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.

We provide a hosted CMS for our customers, and when they want to point their domain name to their hosted site, we currently instruct them to create an A record that points to our load balancer's IP address.

When those servers fell over, the act of bringing a backup up and running in a different location was trivial compared to trying to get all customers to change their A records.

So I was wondering how we could remove that needed step.

Can we have everyone create a CNAME instead? have everyone point it to sites.oursite.com, and then we can change the DNS for sites.oursite.com locally and not have to bother them?

That sounds feasible, but we still would have the delay of propagating the DNS changes across ISPs. Is there something else we could do with our host to prevent that? Flush the DNS record some way, or maybe not use DNS but let Apache run a script to figure out what IP address we currently want to point to? It'd be nice to be able to just change the IP address and almost instantly have our system being served from another location.

share|improve this question

2 Answers 2

Two things:

  1. I think that using CNAME records is a good solution.

  2. As far as DNS propagation is concerned, DNS records don't propagate. You only need to be concerned that the TTL of the A record is sufficiently low to achieve a failover in a reasonable amount of time (1 hour?). When you change the A record it will only affect DNS clients that currently have the A record information in their DNS cache. Any DNS client that doesn't have the new information in their cache will be able to access the CMS immediately. Any DNS client with the information cached when a failover occurs will need to wait until the original A record TTL expires.

share|improve this answer
    
is there some way to not have to worry about the TTL (by not changing DNS)? Considering some of our clients' sites are very frequently trafficked, even 1 hour is a long time to be down. –  seanmonstar Feb 3 '10 at 22:38
    
You can set the TTL low enough that it becomes essentially irrelevant, but your DNS server needs to be ready to handle the extra load and page load times may take a hit because the IP has to be looked up constantly. It's a balancing act to be sure. You could go with something between 120 and 300 seconds (2-5 minutes) and be able to make changes quickly without having to worry about slowing things down too much. –  Justin Scott Feb 4 '10 at 20:01

It'd be nice to be able to just change the IP address and almost instantly have our system being served from another location.

In your case will both the old and new systems exist on the same network? If so migrating the traffic may be possible and easy to do by setting up a NAT on your firewall/router to redirect any traffic destined for the old address to the new one.

share|improve this answer
    
well the issue we just ran into was the data center crumbling. so we'd have a backup at another location altogether. –  seanmonstar Feb 4 '10 at 1:33

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.