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
Enabling SSL is possible if OpenSSL support is built in. In the crt parameter, specify the path to the PEM file containing the required certificates and associated private keys (fullchain certificate). If the file does not contain a private key, HAProxy will attempt to load the key from the same path with a .key suffix.
If a directory name is used instead of a PEM file, all files found in that directory will be loaded in alphabetical order, excluding files ending in .issuer, .ocsp, and .sctl (reserved solutions). ### S3 MinIO ### |
Restart HAProxy:
sudo systemctl restart haproxy
Found a typo? Highlight the text, press ctrl + enter and notify us