Route 53 Health Checks & Failover
Key concepts
Health check types
Calculated health checks
Failover routing policy
Private hosted zones
Health check thresholds
Introduction
Amazon Route 53 health checks monitor the health and performance of your web applications, servers, and other resources. When combined with DNS failover, health checks enable automatic routing of traffic away from unhealthy endpoints to healthy ones. This is fundamental to building highly available architectures on AWS.
Route 53 Health Checks Core Concept
Route 53 health checks can monitor three types of targets: endpoints (HTTP/HTTPS/TCP), other health checks (calculated), and CloudWatch alarms. When associated with DNS records, health checks enable automatic failover to healthy resources when primary endpoints become unavailable.
Types of Health Checks
Endpoint Health Checks
Endpoint health checks directly monitor the health of a resource by sending automated requests.
Endpoint Health Check Configuration
Monitoring Targets:
- IP address (IPv4 or IPv6)
- Domain name (resolves to IP)
- HTTP, HTTPS, or TCP endpoints
Key Parameters:
- Request Interval: 10 seconds (fast) or 30 seconds (standard)
- Failure Threshold: Number of consecutive failures (1-10)
- Health Checker Regions: Choose specific regions or let AWS choose
- Port: TCP port to check (1-65535)
- Path: URL path for HTTP/HTTPS checks (e.g.,
/health) - Search String: Text that must appear in response body (optional)
- Latency Graphs: Enable for performance monitoring
How It Works: Route 53 health checkers in multiple data centers worldwide send requests to your endpoint. If 18% or more of health checkers report the endpoint as healthy, Route 53 considers it healthy.
Endpoint health checks require the target to be publicly accessible from Route 53 health checker IP ranges. For private resources (internal ALB, private EC2), use CloudWatch alarm-based health checks or VPC endpoint monitoring patterns.
Calculated Health Checks
Calculated health checks aggregate the status of multiple child health checks into a single parent health check.
Calculated Health Check Logic
Aggregation Options:
-
AND Logic: Healthy only if ALL child health checks are healthy
- Use for critical dependencies that must all be available
-
OR Logic: Healthy if at least ONE child health check is healthy
- Use for redundant resources where any one being healthy is sufficient
-
Threshold: Healthy if at least N of M child health checks are healthy
- Use for minimum quorum scenarios (e.g., 2 of 3 database replicas)
Inversion: Any health check can be inverted (healthy becomes unhealthy and vice versa)
```json
{
"HealthCheckConfig": {
"Type": "CALCULATED",
"HealthThreshold": 2,
"ChildHealthChecks": [
"health-check-id-1",
"health-check-id-2",
"health-check-id-3"
]
}
}
```CloudWatch Alarm Health Checks
CloudWatch alarm health checks monitor the state of a CloudWatch metric, enabling health checks for private resources or complex conditions.
CloudWatch Alarm Integration
How It Works:
- Create a CloudWatch alarm monitoring a metric (e.g., CPU, error rate, custom metric)
- Create a Route 53 health check that monitors the alarm's data stream
- Health check status reflects the alarm state:
- Alarm state = OK → Health check = Healthy
- Alarm state = ALARM → Health check = Unhealthy
- Alarm state = INSUFFICIENT_DATA → Configurable (healthy or unhealthy)
Limitations:
- Must be in the same AWS account
- Does not support metric math alarms
- Only supports standard-resolution metrics (not high-resolution)
CloudWatch alarm-based health checks are the solution for monitoring private resources (private subnets, internal load balancers) that aren't accessible from Route 53 health checkers. Create a CloudWatch alarm on the resource's metrics and link it to a Route 53 health check.
Comparison of Health Check Types
Health Check Type Comparison
| Feature | Endpoint | Calculated | CloudWatch Alarm |
|---|---|---|---|
| Target | Public IP/domain | Other health checks | CloudWatch metric |
| Protocols | HTTP, HTTPS, TCP | N/A | N/A |
| Private Resources | No | Via child checks | Yes |
| Response Validation | Status code, string | N/A | Alarm threshold |
| Cost | $0.50-$1.00/month | $0.50/month | $0.50/month + alarm |
| Latency Monitoring | Yes | No | Via metric |
| Use Case | Web servers, APIs | Aggregate status | Private endpoints |
DNS Failover Configurations
Active-Passive Failover
The most common failover pattern uses a primary and secondary (standby) resource.
Active-Passive Failover
Configuration:
- Create health check for primary resource
- Create two records with same name, different values:
- Primary: Points to main resource, associated with health check
- Secondary: Points to backup resource (can have health check too)
- Use Failover routing policy
Behavior:
- When primary is healthy → Route 53 returns primary record
- When primary fails → Route 53 automatically returns secondary record
- When primary recovers → Route 53 returns to primary (failback)

