4 · High Availability & Fault Tolerance — Revise
Resilient · 26% · Compressed recall. Read the
Learn guide first.
Key facts
| Fact |
Value |
| Default resilient web tier |
ALB → ASG across ≥ 2 AZs |
| Multi-AZ |
Protects vs AZ failure (HA default) |
| Multi-Region |
Protects vs Region failure (DR — Topic 6) |
| ASG self-healing |
Replaces instances failing health checks |
| ASG default health check |
EC2 only → set to ELB behind a load balancer |
| Simplest scaling policy |
Target tracking (e.g. CPU 50%) |
| Cross-zone LB |
ALB: on + free; NLB: off by default (may add inter-AZ cost) |
ELB types
| LB |
Layer |
Pick when |
| ALB |
7 |
HTTP/HTTPS, path/host routing, Lambda/container targets, WAF |
| NLB |
4 |
Static/Elastic IP, millions rps, ultra-low latency, TCP/UDP |
| GLB |
3 |
Inline 3rd-party appliances (firewall/IDS/IPS) |
| CLB |
legacy |
Avoid |
Scaling policies
| Policy |
Use |
| Target tracking |
Keep a metric at a value (default choice) |
| Step / Simple |
Adjust by alarm magnitude |
| Scheduled |
Known time-based patterns |
| Predictive |
ML forecasts load, scales ahead |
Decision cues
Survive AZ failure + auto-scale? → ASG across ≥2 AZs behind ALB
HTTP path/host routing / Lambda? → ALB
Static IP / raw TCP-UDP / extreme? → NLB
Inline firewall appliance? → GLB
App crashes not being replaced? → ASG health check type = ELB
Predictable daily spike? → Scheduled scaling (+ target tracking)
Users randomly logged out behind LB? → Sticky sessions (better: externalize session)
Flashcards
What's the standard resilient web-tier architecture?
An Application Load Balancer in front of an Auto Scaling group spanning at least two Availability Zones.
ASG behind an ALB doesn't replace app-crashed instances. Why?
Default ASG health check is EC2 status only (OS running). Set health check type to ELB so it acts on the ALB's health checks.
Need a static IP and Layer-4 performance from a load balancer?
Network Load Balancer (static/Elastic IP per AZ, millions rps, ultra-low latency).
Cross-zone load balancing defaults?
ALB: enabled and free. NLB: disabled by default; enabling can add inter-AZ data transfer cost.
Which scaling policy for a predictable weekday 8am spike?
Scheduled scaling to pre-warm capacity, plus target tracking for the rest.
Does an Auto Scaling group provide HA on its own?
Only if it spans multiple AZs. In one AZ it's still a single point of failure.
Which LB routes by URL path or hostname, and can target Lambda?
Application Load Balancer (Layer 7).
Common traps
- ALB + ASG across ≥ 2 AZs is the resilient default; one AZ = SPOF.
- ASG health check defaults to EC2 → use ELB behind a load balancer.
- NLB = static IP / L4 / extreme perf; ALB = HTTP routing / Lambda targets.
- Cross-zone: ALB on+free, NLB off by default.
- Target tracking first; scheduled/predictive only for time-based/forecastable load.
- LB and ASG are Regional (multi-AZ), not multi-Region.