Opscraft
DNS TTL & caching · Lesson 4 of 8 · 4 min read

Propagation and planning changes

"Propagation" is really expiry

DNS changes in Route 53 reach all Route 53 authoritative servers within about a minute (aws route53 get-change shows INSYNC). What takes time is caches around the world expiring their old copy. If a record had TTL 86400 and a resolver fetched it one second before your change, that resolver serves the old answer for almost a day. There's no push mechanism — only expiry.

Watch out: lowering a TTL doesn't take effect immediately everywhere — caches still hold the record with the old TTL until it runs out. You must lower the TTL at least one old-TTL period before the real change.

A migration timeline

Moving shop.example.com from IP A (old load balancer) to IP B; current TTL 3600 (1 hour):

When Action Why
Day −1 (≥ 1 hour before) Lower TTL from 3600 → 60 After 1 hour, every cache holds the record with TTL ≤ 60
Cutover Change the record to B Within ~60 s most clients see B
Cutover + hours Keep A running and watch its traffic Stragglers: apps/runtimes/mobile clients that ignore TTL
Traffic on A ≈ 0 Decommission A —
After stabilising Raise TTL back (e.g. 300–3600) Reduce query load and cost

If you skip step 1 and the old TTL was a day, some users hit the old IP for up to a day.

Enlarge diagramDay beforelower TTL 3600→ 60Wait one oldTTLevery cache nowexpires in ≤ 60 sCutoverpoint the recordat the new IPKeep the oldIP upwatch its trafficfall to zeroThendecommission it;raise the TTLagain12345
Figure 1. Moving a record to a new IP safely: lower the TTL first, switch, keep the old endpoint running for stragglers, then raise the TTL again.
Swipe sideways to see all of it, or tap to open it full screen.

Name server (delegation) changes

Changing DNS providers (e.g. to Route 53) involves NS records at two levels:

  • In your zone — the NS records' TTL (you control it; lower it beforehand).
  • At the parent (TLD) — the delegation the registrar publishes. .com NS records typically have a TTL of 172800 seconds (2 days), which you can't change.

So after switching name servers at the registrar, some resolvers keep using the old provider for up to two days. Safe procedure: copy all records to the new provider first (so both answer identically), lower TTLs, switch NS at the registrar, keep the old provider's zone intact for at least 48 hours, then remove it. "DNS propagation takes 48 hours" comes mostly from this parent NS TTL.

Enlarge diagram.com (parent) delegationNS records set via your registrar · TTL 172800 s(2 days) · not yours to changeNS records in your own zoneTTL you control: lower it before the moveSafe procedureCopy every record to the new provider first, switch the name servers at the registrar, and keep the old providerserving identical data for at least two days.
Figure 2. Changing DNS provider involves two sets of NS records. The parent .com delegation is cached for up to two days and you cannot shorten it.
Swipe sideways to see all of it, or tap to open it full screen.

Verifying propagation

for r in 8.8.8.8 1.1.1.1 9.9.9.9 208.67.222.222; do echo -n "$r: "; dig +short shop.example.com @$r; done

Or use online checkers that query resolvers worldwide. Two users seeing different answers can be expected: different caches, geolocation/latency routing, or split-horizon DNS (inside vs outside the VPC).