โšก Onwuachi Control Plane

Route 53 Resilience: Routing Policies and Failover

Overview

Route 53 routing policies control how DNS responds to queries โ€” returning different endpoints based on health, weight, latency, or geography. For resilience, failover and latency routing are the primary exam patterns. Health checks attached to records enable automatic DNS-level traffic shifting without human intervention.

Why It Matters

DNS is the first layer of traffic control in a multi-region architecture. Route 53 routing policies let you shift traffic away from a failed region, distribute load across regions by latency, or run canary deployments at the DNS level โ€” all without touching application code or load balancer config.

Where It Fits

DOP-C02 Domain 3 โ€” Resilient Cloud Solutions

User DNS query | v Route 53 (evaluates routing policy + health checks) | +– Failover: primary healthy? โ†’ primary ALB | primary unhealthy? โ†’ secondary ALB | +– Weighted: 90% โ†’ v1 ALB, 10% โ†’ v2 ALB | +– Latency: user in EU โ†’ eu-west-1 ALB user in US โ†’ us-east-1 ALB


The Big Picture

Routing Policy Use Case Exam Trigger

Simple Single endpoint, no HA Basic DNS only Weighted Canary deploy, A/B test “shift % of traffic” Latency Serve from closest region “lowest latency globally” Failover Active/passive DR “automatic regional failover” Geolocation Route by country/continent “compliance, data residency” Geoproximity Route by distance + bias tuning “fine-grained geographic control” Multivalue Multiple IPs + health checks “simple load distribution with health”


Core Concepts

Failover routing โ€” the primary DR pattern:

Primary record โ””โ”€โ”€ ALB in us-east-1 โ””โ”€โ”€ Health check attached (required)

Secondary record โ””โ”€โ”€ ALB in us-west-2 (or S3 static site) โ””โ”€โ”€ No health check required โ””โ”€โ”€ Only receives traffic when primary fails

Health check must be on the PRIMARY record. Secondary has no health check โ€” it is the fallback.

Health check types:

Exam trap: Route 53 health checks originate from AWS infrastructure โ€” the endpoint must be publicly reachable. Private VPC resources need CloudWatch alarm-based health checks.

TTL and failover speed:

Weighted routing for canary at DNS level:

weight 90 โ†’ ALB v1 (stable) weight 10 โ†’ ALB v2 (new version)

Different from CodeDeploy canary (target group level) โ€” this operates at DNS, affects all traffic before it hits any load balancer.

S3 static site as secondary โ€” cheapest DR pattern for web apps:

Primary: Route 53 โ†’ ALB โ†’ dynamic app (us-east-1) Secondary: Route 53 โ†’ S3 static site (us-west-2)

On primary failure, users see a static maintenance/cached page โ€” zero compute cost for the DR endpoint.


Real-World Example

No live lab โ€” Route 53 health checks bill ~$0.50/month per check. Pattern recognition is the exam skill here, not CLI syntax.

Failover architecture for onwuachi.com equivalent:

onwuachi.com | +– PRIMARY: A record โ†’ us-east-1 ALB | Health check: HTTPS GET /health โ†’ expect 200 | TTL: 60 | +– SECONDARY: A record โ†’ S3 static site (us-west-2) Failover: SECONDARY TTL: 60

If the us-east-1 ALB health check fails two consecutive times โ†’ Route 53 stops returning the primary record โ†’ all new DNS queries resolve to the S3 static site.


Engineering Analogy

Route 53 failover routing is the DNS-layer equivalent of HAProxy’s option httpchk on a backend server โ€” if the health check fails, the backend is taken out of rotation. The difference is Route 53 operates at the DNS level (affects all traffic globally) while HAProxy operates at the proxy level (affects traffic hitting that specific proxy instance).


Best Practices


Common Mistakes


Pro Tip

Route 53 failover does not happen instantly โ€” it requires the health check to fail consecutively (default: 3 times) plus TTL expiry on cached records. Total failover time = (failure threshold ร— check interval) + TTL. Design accordingly.


Key Takeaways


Related Articles


References

System Context

โ† Back to Kb