4 ms·
Yeah, DNS is a bitch. Best approach would be to host your DNS completely outside of your hosting company. This provides a certain level of resiliency. Changi
by brk 18y ago
Yeah, DNS is a bitch.
Best approach would be to host your DNS completely outside of your hosting company. This provides a certain level of resiliency.
Changing just about anything with DNS can take 6-24+ hours to be fully reflected on the Intartubes.
Just in summary, the DNS flow looks something like this:
Client asks DNS server what IP is www.foo.com
DNS Server has no idea (it could be in cache, but this is worst-case).
DNS Server looks up the root name server for foo.com and sees that NS1.BAR.COM is the nameserver for foo.com.
DNS server finds glue record for NS1.BAR.COM and finds that it has IP address 1.2.3.4
DNS asks 1.2.3.4 what IP is www.foo.com
DNS Caches answer based on TTL in response AND/OR sometimes its own settings to override too-low default TTLs
DNS Server tells Client PC www.foo.com == 1.2.3.4
Moving your domain from being handled by NS1.BAR.COM to NS1.BAZ.COM can take 6-12 hours to take effect, and then another 6-24 hours for most other servers to expire their caches.
Changing www.foo.com to move from 10.10.10.10 to 10.12.13.14 takes effect immediately on the nameserver (NS1...), but various other servers along the way (often including the client PC) will have cached the old information, and may not go out to see if the IP has changed for some period of time.
All in all, a "seemless" DNS move takes about 1 week end to end and goes through a few iterations in the middle.
I personally would probably setup a new server somewhere with HAProxy setup to shoot connections back to my "old" server. Then make nameserver changes to move DNS someplace better (this step might be able to be eliminated). Stage site on new server. Change DNS to send traffic to haproxy IP. Set haproxy to push traffic to new site. If things work as expected, set DNS to reflect IP of new server, and watch haproxy logs to see when traffic stops coming in (3-5 days typically).
The reason for the haproxy bit is that you can "steer" the traffic at will and immediately, no propagation changes. Many people have gotten burned on a new site/server where something doesn't work and DNS changes aren't immediate, so you're stuck with all these hits that can't be fulfilled.
Sorry if my answer is non-readable... I'm writing this while on a conference call :)
I can help you more if you want, email in my profile...