LAMP - perbal and wackamole - suggestions pls.

Ashish Padave ashishpadave at gmail.com
Fri May 11 20:41:43 UTC 2007


Greetings everyone,

We are working on a LAMP project. We plan to use just 2 servers. These 2 
servers will be running the Apache webserver and the Mysql. Mysql we plan to 
use in Master-Master mode. Why we plan to this? So that each loadbalanced 
request will get through to one of the two servers. The PHP script running 
on the servers will write to the local database (localhost), while the other 
will replicate it.

This way we have a Webserver/Mysql combination always even if one of the 
boxes were to fail.

Having two webservers means two IP's. How can I offer load-balancing without 
introducing a third box (which would be a SPOF) which redirects requests to 
one of the two servers. I think I can run wackamole on each of the boxes, so 
that if one was to fail, the other would take ownership of the IP of the 
failed server and continue to serve requests for the failed IP. But thats 
the high-availability part of it.

How do I loadbalance is the BIG question. Is it even possible? Can perlbal 
help me?

Nick Gerakines suggested :

For a two machine setup, you'd have something like this:

Machine A: dns, apache, mysql, perlbal
Machine B: dns, apache, mysql

Requests hit perlbal which sits on port 80 and watches for requests, the 
apache servers are running on a different port, lets say 1071, and the 
perlbal round-robins the requests between the two. Each apache talks to the 
local mysql. Each mysql is configured to slave off of the other (hence the 
master-master config).

If one of the machines were to go down you can tell perlbal to only server 
from the single apache without having to restart anything.

This works very well if apache/mysql goes down, but if the entire box fails 
then you are in trouble. Generally speaking having services that reconfigure 
network settings and take ownership of ips are prone to failure.

My BIG question is can perbal with wackamole or something else, help me to 
serve requests even if the machine hosting perlbal (Machine A) went down 
completely.

Thank you for taking time to read the big message ;)

Regards,

Ashish 



More information about the perlbal mailing list