Jhipster中的多个网关 [英] More than one gateway in jhipster

查看:121
本文介绍了Jhipster中的多个网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在jhipster堆栈中有多个网关应用程序是不正确的做法以及可能带来的后果?

Is it bad practice and what are possible consequences of having more than one gateway applications in the jhipster stack.

我正在开发一个具有非常不同的用户部分和管理部分的应用程序.这个想法是有2个网关,一个用于用户Web应用程序,一个用于管理Web应用程序.他们两个都有自己的微服务作为后端.此外,还有第三个共享微服务,其中包含通用功能.

I am working on an application that has user part and admin part which are very different. The idea is to have 2 gateways, one for user web app and one for admin web app. Both of them would have their own microservice as backend. Plus there is third shared microservice that contains common functionality.

所以看起来像这样:

user web app (gateway)    admin web app (gateway)
      \                           /
       \                         /
  user microservice          admin microservice
         \                     /
          \                   /
           shared microservice 

我已经用简单的示例进行了尝试,它似乎可以在开发环境中工作.除了它不优雅之外,还有其他原因导致该体系结构不正确.

I have tried it with simple examples and it seems to work in dev environment. Besides that it is not elegant, are there other reasons why this architecture is not right.

推荐答案

我认为拥有多个网关没有问题

I see no problem in having multiple gateways

JHipster文档中明确指出您可以具有多个网关(请参见 http://www .jhipster.tech/microservices-architecture/),以适应控制向哪些客户端公开哪些服务的需求.此外,您可以配置zuul代理以限制每个网关上允许的路由.

It is explicitly stated in the JHipster documentation that you can have several gateways (see http://www.jhipster.tech/microservices-architecture/) to accommodate the need to control which services you expose to which client. Moreover you can configure the zuul proxy to restrict the allowed routes on each gateways.

这篇关于Jhipster中的多个网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