Redundancy Best Practices

This section describes considerations that should be made when your client applications are to be used with PubSub+ event brokers using redundancy features, such as high availability (HA). High availability involves using two brokers, a primary and a backup, that work together to provide seamless failover capabilities. For more information, see Event Broker Redundancy for High Availability.

High Availability Reconnection Settings

High Availability (HA) failovers typically take approximately 30 seconds. This duration accounts for the failover from one appliance to its mate within an HA redundant group. You should configure your applications to handle reconnection attempts to ensure minimal disruption. To provide a robust failover mechanism, Solace recommends that applications set their reconnect duration to last at least 300 seconds or 5 minutes. This reconnect duration accommodates the HA failover process and helps manage any additional delays that might occur. To allow for a reconnect duration of 5 minutes for HA redundant event brokers, set the following session properties to these values:

  • connect retries: 1
  • reconnect retries: 20
  • reconnect retry wait: 3,000 ms
  • connect retries per host: 5

For information about setting these properties on the client applications, see Configuring Connection Time-Outs and Retries.

Host Lists for Software Event Brokers

Applications using software event brokers should be configured with a host list of two addresses, one for the primary event broker and one for the backup event broker in the HA redundant group. The addresses can be either IP addresses or hostnames. Appliances in HA redundant groups share the same host address, so configuring multiple hosts is not necessary.

When the application attempts to connect to an event broker, it should follow the specified order in the host list. If the connection to the primary event broker fails, the client will automatically attempt to connect to the backup event broker after the specified number of retries per host. Therefore, setting a reconnect retries per host to a low value, such as 1, is recommended to facilitate quick failover.

Host lists are crucial in an HA setup to ensure that client applications can seamlessly switch to the backup event broker in case of a primary broker failure. The failover mechanism should ensure minimal disruption, typically taking approximately 30 seconds for the backup broker to become active and ready to handle client connections.