"A domain name points to one server." It can, but it doesn't have to. In Amazon Route 53, every record has a routing policy that decides which answer a DNS query gets. That lets one name lead to several resources: to split traffic, to test a new version, or to survive a failure. Route 53 has eight policies today; this post covers the three you will use first. Latency and geolocation come in part 2.
Simple routing
Simple routing is standard DNS with no special behaviour. You typically point a name at a single resource, such as one web server or one load balancer.
- You can put several IP addresses in one simple record. Route 53 returns all of them in random order and the client picks one.
- Those values are not health checked. If one address is dead, some users still get it.
Use simple routing when there is one thing to point at.
Weighted routing
Weighted routing lets you create several records with the same name and type, each with a weight. Route 53 answers with each record in proportion to its weight divided by the total.
- Weights of 90 and 10 send about 10% of queries to the second record.
- A weight of 0 stops sending traffic to that record.
It is useful for spreading load and for testing new versions of software: send a small share to the new stack, watch errors and latency, then raise the weight step by step. Rolling back is setting the weight to zero.
You can attach health checks to weighted records so an unhealthy one is skipped.
Failover routing
Failover routing is active-passive. You create a primary record and a secondary record. Route 53 answers with the primary while it is healthy, and with the secondary when it is not.
- The primary needs a health check (or an alias target whose health is evaluated). Without one, Route 53 has no way to know it failed.
- The secondary can be a full standby in another Region, or something as modest as a static "we'll be right back" page in an S3 bucket.
A common mistake is building the standby and never testing the switch. Fail it on purpose, in a quiet hour, and time how long users take to move.
The caveat: DNS is cached
Routing policies act when a query is answered, and resolvers cache answers for the record's TTL (time to live).
- A weighted split is a share of DNS queries, not of requests. One big resolver serving thousands of users counts as one query, so real traffic is approximate.
- After a failover, users keep the old answer until the TTL expires. Shorter TTLs mean faster shifts and more queries.
When you need an exact percentage per request, do the split at a load balancer or in the application instead.
Where AI fits
Model upgrades are risky in a way ordinary releases are not: the new model can be slower, cost more per request, or answer differently in ways tests don't catch. Weighted routing gives you a simple canary.
Say your application calls your own inference API at ai.example.com. Deploy a second stack that uses the new model version, add a weighted record for it with a weight of 10 against 90, and compare quality, latency and cost on real traffic. If it holds up, shift the weights; if not, set it to zero.
This works for endpoints you host and name yourself. Pair it with failover routing, and a second Region can take over if the primary's health check fails.
Quick recap
- Simple: one name, usually one resource, no health checks.
- Weighted: split traffic by share; ideal for gradual releases and model canaries.
- Failover: primary and secondary, switched by a health check. Remember TTL: shifts are approximate, not instant.