Live data from Hacker News

Stop using low DNS TTLs

blog.apnic.net

1–10 of 46 posts

Re: Stop using low DNS TTLs

#3
post #2

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?

Probably an expectation for floating IPs for load balancing instead of DNS.

Relatively simple inside a network range you control but no idea how that works across different networks in geographical redundant setups

Re: Stop using low DNS TTLs

#4
post #2

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?

Why do you need a low ttl for those? You can add multiple IPs to your A/AAAA records for very basic load balancing. And DNS is a pretty bad idea for any kind of failover. You can set a very low ttl, but providers might simply enforce a larger one.

Re: Stop using low DNS TTLs

#5
post #3
post #2

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?

Probably an expectation for floating IPs for load balancing instead of DNS. Relatively simple inside a network range you control but no idea how that works across different networks in geographical redundant setups

Anycast pretty much

Re: Stop using low DNS TTLs

#6
post #2

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?

Why do you need a low ttl for those? You can add multiple IPs to your A/AAAA records for very basic load balancing. And DNS is a pretty bad idea for any kind of failover. You can set a very low ttl, but providers might simply enforce a larger one.

If you add multiple IPs to a record, a lot of resolvers will simply use the first one. So even in that case you need a low TTL to shuffle them constantly

Re: Stop using low DNS TTLs

#7
post #2

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?

Perhaps as most these days are using Anycast [1] to do failovers. It's faster and not subject to all the oddities that come with every application having its own interpretation of DNS RFC's most notably java and all its work-arounds that people may or may not be using and all the assorted recursive cache servers that also have their own quirks thus making Anycast a more reliable and predictable choice.

[1] - https://en.wikipedia.org/wiki/Anycast

Re: Stop using low DNS TTLs

#9
post #2

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?

Why do you need a low ttl for those? You can add multiple IPs to your A/AAAA records for very basic load balancing. And DNS is a pretty bad idea for any kind of failover. You can set a very low ttl, but providers might simply enforce a larger one.

You don't want to add too many A/AAAA records, or your response gets too big and you run into fun times. IIRC, you can do about 8 of each before you get to the magic 512 byte length (yeah, you're supposed to be able to do more, 1232 bytes as of 2020-10-01, but if you can fit in 512 bytes, you might have better results on a few networks that never got the memo)

And then if you're dealing with browsers, they're not the best at trying everything, or they may wait a long time before trying another host if the first is non-responsive. For browsers and rotations that really do change, I like a 60 second TTL. If it's pretty stable most of the time, 15 minutes most of the time, and crank it down before intentional changes.

If you've got a smart client that will get all the answers, and reasonably try them, then 5-60 minutes seems reasonable, depending on how often you make big changes.

All that said, some caches will keep your records basically forever, and there's not much you can do about that. Just gotta live with it.

Re: Stop using low DNS TTLs

#10
post #3
post #2

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?

Probably an expectation for floating IPs for load balancing instead of DNS. Relatively simple inside a network range you control but no idea how that works across different networks in geographical redundant setups

Agreed; I have no idea how you'd implement that across multiple ASNs, which is definitely a requirement for multi-cloud or geo-redundant architectures.

Seems like you'd be trying to work against the basic design principles of Internet routing at that point.

Post reply on HN