Set your Publisher ID in src/config/ads.ts to display live ads.
Elastic Load Balancing (ALB) & Auto Scaling
Application Load Balancer (Layer 7), Target Groups, and Dynamic Auto Scaling
High availability and fault tolerance are achieved by pairing an Application Load Balancer (ALB) to distribute inbound HTTP traffic across an Auto Scaling Group (ASG) of EC2 instances.
ALB and ASG High Availability Architecture
Application Load Balancer (ALB): Operates at OSI Layer 7 (HTTP/HTTPS), supporting path-based routing (e.g. /api/* to backend servers, /* to frontend), SSL termination, and health check monitoring.
Auto Scaling Groups (ASG): Automatically adds (scales out) or removes (scales in) EC2 instances based on real-time CPU utilization or incoming request traffic.
Self-Healing: If an EC2 instance fails its ALB health check, the ASG automatically terminates the unhealthy instance and launches a healthy replacement.
Distribute Auto Scaling Groups across at least 2 or 3 Availability Zones to ensure zero downtime even if an entire data center loses power.
Set your Publisher ID in src/config/ads.ts to display live ads.
Test Yourself With Exercise
What happens when an EC2 instance in an Auto Scaling Group repeatedly fails its Application Load Balancer health checks?