SkillSprout
Chapter 2 · Lesson 2
Intermediate
6 min read

Route 53 Health Checks and Failover

Overview

Amazon Route 53 is a highly available DNS service. Beyond translating names to addresses it can check the health of endpoints and answer DNS queries differently when something fails, which is how you build DNS-level failover across instances, load balancers or entire Regions.

Think of a switchboard operator who regularly phones each branch office. If the main office stops answering, the operator quietly starts directing callers to the backup office. Callers keep dialling the same number and never notice.

For SysOps you need to know the routing policies, how health checks are evaluated (including for private resources), and why TTL and alias records matter during an outage.

Key Concepts

  • Routing policies: simple, weighted, latency, failover, geolocation, geoproximity, IP-based and multivalue answer.
  • Failover routing uses a primary and secondary record; the primary must have an associated health check (or alias with Evaluate Target Health).
  • Health checks can monitor an endpoint (HTTP/HTTPS/TCP), another health checks (calculated), or a CloudWatch alarm (for private resources).
  • Health checkers are global; they must be allowed through firewalls/security groups (published IP ranges).
  • Alias records point to AWS resources (ALB, CloudFront, S3 website) at no query charge and work at the zone apex.
  • TTL controls caching: low TTL (e.g. 60 s) speeds failover but increases query volume.
  • Private hosted zones are associated with VPCs; Resolver endpoints forward DNS between VPC and on-premises.
  • Route 53 Application Recovery Controller (ARC) provides routing controls and readiness checks for multi-Region failover.

Detailed Notes

Routing policy cheat sheet

PolicyUse
SimpleOne resource; multiple values returned randomly
WeightedBlue/green and canary traffic splits (weight 0 stops traffic)
LatencySend users to the lowest-latency Region
FailoverActive-passive disaster recovery
GeolocationContent/legal restrictions by country or continent
GeoproximityBias traffic by distance with adjustable bias
MultivalueUp to 8 healthy records returned (client-side balance)
IP-basedRoute by client CIDR (e.g. ISP)

Active-passive failover with health check

bash
aws route53 create-health-check --caller-reference web-$(date +%s) --health-check-config '{
  "Type":"HTTPS","FullyQualifiedDomainName":"primary.example.com",
  "ResourcePath":"/health","RequestInterval":30,"FailureThreshold":3}'
json
{
  "Changes": [
    { "Action": "UPSERT", "ResourceRecordSet": {
        "Name": "app.example.com", "Type": "A", "SetIdentifier": "primary",
        "Failover": "PRIMARY", "TTL": 60,
        "ResourceRecords": [{ "Value": "203.0.113.10" }],
        "HealthCheckId": "11111111-2222-3333-4444-555555555555" } },
    { "Action": "UPSERT", "ResourceRecordSet": {
        "Name": "app.example.com", "Type": "A", "SetIdentifier": "secondary",
        "Failover": "SECONDARY", "TTL": 60,
        "ResourceRecords": [{ "Value": "198.51.100.20" }] } }
  ]
}

Health check types

TypeMonitorsNotes
EndpointPublic IP/domain over HTTP, HTTPS, TCP; optional string matchStandard or fast (10 s) interval
CalculatedOther health checks with AND/OR/thresholdParent for complex apps
CloudWatch alarmAn alarm stateUse for private endpoints and RDS/Lambda metrics

A health check endpoint is healthy if >18% of checkers report healthy. Route 53 health checkers cannot reach private IPs, so create a CloudWatch alarm based health check for resources inside a VPC.

Alias with Evaluate Target Health

An alias to an ALB with Evaluate Target Health = Yes treats the record as unhealthy when the ALB has no healthy targets, enabling failover without a separate health check resource.

Troubleshooting DNS

SymptomLikely cause
Failover did not happenNo health check on primary, health check blocked by SG/firewall, or high TTL cached by resolvers
Domain doesn't resolve internallyPrivate hosted zone not associated with VPC; enableDnsSupport/enableDnsHostnames off
New record not visibleNegative caching / old TTL
Apex (example.com) cannot be CNAMEUse alias record
bash
dig +short app.example.com
aws route53 test-dns-answer --hosted-zone-id Z123 --record-name app.example.com --record-type A

Hybrid DNS

Route 53 Resolver inbound endpoints let on-premises resolve AWS private names; outbound endpoints with forwarding rules let VPCs resolve corporate domains. Both use ENIs in your subnets (at least two AZs recommended).### Routing policies and health check types

PolicyBehaviourTypical use
SimpleOne record, may return multiple valuesSingle resource
WeightedSplits traffic by weightCanary, migrations
LatencyLowest-latency RegionMulti-Region apps
FailoverPrimary/secondary based on healthActive-passive DR
Geolocation / GeoproximityBy user location / with biasCompliance, regional content
Multivalue answerUp to 8 healthy recordsSimple client-side balancing

Health checks come in three kinds: endpoint (HTTP/HTTPS/TCP probes from global checkers), calculated (combine child checks with AND/OR) and CloudWatch alarm based (for private resources, since checkers cannot reach private IPs). Alias records to ALB/CloudFront/S3 can use Evaluate Target Health; alias queries to AWS resources are free.

bash
aws route53 create-health-check --caller-reference hc-2025-01 --health-check-config \
  Type=HTTPS,FullyQualifiedDomainName=api.example.com,Port=443,ResourcePath=/health,RequestInterval=30,FailureThreshold=3

Keep TTLs low (60 seconds or less) on failover records, and remember DNS caching means clients may take longer than the TTL. If checks fail unexpectedly, allow the Route 53 health checker IP ranges through security groups and NACLs.

Real World Example

Scenario – regional failover for an API. A company runs its API in us-east-1 with a warm standby in eu-west-1. Route 53 failover records point to regional ALBs, each alias set to evaluate target health, with 60-second TTLs. A CloudWatch alarm-based health check monitors an RDS replica lag metric for the primary.

When the primary ALB loses all healthy targets, Route 53 starts answering with the secondary alias within about a minute, and an EventBridge rule on the health check alarm notifies the team to promote the replica database.

Architecture Diagram

DNS failover between Regions
Architecture
AWS Cloud
Users
Route 53failover records
Primary Region
ALB
Web fleet
Secondary Region
ALB
Standby fleet
  1. 1Users query Route 53 for the application name.
  2. 2Health checks continuously evaluate the primary endpoint.
  3. 3While healthy, Route 53 returns the primary alias.
  4. 4When checks fail, Route 53 returns the secondary record and traffic moves after TTL expiry.

Best Practices

  • ✓Attach health checks to every primary/weighted record that must fail over, and test failover regularly.
  • ✓Use low TTL (30-60 s) on failover records; use alias records to AWS resources.
  • ✓Use CloudWatch-alarm health checks for private resources.
  • ✓Allow Route 53 health-checker IP ranges in security groups and firewalls.
  • ✓For multi-Region control planes use ARC routing controls rather than editing DNS during an incident.

Common Interview Questions

Exam Tips

SOA-C03 focus

  • Active-passive DNS DR -> failover routing + health check.
  • Health check for a private resource -> CloudWatch alarm health check.
  • Apex domain to ALB/CloudFront -> alias record (no CNAME).
  • Gradual migration/canary -> weighted routing; best performance across Regions -> latency routing.

Finished this lesson?

0 of 46 lessons done · 0% of the course