concept

DNS TTL

The time a DNS record may be cached, and a value that resolvers, operating systems and applications honour inconsistently.

dnscachingfailover

The intent is simple: a record with a 60-second TTL may be cached for 60 seconds. The reality is that recursive resolvers sometimes enforce minimums, operating systems cache separately, and several runtimes — the JVM historically being the notorious case — cache resolutions for the process lifetime regardless of TTL.

The consequence is that DNS-based failover is always slower than the TTL suggests, with a long tail of clients still reaching the dead address. Plan for it rather than tuning around it.

Practical guidance: lower TTLs ahead of a planned change (hours in advance, since the old TTL governs how long the old value persists), keep steady-state TTLs moderate to limit resolver load, and use anycast or a load balancer where failover must be fast.