Active-Active Failover
Multiple resources actively serve traffic, with unhealthy ones removed from rotation.
Active-Active Failover
Supported Routing Policies:
- Weighted: Distribute traffic by weight; unhealthy endpoints get zero traffic
- Latency: Route to lowest latency endpoint; skip unhealthy ones
- Geolocation: Route by user location; fail to next match if unhealthy
- Multivalue Answer: Return up to 8 healthy IPs per query
Key Difference from Active-Passive:
- All resources actively serve traffic
- No single "standby" resource
- Automatic removal of unhealthy endpoints from DNS responses
Multivalue Answer routing returns up to 8 healthy IP addresses and can be used for simple client-side load balancing. However, it's NOT a replacement for a load balancer - it doesn't provide health check granularity, sticky sessions, or intelligent traffic distribution. Use ELB for true load balancing.
Health Check Configuration Deep Dive
Health Check Parameters
Request Interval:
- Standard (30 seconds): Lower cost, suitable for most workloads
- Fast (10 seconds): Faster detection, 3x the cost, requires more health checker regions
Failure Threshold:
- Number of consecutive failures before marking unhealthy (1-10)
- Lower threshold = faster failover but more false positives
- Recommended: 3 for production workloads
Health Checker Regions:
- Minimum of 3 regions required
- More regions = more accurate health assessment
- Can customize to match your user base geography
String Matching (HTTP/HTTPS):
- Search first 5,120 bytes of response body
- Must appear within 4 seconds of request
- Case-sensitive exact match
- Useful for validating application health, not just server availability
```bash
# Create HTTP health check with string matching
aws route53 create-health-check \
--caller-reference "my-health-check-$(date +%s)" \
--health-check-config '{
"Type": "HTTP",
"IPAddress": "203.0.113.10",
"Port": 80,
"ResourcePath": "/health",
"RequestInterval": 30,
"FailureThreshold": 3,
"MeasureLatency": true,
"EnableSNI": false,
"SearchString": "OK"
}'
# Create HTTPS health check with SNI
aws route53 create-health-check \
--caller-reference "my-https-check-$(date +%s)" \
--health-check-config '{
"Type": "HTTPS",
"FullyQualifiedDomainName": "api.example.com",
"Port": 443,
"ResourcePath": "/api/health",
"RequestInterval": 10,
"FailureThreshold": 2,
"EnableSNI": true
}'
```Complex Failover Architectures
Multi-Region with Latency-Based Routing
Complex Configuration Pattern
Architecture:
┌─────────────────┐
│ Route 53 │
│ Hosted Zone │
└────────┬────────┘
│
┌──────────────────┼──────────────────┐
│ │ │
┌─────────▼─────────┐ ┌─────▼─────┐ ┌─────────▼─────────┐
│ Latency Record │ │ Latency │ │ Latency Record │
│ us-east-1 │ │ Record │ │ eu-west-1 │
│ (Health Check) │ │ ap-south-1│ │ (Health Check) │
└─────────┬─────────┘ └─────┬─────┘ └─────────┬─────────┘
│ │ │
┌─────────▼─────────┐ ┌─────▼─────┐ ┌─────────▼─────────┐
│ ALB │ │ ALB │ │ ALB │
│ (Primary) │ │ │ │ (Primary) │
└───────────────────┘ └───────────┘ └───────────────────┘
Behavior:
- Route 53 routes users to lowest-latency healthy region
- If regional endpoint fails health check, excluded from responses
- Users automatically routed to next-lowest-latency region
Failover with Static Error Page
S3 Static Failover Pattern
A common disaster recovery pattern uses S3 to host a static error page when the primary application is unavailable.
Setup:
- Primary: ALB with health check
- Secondary: S3 bucket configured for static website hosting
- CloudFront distribution with both origins (optional for HTTPS)
Route 53 Configuration:
- Failover routing policy
- Primary alias record → ALB (with health check)
- Secondary alias record → CloudFront/S3 (no health check needed)
Use Case: Graceful degradation when entire application stack is unavailable

