Score:0

Does Long DNS TTL matter if you can shut down the server using the old IP?

cn flag

If we retain the old IP when we transition a website to a new IP, would browsers/ISP servers be smart enough to refresh the DNS record if the server using the old IP is offline?

Score:3
in flag

No, they would not.

DNS works completely independent from the application. DNS would resolve, and the application would just show that it can't connect.

If you plan to migrate a DNS entry to a new IP, reduce the TTL beforehand.

After the migration you can increase it again.

cn flag
I thought that could be a nice feature. Is there any reason this is not a common practice? (Assuming browsers/DNS servers can rate-limit the DNS queries for the case when a website is simply offline)
in flag
It's just not feasable. DNS requests work through a long chain of involved services, every one with it's own cache. There is no way for the application to control this.
cn flag
Sorry, I think I am missing something. For "www.example.com", I think the application can just ask the top-level domain registry (for "com") for the authoritative name server of "example.com". Then the application can get the CNAME record of "www.example.com" from the name server, whose value the domain owner should have updated to be the new IP. The application can then use the new IP.
cn flag
Bob
For the applications the sequence is almost always `the server is not working` `==>` `throw error message` and hardly ever `the server is not working` `==>` *"initiate debugging protocols"* and then run a whole sequence of tests to isolate a root cause ***and*** attempt work-arounds. You of course design your application to do so, but generally when the server is not responding, an error telling you that is "good enough". A server being down is also much more common than operators changing an IP-address without any mitigating measures for users still using the old IP-address.
in flag
@ZackLight That's not how DNS works.
cn flag
@Bob that makes sense. Glad to hear that this theoretically somewhat could work.
id flag
There are multiple layers here - the application usually asks the networking layer of the OS which in turn asks a recursive server which in turn asks the root servers. Nothing is really standardized - on Linux for example there are at least 2 different APIs with multiple implementations each that an application could use. It is impossible to change anything.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.