Przejdź do głównej zawartości
Wersja: 16.1

Set Up Load Balancing Configuration

The following chapter describes how to set up a load balancing configuration for ADONIS. 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 application server configuration.

  2. Adapt the web application configuration.

  3. Start load balancing.

Wskazówka

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

Adapt ADONIS Application Server Configuration

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

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

The following parameters need to be modified:

  • ports

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

Example

If you want to set up the ADONIS 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 Web Application Configuration

In order to configure load balancing, the general settings on the web server side have to be adapted. In order to do so:

  • Open the folder <Tomcat installation>/webapps“ and open the file ADONIS16_1.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 application server can be reached. Usually it should not be necessary to change this parameter.

Wskazówka

In a load balanced scenario, this parameter MAY contain a comma separated list of URLs of multiple ADONIS 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 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, 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 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 application server (service name e.g. "ADONISServer16.1Service") and the Apache Tomcat web server (service name e.g. "Tomcat10").

Once the services are running, ADONIS can be used.