DNS failover and TTLs lab
Fail one endpoint on a schedule and let DNS move clients to the other. See how the TTL and resolvers that ignore it set how long users keep hitting the dead one, and how weighted answers split traffic.
tick 40 (1 tick = 1 second)TTL 60, failoverendpoint A is up
Requests
- requests
- 800
- failed
- 0 (0.0%)
- failover delay
- 0 s
- answered from cache
- 95%
Clients ask one of 50 resolvers. A resolver keeps its answer for the TTL, so for that long it keeps sending clients to an endpoint that may be dead.
Who asks the authority
- authoritative queries
- 38
- resolvers ignoring TTL
- 5
- traffic sent to A
- 100%
Short TTLs move failover faster and send more queries to the authoritative servers. Resolvers that ignore the TTL keep the old answer for at least two minutes here.
| Series | Latest | Lowest | Highest |
|---|---|---|---|
| failing | 0 | 0 | 0 |
After 40 seconds, 0 of 800 requests failed. The latest outage kept failing for 0 seconds after it began. Resolvers answered 95% of requests from cache, and 100% of traffic went to endpoint A.
What to try
Each one sets up a starting point. Then make the change it describes.
A long TTL delays failover
Set the TTL to 300 seconds and watch the first outage.
Look for. Each resolver keeps sending clients to A until its cached answer expires. Errors last close to the whole outage, and the authoritative servers see far fewer queries.
A short TTL
Set the TTL to 20 seconds and no resolver ignoring it.
Look for. Failover finishes roughly the detection time plus one TTL after the failure. The price is more queries to the authoritative servers, because answers expire sooner.
Resolvers that ignore the TTL
Keep a 20 second TTL and raise ignoring resolvers to 30 percent.
Look for. The TTL you set stops being the limit. A fraction of users stay on the dead endpoint for at least two minutes, whatever the record says.
A weighted split
Choose weighted answers, turn the outage off and set the weight on A to 80 percent.
Look for. Traffic to A lands near 80 percent, but not exactly. The choice is made once per resolver cache entry, not once per request, so a few busy resolvers pull the share around.
Weighted answers and slow TTLs
With weighted answers and no outage, set the TTL to 300.
Look for. Fewer fresh draws are made, so the observed split drifts further from the weight. Weighted DNS is a coarse tool.
New to the idea? Read the lesson first. Every number here comes from a seeded simulator, so the same seed gives the same run.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms