Reading30 min read·Module 2High exam weight

Route 53 Routing Policies

Key concepts

  • Simple, weighted, latency routing

  • Geolocation vs geoproximity

  • Multivalue answer routing

  • Alias records vs CNAME

  • Traffic flow

Introduction

Amazon Route 53 provides eight routing policies that control how DNS queries are answered. Each policy serves different traffic management needs, from simple one-to-one mappings to complex multi-region architectures with failover. Understanding when to use each routing policy is critical for the SAA-C03 exam.

Route 53 Routing Policies Overview

Route 53 offers 8 routing policies: Simple, Weighted, Latency, Geolocation, Geoproximity, Failover, Multivalue Answer, and IP-Based. The key to exam success is knowing which policy to use for each scenario - latency for performance, failover for DR, geolocation for compliance/localization, and weighted for gradual deployments.


Simple Routing Policy

The most basic routing policy that maps a domain name to a single resource.

Simple Routing Limitation

Simple routing does NOT support health checks. If the single resource becomes unhealthy, Route 53 will continue to return it. For production workloads requiring high availability, use other routing policies with health checks.


Weighted Routing Policy

Distributes traffic across multiple resources based on assigned weights.

Weighted Routing Configuration

How It Works:

  • Assign a weight (0-255) to each record
  • Traffic percentage = (record weight) / (sum of all weights)
  • Weight of 0 = no traffic to that record

Example Distribution:

Record A: Weight 70 → 70% traffic
Record B: Weight 20 → 20% traffic
Record C: Weight 10 → 10% traffic

Health Checks: Supported - unhealthy records excluded from responses

Exam Tip

Weighted routing scenarios: Blue/green deployments (shift traffic gradually: 10%, 25%, 50%, 100%), A/B testing (5% to new version), load balancing across regions, canary releases. If question mentions 'gradual traffic shift' or 'percentage-based distribution,' think weighted routing.

SHWeighted Routing Configuration (CLI)
```bash
# Create weighted record for primary server (70%)
aws route53 change-resource-record-sets \
    --hosted-zone-id Z1234567890 \
    --change-batch '{
        "Changes": [{
            "Action": "CREATE",
            "ResourceRecordSet": {
                "Name": "app.example.com",
                "Type": "A",
                "SetIdentifier": "Primary",
                "Weight": 70,
                "TTL": 60,
                "ResourceRecords": [{"Value": "192.0.2.10"}],
                "HealthCheckId": "health-check-id-1"
            }
        }]
    }'

# Create weighted record for secondary server (30%)
aws route53 change-resource-record-sets \
    --hosted-zone-id Z1234567890 \
    --change-batch '{
        "Changes": [{
            "Action": "CREATE",
            "ResourceRecordSet": {
                "Name": "app.example.com",
                "Type": "A",
                "SetIdentifier": "Secondary",
                "Weight": 30,
                "TTL": 60,
                "ResourceRecords": [{"Value": "192.0.2.20"}],
                "HealthCheckId": "health-check-id-2"
            }
        }]
    }'
```

Latency Routing Policy

Routes traffic to the AWS region with the lowest latency for the user.

Latency Routing Behavior

How It Works:

  1. Create latency records for resources in multiple AWS regions
  2. Route 53 measures latency between users and AWS regions
  3. Returns record for region with lowest latency to user

Key Points:

  • Latency is measured from user to AWS region, not to your resource
  • Latency data is collected over time by AWS
  • Not necessarily the geographically closest region
  • Requires resources in multiple AWS regions
Exam Tip

Latency routing routes to the region with the LOWEST LATENCY, NOT the closest geographic distance. Network topology, congestion, and peering relationships affect latency. A user in Australia might get lower latency to Singapore than to Sydney depending on network conditions.


Failover Routing Policy

Configures active-passive failover between primary and secondary resources.

Failover Routing Configuration

Record Types:

  • Primary: Active resource (must have health check)
  • Secondary: Standby resource (health check optional)

Behavior:

  1. Route 53 monitors primary via health check
  2. When primary is healthy → returns primary record
  3. When primary fails → returns secondary record
  4. When primary recovers → returns to primary (failback)

Secondary Options:

  • Another active resource in different region
  • Static S3 website (maintenance page)
  • CloudFront distribution
Failover Routing Architecture
Active-passive failover between primary ALB and secondary static S3 site
Failover is NOT Instant

