The Ultimate Cheapskate Cluster
This is a variant of the Redundant Load Balancers Using VRRP
document, this time with the web servers and load balancers running on
just two servers. It's difficult to imagine a smaller cluster.
Pen offers fault tolerance by automatically rerouting traffic
from servers that are offline. But what if the load balancer
Using VRRP, it is possible to run two load balancers in an
active-passive failover configuration. This requires a
special vrrp daemon which can be found
See the instructions that come with vrrpd how to install it.
Install apache, pen and vrrpd on the two load balancer hosts.
Apache is configured to start before pen and listen
on only one address, 10.1.1.5 on server 1 and 10.1.1.6
on server 2. This is done with the Listen directive
Pen will listen on all remaining addresses, i.e.
10.1.1.2/3 and 10.1.1.4.
Start pen on both load balancers and check that both work
by surfing to http://10.1.1.2/ and http://10.1.1.3/.
Now start vrrpd like this on both load balancers:
vrrpd -i eth0 -v 1 10.1.1.4
Now try surfing to http://10.1.1.4/. One of the load
balancers will be active and respond at that address.
Disconnect that load balancer from the network to simulate
a failure. Now the other load balancer will take over
the address, restoring functionality.
In the example network, the firewall uses NAT, although
that is in no way necessary. A Cisco PIX
would be configured something like this:
static (inside,outside) 22.214.171.124 10.1.1.4 netmask 255.255.255.255 0 0
conduit permit tcp host 126.96.36.199 eq 80 any
Corrections and addition on The Ultimate Cheapskate Cluster from the mailing list.