Setup HAProxy for Cluster

HAProxy Load Balancer Configuration for SearchBlox Cluster

HAProxy can be configured as a load balancer to distribute search queries among the Search Servers in a SearchBlox Cluster. Here’s how to install, configure, and start HAProxy:

HAProxy Installation

For CentOS 7:
Run the following command to install HAProxy:

yum install haproxy

For Ubuntu 18.04:
Run the following command to install HAProxy:

apt-get install haproxy

Update Configuration File

Open the Configuration File:
Edit the HAProxy configuration file located at:

/etc/haproxy/haproxy.cfg

Use the vi editor or any text editor:

vi /etc/haproxy/haproxy.cfg

Based on the number provided in the preceding screenshot, the corresponding details are as follows:

  1. To Enable HA Proxy dashboard configuration
    Note: You can enable HAProxy Dashboard if required

  2. Enabling the Load Balancer for HTTPS applications
    Note: You will need to provide the SSL certificate.

  3. For adding the servers into load balancing configuration

Start HA Proxy Server

To start haproxy

systemctl start haproxy

To get status of haproxy

systemctl status haproxy


What’s Next

You can go through the related sections below