DNS failover depends on TTL propagation. Even with low TTL (60 seconds), clients may cache DNS records. Complete failover can take several minutes. For instant failover, consider Global Accelerator or CloudFront with origin failover.


Geolocation Routing Policy

Routes traffic based on the geographic location of users.

Geolocation Routing Levels

Location Hierarchy:

  1. Continent: Africa, Antarctica, Asia, Europe, North America, Oceania, South America
  2. Country: Specific country codes (US, UK, JP, etc.)
  3. State/Province: US states, Canadian provinces (subdivisions)

Matching Order:

  1. Most specific match (state/province)
  2. Country match
  3. Continent match
  4. Default record (if configured)

Important: Always configure a default record for unmatched locations!

Exam Tip

Geolocation routing use cases: Content localization (languages/currencies by country), Compliance/legal requirements (data sovereignty, licensing), Content restrictions (block/allow countries), Regional pricing. If exam mentions 'compliance,' 'legal requirements,' or 'content licensing,' think geolocation.

JSONGeolocation Records Example
```json
{
  "Records": [
    {
      "Name": "app.example.com",
      "Type": "A",
      "SetIdentifier": "US-Users",
      "GeoLocation": {"CountryCode": "US"},
      "AliasTarget": {"DNSName": "alb-us-east.example.com"}
    },
    {
      "Name": "app.example.com",
      "Type": "A",
      "SetIdentifier": "EU-Users",
      "GeoLocation": {"ContinentCode": "EU"},
      "AliasTarget": {"DNSName": "alb-eu-west.example.com"}
    },
    {
      "Name": "app.example.com",
      "Type": "A",
      "SetIdentifier": "Default",
      "GeoLocation": {"CountryCode": "*"},
      "AliasTarget": {"DNSName": "alb-us-east.example.com"}
    }
  ]
}
```

Geoproximity Routing Policy

Routes traffic based on geographic location of users AND resources, with optional bias.

Geoproximity Routing with Bias

How It Works:

  • Routes to geographically closest resource
  • Bias expands or shrinks the geographic region

Bias Values:

  • Positive bias (1 to 99): Expands region, attracts more traffic
  • Negative bias (-1 to -99): Shrinks region, repels traffic
  • Bias of 0: No adjustment (default)

Example:

  • Resource A at 150km with +50 bias → treated as 75km
  • Resource B at 100km with no bias → remains 100km
  • Result: Traffic routes to A (appears closer)

Requirement: Must use Route 53 Traffic Flow

Geoproximity Routing with Bias
Visualization of how bias expands or shrinks geographic regions for traffic routing

Geolocation vs Geoproximity

FeatureGeolocationGeoproximity
BasisUser location onlyUser + resource location
GranularityContinent/Country/StateCoordinates + distance
Bias ControlNoYes (-99 to +99)
Traffic Flow RequiredNoYes
Use CaseCompliance, localizationPerformance, traffic shifting
Default RecordRequiredNot required

Multivalue Answer Routing Policy

Returns multiple healthy records in response to DNS queries.

Multivalue Answer Behavior

How It Works:

  • Returns up to 8 healthy records per query
  • Each record must have a health check
  • Unhealthy records excluded from responses
  • Client typically uses first IP returned

Key Characteristics:

  • Simple client-side load balancing
  • NOT a replacement for load balancer
  • Health check required for each record
  • Random selection of healthy records
Exam Tip

Multivalue Answer is NOT a substitute for a load balancer: No session persistence, no intelligent traffic distribution, no advanced health checks, no connection draining. Use Multivalue for simple DNS-level redundancy. Use ELB for true application load balancing.


IP-Based Routing Policy

Routes traffic based on the source IP address of the DNS query.

IP-Based Routing Configuration

How It Works:

  • Define CIDR blocks and map them to specific endpoints
  • Route 53 matches client IP against CIDR collections
  • Returns record for matching CIDR

Use Cases:

  • Route ISP customers to specific endpoints
  • Enterprise networks to dedicated resources
  • Optimize for known IP ranges (CDN, partners)

Configuration:

  1. Create CIDR collection with IP blocks
  2. Create CIDR location for each block
  3. Associate records with CIDR locations

Routing Policy Comparison

Route 53 Routing Policies

