ELMA365 On-Premises > Prepare infrastructure > Load balancer / Configure HAProxy for S3 MinIO

Configure HAProxy for S3 MinIO

In an ELMA365 high availability cluster, microservices of the ELMA365 application interact with a MinIO cluster. This article provides guidelines for how to configure HAProxy to load balance the nodes of the MinIO cluster.

Example configuration of HAProxy for MinIO

This article describes configuration of load balancing for a MinIO cluster deployed according to the instructions in the MinIO cluster article.

HAProxy balances customer traffic received at minio.your_domain:9000 across the cluster’s nodes.

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

sudo nano /etc/haproxy/haproxy.cfg

Here is an example of configuring load balancing for a MinIO cluster using HAProxy. Add the following to the haproxy.cfg file:

### S3 MinIO ###
listen s3minio
    bind minio.your_domain:9000
    mode tcp
    balance leastconn
    server minio1 minio-server1.your_domain:9000 check inter 2s
    server minio2 minio-server2.your_domain:9000 check inter 2s
    server minio3 minio-server3.your_domain:9000 check inter 2s
    server minio4 minio-server4.your_domain:9000 check inter 2s
### S3 MinIO ###

Example of configuring HAProxy using SSL

Restart HAProxy:

sudo systemctl restart haproxy

Found a typo? Highlight the text, press ctrl + enter and notify us