JHipster Microservice and Gateway - Gateway Scalability

193 Views Asked by At

I am using JHipster 6.4.1 to generate an Oauth2 (Okta) Microservice application with a React UI / API Gateway. I understand that the Microservice application/s can support multiple instances under the same Registry and will use a round-robin approach to load balancing and in this way can horizontally scale.

My understanding is that the Gateway application with Oauth2 uses a stateful Spring Security implementation (JSESSIONID cookie), so the same stateless scalability approach cannot work here.

Are there any recommended solutions for applying scalability to the Gateway application?

1

There are 1 best solutions below

0
On

You can use Spring Session to share your sessions between gateway instances, there's usually nothing wrong being stateful if the state is small, can be easily replicated and does not contain business data.