I am trying to understand how the session
details are maintained for a JavaEE based web application that is deployed in a cluster of servers. I am new to clustering concepts so I am not clear on how it actually works.
I have gone through this SO post "How do servlets work? Instantiation, session variables and multithreading", where it says that the session
details are maintained by the server where my web application is running and client is provided with JSESSIONID
. Now suppose if I have a load balancer and my application is deployed to a cluster of servers say 3 servers, now if my first request is handled by Server1 and the Server1 has stored the session
details on its RAM, then what happens to my subsequent request? Will load balancer still direct the request to Server1 or will it be handled by Server2/Server3?