3.8.1 Times when load balancing takes place
CTM performs load balancing at the following two times:
-
When an EJB object reference is obtained by a create request
If load balancing takes place at this time, the create-based selection policy decides whether processing is assigned preferentially to the CTM daemon that received the request, or to the CTM daemon that is least loaded.
-
When a business method is executed through a remote interface by an invoke request
If load balancing takes place at this time, the schedule policy decides whether processing is assigned preferentially to the CTM daemon that received the request, or to the CTM daemon that is least loaded.
The following figure shows an overview of how a client calls business-processing programs and the times when load balancing takes place.
|
The following describes the processing illustrated in the above figure.
-
The EJB client executes lookup for one of the global CORBA Naming Services deployed on hosts.
In the above figure, lookup is executed for host A.
In each global CORBA Naming Service, references to schedule queues are registered. In the above figure, host A returns a registered schedule queue reference.
-
The EJB client uses the obtained reference to execute create.
In the above figure, create is executed for the CTM daemon on host A.
At this time, the first load balancing takes place.
The create-based selection policy decides how to balance the load.
The CTM daemon that received the create request returns either of the following references to the EJB client based on the create-based selection policy:
-
Reference to the CTM regulator that corresponds to the CTM daemon on the host that received the create request
-
Reference to the CTM regulator that corresponds to the CTM daemon that is least loaded in the CTM domain
In the above figure, a reference to the CTM regulator on host B is returned.
-
-
The EJB client uses the obtained reference to execute the invoke or remove request defined in the remote interface.
In the above figure, the invoke request is executed for the CTM regulator on host B. The CTM regulator then sends the request to the CTM daemon.
At this time, the second load balancing takes place.
The schedule policy decides how to balance the load when the invoke request is executed.#
In the above figure, processing is assigned to the CTM daemon on host A, which received the request. The request is then registered in the schedule queue. When the request is executed, it is associated with the already-pooled reference to an EJB object, and the relevant business-processing program on the J2EE server is called. At this time, a J2EE server that was terminated abnormally or a business-processing program that timed out due to a hang is never called.
- #
-
The schedule policy is not used for execution of remove.
A reply from a business-processing program is returned to the EJB client via the CTM daemon that received the request.