Medium java spring

How do you run Spring Boot highly available on AWS across multiple AZs?

The 30 second answer

I run at least two instances spread across availability zones behind an Application Load Balancer, which health-checks targets and only routes to healthy ones. The database uses RDS Multi-AZ, so a standby in another zone takes over on failure. The app stays stateless, with sessions in Redis or in tokens, so any instance can serve any request and recovery is automatic.

Run at least two instances or tasks spread across AZs behind an Application Load Balancer. The ALB health-checks targets and only routes to healthy ones. Use RDS Multi-AZ, where a standby in another AZ takes over on failure. Keep the app stateless, with sessions in Redis or tokens, so any instance can serve any request. The Well-Architected reliability pillar covers the principles: automatic recovery, horizontal scaling, testing recovery. Follow-up: What does the app see during an RDS failover? (A short connection drop; the pool must reconnect, and retries must be safe.)

Sources (3)
  1. AWS Well-Architected: Reliability pillar
  2. What is an Application Load Balancer?
  3. RDS Multi-AZ deployments