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

I would like to switch the DNS of our website without any service disruption

The server IP stays the same.
Usually it takes 24-48 hours to update the whole internet.
Is it possible to have both DNS work in parallel?

Important Note by JamesRyan:

Bear in mind that some DNS servers do not respect low TTLs and cache anyway. Expect some overlap.

^ this exactly is quite a problem.


Background:

I changed the DNS of our website to another Provider (bluehost which seems to be broken and quite often shows their ads page instead of our site) so I switched back to the old original DNS after ~2 hours.

The server's IP remained the same, so I hoped to not get any service disruption, because both DNS show the same server.

Now 24 hours later 30% of the internet still uses the broken / wrong provider (bluehost), which is not referenced in the whois. (concerning to Pingdom + several user report that they can't visit us)

share|improve this question

4 Answers 4

up vote 16 down vote accepted

Proper way to do it:

  1. Change the zone TTL to minimum - in most cases it's 300 seconds (5 minutes). Do not change any records at this stage.
  2. Wait 48 hours.
  3. Do the change. It will take just 5 minutes to propagate the changes.
  4. Revert TTL to standard 48 hours.

This procedure applies to all changes, not just NS changes. If you need to change the IP address for the A record, it will work exactly the same way. While this may not be absolutely necessary and in theory you could run two name servers at the time it's bad idea. You never know if you won't need to do emergency changes during this 48 hour period.

share|improve this answer
6  
Bear in mind that some DNS servers do not respect low TTLs and cache anyway. Expect some overlap. –  JamesRyan Dec 21 '12 at 12:14
    
> Bear in mind that some DNS servers do not respect low TTLs and cache anyway. <- i guess this is quite a problem and responsible for service disruption! –  Lukas Dec 21 '12 at 15:47
6  
Not in this case, so long as you keep both servers up through a 4 day switchover window. –  David Schwartz Dec 21 '12 at 16:58
1  
It's not clear whether or not this answer addresses the situation where nameservers stay the same, but webserver ip changes. And it definitely does not address how to bring the downtime to a few seconds. I am going to ask a new question. –  Buttle Butkus Jan 9 '13 at 2:37

A) If you are running site on shared hosting service - manipulate with DNS TTL if possible

B) If you are running your own servers - for minimal downtime use proxy on source server and IP extractor (forwarded_for header) on destination (so originating IP can be the same), move your files, after update DNS records and wait till traffic will stop on source server

share|improve this answer
    
You're answer seems like it might hold some hidden gems, but only people who already know what you are talking about can understand what you said. I'd like to add some links to your post, but I don't know for sure they are correct. Did you mean X-Forwarded-For? en.wikipedia.org/wiki/X-Forwarded-For And for IP extractor do you mean this: github.com/jonrohan/ip-extractor –  Buttle Butkus Jan 9 '13 at 7:17
1  
right, X-Forwarded-For for extractor, it should be web servers module which can do that, in case of apache httpd: mod_extract_forwarded, mod_realip, mod_realip2 etc. this module will translate all the information to the modules with lower priority like php etc. –  GioMac Jan 15 '13 at 14:25
    
IPExtractor has nothing to do with web service –  GioMac Jan 15 '13 at 14:26

First, let's get our terminology straightened out because it's not yet clear what you are asking.

There are three parts to your hosting setup:

  1. The registrar
  2. The nameserver hosting
  3. The server hosting

It's not uncommon for all three of these to be provided by the same company but there's no requirement for it. It's also quite common for there to be no separate charge for 2. when you have bought 1. from the same company, adding to the confusion.

The registrar is responsible for telling the maintainers of the parent domain that your domain exists and what its nameservers are.

The nameservers are responsible for mapping your domain and subdomains to IP addresses (and all of the other things that nameservers can do).

The server is the part you are probably most familiar with and is where the website requests and emails end up.

Once you are sure which one you have changed or want to change, can you modify the question to make it more clear?


I'm going to assume that you are changing your nameserver hosting. To do this, you must:

  1. Find a new nameserver host and set up all the records with them that you have at your current nameserver host.
  2. Contact your registrar and ask them to change the authoritative nameservers to be the new ones that you just set up. This step will take some time as they may not do it immediately and the TTLs involved are often 48 hours.
  3. Once all new DNS requests are arriving at the new nameservers, shut off the old ones.
share|improve this answer
    
thank you Ladadadada, i did exactly this, both DNS configurations had the same A records to the same server (and i hoped to not get any service disruption) - nevertheless it seems the old one (bluehost) didn't use the configuration anymore, because the whois information have already shown to the new server. –  Lukas Dec 21 '12 at 15:46
1  
Ah, that's unfortunate and poor form from Bluehost. They should not take your records out of their nameservers as soon as they have change the delegation. They should continue responding for at least 48 hours. –  Ladadadada Dec 21 '12 at 22:38

If you are changing your DNS provider (the nameservers displayed in whois) then yes you can run them in parallel. Looking at my domain, the TTL used by the GTLD servers (the ones that tell other Internet users who runs my DNS) is 48 hours. As far as I'm aware it's not possible to have this changed.

Usually all you'd do is get your domain registrar to change the nameserver entries making sure that the new provider is already set up, and that the old provider keeps their entries live for at least 48 hours.

As mentioned in the other answer, if you're just changing your own records, you can reduce the TTL on the record beforehand to give a near-instant swap over, although some bad DNS servers will still cache for longer.

share|improve this answer
    
> and that the old provider keeps their entries live for at least 48 hours. <- i guess this is what i did wrong. –  Lukas Dec 21 '12 at 15:50

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.