HAProxy Enterprise Documentation 1.6r1

Layer 4 Load Balancing

To create an active-active cluster of load balancers, you can place another tier of HAProxy Enterprise instances in front. These load balancers operate at Layer 4, the Network layer, and load balance the load balancers. Because HAProxy Enterprise has the ability to check the health of the lower-tier of load balancers, it can remove unhealthy instances as needed.

[Layer 4 load-balancing]

Deploy Layer 7 load balancers

Create a tier of load balancers that will, themselves, be load-balanced:

  1. Deploy at least two servers to host HAProxy Enterprise. Add one or more static IP addresses to each server.

  2. Install HAProxy Enterprise on each server.

  3. Configure them to receive traffic on the assigned IP addresses and relay it to backend application servers. Other than the addresses, their configurations should match.

Deploy Layer 4 load balancers

Create a tier of load balancers that will load balance the layer 7 HAProxy Enterprise servers:

  1. Deploy one or more servers to host HAProxy Enterprise. These will load balance the other load balancers.

  2. If you deploy multiple load balancers in this tier, configure them in active-standby mode.

  3. Configure them to relay traffic to the layer 7 load balancers. In the following example, a listen section defines the pool of upstream load balancers:

    listen load_balancer_cluster
       mode tcp
       bind :80
       option tcplog
       balance roundrobin
       server lb1 check
       server lb2 check

Next up

DNS Round-robin