tezvyn:

DNS routing policies for active-passive failover

AI-drafted, machine-checkedSource: interviewintermediate
WHAT IT TESTS

applying DNS policies to failover.

OUTLINE

a failover policy with health checks routes to primary and flips to secondary on failure; keep TTL low; pair with health checks not just policy.

WHAT THIS TESTS The interviewer wants to confirm you can match the right DNS routing policy to a failover requirement and understand that DNS-level failover hinges on health checks and TTL, not just policy names.

A GOOD ANSWER COVERS For active-passive between two regions, the correct primitive is a failover routing policy. You create a primary record pointing at region one and a secondary pointing at region two, each associated with a health check that probes an application endpoint. While the primary health check passes, DNS answers with the primary. When it fails, DNS automatically returns the secondary, shifting traffic to the standby region. The TTL on these records should be low, on the order of tens of seconds, so resolvers re-query soon after a flip and clients are not stuck on a dead address. Latency-based routing instead sends each user to the lowest-latency region, and geolocation routing sends users to a region by their location, both of which are active-active patterns that distribute live traffic rather than holding one region in reserve. You can layer policies, for example failover within a region pair and latency across pairs, but the failover decision itself must be driven by health checks.

COMMON WRONG ANSWERS Selecting latency-based routing for active-passive, which sends traffic to both regions instead of reserving the passive one. Forgetting health checks, so DNS keeps returning a dead primary. Leaving a high TTL, which delays failover by minutes.

LIKELY FOLLOW-UPS How do health checks evaluate endpoint status? What is the tradeoff of very low TTL on resolver load? How does this compare to load balancer failover?

ONE CONCRETE EXAMPLE Route 53 serves the us-east-1 primary record with a 30 second TTL while its health check passes. The check fails during a regional outage, and within roughly a minute resolvers return the eu-west-1 secondary, completing failover without manual intervention.

Read the original → docs.aws.amazon.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.