Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is session devil in clustering environment

 
Will Lee
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is suggested in the office that session should be absolutely forbid in clustering environment. The reason is synchronization among nodes cause overhead and problem. Any argument to support this opinion?

I personally disagree. Session is for stateless server to remember who the caller is. If you need to implement a stateful application, you have to "save" the user info somewhere, either on server, or client side and pass to server every time. Yes, session migration among nodes does introduce overhead, but it doesn't get rid of this issue w/out session: how about the cost to pass user identity and authenticate/authorize user for every request? If carefully designed, we can try to reduce the footprint of the session object so that the migration session won't be too expensive. In our FLEX application, our front end team pretty much cache everything on client side (is that good?) so that only the authentication token will be saved in session.

In addition, the session migration issue has been there for a while and I believe most of the application server should have a optimized way to deal w/ it.

I may overlook some important points to discourage session. Any suggestion?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will,
Big sessions are a problem. In your case of it being a single string, I think it is fine. The alternative (checking logon is valid every time something happens) doesn't sound better to me.
 
Will Lee
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne very much for the reply. It's very helpful for my design. I think I'm going to use session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic