Related Programming Considerations How Session Connection and Failover Works with a Load Balancer

Load Balancing in a Cluster 5-3 ■ sessionid is a randomly generated identifier of the HTTP session. The length of the value is configured by the IDLength parameter in the session-descriptor element in the weblogic.xml file for an application. By default, the sessionid length is 52 bytes. ■ primary_server_id and secondary_server_id are 10 character identifiers of the primary and secondary hosts for the session. For general instructions on configuring load balancers, see Section 10.2.8, Configuring Load Balancers that Support Passive Cookie Persistence. Instructions for configuring BIG-IP, see Section B, Configuring BIG-IP Hardware with Clusters.

5.1.2.3 Related Programming Considerations

For programming constraints and recommendations for clustered servlets and JSPs, see Section 6.2.1.1.3, Programming Considerations for Clustered Servlets and JSPs. .

5.1.2.4 How Session Connection and Failover Works with a Load Balancer

For a description of connection and failover for HTTP sessions in a cluster with load balancing hardware, see Section 6.2.3, Accessing Clustered Servlets and JSPs with Load Balancing Hardware. .

5.2 Load Balancing for EJBs and RMI Objects

This section describes WebLogic Server load balancing algorithms for EJBs and RMI objects. The load balancing algorithm for an object is maintained in the replica-aware stub obtained for a clustered object. By default, WebLogic Server clusters use round-robin load balancing, described in Section 5.2.1, Round-Robin Load Balancing. You can configure a different default load balancing method for a cluster by using the Administration Console to set weblogic.cluster.defaultLoadAlgorithm. For instructions, see Section 10.2.5, Configure Load Balancing Method for EJBs and RMIs. You can also specify the load balancing algorithm for a specific RMI object using the -loadAlgorithm option in rmic, or with the home-load-algorithm or stateless-bean-load-algorithm in an EJBs deployment descriptor. A load balancing algorithm that you configure for an object overrides the default load balancing algorithm for the cluster. In addition to the standard load balancing algorithms, WebLogic Server supports custom parameter-based routing. For more information, see Section 5.2.5, Parameter-Based Routing for Clustered Objects. Also, external load balancers can distribute initial context requests that come from Java clients over t3 and the default channel. However, because WebLogic Server load balancing for EJBs and RMI objects is controlled via replica-aware stubs, including situations where server affinity is employed, you should not route client requests, following the initial context request, through the load balancers. When using the t3 protocol with external load balancers, you must ensure that only the initial context Note: For sessions using non-replicated memory, cookie, JDBC, or file-based session persistence, the secondary_server_id is not present. For sessions that use in-memory replication, if the secondary session does not exist, the secondary_server_id is NONE.