Load Balancer Health Checks
This topic discusses the Solace PubSub+ event brokers response to load balancer HTTP health checks, and how to configure an event broker's health check related settings.
In many operational environments, such as clouds and PaaS, you will need to operate the Solace PubSub+ event brokers in conjunction with an environment provided load balancer. For a load balancer to operate properly with an event broker and send it appropriate traffic, the event broker interacts with the load balancer’s health monitoring feature to keep the load balancer up-to-date on the event broker’s operational status. The HTTP health check probe is one of the most common types of health checks supported by load balancers and is the one responded to by the event broker.
On a fresh installation or a reload of a default configuration, the feature is enabled at start-up on the software event broker and disabled on the appliance. When upgrading from an earlier version, the feature is disabled on both the software event broker and appliance.
Software Event Broker Response to Health Checks
A Solace PubSub+ software event broker responds to load balancer HTTP health-check GETs on both /health-check/guaranteed-active
and /health-check/direct-active
in accordance with the following table.
Solace PubSub+ Software Event Broker State | Redundancy Configured | Redundancy Not Configured |
---|---|---|
Solace PubSub+ software event broker Active |
for 200: if the message spool is up 503: if the message spool is down for 200 |
for 200: if the message spool is up 503: if the message spool is down for 200 |
Solace PubSub+ software event broker Standby |
for either 503 |
for either N/A |
Solace PubSub+ software event broker Monitoring |
for either 503 |
for either N/A |
Software Event Broker's Health-Check Listen-Port
New installations of the Solace PubSub+ software event broker by default actively listen on port 5550 and 5553 (if using TLS/SSL) for load balancer health checks, but it is possible to change the listen-port setting to some other value using either Solace CLI or a configuration key.
Setting with CLI
To change the port setting, execute the health-check listen-port
command:
solace(configure/service/health-check) # listen-port <port> [ssl]
To restore the listen-port to its default value, execute the no
version of the previous command:
solace(configure/service/health-check) # no listen-port [ssl]
Where:
ssl
specifies the TLS/SSL health-check listen-port.
Setting with a Configuration Key
At creation and start-up of a software event broker, the service/healthcheck/port
or service/healthcheck/tlsport
configuration key can be used to set a specific port to use as the load balancer listen-port.
For information on initializing software event broker containers with configuration keys, refer to Initializing a Software Event Broker Container.
Appliance Response to HTTP Health Checks
A Solace PubSub+ appliance responds to load balancer HTTP health-check GETs on both /health-check/guaranteed-active
and /health-check/direct-active
in accordance with the table below.
The appliance does not support hostlist high-availability (HA) failover, so the /health-check/guaranteed-active
health check is only useful across multiple HA appliance pairs. The /health-check/guaranteed-active
could be used with the appliance in cases where the clients are using MQTT QoS1 clean sessions with a load balancer distributing incoming HTTP requests across multiple appliances not running HA.
Appliance State | Redundancy Configured | Redundancy Not Configured | ||
---|---|---|---|---|
|
Static IP | Primary/Backup IP | Static IP | Primary/Backup Ip |
Solace PubSub+ Appliance Active |
for 503 for 200 |
for 200: if the message spool is up 503: if the message spool is down for *200 |
for either 200 |
for either 200 |
Solace PubSub+ Appliance Standby |
for 503 for 200 |
for N/A for *200 |
for either N/A |
for either N/A |
* When using /health-check/direct-active
, with redundancy configured, the primary and back IP addresses are transferred to the active event broker.
The guaranteed health-check API is only supported for an Active/Standby redundancy configuration.
Appliance's Health-Check Listen-Port
On a fresh installation or when reloading the default configuration, the load balancer health checking is disabled on the Solace PubSub+ appliance and must be manually enabled.
By default, the Solace PubSub+ appliance listens on 5550 and 5553 (if using TLS/SSL) for load balancer health checks, but it is possible to change the listen-port setting to some other value using Solace CLI.
Setting with CLI
Enable the health-check
and execute the health-check listen-port
command to change the port setting:
solace(configure/service/health-check) # no shutdown
solace(configure/service/health-check) # listen-port <port> [ssl]
To restore the listen-port to its default value, execute the no
version of the previous command:
solace(configure/service/health-check) # no listen-port [ssl]
Where:
ssl
specifies the TLS/SSL health-check listen-port.
How to Stop Listening to a Health Check
To stop listening to a load balancer's health-check, execute the health-check shutdown
command:
solace(configure/service/health-check) # shutdown [plain-text] [ssl]
To restore heath-check listening, execute the no shutdown
command:
solace(configure/service/health-check) # no shutdown [plain-text] [ssl]
Where:
plain-text
specifies the plain-text health-check listen-port.
ssl
specifies the TLS/SSL health-check listen-port.
If you execute the shutdown
or no shutdown
command with no keywords, the event broker disables or enables both ports.