[英]JHipster Microservice and Gateway - Gateway Scalability
I am using JHipster 6.4.1 to generate an Oauth2 (Okta) Microservice application with a React UI / API Gateway.我正在使用 JHipster 6.4.1 生成带有 React UI / API 网关的 Oauth2 (Okta) 微服务应用程序。 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.我的理解是,带有 Oauth2 的网关应用程序使用有状态的 Spring 安全实现(JSESSIONID cookie),因此相同的无状态可扩展性方法在这里不起作用。
Are there any recommended solutions for applying scalability to the Gateway application?是否有任何推荐的解决方案可将可扩展性应用于网关应用程序?
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.您可以使用 Spring Session 在网关实例之间共享您的会话,如果 state 很小,可以轻松复制并且不包含业务数据,则通常没有任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.