Skip to content

Lesson 3 of 9 · 21m

TTLs, Negative Caching, and the Propagation Myth

Why DNS does not propagate, how TTL countdown really works, and how to plan changes that caches cannot sabotage.

There is no propagation. Nobody pushes your new record out to the internet. Recursive resolvers cache the answer they already fetched until its TTL expires, and different resolvers learned it at different times. Operators who believe in propagation wait; operators who understand caching design the change around cache lifetimes.

TTL is a countdown

$ dig @1.1.1.1 www.cloudflare.com +noall +answer
www.cloudflare.com. 226 IN A 104.16.123.96

If the authoritative TTL is 300 and a resolver shows 226, that resolver has held the answer for 74 seconds. The number decreases to zero; only then does a new query cause a fresh authoritative lookup. Lowering TTL right before maintenance is too late: a resolver that cached the old answer one minute earlier still keeps it for the old TTL.

The migration pattern that works

  1. At least one full old-TTL period before the change, lower TTL to 60 or 300 seconds.
  2. Wait for the old TTL to expire everywhere.
  3. Deploy and verify the new service independently.
  4. Change DNS while keeping the old service alive.
  5. Raise TTL again after the rollback window closes.
www 300 IN A 203.0.113.25

Low TTLs increase authoritative query volume and cold lookup latency. That is a migration cost, not necessarily a permanent architecture.

Negative answers are cached too

NXDOMAIN and NODATA are cached using negative-cache policy derived from the SOA:

@ IN SOA ns1.sudosecurity.org. hostmaster.sudosecurity.org. (
    2026113001 ; serial
    7200 3600 1209600
    300 )      ; negative cache TTL

Create status.sudosecurity.org after someone queried it, and their resolver may continue returning NXDOMAIN until the negative TTL expires. That is why one user says a new record "still doesn't exist" while everyone else sees it.

Different caches have different memories

Browser, application, operating system, router, upstream resolver, CDN, and security appliances can all cache differently. Compare independent resolvers rather than trusting one client flush:

dig @1.1.1.1 api.sudosecurity.org +noall +answer
dig @9.9.9.9 api.sudosecurity.org +noall +answer
dig @8.8.8.8 api.sudosecurity.org +noall +answer

If those differ while TTLs count down, you are watching cache expiry. If they differ indefinitely, investigate split horizon, GeoDNS, or inconsistent authoritative data.

TTLs are resilience design

Very low TTLs make failover faster but increase dependence on DNS availability; some resolvers clamp them upward anyway. Very high TTLs reduce load and latency but make change glacial. Stable infrastructure can be hours; migration targets can be minutes; emergency failover should never depend on universal five-second obedience.

Field notes

  • TTL 0 means do not cache, not instant global consistency.
  • Measure one resolver repeatedly to observe expiry; jumping between resolvers mixes independent caches.
  • GeoDNS and load balancing can make different answers correct — verify intent before calling it drift.
  • Lower every related record family, especially A and AAAA, not just the one you remembered.

Was this lesson helpful?

Sign in to rate