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.

I have a website which is very large and has a large user-base. I am trying to think of a 'best practice' way to create a back up or mirror website, so if something happens on domain.com, I can quickly point the site to backup.domain.com via 401 redirect. This would give me time to troubleshoot domain.com while everyone is viewing backup.domain.com and not knowing the difference.

Is my method the ideal method, or have you enacted better methods to creating a backup site? I don't want to have the site go down and then get yelled at every minute while I'm trying to fix it. Ideally I would just 'flip the switch' and it would redirect the user to a backup.

Any insight would be greatly appreciated.

share|improve this question
    
A high availability solution is going to depend on your architecture, resources, and requirements. –  Warner May 11 '10 at 21:06
1  
Please use example.com rather than domain.com for examples (see rfc2606 rfc-editor.org/rfc/rfc2606.txt) –  Joel Coel May 11 '10 at 21:19
1  
@Joel, please post this in all of these posts: serverfault.com/search?q=domain.com :) (just kidding) - or even better post in meta a request to include a script that reminds people about this whenever someone types "domain.com" –  l0c0b0x May 11 '10 at 21:25
3  
@Joel, that has to be the most trivial nit pick I've seen on this site so far. Besides, an RFC is not a standard. It's just a precursor to a proposal for a standard. i.e. It's just a suggestion. –  John Gardeniers May 11 '10 at 21:38
add comment

2 Answers

For this types of cases where you'd like a quick failover to a different host (in case your webhost bombs), configure a low TTL (Time To Live) on your web host's DNS record.

I'm not sure how low you can go, probably minutes. What this means is that DNS servers will only cache that address for that period of time.

share|improve this answer
    
would something as simple as switching a 301 to direct traffic to backup.domain.com (exact copy of the main domain.com, just a backup) work as well? –  HollerTrain May 11 '10 at 22:57
    
Here's a good resource I found on my links: sebastians-pamphlets.com/… –  l0c0b0x May 11 '10 at 23:17
add comment

I would think that best practice for a very large site with a large userbase would be to put some kind of load balancer in front of everything, which might just be round robin DNS in simple cases. This way, your architecture in the backend may be as simple as two copies of a static site or a complicated clustered system with multiple databases and you can let the balancer handle the immediate response to a failure. How you replicate in the backend however, is totally dependent on your current system, and since you don't give any infos, no one can suggest anything.

share|improve this answer
    
the site is a basic WP site with some user accounts. Everything is via database. where is best place to read more about "load balancing"? –  HollerTrain May 11 '10 at 22:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.