HAProxy configuration for ELMA365 web
The architecture of a highly available ELMA365 cluster involves the interaction of ELMA365 application microservices within a resilient cluster. The HAProxy configuration discussed in this article assumes even load balancing of traffic between nodes in the high-availability Kubernetes cluster.
Example HAProxy configuration for ELMA365 web
HAProxy evenly balances client connections between nodes in the Kubernetes cluster, arriving at elma365.your_domain. Open the haproxy.cfg configuration file for editing using the command:
sudo nano /etc/haproxy/haproxy.cfg
Example configuration for load balancing to the Kubernetes cluster using HAProxy to add to the haproxy.cfg file:
### Web ELMA365 ###
listen elma365_web
bind haproxy-server.your_domain:80
mode http
balance leastconn
no option http-use-htx
option forwardfor
option httpclose
server elma365-1 elma365-1.your_domain:80 check
server elma365-2 elma365-2.your_domain:80 check
server elma365-3 elma365-3.your_domain:80 check
### Web ELMA365 ###
Example HAProxy configuration using SSL
SL can be enabled if OpenSSL support is embedded. 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. SSL возможно, если встроена поддержка OpenSSL.
If a directory name is used instead of a PEM file, all files found in that directory will be loaded in alphabetical order, except for files ending in .issuer, .ocsp, or .sctl (reserved solutions).
In the ca-file parameter, specify the path to the PEM file containing the root certificate. Read more in the Configuration Manual for the HAProxy version used. Example for HAProxy 2.5:
### Web ELMA365 ###
listen elma365_web
bind elma365.your_domain:443 ssl crt /etc/haproxy/ssl/elma365-server.your_domain.pem
mode http
balance leastconn
no option http-use-htx
option forwardfor
option httpclose
server elma365-1 elma365-1.your_domain:443 check inter 2s ssl crt /etc/haproxy/ssl/elma365-server.your_domain.pem ca-file /etc/haproxy/ssl/rootCA_your_domain.pem
server elma365-2 elma365-2.your_domain:443 check inter 2s ssl crt /etc/haproxy/ssl/elma365-server.your_domain.pem ca-file /etc/haproxy/ssl/rootCA_your_domain.pem
server elma365-3 elma365-3.your_domain:443 check inter 2s ssl crt /etc/haproxy/ssl/elma365-server.your_domain.pem ca-file /etc/haproxy/ssl/rootCA_your_domain.pem
### Web ELMA365 ###
|
Restart HAProxy:
sudo systemctl restart haproxy
Found a typo? Highlight the text, press ctrl + enter and notify us