How to setup 2 server or 4 server load balancer/cluster? LAMP/MysqlReplication/Rsync

cimmer used Ask the Experts™
Our company is currently running a single webserver for the company site with a RAID5 server. While this setup prevents downtime from hard drive failure, we are in need of an upgrade and are looking into possibly running 2 servers where one is the master and the other is in sync and available if the master dies or breaks. We want 100% uptime since we have alot of things hitting this box constantly.

What are your ideas on how to set something up like this?

Ideally we would want to use LAMP on UBUNTU 8 or 9. If we were to power down Server1, Server2 would take over the requests until Server1's hardware or software is fixed and appears back online. Is something like this possible with just 2 servers?

From what I could find... The popular setup would be 2 load balancers (checking availability of each other)  and 2 web servers (running rsync and mysql replication) with 5 IP addresses. Is it possible to do a setup like this without the need for the 2 load balancers?  

Im looking for the protection if webserver1 goes down that webserver2 will take over so we can then fix
webserver1 without downtime. Whats the cheapest and best way to do this with 2 servers? If it isnt possible with 2 servers what is the best way to do it with 4?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I was looking for a similar solution and came across this page:

I'm not sure how old this article is but it shows some merit for the application you are a looking for.  

Good luck!
i would recommend 'dns load balancing' for cheapest disaster solution and splitting the load, you just need a dns server, and two synced machine. You can use whatever software using before.

you can find information about dns load balancing at
I successfully built a load balanced apache server cluster last week in the lab using the following tools:

-Two servers running vmware esxi
-Two virtual pen machines (pen  is a load balancing software that runs on linux).  If you use esxi you can download a 4mb linux OS template called "hercules load balancer" which incorporates a number of tools (pen, vrrp) for load balancing and HA between two load balancers using a virtual IP.  Vrrp (virtual router redundancy protocol) is used to load balance the load balancers (uber redundancy!) and is a snap to setup.  It also allows you to "bond" the two load balancers under one virtual IP address so you can avoid any kind of round robin dns disasters (trust me, round robin dns is a NIGHTMARE... I speak from 150000 email customers experience)
-Two virtual apache machines, one the master node where changes are made, a second node which has the data rsynced to it.

You configure the Hercules load balancers to share a virtual IP, then you define cluster nodes behind the load balancers... load balancing done!
Then the hardest part is configuring your apache server with rsync and migrating the appropriate directories and setting up cron jobs to keep your httpd daemon up-to-date on the slave node.

Good luck!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial