Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
    
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 7 '09 at 5: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. –  Jesper Mortensen Sep 7 '09 at 6: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 7 '09 at 19:06

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.