tags:

views:

196

answers:

1

Hi, I am having a 2 instance load balanced and session replicated tomcat 6.0.20 cluster. Should sticky_session be set to true or false for in memory session replication.

http://tomcat.apache.org/connectors-doc/reference/workers.html mentions : Set sticky_session to False when Tomcat is using a Session Manager which can persist session data across multiple instances of Tomcat.

where as /tomcat-6.0-doc/cluster-howto.html (Cluster Basics) mentions : Make sure that your loadbalancer is configured for sticky session mode.

A: 

Do you want sticky sessions or not? If you do (and I general I think you do want them and you better have a good reason not to want them), you should set sticky_session to True (if you are using Tomcat Load Balancer worker as your load balancer).

One of the side effects of switching off sticky sessions will be that Session ID will be changed every time you hit different cluster node (based on "Bind session after crash to failover node" section of http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html doc)

Georgy Bolyuba