How to achieve zero downtime website hosting transition

domain-name-systemhosting

Background:

I am a programmer. I still have a lot to learn about hosting and DNS. I am using a cheap shared hosting provider (DreamHost) to host a client website. They have decided that they would like to manage their own account. I thought this would be as easy as asking DreamHost to just move my stuff to its own account, but apparently it is not this easy.

The gist of it is that since DreamHost is hosting the DNS records, they have to remove the DNS records (for a short period of time) in order for the DNS systems to clear their caches, then re-instate the DNS records which will point to the new account (hosted on some new server in their data center)…at least that's how I understand it anyway. Here's their actual response:

— What amount of downtime can I expect? Are we talking minutes/hours/days?

The length varies by location and the amount of time it takes you to
recreate the hosting for the domain on the destination account, but
would be in the range of minutes to hours (days would be for extreme
DNS caching).

— Why will there be new DNS records? Won't the DNS records stay the same since
the account is still hosted and registered with dreamhost?

The reason is that you are not guaranteed to be hosted on the same
machine on the destination account. Since it would be a new machine,
there's new network addresses used, so that's a DNS change to have the
new machine address information set for the domain. In case it wasn't
clear, the domain is completely removed from the Dreamhost DNS system
for a (brief) time, so when it's added back, the system treats it like
any other domain that's added. That's why all the content must be
backed up before it's removed. No pointers to that content would exist
(and in some cases, the content becomes completely unavailable,
permanently).

Question:

My question (for you professional server administrators): How can I transfer the code, database, and subdomains in a way that has the least amount of down-time, and so email (hosted by Google Apps) doesn't get lost? Is the DreamHost recommended way, the best way? Would it reduce down-time to transfer to another host, then transfer back to DreamHost? Am I making a big deal out of something that isn't going to get noticed if it happens late at night?

Best Answer

Normally when changing the public IP of a website I like to run the site on both IPs for at least a couple of days as there are lots of people out there who have cached IPs in their DNS servers and they'll keep getting the old IP. Using this approach, assuming that when Dreamhost removes the website from DNS they also shutdown the old site on the old server people using the cached (now wrong) IP would get an error message instead of the site.

The worst I've seen was when moving one site for a client we had people hitting the old server for a month (just a couple people). We ended up having to call those clients to have them flush their DNS cache manually.

Related Topic