File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session haldling  in a clustering environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session haldling  in a clustering environment" Watch "session haldling  in a clustering environment" New topic

session haldling in a clustering environment

Raj Jindal
Ranch Hand

Joined: Jan 17, 2003
Posts: 50
Suppoe there are three servers A,B,C in a horizontal load balancing enviroment hosting the same application. If the number of request goes beyond 50 on A, the next server serves the request. when a person's request is served by server A, a session is created on server A. Next time, the request of the same person for the resource goes to Server B. Will a new session for that person be created on server B. If yes then what is the fun of creating multiple sessions one on server A and another on B for a single user. what will happen to the session on server A If a new session is created on server B.
Paul Kelcey
Ranch Hand

Joined: Jan 26, 2003
Posts: 45
I think there's multiple ways to configure the server. I think it also depends upon the server. I can't remember the names of the configurations but I think a common scenario in a clustered environment is that once a session has been established with a node it will stay with that node. If new sessions need to be directed to another node then I think that occurs before it gets to node A say. I guess another option is to move the session over to another server. I don't think there's the case that you describe where there are multiple sessions for the same user existing on several nodes however.
I agree. Here's the link:
subject: session haldling in a clustering environment
Similar Threads
Passing a session from a servlet to a JSP
how to maintain data in distributed environment
url rewriting doubt
Using html:radio with indexed attribute
Need to understand the Request Scope