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
| Type | Usage | Example |
|---|---|---|
| A | Name → IPv4 | www → 52.1.2.3 |
| AAAA | Name → IPv6 | www → 2001:db8::1 |
| CNAME | Alias to another name | app → alb.amazonaws.com |
| MX | Mail servers | mail.example.com |
| TXT | Text (verification, SPF) | "v=spf1..." |
| NS | Name servers | ns-xxx.awsdns-xx.com |
| Alias | AWS only, apex OK | example.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
| Policy | Description | Use Case |
|---|---|---|
| Simple | Single resource | Simple site |
| Weighted | Weight-based distribution | A/B testing, migration |
| Latency | Closest geographically | Global performance |
| Failover | Primary/Secondary | High availability |
| Geolocation | By country/continent | Localized content |
| Multivalue | Multiple IPs with health check | Basic 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
Navigation
- DNS Concepts and Route 53
- Routing Policies
- Validation Quiz - 30 questions to validate your knowledge
- Lab: DNS Failover
Next week: MODULE 11 - AWS Lambda