Query Engine Replica Load Balancer Node Installation
Audience: System Administrators
Content Summary: A load balancer should be installed and configured to act as a reverse proxy for the Query Engine Replica nodes. The load balancer should be installed on a dedicated node, but can be collocated with one of the Web Service nodes. If collocating, the web server node hosting the load balancer will be referred to for the remainder of this section as the query engine load balancer node.
Install haproxy on the query engine load balancer node.
The following command must be run as
yum install haproxy
Configure haproxy by creating
global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon defaults mode http log global retries 3 timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 60m timeout server 60m timeout check 10s maxconn 3000 listen query_engine_replicas *:5432 mode tcp balance roundrobin option tcp-check # Create an entry for each replica node: # Example: server <name> <query engine replica hostname>:5432 check port 5432
Finally, enable and start the haproxy service.
The following commands must be run as
systemctl enable haproxy systemctl start haproxy