Try OpenEdge Now
skip to main content
Administration Guide
HTTP sessions : Clusters and sticky sessions
 

Clusters and sticky sessions

HTTP sessions is an enabling technology for load balancing. With HTTP sessions, session information can be shared with any PAS for OpenEdge instance in a defined cluster of instances. Therefore, any instance in the cluster can handle subsequent client requests within the correct context.
Instances in a cluster must all be created from a common core PAS for OpenEdge installation. ($CATALINA_HOME). To add an instance to a cluster, you must turn on the cluster property in the /conf/server.xml file of the instance. To avoid corrupting server.xml use the TCMAN utility to update the property. For example:
/bin/tcman.sh feature Cluster=on

Sticky sessions

HTTP sessions can be used to contain context information whether sticky sessions are enabled or disabled.
Sticky sessions, another industry standard for Web servers, binds a session to a particular instance. In other words, after an intial client request is satisfied by a Web application running in a PAS for OpenEdge instance, subsequent requests are routed to the same Web application running on the same instance. You would want sticky sessions enabled when:
*The Web application is storing state information about the session
*The Web application launches persistent procedures, since the memory space that persistent procedures run in cannot be shared by multiple instances.
In a load balancing configuration, sticky sessions are usually enabled or disabled by configuring the Web server. In an Apache Web server, you enable sticky sessions by adding a route property to BalancerMember and setting the stickeysession property. For example:
#Load balancer Proxy settings (sticky sessions)
<Proxy "balancer://mylbgroup">
BalancerMember "http://172.16.21.39:11600" route=oepas1
BalancerMember "http://172.16.21.39:11610" route=oepas2
BalancerMember "http://172.16.21.39:11620" route=oepas3

</Proxy>
ProxyPass "/test" "balancer://mylbgroup"
stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse "/test" "balancer://mylbgroup"
When sticky sessions are not enabled on an Apache Web server, the instances in the configuration are specified by their IP addresses only and the stickysession property is not set. For example:
#Load balancer Proxy settings (session free)
<Proxy "balancer://mylbgroup">
BalancerMember "http://172.16.21.39:11600"
BalancerMember "http://172.16.21.39:11610"
BalancerMember "http://172.16.21.39:11620"

</Proxy>
ProxyPass "/test" "balancer://mylbgroup"
ProxyPassReverse "/test" "balancer://mylbgroup"
*The Tomcat servlet container in PAS for OpenEdge does not allow Web applications to change a session to a sticky session.
*Sticky sessions can have a negative impact on performance in a load balancing configuration since client requests can be bound to a single node among all available nodes.