Home » Java » java – Is there a way to invalidate a session in server 2 from server 1?-Exceptionshub

java – Is there a way to invalidate a session in server 2 from server 1?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have an app that is being load balanced between 4 app servers.
When a user logs in, the load balancer sends him to app server #1 and puts the user’s session (sticky session) in memory. An administrator that is logged-in in app server #3 terminates the user’s account changing an attribute in the session for that user, problem is the user that is in app server #1 doesn’t see the changes in his session because they were modified in a different app server.

How can I alter the session of the user in app server #1 when I am in a different app server since they don’t share the same session.

How to&Answers: