Comments on Setting Up A High-Availability Load Balancer (With Failover and Session Support) With Pound/Keepalived On Debian Etch
Setting Up A High-Availability Load Balancer (With Failover and Session Support) With Pound/Keepalived On Debian Etch This article explains how to set up a two-node load balancer in an active/passive configuration with Pound and keepalived on Debian Etch. The load balancer sits between the user and two (or more) backend Apache web servers that hold the same content. Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using keepalived, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. Pound is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.).
4 Comment(s)
Comments
Just a critical correction in the title vs the meat in this howto. "Etch" only has 1.1.12 in its repository making it so the vrrp script priority positively will not work as described.
Etch:
http://packages.debian.org/etch/keepalived
Lenny:
http://packages.debian.org/lenny/keepalived
Maybe the powers that be can change the title to "lenny" or add a section about apt pinning?
I've tested this with 1.1.12, and it was working for me. I'm not sure if Etch's 1.1.12 was patched so that maybe it has some capabilities of 1.1.13 already.
Looks like it will only half work in that configuration via 1.1.12 on etch. I think the confusion lies in the fact that keepalived won't complain about not having vrrp_scripting support. It just continues on its marry little way as if nothing is wrong. You'll know because you wont ever see VRRP_Script(chk_pound) success/failure messages since that part isn't there with etch's keepalived. In otherwords, pound failing wont cause the weights to affect the priority and it wont switch from master to backup.
On a good note, if you kill the server itself or keepalived specifically it will failover just fine the way it is written. I personally rebuilt the 1.1.15 packages from lenny on etch and everything seems to be working fine now.
Fantastic article and still relevant. I followed the instructions on Debian 9.2 Stretch (in December 2017) and got great results. I started using this setup (Debian 9, keepalived, pound) on production systems, seems to work great.
Thank you!