Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What's the best way to handle the session in clustered environment?  RSS feed

Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have deployed my JSP application in tomcat instances. The load between two tomcat instances is balanced by a load balancer. Due to heavy traffic, session handling is a overhead for me. I am thinking of redesigning my sesion handling. So, I am planning to get rid of session object, and use cookies based session handling, which can save memory.

So, in this model, I have to store the session shared data in the database side, is that right? I mean, cookie values are sent to browser and same values are tracked server side by storing them in database. Here also, there is a overhead of database calls while checking cookie values.

Is there any other alternative way, how I can keep track the cookie value across pages in server side?
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!