Reputation: 1794
I have a Java web application which is deployed on two VMs. and NLB (Network Load Balancing) is set for these VMs. My Application uses sessions. I am confused that how the user session is managed in both VMs. i.e. For Example- If I make a request that goes to VM1 and create a user session. Now the second time I make request and it goes to VM2 and want to access the session data. How would it find the session which has been created in VM1.
Please Help me to clear this confusion.
Upvotes: 14
Views: 9481
Reputation: 85
We can use distributed Redis to store the session and that could solve this problem.
Upvotes: -2
Reputation: 691685
There are several solutions:
You'll have to look in the documentation of your server to see what is possible with that server, or use a third-party solution.
Upvotes: 32