Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am learning Tomcat session control and I have 2 workers with sticky_session=1. But I want to remove stickiness to a particular worker yet maintain the session for users. I found the following statement in Tomcat doc and it says sticky_session can be False yet session can be shared across multiple instances. But I'm not quite sure what this Session Manager is exactly about and how to set it up. Could someone please elaborate this or point me to the corresponding doc if there is any?

sticky_session specifies whether requests with SESSION ID's should be routed back to the same Tomcat worker. You can set sticky_session to False when Tomcat is using a Session Manager which can persist session data across multiple instances of Tomcat. By default sticky_session is set to True.

Thanks!

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I found it. Thank you.

share|improve this answer

The page you should be looking at is the Cluster Howto. Configuring the jk connectors to load balance across two Tomcats without sticky sessions on its own isn't enough, since it doesn't cause the session object to be replicated across both Tomcats. Instead, it will potentially send your user to a different Tomcat on different requests, losing session state. Clustering is what you need to make sure the user's session data will be available on both Tomcat instances.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.