logoalt Hacker News

Stop using low DNS TTLs

38 pointsby swillsyesterday at 3:12 PM27 commentsview on HN

Comments

tracker1yesterday at 11:16 PM

I usually set mine to between an hour and a day, unless I'm planning to update/change them "soon" ... though I've been meaning to go from a /29 to /28 on my main server for a while, just been putting off switching all the domains/addresses over.

Maybe this weekend I'll finally get the energy up to just do it.

Neywinyyesterday at 10:13 PM

I guess I'm not sure I understand the solution. I use a low value (idk 15 minutes maybe?) because I don't have a static ip and I don't want that to cause issues. It's just me to my home server so I'm not adding noticable traffic like a real company or something, but what am I supposed to do? Is there a way for me to send an update such that all online caches get updated without needing to wait for them to time out?

show 1 reply
zamadatixtoday at 2:23 AM

I used to get more excited about this but even when browsers don't do a DNS prefetch (or even a complete preload) the latency for lookups is usually still so low on the list of performance impacting design decisions that it is unlikely to ever outweigh even the slightest advantages (or be worth correcting misperceived advantages) until we all switch to writing really really REALLY optimized web solutions.

deceptionatdyesterday at 9:58 PM

I have mine set low on some records because I want to be able to change the IP associated with specific RTMP endpoints if a provider goes down. The client software doesn't use multiple A records even if I provide them, so I can't use that approach; and I don't always have remote admin access to the systems in question so I can't just use straight IPs or a hostfile.

garciasnyesterday at 9:43 PM

Could it be because folks set it low for initial propagation and then never change it back after they set it up.

show 2 replies
effnorwoodtoday at 12:29 AM

Sometimes they need to be low if you use the values to send messages to people.

gertoptoday at 3:18 AM

The irony here is that news.ycombinator.com has a 1 second TTL. One DNS query per page load and they don't care, yay!

1970-01-01yesterday at 10:46 PM

(2019)

show 1 reply
GuinansEyebrowsyesterday at 11:23 PM

i was taught this as a matter of professional courtesy in my first job working for an ISP that did DNS hosting and ran its own DNS servers (15+ years ago). if you have a cutover scheduled, lower the TTL at $cutover_time - $current_ttl. then bring the TTL back up within a day or two in order to minimize DNS chatter. simple!

of course, as internet speeds increase and resources are cheaper to abuse, people lose sight of the downstream impacts of impatience and poor planning.

bjourneyesterday at 9:03 PM

I don't understand why the author doesn't consider load balancing and failover legitimate use cases for low ttl. Cause it wrecks their argument?

show 4 replies