LAMP - perbal and wackamole - suggestions pls.
adam at hjksolutions.com
Fri May 11 20:54:55 UTC 2007
On Fri, May 11, 2007 at 09:41:43PM +0100, Ashish Padave wrote:
> 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
Run two instances of perlbal, and use Round Robin DNS to load balance between them.
10.1.0.10 - Machine A
10.1.0.11 - Machine B
www.foosite.com = 10.1.0.10, 10.1.0.11
This will cause some portion of the internet to have an issue when either
machine goes down, in that they may have already cached (or recieve) the down
boxes IP upon request of your site.
You can resolve this by sticking another layer on top, using either a hardware
load balancer (F5, Foundry, Cisco, Netscaler all come immediately to mind) or
LVS (with keepalived for HA). Have that load balancer feed to your perlbal
This would bring the total to 4 machines, two of which are load balancers in
hot standby mode.
> 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
You could use keepalived to take over the other IP address and fire up
Perlbal, I suppose. I would just put two LVS boxes in front and call it a day,
personally. Load balance your DNS too, while you're at it, so that you can
take transparent outages there without making anyones resolver slow down.
HJK Solutions - We Launch Startups - http://www.hjksolutions.com
Adam Jacob, Senior Partner
T: (206) 508-4759 E: adam at hjksolutions.com
More information about the perlbal