Try
↑ ↓ move↵ openesc close
In this lesson · topic 4 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 4

Failover is detection plus the longest cache

4 min read

The simple case

When every resolver obeys the TTL, the last user to learn of the change is one whose cache was filled just before it. That user keeps the old answer for one full TTL. So the failover delay is at most the detection time plus the TTL.

With a 20 second TTL and a 10 second check, the lab measured a delay of 27 secondsmeasured. That sits under the limit of 30. With a 300 second TTL the delay was 248 secondsmeasured, and the share of failed requests rose from 4.0 percentmeasured to 36.0 percentmeasured.

Resolvers that ignore the TTL

Not every resolver obeys. Some enforce a minimum, some keep an answer through a short outage of their own, and some applications cache a lookup for the life of the process. The record cannot reach any of them early.

The lab sets a floor of 120 secondsmeasured for 30 percent of resolvers. The TTL was still 20 seconds. The failover delay rose from 27 secondsmeasured to 124 secondsmeasured. A small share of users sat on the dead endpoint for two minutes. The model uses a single number for the floor. In practice the floors vary and nobody publishes them, so measure your own traffic.

What to do about it

  • Set a short TTL on records you may need to move, in advance, not during the incident.
  • Do not rely on DNS alone for fast failover. Put a load balancer or an anycast address in front, which later topics cover.
  • Make clients retry against another address. A client that tries the second address in a list recovers in one timeout, not one TTL.

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