Try
↑ ↓ move↵ openesc close
In this lesson · topic 3 of 7
  1. 1. The address that will not change
  2. 2. The resolution path and the TTL
  3. 3. Fail an endpoint and time the failover
  4. 4. Failover is detection plus the longest cache
  5. 5. Weighted and latency-based answers
  6. 6. Anycast in words
  7. 7. DNS in review

Topic 3

Fail an endpoint and time the failover

8 min read

What the lab runs

Twenty clients a second ask one of 50 resolvers for the service name. A resolver answers from its cache while the entry is fresh. Otherwise it asks the authoritative server and caches the reply for the TTL.

Endpoint A goes down at second 100 and returns at second 350. A health check changes the record 10 seconds after each change. A request sent to a dead endpoint fails. The lab reports the failover delay, the seconds from the start of the outage to the last failed request.

Some resolvers ignore the TTL and keep every answer for at least two minutes. You choose how many.

Predict before you press play

You cut the TTL from 300 seconds to 20, and every resolver obeys it. What changes?

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.

Share of requests failing, last 150 seconds
Share of requests failing, last 150 seconds. Text version available below the chart.0011112140recent secondspercent failing

Full-page version with guided experiments: DNS failover and TTLs lab.

Things to try

  1. Set the TTL to 300 and read the failover delay.
  2. Set the TTL to 20 with no resolver ignoring it.
  3. Keep the TTL at 20 and raise ignoring resolvers to 30 percent.
  4. Choose weighted answers with the outage off and the weight on A at 80 percent.
  5. Keep weighted answers and raise the TTL to 300.

The full-page lab has a guided experiment for each of these.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms