Route Health Injection
Route Health Injection (RHI) is an optimized version of a third party software that allows for the control of routing protocol announcement based on the health of the network and the HAProxy Enterprise service for active/active clustering.
Install the RHI module
-
Install RHI using your package manager:
# On Debian/Ubuntu
$ apt install install hapee-extras-rhi
# On CentOS/RedHat
$ yum install install hapee-extras-rhi
# On SUSE
$ zypper install install hapee-extras-rhi
-
Make sure that you configured the HAProxy Enterprise socket, which enables the Runtime API, and which RHI uses to analyze the status of proxies and backends:
global
stats socket /var/run/hapee-1.8/hapee-lb.sock user hapee-lb group hapee mode 660 level admin
-
Update the RHI settings to point to the socket's path by adding the following line to the file /etc/default/hapee-extras-rhi:
HAPEE_LB_SOCKET="/var/run/hapee-2.1/hapee-lb.sock"
-
Enable and start the RHI service:
$ sudo systemctl enable hapee-extras-rhi
$ sudo systemctl start hapee-extras-rhi
How RHI works
RHI comprises two layers:
The hapee-extras-route
daemons (one for IPv4 and one for IPv6) interact with the infrastructure's core routing system.
-
The hapee-extras-rhi
daemon analyzes the status of frontends or backends managed by HAProxy Enterprise and updates route daemons following the rules described in its configuration.
The diagram below shows these interactions:
The hapee-extras-rhi
daemon checks the proxies every second.
A proxy is considered as failing after three consecutive DOWN statuses.
When HAProxy Enterprise is reloaded after a proxy is removed (but still checked), then hapee-1.8-rhi
carries on using the last status reported for the missing proxy.
Manage the RHI process
$ sudo service hapee-extras-route {start,stop,restart}
$ sudo service hapee-extras-route6 {start,stop,restart}
Manage the RHI daemon process
$ sudo service hapee-extras-rhi {start,stop,restart,reload}
Example RHI configuration
To announce the IP address 10.200.200.200/32 when the backends be_static and be_app are available, add the following line into hapee-extras-rhi configuration file:
10.200.200.200/32 = all(b:be_static,b:be_app)
Next up
Realtime cluster-wide tracking