I am looking to set up a redundant network that uses a load balancing solution to redirect traffic between two servers. The load balancer I will use is HaProxy.

Example: Traffic -> Haproxy -> Server1 or Server2

Now, both Server1 and Server2 will have litespeed and MySQL (And various other components but they don't require redundancy)

so should Server1 or Server2 be cut out of the equation due to high load, downtime or attack there will be a server remaining that can handle all incoming traffic.

That is all fine, I was just explaining the scenario but what I need to know to do is all files updated on Server 1 need to be synchronised to Server 2 and vice-versa. A small delay would be acceptable for files, for example 2-5 minutes whereas database changes made on either Server1 or Server2 need to be replicated almost instantly.

So is this possible? I don't want to spend too much money on software etc. P.S the two servers are half way across the globe from eachother so I am not expecting instantaneous replication just as quick as possible.

Thanks in advance for you help.


It's certainly possible. For shared storage on the web nodes, look into GlusterFS.

The database redundancy you seek is not going to be easily accomplished when your two servers are in different datacenters. I would add a server to one location, that way you can set up an HA cluster for Mysql with a floating IP address (using DRBD and Heartbeat). You could then set up replication to your off-site 3rd server for disaster recovery.

For a decent level of redundancy you're going to want your webservers separated from your database servers as well. You should really check out RackerHacker's "Redundant Cloud Hosting Guide" as it covers a lot of the general setup:


  • Thanks very much for the help my friend. I think your solution sounds great. So rather than load balancing it would be more of a disaster recovery scenario. – Chris Oct 24 '10 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.