Skip to main content

MODULE 10 - DNS and Failover Routing

Overview​

This module covers Amazon Route 53, AWS's DNS service. You will learn DNS concepts and how to configure failover routing for resilience.

Learning Objectives​

  • Understand fundamental DNS concepts
  • Explain DNS record types
  • Configure TTL and understand propagation
  • Implement failover routing
  • Design resilience scenarios

Week Content​

1. DNS - Basic Concepts​

┌─────────────────────────────────────────────────────────────┐
│ DNS - Domain Name System │
├─────────────────────────────────────────────────────────────┤
│ │
│ "The Internet's phone book" │
│ │
│ www.example.com ──► DNS ──► 52.1.2.3 │
│ (human name) (IP address) │
│ │
│ DNS Hierarchy: │
│ │
│ . (root) │
│ │ │
│ ┌─────┼─────┐ │
│ │ │ │ │
│ .com .org .ca │
│ │ │
│ example.com (your domain) │
│ │ │
│ www.example.com (record) │
│ │
└─────────────────────────────────────────────────────────────┘

2. DNS Record Types​

TypeUsageExample
AName → IPv4www → 52.1.2.3
AAAAName → IPv6www → 2001:db8::1
CNAMEAlias to another nameapp → alb.amazonaws.com
MXMail serversmail.example.com
TXTText (verification, SPF)"v=spf1..."
NSName serversns-xxx.awsdns-xx.com
AliasAWS only, apex OKexample.com → ALB

3. TTL (Time To Live)​

┌─────────────────────────────────────────────────────────────┐
│ TTL │
├─────────────────────────────────────────────────────────────┤
│ │
│ TTL = Record caching duration │
│ │
│ Short TTL (60s) Long TTL (86400s) │
│ ───────────── ────────────── │
│ • Rapid changes • Fewer DNS requests │
│ • More DNS requests • Slow changes │
│ • Fast failover • Slow failover │
│ • More costly • Less costly │
│ │
│ Recommendations: │
│ • Stable production: 300-3600 seconds │
│ • Before migration: reduce to 60s (wait for current TTL) │
│ • Failover: 60s or less │
│ │
└─────────────────────────────────────────────────────────────┘

4. Route 53 Routing Policies​

PolicyDescriptionUse Case
SimpleSingle resourceSimple site
WeightedWeight-based distributionA/B testing, migration
LatencyClosest geographicallyGlobal performance
FailoverPrimary/SecondaryHigh availability
GeolocationBy country/continentLocalized content
MultivalueMultiple IPs with health checkBasic HA

5. Failover Routing​

┌─────────────────────────────────────────────────────────────┐
│ FAILOVER ROUTING │
├─────────────────────────────────────────────────────────────┤
│ │
│ Route 53 Health Check │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ www.example.com │ │
│ │ │ │ │
│ │ ├── PRIMARY (if healthy) │ │
│ │ │ └── ALB Region A (us-east-1) │ │
│ │ │ │ │
│ │ └── SECONDARY (if primary unhealthy) │ │
│ │ └── ALB Region B (eu-west-1) │ │
│ │ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ Scenario: │
│ 1. User → www.example.com │
│ 2. Route 53 checks primary health check │
│ 3. If OK → returns primary IP │
│ 4. If KO → returns secondary IP │
│ │
└─────────────────────────────────────────────────────────────┘

Incident Scenario​

Exercise: Failover Plan​

Context:
- Production site on us-east-1
- DR site on eu-west-1
- Need: automatic failover in case of failure

Questions:
1. What type of health check to configure?
2. What TTL to choose and why?
3. How long for complete failover?
4. What are the limitations of this approach?

Deliverable​

Mini Failover Report:

  • Failover architecture diagram
  • Proposed DNS configuration
  • Estimated failover time
  • Identified limitations and risks
  1. DNS Concepts and Route 53
  2. Routing Policies
  3. Validation Quiz - 30 questions to validate your knowledge
  4. Lab: DNS Failover

Next week: MODULE 11 - AWS Lambda