• 请不要在回答技术问题时复制粘贴 AI 生成的内容
PeiXyJ
V2EX  ›  程序员

项目拥有了 Gateway(zuul/spring gate) 还需要 Nginx 吗?

  •  
  •   PeiXyJ · Oct 21, 2020 · 7882 views
    This topic created in 2208 days ago, the information mentioned may be changed or developed.

    如题, 打算写个微服务的项目,但是已经拥有了网关,还需要 Nginx 在前面再包一层吗? 各位大佬的项目是怎么处理的?

    23 replies  •  2020-10-21 21:21:02 +08:00
    chogath
    chogath
    Oct 21, 2020
    1
    我们是加了一层 Nginx
    PeiXyJ
    PeiXyJ
    OP
    Oct 21, 2020
    2
    @chogath 是拿 Nginx 来再做网关的负载吗
    anonydmer
    anonydmer
    Oct 21, 2020
    3
    SSL,static files,这些我们都仍然用的 nginx
    chogath
    chogath
    Oct 21, 2020
    4
    @PeiXyJ 是
    qwerthhusn
    qwerthhusn
    Oct 21, 2020❤️3
    5
    NGINX 做 SSL 消除,响应压缩,多网关 LB
    还要做一些静态页面或资源的服务
    PeiXyJ
    PeiXyJ
    OP
    Oct 21, 2020
    6
    @anonydmer
    @qwerthhusn
    好的多谢大佬,我大概知道咋玩了.
    lavvrence
    lavvrence
    Oct 21, 2020
    7
    nginx 做 4 层 LB,gateway 做 7 层 LB
    haosamax
    haosamax
    Oct 21, 2020
    8
    @jaylee4869 大佬,能大概说下,4 层、7 层都是啥意思吗
    q474818917
    q474818917
    Oct 21, 2020
    9
    @haosamax 应用层、传输层
    haosamax
    haosamax
    Oct 21, 2020
    10
    @q474818917 哦哦,原来是第 4 层、第 7 层
    haosamax
    haosamax
    Oct 21, 2020
    12
    @jaylee4869
    @q474818917
    淦,以前看的时候一直以为 4 层,7 层? 还不如不翻译 直接 layer 4 、layer 7 更好理解
    securityCoding
    securityCoding
    Oct 21, 2020
    13
    gateway 偏向对接业务 ,前端还是要挂一层 nginx 对接前端的
    slyang5
    slyang5
    Oct 21, 2020
    14
    gateway 直接给前端不是一样吗 ?没必要多加一层网络层的消耗
    xuanbg
    xuanbg
    Oct 21, 2020
    15
    要的,Nginx 做一层反向代理。一来方便提供 https,二来可以给网关做负载均衡,还可以在 Nginx 上做各种骚操作。
    axbx
    axbx
    Oct 21, 2020
    16
    前端不是自己部署的服务的话,需要 nginx 来做转发
    xuanbg
    xuanbg
    Oct 21, 2020
    17
    @slyang5 Nginx 是放在 Web 服务前面的,user->nginx->web server->gateway->service->database 。
    chenhbang
    chenhbang
    Oct 21, 2020
    18
    Nginx + gateway 的
    nazor
    nazor
    Oct 21, 2020
    19
    @haosamax 确实,一般都说 L4, L7 。
    egglin
    egglin
    Oct 21, 2020
    20
    @xuanbg web server 是啥
    stramkismet
    stramkismet
    Oct 21, 2020
    21
    需要,ng 转到 gateway 上,直接用 gateway 撑不住的。
    slyang5
    slyang5
    Oct 21, 2020
    22
    @xuanbg 多此一举。
    xuanbg
    xuanbg
    Oct 21, 2020
    23
    @egglin web 应用肯定需要有个 Web 服务,要不然浏览器访问谁去……

    我们用的是 node 。当然 Nginx 本身也能提供 web 服务。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1793 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 58ms · UTC 06:38 · PVG 14:38 · LAX 22:38 · JFK 01:38
    ♥ Do have faith in what you're doing.