Set Up Load Balancing Configuration
The following chapter describes how to set up a load balancing configuration for the ADOIT web client. In this scenario users (and thus workload) are distributed across multiple aworker processes started by the application server.
The following steps have to be taken in order to set up a load balancing configuration:
As load balancing introduces a new element of complexity, install the ADOIT web client and make sure it runs properly first. Then start setting up a load balancing configuration on top of the ADOIT web client installation. This approach facilitates troubleshooting.
Adapt ADOIT Application Server Configuration
In order to start multiple aworker processes, the ADOIT application server configuration has to be adapted:
- Edit the configuration file
server.confin the folder "<ADOIT installation>/conf".
The following parameters need to be modified:
Enter a port for every aworker process that should be started by the ADOIT application server.
If you want to set up the ADOIT application server to start two aworker processes and configure the ports for ordinary requests for these processes as 54321 and 54322, adjust this section like this:
# Main access ports, comma separated list, number of ports determines
# number of worker processes
ports = 54321,54322
Usually it should not be necessary to change the other parameters.
Adapt ADOIT Web Client Configuration
In order to configure load balancing, the settings for starting up the web client have to be adapted. In order to do so:
- Open the folder “<Tomcat installation>/webapps“ and open the file
ADOIT16_0.warwith a file archiver. Edit the file
adoxx_web.propertieswhich can be found inside. Save the changes afterwards.
The following parameters are available:
The URL at which the ADOIT application server can be reached. Usually it should not be necessary to change this parameter.
In a load balanced scenario, this parameter MAY contain a comma separated list of URLs of multiple ADOIT application servers (which connect to the same database). This is useful in large scenarios where workload has to be distributed across multiple machines. Each URL consists of the name of the application server (can be freely defined) and the domain name or IP address (a port should NOT be included).
If you are running the application server locally, and the name of the application server is "AS1", the parameter should look like this:
aservers = AS1:localhost
The default configuration supports one aworker process. Add additional entries according to the number of aworker processes which you specified earlier in the file
server.conf. The entries are separated by commas. For each entry, define the name of the application server (as defined in the parameter aservers) and the port.
The ADOIT application server has been set up to start two aworker processes (ports 54321 and 54322). The name of the application server is "AS1". The parameter should look like this:
aworkers = AS1:54321, AS1:54322
When load balancing is enabled in ADOIT, a dedicated aworker process may be reserved for scheduled tasks so that these resource intensive operations do not cause any load on other aworker processes used for user logins. To reserve an aworker process, define the name of the application server (as defined in the parameter aservers) and the port.
Start Load Balancing
In order to start load balancing, the ADOIT application server and the Apache Tomcat web server have to be restarted for the configuration changes to become effective:
Services.mscin the Run command on Start menu. The Services management console opens.
Stop and restart the ADOIT application server (service name e.g. "ADOITServer16.0Service") and the Apache Tomcat web server (service name e.g. "Tomcat9").
Once the services are running, the web client can be started.