http://www.unixmen.com/configure-high-available-load-balancer-haproxy-keepalived/

This tutorial explains how to set up a two-node load balancer with HAProxy</a> and keepalived on CentOS 7. The load balancer sits between the user and two (or more) backend Apache web servers that hold the same content.  If one of them is down, all requests will automatically be redirected to the remaining backend server. which means the users will not notice any disruption of the service.

For configuring HA-Load balanceer, You need 2 virtual/physical servers for the load-balancers and 2 virtual/physical servers to load-balance. In addition to the 4 IP addresses needed by the servers themselves, a fifth virtual IP address (VIP) is necessary. The two load-balancers and the VIP need to be in the same network segment.

Piranha</strong> has been replaced in RHEL7/CENTOS 7</strong> with HAProxy</strong> and keepalived</strong>. So, HAProxy</strong> will be used as load-balancing software, keepalived</strong> as high availability solution and apache</strong> as software to load-balance.

Host details:</strong></h4>