tags:

views:

136

answers:

2

I am trying to coordinate the move of a site from its current server to a new one. My original plan was to migrate the data to the new machine, which is already in place and the migration scripts tested successfully. I was planning to configure the original machine to proxy all requests to the new one, in order to ensure that anyone hitting the original machine before the DNS change fully propagates will still get proper response.

Someone made an alternative suggestion that I add the records for the new machine, without it actually serving any content. I was told that, under these circumstances, traffic would all hit the original IP. When the new records propagate, I am told I can turn off the old server and bring up the new server. I'm skeptical of trying this and having my migration in a half-way mode. Should I even attempt it or just stick to my original plan?

+1  A: 

There is nothing wrong with your original plan.

It's also a good plan when you don't control the DNS server(s) that you use.

[Edit] Also, since this sounds like a production environment, it is never a good idea to try something you are not familiar and comfortable with in a production environment.

The second idea does not sound at all bad, but just not optimal in this case. Go with what you know works.

Cheers,

-R

Huntrods
A: 

You cannot control how long before the records propagate, only how long before you are sure they have propagated.

The DNS records' TTL is the maximum time they can be cached; however, even before that time, people will already be hitting the site at the new address (for instance, if their DNS server did not have the record on their caches).

This means that any solution will have a window of time where some people are hitting the old addresses and other people are hitting the new addresses. Any migration solution must consider that scenario.

Your original plan is the best one, as long as you remember to proxy to the IP address (since you cannot know what the domain name is pointing to until the TTL has elapsed). An alternate plan (if you can have your site offline for some time) would be to simply take the old server offline, do the migration, bring the new server online, change the DNS records, and wait for the TTL to elapse; people will gradually start using the new server as the DNS records on their nameservers and browser DNS caches expire, and before that they only see an offline website.

The suggestion to add the records for the new machine without it serving any content is suspicious, since as soon as the record is added some people will start using it.

CesarB