AWS Certified CloudOps Engineer – Associate
Route 53 routing policies and health checks for SOA-C03
The Amazon Route 53 Developer Guide lists the routing policies: failover for active-passive, weighted for traffic in set proportions, latency for the Region with the lowest latency, and geoproximity for the closest resource with an adjustable bias. Health checks decide which records are eligible, and a record with no health check is always treated as healthy.
Which routing policy fits which need?
Failover routing sends traffic to one resource while it is healthy and to another when it is not. Weighted routing splits traffic across records with the same name and type in proportion to each weight as a share of the total; weights of 1 and 255 send 1/256th to the first.
Latency routing answers with the record for the AWS Region that gives the user the lowest latency. The data comes from traffic between users and AWS data centers and changes over time.
Geoproximity routing sends traffic to the closest resource. A positive bias from 1 to 99 expands the area that routes to a resource and shrinks the adjacent ones; a negative bias from -1 to -99 shrinks it. AWS suggests changing bias in small steps.
Simple routing is for a single resource, geolocation routes by the location of the user, and multivalue answer returns up to eight healthy records chosen at random.
How do health checks change the answer?
Route 53 first picks a record by the routing policy, then checks whether it is healthy. If it is not, it picks again until it finds a healthy record. Health is checked periodically, not when the query arrives.
A record without an associated health check is always considered healthy. A failover primary with no health check therefore keeps being returned even when the resource is down.
If no record in the group is healthy, Route 53 treats all of them as healthy and chooses by the routing policy.
Weight 0 stops traffic to a record in normal operation. But when every record has a health check and all the records with nonzero weight are unhealthy, Route 53 considers the zero-weight records. Make sure a zero-weight target can give a usable answer.
When do you need an alias record?
A CNAME record cannot exist at the zone apex, such as example.com. An alias record can, and it can point at AWS resources such as an Elastic Load Balancing load balancer, a CloudFront distribution or an S3 website bucket.
Route 53 answers an alias query with the resource's current IP addresses and follows them when they change. You cannot set the TTL of an alias record that points to an AWS resource. For health, set Evaluate Target Health to Yes so Route 53 checks the resource the alias points to.
Where the exam catches people
- Setting up failover records without a health check on the primary: a record with no health check is always considered healthy.
- Believing weight 0 means never returned: zero-weight records are considered when all nonzero-weight records are unhealthy.
- Creating a CNAME for the zone apex: use an alias record there.
- Choosing geolocation to move a boundary between Regions: geoproximity bias is the setting that expands or shrinks a resource's area.
- Believing all-unhealthy means no answer: when no record is healthy, Route 53 treats all records as healthy.