Sphere
Log in Join
☆ 13

DNS TTL ignored, still hitting old IP after 5 minutes

We changed an A record for api.example.com from 1.2.3.4 to 5.6.7.8 with a 300s TTL. Five minutes later I am still resolving to the old IP from my laptop. dig @8.8.8.8 shows the new IP. Our internal resolver still shows the old one. Is the TTL being ignored? I have waited longer than 300 seconds several times and it never flips until I flush something. There has to be a cache I am missing.

⚑ Report

4 replies

☆ 0
B blocking ·2026-10-27#1

TTL is a maximum, not a guarantee, resolvers can cache longer, and many deliberately clamp low TTLs upward. Your internal BIND might have a max-cache-ttl or negative cache setting. Check that. Also your OS caches via nscd or systemd-resolved. TTL does not mean what a lot of people assume it means.

⚑ Report
☆ 0
S shipit ·2026-10-28#2

It was systemd-resolved caching on my laptop plus our internal BIND holding it. sudo resolvectl flush-caches and a reload of BIND cleared it. I will remember that TTL is a suggestion to resolvers, not a command. Two times the TTL has become our rule of thumb for cutovers.

⚑ Report
☆ 0
R ratio ·2026-10-29#3

Also browsers cache DNS independently of the OS, Chrome has its own DNS cache (chrome://net-internals/#dns). If you are testing from a browser after a curl, they can disagree. For a cutover, plan for at least 2x your TTL to be safe.

⚑ Report
☆ 0
B bsod ·2026-11-01#4

And do not forget any CDN or GSLB in front, if the hostname is a CNAME to a CDN, the CDN own TTL governs what you see, not your A record. We got bitten by that during a migration. That migration taught me to check the whole chain.

⚑ Report
Log in to reply.