Session Management in Load Balancing scenario????
1 posts in topic
Flat View  Flat View

Posted By:   Shridhar_N
Posted On:   Thursday, March 27, 2003 03:11 AM

Hi All,

Can anyone tell how the session is maintained when the application is hosted on 2 or more machines (Load Balancing scenario)..

Ex : When the user logs in, he will be directed to Server1 and his request will be processed, 2nd time when he request something he will be redirected to Server 2 (as Server1 has maxx number of requests). How is session managed in this type of scenario,,
How can we check whether this is a new session (user) or old session (user)..
Any help would be highly appreciated.
Thanks in Advance.


Re: Session Management in Load Balancing scenario????

Posted By:   Madhu_Analakkat  
Posted On:   Wednesday, April 9, 2003 09:19 AM

In a cluster (if this is what u r asking), the appservers manage this transparently. For example, websphere has a configuration setting to allow you to specify "persistent session". Websphere saves the session to an internal datastore and makes it available to the other node.

As an alternative, You can go for "session affinity", which makes the client go to the same machine for the entire session.

For the servlet/JSP to check whether the user session is new (fresh) there is a method on HttpSession called isNew().

About | Sitemap | Contact