Skip to main content
Version: 11.0

Set Up Load Balancing Configuration

The following chapter describes how to set up a load balancing configuration for the ADONIS NP 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:

  1. Adapt the ADONIS NP application server configuration.

  2. Adapt the ADONIS NP web client configuration.

  3. Start load balancing.

note

As load balancing introduces a new element of complexity, install the ADONIS NP web client and make sure it runs properly first. Then start setting up a load balancing configuration on top of the ADONIS NP web client installation. This approach facilitates troubleshooting.

Adapt ADONIS NP Application Server Configuration

In order to start multiple aworker processes, the ADONIS NP application server configuration has to be adapted:

  • Edit the configuration file server.conf in the folder "<ADONIS NP installation>/conf".

The following parameters need to be modified:

  • ports

    Enter a port for every aworker process that should be started by the ADONIS NP application server.

Example

If you want to set up the ADONIS NP 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 ADONIS NP 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 ADONISNP11_0.war with a file archiver. Edit the file adoxx_web.properties which can be found inside. Save the changes afterwards.

The following parameters are available:

  • aservers

    The URL at which the ADONIS NP application server can be reached. Usually it should not be necessary to change this parameter.

note

In a load balanced scenario, this parameter MAY contain a comma separated list of URLs of multiple ADONIS NP 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).

Example

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

  • aworkers

    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.

Example

The ADONIS NP 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

  • aworker_purpose.scheduler

    When load balancing is enabled in ADONIS NP, 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 ADONIS NP application server and the Apache Tomcat web server have to be restarted for the configuration changes to become effective:

  • Type Services.msc in the Run command on Start menu. The Services management console opens.

  • Stop and restart the ADONIS NP application server (service name e.g. "ADONISNPServer11.0Service") and the Apache Tomcat web server (service name e.g. "Tomcat9").

Once the services are running, the web client can be started.