📖 Scenario: You are managing a website that needs to direct visitors to different servers based on simple, weighted, and latency routing policies. This helps improve user experience by controlling traffic flow and reducing delays.
🎯 Goal: Build a Route 53 hosted zone with three DNS records demonstrating simple, weighted, and latency routing policies.
📋 What You'll Learn
Create a hosted zone named example.com
Add a simple routing record for www.example.com pointing to 192.0.2.1
Add a weighted routing record for app.example.com with two IP addresses and weights
Add a latency routing record for api.example.com with two regions
💡 Why This Matters
🌍 Real World
Routing policies help direct internet traffic efficiently to improve website speed and availability.
💼 Career
Understanding DNS routing policies is essential for cloud engineers and network administrators managing scalable web applications.
Progress0 / 4 steps
1
Create the hosted zone
Create a Route 53 hosted zone named example.com using the AWS CLI command aws route53 create-hosted-zone with the name example.com.
AWS
Hint
Use the aws route53 create-hosted-zone command with the --name option set to example.com.
2
Add a simple routing record
Add a simple routing record for www.example.com pointing to IP address 192.0.2.1 in the hosted zone example.com. Use the AWS CLI command aws route53 change-resource-record-sets with a JSON file named simple-record.json containing the record details.
AWS
Hint
Create a JSON file with the record set for www.example.com using simple routing and then apply it with aws route53 change-resource-record-sets.
3
Add a weighted routing record
Add a weighted routing record for app.example.com with two IP addresses: 192.0.2.10 with weight 70 and 192.0.2.20 with weight 30. Use a JSON file named weighted-record.json and the AWS CLI command aws route53 change-resource-record-sets.
AWS
Hint
Use SetIdentifier and Weight fields in the JSON to create weighted routing records.
4
Add a latency routing record
Add a latency routing record for api.example.com with two records: one in us-east-1 region pointing to 192.0.2.100 and one in eu-west-1 region pointing to 192.0.2.200. Use a JSON file named latency-record.json and the AWS CLI command aws route53 change-resource-record-sets.
AWS
Hint
Use the Region and SetIdentifier fields in the JSON to create latency routing records.
Practice
(1/5)
1. What does a simple routing policy do in AWS Route 53?
easy
A. Sends all traffic to a single resource
B. Splits traffic based on weights
C. Routes traffic based on lowest latency
D. Routes traffic randomly among resources
Solution
Step 1: Understand simple routing purpose
Simple routing sends all user requests to one resource without splitting or conditions.
Step 2: Compare with other routing types
Weighted routing splits traffic, latency routing chooses fastest server, so they differ from simple routing.
Final Answer:
Sends all traffic to a single resource -> Option A
Quick Check:
Simple routing = single destination [OK]
Hint: Simple routing means one destination for all traffic [OK]
Common Mistakes:
Confusing simple routing with weighted routing
Thinking simple routing balances traffic
Assuming simple routing uses latency
2. Which of the following is the correct way to configure a weighted routing policy in AWS Route 53?
easy
A. Assign weights to each record to split traffic
B. Set a single IP address for all traffic
C. Use latency measurements to route traffic
D. Randomly assign traffic without weights
Solution
Step 1: Identify weighted routing configuration
Weighted routing requires assigning numeric weights to DNS records to control traffic distribution.
Step 2: Eliminate incorrect options
Single IP is simple routing, latency routing uses latency, random without weights is invalid.
Final Answer:
Assign weights to each record to split traffic -> Option A
Quick Check:
Weighted routing = assign weights [OK]
Hint: Weighted routing needs numeric weights per record [OK]
Common Mistakes:
Confusing weighted with simple routing
Using latency instead of weights
Not assigning any weight values
3. Given two servers in different regions with latency routing enabled, which server will Route 53 direct a user to?
medium
A. The server with the highest weight
B. The server with the lowest latency from the user
C. The server with the most traffic
D. The server randomly chosen
Solution
Step 1: Understand latency routing behavior
Latency routing sends users to the server with the lowest network delay from their location.
Step 2: Exclude other options
Weight is for weighted routing, traffic volume is not a factor, random choice is not latency routing.
Final Answer:
The server with the lowest latency from the user -> Option B
Quick Check:
Latency routing = fastest server [OK]
Hint: Latency routing picks fastest server by user location [OK]
Common Mistakes:
Mixing weighted and latency routing concepts
Assuming traffic volume affects routing
Thinking routing is random
4. You configured weighted routing but all traffic still goes to one server. What is the most likely cause?
medium
A. DNS records have different names
B. Latency routing is enabled instead of weighted
C. Simple routing policy is selected by mistake
D. Weights are set to zero for other servers
Solution
Step 1: Check weight values in weighted routing
If weights for other servers are zero, all traffic goes to the server with non-zero weight.
Step 2: Rule out other causes
Latency routing or simple routing would behave differently; different record names do not affect routing weights.
Final Answer:
Weights are set to zero for other servers -> Option D
Quick Check:
Zero weights = no traffic [OK]
Hint: Check weights are not zero for all servers [OK]
Common Mistakes:
Confusing routing policy type
Ignoring zero weights effect
Assuming DNS names affect weighted routing
5. You want to route 70% of traffic to a primary server and 30% to a backup server, but also ensure users connect to the lowest latency server within those groups. Which routing policy setup should you use?
hard
A. Use latency routing only with weights assigned
B. Use simple routing with latency routing
C. Use weighted routing with latency routing inside each weight group
D. Use weighted routing only without latency
Solution
Step 1: Understand combined routing needs
You want to split traffic by weight, then route users to lowest latency server within each group.