Route 53 High-Availability & Traffic Management Study Guide
High-availability features in Route 53 (for example, DNS load balancing using health checks with latency and weighted record sets)
Route 53 High-Availability & Traffic Management
This guide explores how Amazon Route 53 provides high availability (HA) and performance optimization through advanced DNS routing policies, health checks, and global traffic management. These features are critical for the AWS Certified Advanced Networking Specialty (ANS-C01) exam.
Learning Objectives
After studying this guide, you should be able to:
- Differentiate between various Route 53 routing policies (Weighted, Latency, Failover).
- Configure health checks to monitor endpoint availability and automate DNS failover.
- Explain how weighted record sets facilitate blue/green deployments and canary testing.
- Analyze the impact of TTL (Time to Live) on high-availability and failover responsiveness.
- Design a multi-region architecture using latency-based routing for performance.
Key Terms & Glossary
- DNS Health Check: A mechanism where Route 53 periodically sends requests (HTTP, HTTPS, or TCP) to an endpoint to verify its status.
- Weighted Record Set: A DNS record that allows you to assign a relative weight to multiple resources for the same domain name.
- Latency-Based Routing (LBR): A policy that routes users to the AWS region that provides the lowest network latency.
- DNS Failover: The process of automatically updating DNS responses to point to a healthy resource when the primary resource fails a health check.
- Active-Active Configuration: A setup where multiple resources are all serving traffic simultaneously.
- Active-Passive Configuration: A setup where one resource is primary and others act as standby/backup.
The "Big Idea"
[!IMPORTANT] The core philosophy of Route 53 High Availability is decoupling availability from infrastructure. By moving the decision-making logic to the DNS layer, you can route around failed regions or data centers before a user even establishes a connection to your server.
Formula / Concept Box
Traffic Distribution Calculation
For weighted record sets, the probability () is calculated as:
| Feature | Primary Goal | Use Case |
|---|---|---|
| Health Checks | Detection | Monitoring endpoint heartbeats |
| Weighted | Distribution | Canary testing, software migration |
| Latency | Performance | Reducing round-trip time (RTT) for users |
| Failover | Resilience | Disaster recovery (Active-Passive) |
Hierarchical Outline
- Route 53 Health Checks
- Types: HTTP, HTTPS, TCP, SSL.
- Logic: Healthy vs. Unhealthy thresholds (default 3).
- Inversion: "Invert health check status" for monitoring maintenance windows.
- DNS Load Balancing Policies
- Weighted Routing: Assign weights (0-255); 0 stops traffic to a resource.
- Latency-Based Routing: Uses latency measurements collected by AWS over time.
- Failover Routing: Utilizes a Primary and Secondary record.
- Global Traffic Management (Traffic Flow)
- Visual policy editor for complex nesting (e.g., Latency + Failover).
- Version control for DNS routing policies.
Visual Anchors
DNS Failover Logic
Latency-Based Regional Selection
Definition-Example Pairs
- Canary Testing: Deploying a new version of software to a small percentage of users.
- Example: Setting a weight of 255 for the "Old" stack and 5 for the "New" stack to test stability with ~2% of traffic.
- Regional Failover: Switching traffic between entire AWS regions.
- Example: A primary ALB in
us-east-1fails a health check; Route 53 automatically updates the record to point to an ALB ineu-central-1.
- Example: A primary ALB in
Worked Examples
Scenario: Blue/Green Deployment with 10% Canary
Problem: You have a Production environment (Blue) and a New environment (Green). You want to route 10% of traffic to Green to verify it works.
Step-by-Step Solution:
- Create Record A: Name:
app.example.com, Type:A, Alias:Yes(to Blue ELB). - Assign Weight: Set weight to
90. - Set SetID:
Blue-Production. - Create Record B: Name:
app.example.com, Type:A, Alias:Yes(to Green ELB). - Assign Weight: Set weight to
10. - Set SetID:
Green-Canary. - Result: Total weight = 100. Record B gets $10/100$ (10%) of requests.
Checkpoint Questions
- What happens if all resources in a weighted record set have their weight set to 0?
- True or False: Route 53 Health Checks can monitor resources residing outside of AWS.
- Why is a short TTL (e.g., 60 seconds) recommended for records using DNS Failover?
▶Click to see answers
- Route 53 treats all records as if they have equal weight and routes traffic to all of them.
- True. You can specify health checks for any publicly accessible IP address or domain name.
- To ensure that recursive resolvers and clients expire the old (unhealthy) IP address quickly and query Route 53 for the new (healthy) one.
Muddy Points & Cross-Refs
- TTL vs. Health Check Interval: Students often confuse these. Health Check Interval is how fast AWS detects a failure; TTL is how fast the rest of the internet "forgets" the old IP.
- Alias vs. CNAME: Alias records are free and can point to the zone apex (
example.com); CNAMEs cannot. Always prefer Alias for AWS resources. - Latency vs. Geolocation: Latency is about speed; Geolocation is about legal/language requirements. You might have lower latency to a region in another country, but Geolocation keeps you in-region for data sovereignty.
Comparison Tables
| Feature | Weighted Routing | Latency Routing | Failover Routing |
|---|---|---|---|
| Primary Metric | Manual Weight (0-255) | AWS Network Latency | Health Check Status |
| Best For | Testing/Gradual Migration | Global Performance | High Availability / DR |
| Configuration | Active-Active | Active-Active | Active-Passive |
| Automation | Manual or API-driven | Fully Automatic | Automatic via Health Check |