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:
Install HAProxy:
sudo apt-get install haproxy
Open the /etc/haproxy/haproxy.cfg file with HAProxy settings and execute the following operations:
Change value of the maxconn parameter to 120000 in the global section:
maxconn 120000
Change values of parameters in the defaults section:
timeout connect. Timeout for licensing service connection and sending the first request to the service.
timeout client. Client idle time.
timeout server. Request handle time during opened connection with the licensing service
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.
Create the frontend ft_bi section:
frontend ft_bi
bind <IP address and DNS name of balancer>:<port number>
default_backend bk_licman #Group for working with licensing services
Create the peers sticktables section:
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.
Create the backend bk_licman section:
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.
Create the License section containing the Service subsection with licensing service connection parameters in the settings.xml file:
Active. Method of interaction between BI server and license server:
True. BI server and license server communicate via the licensing service.
False. BI server and license server communicate directly.
Host. IP address DNS name of balancer.
Port. Number of the port, at which the balancer is available.
The example of the License section in settings.xml:
<...>
<Key Name="License">
<Key Name="Service" Active="True" Host="blncr-web" Port="555"/>
</Key>
</...>
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