HAProxy Load balancer on Virtual IP

This would be the micro post!

Requirement:

I have configured 2 HAProxy load balancer which sends request to 3 different backends. But I wanted to make both HAProxy load balancer to be Highly Available. So I was looking for solution approach to assign Virtual IP address which keeps floating between two HAProxy nodes based on their availability. So I found "ucarp" package. Quite simple and 4 lines configuration makes your thing work.

So I did below mentioned changes in /etc/ucarp/vip-001.conf file of ucarp.

VIP_ADDRESS="192.168.133.250"
PASSWORD="simple_password"
BIND_INTERFACE="eth0"
OPTIONS="--shutdown --preempt"
SOURCE_ADDRESS="192.168.133.130"

Here, 
VIP_ADDRESS is the IP address which you want to assign as Virtual IP. 
PASSWORD parameters needs to be same in both HAProxy load balancer to make sure that both ucarp are sharing same information.
BIND_INTERFACE is the network interface you have in your server
SOURCE_ADDRESS is the Local Static/Dynamic IP addres associated with machine. You need to set this address according to the server's IP address.

Once you make above mentioned you can save and make "ucarp" service running by giving below command.

service ucarp start

And make it running at startup by below command.

chkconfig ucarp on