CloudGuild · Blog · Cheat sheets · Lessons · Certifications
ELB + Auto Scaling — Elastic Front Door
Distribute traffic across healthy targets and grow/shrink capacity automatically.
What it is
- Elastic Load Balancing spreads traffic across targets in multiple AZs and health-checks them.
- Auto Scaling groups keep the right number of instances and replace unhealthy ones.
Pick the right load balancer
- ALB: HTTP/HTTPS, path/host routing, layer 7. The default for web apps.
- NLB: TCP/UDP, ultra-low latency, static IPs, layer 4.
- GWLB: inline third-party virtual appliances.
Key architectural decisions
- ASG across multiple AZs for resilience.
- Scaling policy: target tracking (keep CPU ~60%) is the clean default; step/scheduled for known patterns.
- Health checks drive both LB routing and ASG replacement.
Gotchas & exam traps
- "Automatically replace failed instances and maintain capacity" => ASG.
- "Route by URL path" => ALB; "static IP / extreme performance" => NLB.
- Statelessness matters — offload session state to ElastiCache/DynamoDB so scaling is safe.
The architect view
ALB plus a multi-AZ Auto Scaling group is the reference pattern for elastic web tiers. If a design pins a fixed number of servers, it is usually the wrong answer.