Application Recovery Controller (ARC)
AWS Application Recovery Controller
ARC provides a simplified way to manage recovery across AWS Regions and Availability Zones.
Key Components:
- Routing Controls: On/off switches for traffic routing
- Readiness Checks: Verify resources are ready to handle traffic
- Safety Rules: Prevent unsafe configuration changes
Integration with Route 53:
- Routing controls connect to Route 53 health checks
- Update routing control → triggers health check state change → updates DNS
Benefits:
- Single API call to fail over entire application
- Safety rules prevent accidental misconfiguration
- Works with private resources
- No dependency on primary region during failover
Health Check Best Practices
Health Check Best Practices
- Use meaningful health check endpoints: Check application functionality, not just server reachability
- Set appropriate thresholds: Balance between fast failover and false positives
- Monitor health check status: Create CloudWatch alarms for health check state changes
- Test failover regularly: Verify failover works before you need it in production
- Use calculated health checks: Aggregate multiple checks for complex dependencies
- Consider TTL impact: Lower DNS TTL = faster failover propagation (but more DNS queries)
- Place failover resources in different regions: Ensure true isolation from primary
Common Pitfalls
Avoid These Mistakes:
- Health checking a load balancer that's always "healthy" even when backends fail
- Setting failure threshold too low (causes flapping)
- Forgetting to associate health check with DNS record
- Using endpoint health checks for private resources
- Not testing failover before production deployment
CloudWatch Integration
Health Check CloudWatch Metrics
Route 53 publishes health check metrics to CloudWatch for monitoring and alerting.
Available Metrics:
- HealthCheckStatus: 1 (healthy) or 0 (unhealthy)
- HealthCheckPercentageHealthy: Percentage of health checkers reporting healthy
- ConnectionTime: Time to establish TCP connection (ms)
- SSLHandshakeTime: Time for SSL/TLS handshake (ms)
- TimeToFirstByte: Time to first response byte (ms)
Alarm Examples:
# Alert when health check fails
Metric: HealthCheckStatus
Threshold: < 1
Period: 1 minute
Evaluation Periods: 1
Common Exam Scenarios
Health Check Scenarios: Automatic failover to DR → Failover routing + health check | Remove unhealthy from DNS → Weighted/Latency + health checks | Monitor private DB → CloudWatch alarm health check | Failover if 2/3 fail → Calculated health check | Multiple healthy IPs → Multivalue answer | Maintenance page → Failover to S3
A company has a web application running behind an ALB in us-east-1 and wants automatic failover to a static error page hosted in S3 if the application becomes unavailable. What Route 53 configuration should they use?
A solutions architect needs to monitor the health of an internal Application Load Balancer in a private subnet for DNS failover purposes. The ALB is not accessible from the internet. What is the BEST approach?
A company wants to implement DNS-based failover for their multi-region application. Which Route 53 features should they use? (Select TWO)
Summary
Route 53 health checks are essential for building highly available applications on AWS. The three types (endpoint, calculated, CloudWatch alarm) cover different monitoring scenarios:
- Endpoint: Public HTTP/HTTPS/TCP resources
- Calculated: Aggregating multiple health checks
- CloudWatch Alarm: Private resources and complex conditions
Combined with DNS failover routing policies, health checks enable automatic recovery from failures with minimal manual intervention. Understanding these concepts is critical for the SAA-C03 exam.