Skip to content

You are viewing documentation for Immuta version 2.8.

For the latest version, view our documentation for Immuta SaaS or the latest self-hosted version.

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.

Package Installation

Install haproxy on the query engine load balancer node.

Note: the following command must be run as root.

yum install haproxy

Configuration

Configure haproxy by creating /etc/haproxy/haproxy.cfg:

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.

Note: the following commands must be run as root.

chkconfig haproxy on
service haproxy start