🧩Route-53

What is AWS Route 53?
AWS Route 53 is a scalable and highly available Domain Name System (DNS) web service. It performs three major functions:
Domain registration
DNS routing
Health checking
📦 Core Components of Route 53
| Component | Description |
| Hosted Zone | Container for records for a domain |
| Record Sets | Mapping from domain names to resources (e.g., A, CNAME, MX, etc.) |
| Health Checks | Monitor health of resources like web servers |
| Routing Policies | Define how Route 53 responds to DNS queries (Simple, Weighted, Failover, etc.) |
| Domain Registration | Register domain names directly through Route 53 |
🧰 Use Cases
| Use Case | Example |
| Website Hosting | Route traffic to S3 static website, EC2, or ELB |
| Load Balancing | Distribute traffic using weighted routing to multiple regions |
| Failover Setup | Automatically switch to backup site if primary fails (Failover Routing) |
| Latency-Based Routing | Route users to closest AWS region for low latency |
| Multi-region High Availability Setup | Combine latency + failover routing across regions |
| Hybrid DNS Resolution | Resolve DNS between AWS and on-premises (using Route 53 Resolver) |
🏗️ Architecture Diagram (Overview)
sqlCopyEditUser Request
|
v
Route 53
|
+-- Public Hosted Zone
| +-- A Record --> Application Load Balancer (EC2, EKS, etc.)
|
+-- Private Hosted Zone
+-- Internal Services (e.g., *.internal.example.com)
⚙️ Workflow
Scenario: Deploying a Web App Using EC2 Behind ALB
Domain Registration (Optional):
- Buy domain from Route 53 or transfer an existing one.
Create a Hosted Zone:
- Public hosted zone for
myapp.com.
- Public hosted zone for
Add DNS Records:
ARecord → Alias to Application Load BalancerCNAME→ Used for subdomains likewww.myapp.com
Attach Routing Policy:
Simple → For single target
Weighted → For blue-green deployments
Failover → For active-passive failover setup
Latency → For performance optimization
Health Check (Optional):
Monitor backend EC2 or endpoint
Route 53 will remove unhealthy resources from DNS response
🪜 Step-by-Step Setup (Example)
🎯 Objective: Route domain myapp.com to an Application Load Balancer
✅ Prerequisites:
An EC2-based application behind an Application Load Balancer
A registered domain name (e.g., from Route 53 or GoDaddy)
IAM permissions to manage Route 53
🔧 Steps:
1. Create Hosted Zone
Go to Route 53 → Hosted Zones
Click Create Hosted Zone
Choose type: Public Hosted Zone
Enter domain name:
myapp.com
2. Get NS Records
Copy the Name Server (NS) records generated
If domain is external, update nameservers at your registrar
3. Create A Record (Alias to ALB)
In your hosted zone, create a new record:
Type: A – IPv4 address
Alias: Yes
Alias Target: Choose your ALB
Routing Policy: Simple / Weighted / Latency, etc.
TTL: 60 seconds (default)
4. Optional: Create CNAME Record
5. Health Check (Optional)
Create health check to monitor EC2 or endpoint.
Attach health check to record for failover setup.
🚦 Routing Policy Examples
| Type | Use Case | Example Setup |
| Simple | Single endpoint | A → ALB/EC2 |
| Weighted | Gradual traffic shifting or A/B testing | 80% traffic to us-east-1, 20% to us-west-2 |
| Failover | High availability with active-passive setup | Primary = us-east-1, Secondary = us-west-2 |
| Latency | Route to region with lowest latency | Users in India go to ap-south-1, US to us-east-1 |
| Geolocation | Route based on user’s geographic location | Users in UK → EU servers, US → US servers |
| Multivalue | Return multiple healthy endpoints (basic load balancing) | 3 healthy IPs for the same record |
🏛️ Architecture Example: Multi-region Failover
lessCopyEdit[Client]
|
v
[Route 53]
|
+-- Health check: us-east-1 ALB
| |
| v
| [App in us-east-1]
|
+-- (Failover if unhealthy)
|
v
[App in us-west-2]
⚠️ Best Practices
Use alias records instead of hardcoding IPs for AWS resources.
Use private hosted zones for internal services within a VPC.
Set up health checks + failover for high availability.
Use latency or geolocation routing for global apps.
Monitor DNS TTL and propagation delays when updating records.
🧪 Real-Time Use Case (Blue-Green Deployment)
Deploy v1 of your app to
blue.myapp.com(ALB1)Deploy v2 to
green.myapp.com(ALB2)Weighted routing:
Blue = 90%, Green = 10%
Gradually shift traffic
Monitor health check
Update
myapp.comalias to point fully to green when stable
About the author
- Cloud & DevOps Engineer | AWS Solutions Architect | Terraform Associate | Love to work with #AWS #Terraform #Docker #Kubernetes #Jenkins #GitHub #Linux
Comments
Join the discussionNo comments yet. Be the first to comment.


