Cianplan

Level 1: Foundations · L1.2 DNS & CDNs

TTLs, GeoDNS and failover

Explain TTL trade-offs and why DNS failover isn't instant.

10 min · Free

What you take away

  • A TTL is a request, not a rule: browsers, operating systems and some resolvers hold answers longer than you asked.
  • Low TTLs buy agility during a change and cost resolver traffic and cold-path lookups the rest of the time.
  • DNS routing policies — weighted, latency, geolocation, failover — decide which answer a resolver receives.
  • DNS failover has a long tail, so real failover belongs to a load balancer or anycast; DNS is for planned moves.

How the class is laid out

  1. The problem
  2. The simple version
  3. The long tail of a DNS change
  4. Choosing a TTL
  5. Where the answer comes from
  6. Check your understanding