Lesson 2 of 4 Amazon Route 53

Choosing Route 53 Routing Policies

This lesson explains how Route 53 routing policies implement traffic splitting, geographic routing, latency optimisation and failover without any change to clients.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose a routing policy for a requirement.
  • Combine policies with nested alias records.
  • Use geolocation with a default record.

The policies

Simple routing returns all values of a single record, with no health checks. Weighted routing returns records in proportion to their weights, for example 90 and 10 for a canary release or A/B test; a weight of 0 stops traffic to a record. Latency routing returns the record for the AWS Region with the lowest measured latency from the user's resolver. Failover routing returns the primary record while its health check passes and the secondary otherwise. Geolocation routing chooses by the user's continent, country or US state, with a default record for unmatched locations; it suits content localisation and legal restrictions. Geoproximity routing chooses by distance between users and resources, with a bias to expand or shrink a Region's area, and is configured with traffic flow. Multivalue answer returns up to eight healthy records at random, a simple form of client-side load balancing. IP-based routing chooses by the client's IP range defined in CIDR collections, for example to route a known ISP's users to a specific endpoint.

PolicyChooses byTypical use
SimpleNothingSingle resource
WeightedWeightCanary, blue/green, A/B testing
LatencyLowest latency RegionMulti-Region performance
FailoverPrimary healthActive-passive DR
GeolocationUser locationLocalisation, compliance
GeoproximityDistance with biasShifting load between Regions
Multivalue answerRandom healthy records (up to 8)Simple DNS load balancing with health checks
IP-basedClient CIDRRouting specific networks
Match the pairs

Routing policies

Exam skills 5.2.2

Match each requirement with the Route 53 routing policy that meets it.

Log in to try this activity Interactive activities are free with an account.

Combining policies

Policies can be nested by pointing alias records at other record sets. A common design uses latency routing between two Regions, where each Region's latency record is an alias to a failover or weighted record set inside that Region. Traffic flow builds such trees visually as traffic policies that can be versioned and applied to many records. Health checks apply at every level, so an unhealthy branch is skipped.

The following diagram shows latency routing over a failover set in each Region.

Combining routing policies. A latency record for app.example.com chooses the Region with the lowest latency, and each Region's latency record is an alias to a failover record set inside that Region. Health checks apply at every level, so an unhealthy branch is skipped.
The Regions are illustrative.
Worked example

Geolocation with a default

A company must serve users in Germany from its eu-central-1 stack for data residency, users in the rest of Europe from eu-west-1, and everyone else from us-east-1. It creates geolocation records for country DE, continent EU and the default location. Without the default record, users whose location is unknown or outside the listed locations would receive no answer (NOERROR with no data). Health checks on each record ensure that an unhealthy endpoint is not returned; if the DE endpoint fails, Route 53 falls back to the EU record because the more specific record is unhealthy.

Check yourself

How many healthy records does multivalue answer routing return?

Show answer

Up to eight.

Exam Tips

Remember for the exam

  • Weighted for gradual shifts; latency for performance; failover for active-passive DR.
  • Geolocation needs a default record for unmatched users.
  • Multivalue answer returns up to eight healthy records.
  • Nest policies with alias records; health checks apply at each level.