Opscraft
Route 53 routing policies · Lesson 4 of 10 · 3 min read

Latency-based routing

How it decides

Each latency record specifies an AWS region (the region of its resource):

set-id mumbai     A alias → ALB in ap-south-1      region ap-south-1
set-id singapore  A alias → ALB in ap-southeast-1  region ap-southeast-1
set-id virginia   A alias → ALB in us-east-1       region us-east-1

Route 53 keeps latency measurements between internet networks and AWS regions (collected by AWS over time). For each query it looks at the resolver's network (or the client subnet if the resolver sends EDNS Client Subnet), and returns the healthy record whose region has the lowest latency for that network.

Example: a user in Chennai using a Chennai ISP resolver → most likely ap-south-1 (Mumbai). If Mumbai's record is unhealthy, the next-lowest-latency healthy region is returned — so latency routing with health checks gives active-active multi-region with automatic regional failover.

Enlarge diagramuser in Chennaiap-south-1 (Mumbai)lowest latencyuser in Jakartaap-southeast-1 (Singapore)lowest latencyuser in New Yorkus-east-1 (Virginia)lowest latencyRoute 53 latency dataRoute 53 latency dataRoute 53 latency data
Figure 1. Latency routing sends each user to the AWS region with the lowest measured latency from their resolver's network.
Swipe sideways to see all of it, or tap to open it full screen.

Caveats

  • Latency is measured to regions, not your actual endpoints — it says nothing about your app's load.
  • Decisions are per resolver (or subnet with ECS), so users of a far-away public resolver can be misrouted; ECS improves this (Google and others send it, Cloudflare 1.1.1.1 doesn't, for privacy).
  • Latency data changes over time, so a user may flip between regions — your data layer must handle users appearing in different regions (global tables, Aurora Global Database, sticky user-to-region mapping where needed).