• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Sticky Session

 
Sachin Dare
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello World,

Currently I am working on one system. In development we are using Tomcat server. But in production we are using Apache as a load balancer and Tomcat as web server. Our Architecture has a problem of "Sticky Session" i.e. the request of particular user always goes to particular server. I have some questions in my mind -

1. Does the sticky sessions are always harmful? If not what is the scenario when we require having sticky sessions.

2. To avoid the sticky session we are planning to shift session management on Apache. Does this require any code changes or will it be just a configuration change?
It will be great if anyone can explain me the process of shifting session management from Tomcat to Apache.

Thanks a lot for your kind suggestions in advance.
Thanks and Regards,
Sachin Dare.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session affinity is another term for this, which may help when you do more searching on the topic.

1) Sticky sessions aren't always bad. They are useful when you don't want to replicate user's session state across multiple servers.
2) No code changes - unless you have huge sessions in which case you want to refactor to store less in the session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic