本文共 432 字,大约阅读时间需要 1 分钟。
1、共同之处
Spring Cloud Gateway 和 Zuul 均是微服务平台的网关,在系统架构中他们是需要二选一的
2 、不同之处
1> 开源组织不同
Spring Cloud Gateway 是 Spring Cloud 微服务平台的一个子项目,属于 Spring 开源社区
Zuul 是 Netflix 公司的开源项目,Spring Cloud 在 Netflix 项目中也已经集成了 Zuul
2> 底层实现不同
Zuul构建于 Servlet 2.5,兼容 3.x,使用的是阻塞式的 API,不支持长连接,比如 websockets。另外
Spring Cloud Gateway构建于 Spring 5+,基于 Spring Boot 2.x 响应式的、非阻塞式的 API。同时,它支持 websockets,和 Spring 框架紧密集成。
3> 内嵌web容器不同
zull 默认tomcat
gateway默认 NettyWebServer
转载地址:http://tjnab.baihongyu.com/