HAProxy and Keepalived for Highly Performance Load-Balancing on Ubuntu
This article explains how to set up a two-node based load balancers in an active/passive fashion, using HAProxy and keepalived on Ubuntu Server.
HAproxy is a high-performance and highly-robust HTTP and TCP load-balancer which provides cookie-based persistence, auto failover, header modification on the fly, weighted load balancing, advanced logging and many more more features. It can easily handle up to ten thousands hits per second on modern hardware(s), and even with thousands of simultaneous connections. Unlike other free load-balancing solutions, this product is used by a few hundreds of people around the world - but those people run very big sites serving several millions hits. But it's a too good piece of s/w - which getting popular very fast.
keepalived is to add a strong & robust keepalive facility to the HAProxy load-balancers (also known as directors). This is written in C with multilayer TCP/IP stack checks (Layer3, Layer4 & Layer5/7). Here in examples, Keepalived implements an independent VRRPv2 stack to handle HAproxy directors failover.