Show TOC

Background documentationLoad Balancing for Registered Programs Locate this document in the navigation structure

 

The value of the parameter gw/reg_lb_level defines the type of load balancing for registered programs.

The following values are permitted:

  • 0: No load balancing, the first free registered program is used.

  • 1: The program with the lowest counter is used. Every time a registered program is assigned a request, the counter is increased by one.

  • 2: The program with the smallest load is used. How the load is determined is explained below.

The value of the parameter gw/reg_lb_ip determines the load value for an IP address, or for a range of IP addresses. A host name can be entered in the place of an IP address. The gateway then determines the IP address for the host name.

Syntax Syntax

The value of a parameter is a list of IP addresses or host names. The corresponding load is output with an equal sign after each IP address. The load is a weighting factor that specifies the strength of a particular server. The higher the value, the weaker the server. The maximum value is 1.

  1. a.b.c.d=val1 e.f.g.*=val2 linux1=val3
End of the source code.

Note Note

You can specify a range of IP addresses instead of a single IP address, for example:

gw/reg_lb_ip = 194.56.48.*=1 194.56.49.*=3

All servers from the 194.56.48 network are highly efficient, the servers from the 194.56.49 network are somewhat weaker, and all other servers are extremely weak and should only be used infrequently.

End of the note.

For load balancing level 2 (gw/reg_lb_level=2), the registered program with the smallest load is used. The load is calculated as follows.

When the registered program logs on to the gateway, the IP address is used to determine what the load of the IP address is. The system searches the list in the order specified by the profile parameter. This value is added to the load when this program receives a request. If the IP address is not found, the system uses the value defined by gw/reg_lb_default. This ensures that a strong server is assigned more requests than a weaker server. A server that registers itself with the gateway receives as initial value the highest load of all servers with the same registration ID. If no servers are registered with this ID, or if no requests have been assigned to these servers, the value is 0.

Example Example

Example of request assignment to the servers

The following values are defined in the profile:

gw/reg_lb_level=2

gw/reg_lb_ip= Server1=2 Server2=3 Server3=4 Server4=4

This results in the following weighting values for the various servers:

Server1: Load 2

Server2: Load 3

Server3: Load 4

Server4: Load 4

End of the example.

Auftrag

Server with Least Load

Load after Request Assignment

Server 1

Server 2

Server 3

Server 4

All servers start with 0

0

0

0

1. Auftrag

Server1: Load + 2

2

0

0

2. Auftrag

Server2: Load + 3

2

3

0

3. Auftrag

Server3: Load + 4

2

3

4

4. Auftrag

Server1: Load + 2

4

3

4

5. Auftrag

Server2: Load + 3

4

6

4

6. Auftrag

Server1: Load + 2

6

6

4

7. Auftrag

Server3: Load + 4

6

6

8

8. Auftrag

Server1: Load + 2

8

6

8

8 (*)

(*) If after request 7, another server logs on that responds to the same registration ID, the system assigns it the highest value of the load value (value 8 in the above example). This server would then participate normally in the load assignment process.

Note Note

You can influence the weighting values of the IP addresses by dynamically changing its value.

End of the note.

If you want to change an entry in the list, enter the new value as the load.

For example, Server1=3

If you want to delete an entry from the list, enter the value 0 as the load.

z.B. Server2=0 deletes the entry

If you want to add an entry, enter the new IP address, or server name.

For example, LinuxLab=1