zuul与spring-cloud-gateway的区别
1.开源组织不同。
Spring Cloud Gateway 是 Spring Cloud 微服务平台的一个子项目,属于 Spring 开源社区,依赖名叫:spring-cloud-starter-gateway。
https://spring.io/projects/spring-cloud-gateway
Zuul 是 Netflix 公司的开源项目,Spring Cloud 在 Netflix 项目中也已经集成了 Zuul,依赖名叫:spring-cloud-starter-netflix-zuul。
https://github.com/Netflix/zuul
在pom文件中需要分别引入他们各自的依懒,才能在实际项目中适用
2.性能比较
Spring Cloud Gateway基于Spring 5、Project Reactor、Spring Boot 2,使用非阻塞式的API,内置限流过滤器,支持长连接(比如 websockets),在高并发和后端服务响应慢的场景下比Zuul1的表现要好。
Zuul基于Servlet2.x构建,使用阻塞的API,没有内置限流过滤器,不支持长连接。
两者都能与Sentinel(是阿里开源的一款高性能的限流框架)集成。
Zuul:
使用的是阻塞式的 API,不支持长连接,比如 websockets。
底层是servlet,Zuul处理的是http请求
没有提供异步支持,流控等均由hystrix支持。
依赖包spring-cloud-s