AWS High Availability & Auto Scaling: ELB, ASG & Route 53
Build highly available AWS architectures with Elastic Load Balancing, Auto Scaling Groups, and Route 53. Design systems that survive failures automatically. SAA-C03 guide.

A highly available system is one that keeps working even when individual components fail. In AWS, high availability is not an accident — it is a deliberate combination of load balancers distributing traffic, Auto Scaling Groups replacing failed instances, and Route 53 routing users to healthy endpoints.
This lesson covers the three pillars of AWS high availability architecture.
Elastic Load Balancing (ELB)
A load balancer distributes incoming traffic across multiple targets (EC2 instances, containers, Lambda functions, IP addresses) in one or more Availability Zones. If a target fails its health check, the load balancer stops sending it traffic.
| Load Balancer | OSI Layer | Protocol | Best For |
|---|---|---|---|
| Application Load Balancer (ALB) | Layer 7 | HTTP/HTTPS/WebSocket | Web apps, microservices, content-based routing |
| Network Load Balancer (NLB) | Layer 4 | TCP/UDP/TLS | High performance, static IPs, non-HTTP workloads |
| Gateway Load Balancer (GWLB) | Layer 3 | IP | Third-party virtual appliances (firewalls, IDS) |
| Classic Load Balancer | Layer 4/7 | HTTP/HTTPS/TCP | Legacy (avoid for new workloads) |
Application Load Balancer (ALB)
The ALB operates at Layer 7 — it understands HTTP. This enables content-based routing:
ALB: api.example.com
Rule 1: /api/users/* → Target Group: users-service
Rule 2: /api/orders/* → Target Group: orders-service
Rule 3: /static/* → Target Group: s3-bucket (or EC2)
Default: → Target Group: web-frontendALB routing rules can match on path (/api/*, /images/*), host header (api.example.com vs app.example.com), HTTP headers, query strings, and source IP.
Target Groups contain registered targets (instances, IPs, Lambda functions) and perform health checks. ALBs support sticky sessions (session affinity) — the same client is always routed to the same target using a cookie.
Network Load Balancer (NLB)
The NLB operates at Layer 4 — it forwards TCP/UDP packets without inspecting HTTP content. It handles millions of requests per second with ultra-low latency (~100μs), has a static IP address per AZ (useful for whitelisting), preserves the client's source IP address, and supports TLS termination.
Use the NLB for game servers, financial trading systems, IoT devices, or any TCP/UDP workload that ALB cannot handle.
Auto Scaling Groups (ASG)
An Auto Scaling Group maintains a fleet of EC2 instances. It automatically launches new instances when demand increases and terminates instances when demand drops — keeping you within the desired capacity range.
ASG Configuration
Auto Scaling Group: web-asg
Launch Template: web-lt (AMI, instance type, security group, user data)
Min capacity: 2 ← always at least 2 instances running
Desired capacity: 4 ← current target
Max capacity: 10 ← never exceed 10 instances
VPC subnets: us-east-1a, us-east-1b, us-east-1c
Attached to: ALB target group web-tgThe ASG distributes instances across the specified subnets — ensuring your fleet spans multiple AZs automatically.
Scaling Policies
Target Tracking: Maintain a specific metric at a target value — the simplest and most recommended approach. For example: keep average CPU at 50% and the ASG automatically adds/removes instances to maintain that target.
Step Scaling: Add/remove a specific number of instances based on how far a metric breaches an alarm threshold.
Scheduled Scaling: Scale at known times — for predictable traffic patterns. For example: every weekday at 08:00 set desired capacity to 10, every weekday at 20:00 set desired capacity to 2.
Predictive Scaling: Uses machine learning to forecast load based on historical patterns and scales proactively before demand arrives.
Scaling Cooldown
After a scaling activity, the ASG waits for a cooldown period (default: 300 seconds) before launching or terminating additional instances. This prevents thrashing — launching and immediately terminating instances if a metric fluctuates around the threshold.
Instance Refresh
Instance Refresh replaces all instances in the ASG rolling — useful for deploying a new AMI without downtime.
aws autoscaling start-instance-refresh \
--auto-scaling-group-name web-asg \
--preferences MinHealthyPercentage=90AWS Route 53
Route 53 is AWS's scalable, highly available DNS service. It translates domain names to IP addresses and routes users to healthy endpoints.
Record Types
| Record | Purpose |
|---|---|
| A | Domain → IPv4 address |
| AAAA | Domain → IPv6 address |
| CNAME | Domain → another domain |
| Alias | AWS-specific — domain → AWS resource (ALB, CloudFront, S3 website) |
| MX | Mail server record |
| TXT | Text records, domain verification |
Alias records resolve to an AWS resource and are free of charge for queries. Unlike CNAME, Alias records can be created at the zone apex (root domain, e.g., example.com).
Routing Policies
| Policy | Behaviour | Use Case |
|---|---|---|
| Simple | Returns one or more values | Single resource, no health checks |
| Weighted | Distributes traffic by percentage | A/B testing, blue/green deployments |
| Latency-based | Routes to region with lowest latency | Global applications |
| Failover | Active-passive failover to secondary | Disaster recovery |
| Geolocation | Routes based on user's geographic location | Content localisation, compliance |
| Multi-Value Answer | Returns up to 8 healthy records | Simple load balancing with health checks |
Route 53 Health Checks
Route 53 health checks monitor the health of your endpoints and integrate with routing policies to remove unhealthy endpoints from DNS responses automatically.
High Availability Architecture Patterns
Multi-AZ Web Application (Classic Three-Tier)
Internet
↓
Route 53 (DNS + health checks)
↓
Application Load Balancer (multi-AZ)
↓
Auto Scaling Group — EC2 instances across 3 AZs
↓
RDS Multi-AZ (primary in 1a, standby in 1b)
+ ElastiCache Redis clusterThis architecture survives the failure of any single AZ — the ALB routes to instances in other AZs, the ASG launches replacement instances in healthy AZs, and RDS fails over to the standby automatically.
RTO and RPO
| Metric | Definition | Example |
|---|---|---|
| RTO (Recovery Time Objective) | Maximum acceptable downtime | Minutes (Multi-AZ) to hours (cross-region) |
| RPO (Recovery Point Objective) | Maximum acceptable data loss | Seconds (synchronous replication) to hours (daily backups) |
Multi-AZ RDS: RTO ~2 minutes, RPO ~0 (synchronous replication, no data loss).
Previous: Lesson 7 — AWS Databases | Next: Lesson 9 — Solutions Architect Patterns
Part of the AWS Cloud Fundamentals course.
External references:
