Table of Contents

Load Balancing with HAProxy And Keepalived

General Information

Creating a highly available pair of load balancers with HAProxy and Keepalived.

Checklist


Network Addressing Setup

Network configuration used in the examples below.

Load Balancers

Web Servers (used in haproxy example config)




Install

Install the required packages on the load balancer servers


Configure

Configuring keepalived and haproxy.


Keepalived

Keepalived utlizes a Linux kernel implementation of VRRP. (Virtual Router Redundancy Protocol)

Official Site: http://www.keepalived.org/


HA-Proxy

HAProxy is a TCP/HTTP load balancer.

Official Site: http://www.haproxy.org/

Main Config

Frontend/Backend Configs

Additional Config Examples

Session Persistence


Logging

Setup logging for HAProxy.


Operate

Operating the load balancers.


Services

Start and enable the services on each node.


Reboots

Reboot procedure and dependencies.