BRIX On-Premises > Prepare infrastructure > Load balancer / Configure HAProxy for RabbitMQ

Configure HAProxy for RabbitMQ

Highly available BRIX cluster architecture involves the interaction of BRIX application microservices with a RabbitMQ message broker cluster. To evenly balance traffic between RabbitMQ cluster servers, install a HAProxy configuration. This will ensure stable system operation in case of a failure.

Example of a HAProxy configuration for RabbitMQ

This configuration is prepared for load balancing traffic in a RabbitMQ cluster deployed according to the instructions in RabbitMQ cluster. HAProxy is used for this, providing the following:

  • Balancing client connections (AMQP) coming to haproxy-server.your_domain:5672 across the cluster servers.
  • Proxying client connections to the RabbitMQ web interface (HTTP-based API) coming to haproxy-server.your_domain:15672.

In order to create a HAProxy configuration for RabbitMQ, follow these steps:

  1. Open the haproxy.cfg configuration file for editing using the following command:

sudo nano /etc/haproxy/haproxy.cfg

  1. Edit the haproxy.cfg configuration file:

Configuration example:

Example of a HAProxy configuration with SSL

  1. Restart HAProxy to apply changes:

sudo systemctl restart haproxy