Monday, August 13, 2012

Migrating without downtime

SkyHi @ Monday, August 13, 2012
Using DNS, you can migrate your website, email, or other internet services to different servers with minimal downtime, here's the steps: 

(To minimize the chance that you would lose inbound email for your domain, we recommend our Mail Pathfinder service. With Mail Pathfinder, our servers become your MX records and accept mail for your domain and relay it to your mail server. When the old mail server goes offline, Mail Pathfinder will queue your mail, so that change will be transparent to the rest of the world. When the new mail server is online, all you need to do is reconfigure Mail Pathfinder to point to the new IP and your queued mail will be delivered.)

72 Hours prior to the migration:
Set the TTLs of each DNS record that will be changed down to 60 seconds.

24 Hours prior to the move:
Verify that your services are functioning on the new server(s). You may have to modify your local hosts file, or use a browser plugin that will let you modify your HTTP headers in order to see your web site on the new IP prior to migration.
Query the SOA record for your domain and record it.

At migration time:
Update all appropriate DNS records to point to the new IP addresses.
Empty all local DNS caches, including your local system DNS cache and yodur network/domain's DNS cache.

5 minutes after migration:
Query the SOA record for your domain and verify the Serial Number has been updated.
Query the DNS records directly against our nameservers to confirm our nameservers are advertising the new IP addresses.
Query your local DNS to verify it has picked up the new IP addresses.
Check your services directly, either by browsing to your web site from different locations, or checking that mail is flowing, etc.

If you observe any issues with your services, you can always revert back to the old IPs (assuming the servers are still available) and with the 60 second TTLs the records will revert very quickly.

24 hours after migration:
Increase the TTLs on all changed records back to 3600 seconds.

(NOTE: These time windows above are simple recommendations. The conditions of your migration may differ and require you to perform the above steps at different intervals.)