HAProxy Enterprise Documentation 1.8r2

Highly-available setup

Note

This section builds upon the multi-level setup section. Please read the Multi-level setup section first.

You can set up a cluster of Stick Table Aggregators configured for high-availability.

As an example, we will consider the following setup:

https://cdn.haproxy.com/documentation/hapee/1-8r2/assets/cluster-wide-tracking-ha-setup-3e25d8ecf8c45676e4240bfd3064aa1f880aec0f81fe28afeaf9cd0516086fd7.png

Configure the high-availability cluster Stick Table Aggregators

In a cluster of highly available Stick Table Aggregator, you have two levels of aggregators.

The top-level should have the same configuration files at /etc/hapee-extras/hapee-stktagg.cfg as those we created in the Multi-level setup section.

We will implement the following sandbox configuration:

Top-level Stick Table Aggregator aggr3

global
  stats socket /tmp/stktagg.socket

aggregations myl2
  peer aggr3     192.168.56.113:22222 local
  peer aggr1     192.168.56.111:11111 down
  peer aggr2     192.168.56.112:11111 down
  from .aggr to .l2

Top-level Stick Table Aggregator aggr4

global
  stats socket /tmp/stktagg.socket

aggregations myl2
  peer aggr4     192.168.56.114:22222 local
    peer aggr1     192.168.56.111:11111 down
  peer aggr2     192.168.56.112:11111 down
  from .aggr to .l2

The high-availability cluster Stick Table Aggregators' configuration files are the same on both nodes, except for the local, self-referencing peer directive in the aggregations section.

Top-level Stick Table Aggregators do not communicate.

Configure the intermediate Stick Table Aggregators

We will edit the intermediate Stick Table Aggregator configuration files we created in the Multi-level setup section. We will implement the following sandbox configuration:

Intermediate Stick Table Aggregator aggr1

aggregations myaggr
  peer aggr1  192.168.56.111:11111 local
  peer hapee1 192.168.56.101:44444
  peer hapee2 192.168.56.102:44444
  peer aggr3  192.168.56.113:11111 up group 1
  peer aggr4  192.168.56.114:11111 up group 1
  from .uncombined to .aggr
  forward .l2

Intermediate Stick Table Aggregator aggr2

aggregations myaggr
  peer aggr2  192.168.56.112:11111 local
  peer hapee3 192.168.56.103:44444
  peer hapee4 192.168.56.104:44444
  peer aggr3  192.168.56.113:11111 up group 1
  peer aggr4  192.168.56.114:11111 up group 1
  from .uncombined to .aggr
  forward .l2
  1. Declare the new top-level aggr4 Stick Table Aggregator on the aggr1 and aggr2 intermediate Stick Table Aggregators configuration file.

    aggregations myaggr
      peer aggr1  192.168.56.111:11111 local
      peer hapee1 192.168.56.101:44444
      peer hapee2 192.168.56.102:44444
      peer aggr3  192.168.56.113:11111 up
      peer aggr4  192.168.56.114:11111 up
      from .uncombined to .aggr
      forward .l2
  2. Define a cluster of Stick Table Aggregators through the group directive.

    aggregations myaggr
      peer aggr1  192.168.56.111:11111 local
      peer hapee1 192.168.56.101:44444
      peer hapee2 192.168.56.102:44444
      peer aggr3  192.168.56.113:11111 up group 1
      peer aggr4  192.168.56.114:11111 up group 1
      from .uncombined to .aggr
      forward .l2

As for the multi-level setup, the intermediate Stick Table Aggregators' configuration files are the same, except for the peer directives in the aggregations section, but the ones containing the up keyword.

There are now two peer directives with the up keyword. Intermediate Stick Table Aggregators are aware of two top-level Stick Table Aggregators seen as a single cluster.

Configure the HAProxy Enterprise nodes

The HAProxy Enterprise configuration files are the same as for the multi-level setup.


Next up

Display aggregated data