Route 53

Introduction

Route 53 is AWS's DNS web service, named after the DNS port 53. It offers various routing policies to direct traffic based on different criteria and use cases.

Routing Policy Types

AWS Route 53 Routing Policies Decision Matrix

Policy Type
Decision Process
Example Use Case

Simple

"Simple. Here's the destination for that name."

Basic DNS mapping where a single endpoint is needed (e.g., company website)

Failover

"Normally, I'd route you to , but it appears down based on my Health Checks so I'll failover to ."

High-availability setups where backup systems are required

Geolocation

"Looks like you're in Europe, so I'm going to route you to a resource closer to you in that region."

Content delivery based on user location (e.g., localized content)

Geoproximity

"You're closer to the US-EAST-1 region than US-WEST-2 so I'll route you to US-EAST-1"

Regional service distribution with flexible geographic boundaries

Latency

"Let me see which resources has lower latency from you, then I'll direct you that way."

Performance optimization for global applications

Multivalue Answer

"I will return several IP addresses, as a sort of basic load balancer"

Simple load balancing without need for complex load balancer setup

Weighted

"You can setup multiple resources and I'll route according to the percentage of weight you assign each"

Blue-green deployments or gradual traffic shifting between versions

1. Simple Routing Policy

The most basic policy that maps a DNS name to a single destination. Route 53 simply returns the configured destination for the DNS query.

Example Response:

dig query returns: 52.11.7.197

2. Failover Routing Policy

Implements active-passive failover configuration using health checks. Route 53 monitors the primary endpoint and automatically routes traffic to a backup system if the primary fails.

Behavior:

  • Primary healthy: Routes to primary endpoint (e.g., 52.11.7.197)

  • Primary unhealthy: Automatically routes to secondary endpoint (e.g., 120.13.x.x)

3. Geolocation Routing Policy

Routes traffic based on the geographic location of users. Requires a default route as fallback for unidentifiable locations.

Example Configuration:

  • North American users → Specific endpoint

  • Default route → Different endpoint for all other locations

Implementation Notes:

  • Supports various DNS record types (A, CNAME, etc.)

  • Essential to configure default route as fallback

4. Geoproximity Routing Policy

Routes traffic based on geographic distance between users and resources, with adjustable bias.

Key Features:

  • Bias range: -99 to +99

  • Positive bias: Expands routing radius

  • Negative bias: Shrinks routing radius

Use Case Example: Load balancing between regions (e.g., US-EAST-1 and US-WEST-2) by adjusting geographic distribution through bias settings.

5. Latency-Based Routing Policy

Routes based on lowest network latency for end users rather than geographic location.

Example Configuration:

Record 1: US-East datacenter
Record 2: EU-Central datacenter

Route 53 automatically directs users to the endpoint with lowest latency from their location.

6. Multivalue Answer Routing

Acts as a basic load balancer by returning multiple IP addresses for a single DNS query.

Features:

  • Returns multiple healthy endpoints

  • Supports health checks

  • Clients can automatically fail over to alternative IPs

7. Weighted Routing Policy

Distributes traffic across multiple endpoints based on assigned weights.

Weight Calculations:

  • Weight Range: 0-255

  • Traffic Distribution = (Endpoint Weight) / (Sum of All Weights)

Example Scenarios:

  1. Equal Distribution:

    • Endpoint 1: Weight 10

    • Endpoint 2: Weight 10

    • Result: 50% traffic to each

  2. Complete Traffic Shift:

    • Endpoint 1: Weight 0

    • Endpoint 2: Weight > 0

    • Result: 100% traffic to Endpoint 2

Common Use Case: Blue-green deployments where traffic needs to be gradually shifted between instances.

Implementation Considerations

  1. Always configure health checks for failover scenarios

  2. Set up default routes for geolocation routing

  3. Use weighted routing with 0 weights for graceful traffic transitions

  4. Consider latency-based routing for global applications where performance is critical

This comprehensive routing policy system allows for sophisticated traffic management scenarios, from simple one-to-one mapping to complex global distribution strategies.

Last updated

Was this helpful?