We have the following setup.
- STM (Stingrey Traffic Manager) does load balancing + session stickiness
- Weblogic 'cluster'
- Auth handled by a third party tool
Therefore I do not have to worry about session with regards to horizontal scaling/ running multiple instances of the application. STM/ Weblogic cluster makes sure that the subsequent request come to same managed server.
What we currently have is a monolithic application and we are trying to move to microservices. Also we do not wan't to move out of current infrastructure (i.e. STM/ Weblogic cluster/ Auth tool). What we have planned is:
- A Gateway WAR which routes requests to other microservices
- N x Microservices (WAR) for each functional sub-domain
- Only the API Gateway receives user requests and other microservices are not accessible from outside
So my question is
- Should API Gateway be state-full while other microsevices are stateless?
- If so, how should the user session data be shared between API Gateway and microservices?
Please suggest any better alternatives and resources/links as well. Thanks.