It's because updating dns does not work reliably so it's always a lot if trail and error which you can only see after the cache updates
Could you make your changes with a low TTL and switch to a longer one once you are satisfied with the results?
Stop using low DNS TTLs
41–46 of 46 posts
Re: Stop using low DNS TTLs
#42I don't understand why the author doesn't consider load balancing and failover legitimate use cases for low ttl. Cause it wrecks their argument?
Because unless your TTL is exceptionally long you will almost always have a sufficient supply of new users to balance. Basically you almost never need to move old users to a new target for balancing reasons. The natural churn of users over time is sufficient to deal with that. Failover is different and more of a concern, especially if the client doesn't respect multiple returned IPs.
Now there are multiple kinds of HA, so we'll go over a bunch of them here.
Case 1: You have one host (host A) on the internet and it dies, and you have another server somewhere (host B) that's a mirror but with a different IP. When host A dies you update DNS so clients can still connect, but now they connect to host B. In that case the client will not connect to the new IP until their DNS resolver gets the new IP. This was "failover" back in the day. That is dependent on the DNS TTL (and the resolver, because many resolvers and aches ignore the TTL and used their own).
In this case a high TTL is bad, because the user won't be able to connect to your site for TTL seconds + some other amount of time. This is how everyone learned it worked, because this is the way it worked when the inter webs were new.
Case 2: instead of one DNS record with one host you have a DNS record with both hosts. The clients will theoretically choose one host or the other (round robin). In reality it's unclear if that actually do that. Anecdotal evidence shows that it worked until it didn't, usually during a demo to the CEO. But even if it did that means that 50% of your requests will hit a X second timeout as the clients try to connect to a dead host. That's bad, which is why nobody in their right minds did it. And some clients always picked the first host because that's how DNS clients are sometimes.
Putting a load balancer in front of your hosts solves this. Do load balancers die? Yeah, they do. So you need two load balancers...which brings you back to case 1.
These are the basic scenarios that a low DNS TTL fixes. There are other, more complicated solutions, but they're really specialized and require more control of the network infrastructure...which most people don't have.
This isn't an "urban legend" as the author states. These are hard-won lessons from the early days of the internet. You can also not have high availability, which is totally fine.
Re: Stop using low DNS TTLs
#43Re: Stop using low DNS TTLs
#44When you run a website that receives new POSTed information every 60 seconds, you sure do. ;)
Re: Stop using low DNS TTLs
#45Earlier quoted context omitted.
Could you make your changes with a low TTL and switch to a longer one once you are satisfied with the results?
How does that help you if you have to wait for long ttl to expire before the short one takes over?
Re: Stop using low DNS TTLs
#46> However, no one moving to a new infrastructure is going to expect clients to use the new DNS records within 1 minute, 5 minutes or 15 minutes When you run a website that receives new POSTed information every 60 seconds, you sure do. ;)