PolicyUse CaseHealth ChecksKey Feature
SimpleSingle resourceNoBasic DNS
WeightedTraffic distributionYesPercentage-based
LatencyBest performanceYesLowest latency region
FailoverDisaster recoveryYes (primary)Active-passive
GeolocationLocation-based contentYesUser location
GeoproximityLocation + biasYesTraffic shifting
MultivalueSimple redundancyYes (required)Up to 8 IPs
IP-BasedKnown IP rangesYesCIDR matching

Active-Active vs Active-Passive Failover

Failover Configurations

Active-Passive Failover:

  • Uses Failover routing policy
  • Primary resource handles all traffic when healthy
  • Secondary (standby) only receives traffic when primary fails
  • Best for: DR scenarios, maintenance pages

Active-Active Failover:

  • Uses any other routing policy (weighted, latency, geolocation, etc.)
  • All resources actively serve traffic
  • Unhealthy resources automatically excluded
  • Best for: High availability, load distribution

Example:

  • Active-Active with Weighted: Both regions get traffic, unhealthy region excluded
  • Active-Passive with Failover: Only primary gets traffic until it fails

Complex Routing Configurations

You can combine multiple routing policies using alias records to create sophisticated routing trees.

Multi-Level Routing Example

Scenario: Global application with regional failover

Architecture:

                    ┌─────────────────────┐
                    │  Latency Records    │
                    │  (top level)        │
                    └──────────┬──────────┘
                               │
           ┌───────────────────┼───────────────────┐
           │                   │                   │
    ┌──────▼──────┐     ┌──────▼──────┐     ┌──────▼──────┐
    │  Failover   │     │  Failover   │     │  Failover   │
    │  us-east-1  │     │  eu-west-1  │     │  ap-south-1 │
    └──────┬──────┘     └──────┬──────┘     └──────┬──────┘
           │                   │                   │
     ┌─────┴─────┐       ┌─────┴─────┐       ┌─────┴─────┐
     │           │       │           │       │           │
   Primary   Secondary Primary   Secondary Primary   Secondary

Behavior:

  1. Latency routing selects closest region
  2. Within region, failover handles availability
  3. If regional primary fails, traffic goes to regional secondary

Common Exam Scenarios

Exam Tip

Routing Policy Selection: Gradual traffic shift → Weighted | Lowest latency → Latency | Data residency compliance → Geolocation | Failover to DR → Failover | Multiple IPs → Multivalue | Shift from overloaded region → Geoproximity (negative bias) | Enterprise customers to dedicated → IP-Based | Blue/green → Weighted

Q

A company wants to perform a blue/green deployment, gradually shifting traffic from the old version to a new version. They want to start with 10% of traffic to the new version and increase over time. Which Route 53 routing policy should they use?

ASimple routing
BLatency routing
CWeighted routing
DFailover routing
Q

A media company must ensure that users in the European Union can only access content hosted in EU data centers due to GDPR compliance. Which Route 53 routing policy should they implement?

ALatency routing
BGeolocation routing
CGeoproximity routing
DWeighted routing
Q

A global gaming company wants to provide the best possible experience by routing players to the AWS region with the lowest network latency. Which routing policy should they use?

AGeolocation routing
BGeoproximity routing
CLatency routing
DSimple routing

Best Practices

Route 53 Routing Best Practices
  1. Always configure default records: For geolocation, ensure unmatched users get routed somewhere
  2. Use health checks: Enable health checks for all routing policies that support them
  3. Set appropriate TTLs: Lower TTL = faster failover, but more DNS queries (and cost)
  4. Test failover: Regularly test your failover configuration before you need it
  5. Monitor with CloudWatch: Set alarms for health check status changes
  6. Use alias records: For AWS resources, alias records are free and support apex domains
  7. Document your routing tree: Complex configurations can be hard to troubleshoot
  8. Consider Traffic Flow: For complex routing, use Route 53 Traffic Flow for visual management

Summary

Route 53 routing policies provide flexible traffic management for different scenarios:

  • Simple: Basic single-resource DNS
  • Weighted: Percentage-based traffic distribution
  • Latency: Best performance routing
  • Failover: Active-passive disaster recovery
  • Geolocation: Compliance and localization
  • Geoproximity: Location with bias control
  • Multivalue Answer: Simple multi-IP redundancy
  • IP-Based: CIDR-based routing

Understanding when to use each policy is essential for the SAA-C03 exam and building resilient architectures on AWS.

Related services

Route 53