Skip to main content
Version: 10.3.2

Load balancer

note

You only have to configure a load balancer if you plan to set up Work.AI in the high-availability mode. In the case of the Basic installation, ignore this instruction.

Requirements

A hardware load balancer must be provided and configured in advance before installing Work.AI.

  • The load balancer must have an IP address (Virtual IP, VIP) assigned to which all clients' external connections will be established.

  • The load balancer must support Layer 4 TCP load balancing.

  • The load balancer must listen to the specific ports described in the table below. You can override ports in the config file before the installation. The table describes the default port numbers set initially in the config file inside the installation package. If you want to use different ports, make sure that the ports configured to listen on the load balancer are updated accordingly in the configuration file during installation:

    Port numbers (default values from ports.yml)Respective setting in ports.yml
    TCP: 80lb_port
    TCP: 443lb_port_ssl
    TCP: 8202vault_proxy_port
  • The load balancer must route all TCP traffic from the specified ports to the same ports on Master1, Master2, and Master3 servers (simple round-robin balancing between Master1, Master2, and Master3). It means that the ports must be accessible from the load balancer's network interface to all Master1-3 servers' network interfaces.

  • We recommend configuring the load balancer to perform TCP health checks of the "lb_port_ssl" port of Master1-3 servers every 5 seconds to check that a server is alive.

  • All load balancer TCP ports from the table above must be accessible over the VIP from every server of the environment.

  • TLS termination must be disabled on the external load balancer.

Configure load balancer

Select your Load Balancer type:

In the load balancer's configuration, specify the following parameters for it:

  1. Configure the list of servers to be balanced:

    • Master hostname 01 (for example, master1.example.com)
    • Master hostname 02 (for example, master2.example.com)
    • Master hostname 03 (for example, master3.example.com)
  2. Create the following list of ports that VIP will listen to (see comment and table above, that these ports may be changed during installation):

    • TCP: 80
    • TCP: 443
    • TCP: 8202
  3. Configure health checks:

    • Ports to listen: TCP 443. If the port is unavailable, HAProxy is down.
    • Servers in the Target group to check: Master Server hostname 01, Master Server hostname 02, Master Server hostname 03.
    • Rules:
      • The number of failed health checks to consider the server is down. By default, 3.
      • The number of passed checks to consider the server is restored. By default, 1.
      • The interval of health checks, by default, 20 seconds.
  4. Set Sticky sessions to the Round Robin mode.

  5. Set Client NAT.