• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Regarding Sticky Session

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
author & internet detective
Posts: 41998
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic