1

I'm going to be moving servers for our website soon. Instead of having a long period of 'downtime' for clients because their DNS client is caching the entries for a 'long time', can I hint to the DNS servers that it should check for the IP address 'frequently'.

Is this Time To Live (TTL)? Minimum TLL?

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
Pure.Krome
  • 6,508
  • 18
  • 73
  • 87

3 Answers3

6

Yes, it is the Time To Live value that you should reduce. In normal operation it's typically set to between an hour and 2 days. So a day or two before the move, you should reduce it to somewhere from 10 to 30 minutes, as you see fit.

There are 3 common ways the TTL can be defined

  • TTL for the zone as whole, which is then inherited.
  • TTL set on each entry individually.
  • A TTL is set for the zone as whole, and some entries have a individual TTL setting which overrides the inherited value.

How to change the TTL will depend on which DNS server, or DNS hosting service you use. Here is a quick overview of the TTL value in BIND 9's configuration, which is useful since many services model their user interface somewhat after BINDs configuration.

  • Our dns is handled by our hosting provider. we're paying for dedicated servers, hosted by them. I'll add a support ticket and request the TTL to get changed. I think it's 3600 (whatever that is) and ask them to go down to 15 mins. – Pure.Krome Sep 07 '09 at 05:38
  • TTL is set in seconds, so 3600 / 60 = **60 minutes**. That is already fairly low. Your "average TTL" is half your TTL, i.e. your users are evenly spread across a spectrum from having just resolved your DNS name, to having resolved it 60 minutes ago. Thus the average **cache time left** for your population of users is half your published TTL; 30 minutes in this case. It may not be worth the bother to reduce TTL further. –  Sep 07 '09 at 06:54
  • If you're using secondary DNS servers, you should also make sure the refresh time in the SOA record is similarly short, so the secondaries will pick up updates quickly. – Gordon Davisson Sep 07 '09 at 19:06
2

There are some nice details in the following article that you may want to understand, as far as remote hosts honoring DNS changes:

A 2003 PDF report on an investigation of response to changes made with respect to honoring the TTL.

A thread on the NANOG mailing list about TTLs being honored

If you absolutely, positively, have to do the change with no downtime for any remote hosts, you probably need to set up the old server to proxy to the new server as part of the migration. Then hosts that honor the TTL will switch to the new server, and hosts that do not will hit the new server via the proxy on the old server.

We have used this technique successfully for several of our clients.

Sean

Sean Reifschneider
  • 10,720
  • 3
  • 25
  • 28
0

Yes, the TTL is what defines how long a record can be cached before querying the DNS server again for it.

Massimo
  • 70,200
  • 57
  • 200
  • 323