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 few named vhosts on my apache2 debian server and I want to have a mirror server that can pickup as soon as the first server goes down. We can assume I have total control over both servers and /www data on both servers is regularly and incrementally synchronized using rsync.

I can see ways of doing it at the DNS level, but I'd like to have a community input on that. Are there any solutions for achieving this out there already?

Thanks

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

If both server are on the same subnet, you probably want to look for Heartbeat this will make server2 to take server1 IP of server1 fail. A simple example is http://www.linux-ha.org/GettingStarted/Apache

share|improve this answer
    
For a simple "A dies start B" solution, Heartbeat is what your looking for. If your looking to get into load balancing, then look at LVS. –  David Jun 16 '09 at 1:06
add comment

IPVS and keepalived are the combination to use. Depending on your configuration you can use both servers as long as they work and then just use one if the other one is failing.

Typically you should have redundant load balancers and then any number of webservers behind those.

You can even configure them to serve a static "FailWhale" page, however the configuration is not that simple, YMMV.

share|improve this answer
    
Thanks for your input, Server Horror. –  Wadih M. Jun 29 '09 at 19:16
add comment

Another possibility is to use UCARP (http://www.ucarp.org/):

UCARP allows a couple of hosts to share common virtual IP addresses in order to provide automatic failover.

Though beware that it works on the IP Level not on the Application Level! However a pro is that it all runs in Userspace, setup is very easy and it's compatible with UCARP versions running on different plattforms (i.e. the main server could be Linux and your Slave runs Solaris or Windows or whatever).

share|improve this answer
add comment

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.