I'm working on distributed web application and we decided to separate web module from business services to make it more scalable.
Here is the situation: We have one server instance that keeps web application (Controllers, JSPs, etc) and lots of server instances with business services. If web application needs any data it asks any of the existing business server via Hessian about it, then got the response and displays data.
Currently we retrieving data from DB based on logged in user and this cannot be changed, so every server should know which user asked to do the job.
My question is: Do you know the solution to keep user session across several independent applications?
For example one of the solutions can be send username with every request but this is not a very good idea for us.
Thanks a lot
There are 2 approaches for this problem:
1) Store all session info in central memcached server
2) Use session-aware load-balancer, which will direct same users to same nodes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With