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

Configure HAProxy for Redis Sentinel

The architecture of a high-availability BRIX cluster involves interaction between the BRIX application microservices and Redis Sentinel. To ensure reliable load balancing within the system, configure HAProxy for Redis Sentinel. This setup allows traffic to be redirected to the primary Redis server in case of a technical failure, ensuring continuous system operation

Example HAProxy configuration for Redis Sentinel

ВThis article provides a configuration for identifying the primary Redis server and redirecting traffic to it. HAProxy will automatically check the 6379 port on Redis servers and determine the current server with the master role.

Steps to create HAProxy configuration for Redis Sentinel:

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

sudo nano /etc/haproxy/haproxy.cfg

  1. Make changes to the haproxy.cfg configuration file:

Configuration example

  1. Restart HAProxy to apply changes:

sudo systemctl restart haproxy

After completing the HAProxy configuration, traffic will be directed to the primary Redis server (master). In case of failures, this setup ensures the stable operation of the system.