How routing policies work
Route 53 routing policies decide which answer a DNS query gets: split traffic by weight, send users to the lowest-latency region, fail over to a standby, route by the user's country or network. Combined with health checks, they're the backbone of multi-region and disaster-recovery designs on AWS. Senior interviews expect you to know all eight policies, how health checks drive them, how to nest policies for real architectures, and — crucially — the limits of DNS-based traffic management.
Record sets with set identifiers
A simple record is one record set per name and type. Every other policy works by creating several record sets with the same name and type, each with:
- a set identifier (a unique label like
mumbaiorblue), - policy-specific settings (weight, region, failover role, location, CIDR collection...),
- optionally a health check (or
evaluate_target_healthfor alias records).
Route 53 evaluates the policy for each query and returns the chosen record set's values. You can't mix routing policies for the same name and type at one level — you nest them using alias records (later lesson).
The eight policies
| Policy | Chooses answer by | Health checks | Typical use |
|---|---|---|---|
| Simple | Nothing — one record set (may contain multiple values) | No | Single resource |
| Weighted | Relative weights | Yes | Gradual migrations, A/B, DNS-level canary |
| Latency | Lowest latency between the user's network and AWS regions | Yes | Multi-region active-active |
| Failover | Primary if healthy, else secondary | Required on primary | Active-passive DR |
| Geolocation | User's continent, country, or US state | Yes | Compliance, localisation, licensing |
| Geoproximity | Geographic distance, adjustable with bias | Yes | Shifting regional boundaries; via Traffic Flow |
| Multivalue answer | Returns up to 8 healthy values at random | Yes (per value) | Client-side load spreading with health filtering |
| IP-based | Client's source IP range (CIDR collections) | Yes | ISP/office-specific routing |
Health checks + evaluate target health
- A non-alias record gets a
health_check_id. If that health check is unhealthy, Route 53 treats the record as unavailable and picks another per the policy. - An alias record can set
evaluate_target_health = true: Route 53 uses the health of the target itself (e.g. an ALB is unhealthy if no healthy targets in its target groups; for nested aliases, the health of the nested record set). No separate health check needed — and no extra cost. - If all records in a policy are unhealthy, Route 53 returns all of them anyway (fail-open) rather than nothing — better than an outage due to a misconfigured check.
TTL is always in play
Whatever Route 53 decides, clients act on cached answers until the TTL expires. Routing changes and failovers therefore take effect gradually. Keep TTLs low (~60 s) on records used for failover or traffic shifting; aliases to ELBs already use 60 s.