What is AWS Route 53 and how do you implement DNS failover?
Amazon Route 53 is a scalable and highly available DNS web service that routes end users to internet applications and supports domain registration.
Key Features
DNS Resolution
Route 53 translates domain names (example.com) into IP addresses. It supports all standard DNS record types: A, AAAA, CNAME, MX, TXT, NS, SOA, and Route 53-specific alias records.
Routing Policies
- Simple: Route traffic to a single resource
- Weighted: Split traffic by percentage between resources (A/B testing, gradual rollouts)
- Latency: Route to the region with lowest network latency
- Geolocation: Route based on user’s geographic location
- Geoproximity: Route based on geographic location with configurable bias
- Failover: Active-passive failover routing
- Multivalue Answer: Responds with up to 8 healthy records
Implementing DNS Failover
Active-Passive Failover Setup
- Create Health Checks
- Configure health checks for your primary endpoint (HTTP/HTTPS/TCP)
- Set evaluation period, failure threshold, and interval
- Create Primary Record
Type: A
Routing Policy: Failover
Failover Type: Primary
Health Check: my-primary-health-check
TTL: 60- Create Secondary Record
Type: A
Routing Policy: Failover
Failover Type: Secondary
Value: [backup IP or S3 static site]
TTL: 60- Failover Behavior
- If primary health check fails, Route 53 routes to secondary
- When primary recovers, traffic automatically returns
Active-Active Failover
Use Weighted routing with health checks:
- Both endpoints active with equal weight (50/50)
- Route 53 automatically removes unhealthy endpoints
- Traffic redistributes to healthy endpoints
Multi-Region Failover Pattern
Route 53 (Latency routing)
├── us-east-1 ALB (Primary)
│ └── Auto Scaling Group
└── eu-west-1 ALB (Failover)
└── Auto Scaling GroupHealth Check Types
- Endpoint health checks: HTTP/HTTPS/TCP checks on IP or domain
- Calculated health checks: Combine results of multiple health checks
- CloudWatch alarm health checks: Based on CloudWatch alarm state