The SAP J2EE Engine 6.20 Load Balancing system checks the load factor of all servers running in the cluster and detects the least-busy cluster element at that time. When a client application requests a server resource (a particular service), the Load Balancing system chooses the most appropriate server (which has that particular service running on it) within the cluster. This is used mainly for services running on both dispatcher and server. These services use the functions provided by a specially designed interface, named
LoadBalance
context, and direct the client requests accordingly.
The load factor of a server node is determined based on the common load status of the managers that run on it (Classloader Manager, Cluster Manager, Log Manager, Memory Manager, Service Manager, Swap Manager, Thread Manager, TimeOut Manager). The managers estimate their own load factor and then the LoadBalance system estimates the load factor of the entire cluster element. This information is updated and then recalculated for a certain period using the RoundRobin algorithm.
The machines within the cluster may work at different speeds, have a different number of elements running on them, and different amount of physical memory, and so on. Therefore, you can estimate the power of a machine (relative to other cluster elements), so that the load-balancing algorithm can determine the least-busy cluster element. The number of server and dispatcher cluster elements running on a particular machine must also be considered when calculating the relative power. These calculations are performed by the system administrator and are independent of the SAP J2EE Engine 6.20 system.
Once the relative power of the machines is estimated, the dispatcher nodes check this property and select the most appropriate server node to process the client request.
To define the relative power of a machine, start SAP J2EE Engine 6.20 Visual Administrator. Make sure that you are in Cluster view mode (that is,
on the toolbar is selected). Choose
Cluster
®
Server
®
Managers
®
ServiceManager
from the left-hand pane of SAP J2EE Engine 6.20 Visual Administrator. Choose the “Properties” tab from the right-hand pane. Select the
LoadBalancingPower
property and change its value in the “Value” field at the bottom of the right-hand pane. The value range of this property is an integer from 1 to 100. The default value is
50
. Choose “Add.” To enable the changes to take effect, choose
(Save Properties) on the toolbar and restart the Service Manager.