Clusters and sticky sessions
- Last Updated: February 25, 2025
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
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:
|
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 initial 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 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 stickysession property, for example:
|
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:
|
- 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 effect on performance in a load balancing configuration because client requests can be bound to a single node among all available nodes.
- The initial option call and the subsequent connection message can be routed to different PAS for OpenEdge instances, which is an expected behavior and is not a cause for concern unless the PAS for OpenEdge instances run on different OpenEdge versions.