Liquid UI - Documentation - 5.4 Implementing Load Balancing with Web Server

5.4 Implementing Load Balancing with Web Server


Load balancing involves using the Dispatcher to distribute a load of many users and machines among multiple instances of Web Server to reduce the strain on the network and speed up the work. The way this works is that the Dispatcher will load once you run it. This is a stand-alone process and loads when you run the 'RunWithDispatcher.bat' that is included in the Web Server package. This process will then distribute the load among any sub-servers that you have configured and designated. The Dispatcher will always send the load to the message server first and then distribute it to the sub-servers. The Dispatcher will always send the load to the fastest sub-server first.

 

Note: Make sure that the Web Server is installed on the main server and each sub-server as well.

 

To implement a load-balancing environment using Web Server, please do the following.

  1. Edit any necessary parameters in the Dispatcher.js file. The parameters that usually require editing for a load-balancing scenario are the following.

    • Listen_Port: This will need to be set to a unique port for each instance of the Web Server. In other words, if the default port for the first instance of the Web Server is set at 80, then we recommend incrementing each subsequent sub-server by a factor of one (1). For example, the first port might be 81, the second 82, and so forth.
    • MAX_CLIENT: You will need to designate the maximum number of clients who can concurrently connect to a single instance of Web Server. An example is shown below.

      MAX_CLIENT = 100;
    • MESSAGE_SERVER: This will be set to the actual name of the message server. if all the activity is occurring on a single server, then the message server name should be set as blank as in the following example" ".

      MESSAGE_SERVER = " ";
    • SERVER_BASE_PORT: This is the port number for the first instance of the Web Server. If there are two instances of Web Server starting at port 4000, then you must have two unique base ports and the port numbers would be 4000 and 4001. In this example, see the following parameter.

      SERVER_BASE_PORT = 4000;
    • SERVER_NUM: This value must equal the number of servers involved. If there are two servers, then there must be two unique server numbers, as shown in the following example.

      SERVER_NUM = 2;
    • SERVER_THRESHOLD: This value specifies the minimum number of users that will trigger the load distribution. Once this number is reached, the Dispatcher will then distribute any further connections to the sub-servers.

  2. Change the MESSAGE_SERVER parameter in the sub-server Dispatcher.js files as follows.

    MESSAGE_SERVER = <your_Message_Server>

Third-Party Load Balancers

You can use Web Server in conjunction with third-party load balancers. The third-party load balancers known to work with Web Server are as follows.

 

Company

 

Software Specifications

 

Hardware Specifications

 

LightTPD

 

Ubuntu 18.04 Operating system
-

Apache

 

Linux 2.6 or later
-

F5 Load Balancers

 

BIG-IP or VIPRION device
-

Nginx

 

Linux 2.6 or later
   macOS 10.6 or later


-

Can't find the answers you're looking for?