Setting Up HAProxy Balancer Using Licensing Service

To ensure fault tolerance of licensing service when a single BI server or a cluster of BI servers is used in Linux OS, set up the HAProxy balancer:

  1. Install HAProxy:

sudo apt-get install haproxy

  1. Open the /etc/haproxy/haproxy.cfg file with HAProxy settings and execute the following operations:

maxconn 120000

timeout connect 30s

timeout client  30s

timeout server  30s

The time without measurement unit is set in milliseconds, the time with the "s" measurement unit is set in seconds.

TIP. It is recommended to set equal parameters to the timeout connect, timeout client, timeout server parameters. Value of the serverTimeout field specified in the settings.json file should be less than specified values.

frontend ft_bi
    bind <IP address and DNS name of balancer>:<port number>
    default_backend bk_licman  #Group for working with licensing services

peers sticktables
    bind :10000
    server <IP address DNS name of license server> #Main license server, default localhost
    table sticky-sessions type ip size 1m

NOTE. IP address or DNS name of license server should match with values of the server field specified in the settings.json file.

backend bk_licman
    option forwardfor
    default-server check inter 25s rise 2 fall 5
    default-server on-marked-down shutdown-sessions
    balance roundrobin
    stick match src table sticktables/sticky-sessions
    stick store-request src table sticktables/sticky-sessions
    server licman1 <IP address or DNS name of licensing service 1>:<port number 1>
    server licman2 <IP address or DNS name of licensing service 2>:<port number 2>
    ...
    server licmanN <IP address or DNS name of licensing service N>:<port number N>

Specify the list of licensing services in the server parameter.

NOTE. The port of corresponding licensing service should match with value of the port field specified in the settings.json file.

  1. Create the License section containing the Service subsection with licensing service connection parameters in the settings.xml file:

The example of the License section in settings.xml:

<...>

  <Key Name="License">

    <Key Name="Service" Active="True" Host="blncr-web" Port="555"/>

  </Key>
</...>

  1. Restart the BI server.

After executing the example the BI server or the cluster of BI servers interacts with licensing services via the HAProxy balancer.

See also:

Creating BI Servers Cluster | Licensing Service and Features of Its Use