【问题标题】:How is Spring Cloud Gateway different from Zuul?Spring Cloud Gateway 与 Zuul 有何不同?
【发布时间】:2018-04-15 23:10:53
【问题描述】:

我一直使用Zuul 作为边缘服务和 API 网关。最近我注意到 Spring Cloud Platform 发布了Spring Cloud Gateway。这两个网关有什么区别?为什么 Zuul 没有扩展来支持 S-C-Gateway 中的功能?新图书馆的驱动因素是什么?什么时候使用?

【问题讨论】:

  • 您能分享一下您所指的 Spring [Boot] 版本吗?

标签: spring-mvc spring-cloud netflix-zuul spring-cloud-netflix spring-cloud-gateway


【解决方案1】:

我是spring cloud gateway的作者。 Zuul 建立在 servlet 2.5(适用于 3.x)之上,使用阻塞 API。它不支持任何长期存在的连接,例如 websockets。

Gateway 使用非阻塞 API 构建在 Spring Framework 5、Project Reactor 和 Spring Boot 2 之上。支持 Websocket,因为它与 Spring 紧密集成,所以开发人员体验要好得多。

【讨论】:

  • 2016 年 9 月/10 月,Netflix 发布了 Zuul 2。它是一个非阻塞和异步的解决方案。 Zuul 2 和 Zuul 1 的主要架构区别在于 Zuul 2 使用 Netty 在异步和非阻塞框架上运行。
  • 他们还没有发布zuul 2,他们宣布了。目前正在 2.1 分支上进行开发。
  • @spencergibb this比较中提到的spring-cloud-gateway的性能问题解决了吗? 229ms (scg) 与 8core-16gb 机器上的 29ms (Zuul1) 相比并不是很有用。
  • Zuul 2.1.1 已于 2018 年 4 月 13 日发布。它是异步且非阻塞的。
  • Cloud Gateway 与 Netflix Zuul 2 的性能有何不同?
猜你喜欢
  • 2020-12-13
  • 2016-12-10
  • 2020-07-19
  • 1970-01-01
  • 1970-01-01
  • 2020-09-27
  • 2020-11-04
  • 1970-01-01
  • 2020-06-01
相关资源
最近更新 更多