Spring Cloud Gateway VS Zuul 比较,怎么选择?
Spring Cloud Gateway 是 Spring Cloud Finchley 版推出来的新组件,用来代替服务网关:Zuul。
那 Spring Cloud Gateway 和 Zuul 都有哪些区别呢,咱们来比较一下。
1、开源组织
Spring Cloud Gateway 是 Spring Cloud 微服务平台的一个子项目,属于 Spring 开源社区,依赖名叫:spring-cloud-starter-gateway。
Zuul 是 Netflix 公司的开源项目,Spring Cloud 在 Netflix 项目中也已经集成了 Zuul,依赖名叫:spring-cloud-starter-netflix-zuul。
2、底层实现
https://stackoverflow.com/questions/47092048/how-is-spring-cloud-gateway-different-from-zuul
据 Spring Cloud Gateway 原作者的解释:
Zuul构建于 Servlet 2.5,兼容 3.x,使用的是阻塞式的 API,不支持长连接,比如 websockets。另外
Spring Cloud Gateway构建于 Spring 5+,基于 Spring Boot 2.x 响应式的、非阻塞式的 API。同时,它支持 websockets,和 Spring 框架紧密集成,开发体验相对来说十分不错。
3、性能表现
这个没什么好比的,要比就和 Zuul 2.x 比,Zuul 2.x 在底层上有了很大的改变,使用了异步无阻塞式的 API,性能改善明显,不过现在 Spring Cloud 也没集成 Zuul 2.x,所以就没什么好比的。
如何选择?
本文说的 Zuul 指 Zuul 1.x,Netflix 早就发布了最新的 Zuul 2.x,但 Spring Cloud 貌似没有整合计划,栈长看了下目前最新的包,整合的还是 Zuul 1.x。
据了解,正是因为 Zuul 2.x 的不断跳票,Spring Cloud 才釜底抽薪推出了自己的服务网关:Spring Cloud Gateway,栈长看了下,使用起来比 Zuul 更简单,配置更方便,所以说选 Spring Cloud Gateway 没错,毕竟是 Spring Cloud 亲儿子,不会始乱终弃。
关注Java技术栈微信公众号,栈长将继续分享 Spring Cloud Gateway 的实战教程,公众号第一时间推送,持续关注。在公众号后台回复:cloud,获取栈长整理的更多的 Spring Cloud 教程,都是实战干货,以下仅为部分预览。
- Spring Cloud 最新 Finchley 版本踩坑
- Spring Cloud 多版本如何选择
- Spring Cloud 是什么,和 Dubbo 对比
- Spring Cloud 注册中心高可用搭建
- Spring Cloud Eureka 自我保护机制
- ……
本文原创首发于微信公众号:Java技术栈(id:javastack),关注公众号在后台回复 "cloud" 可获取更多 Spring Cloud 教程,转载请原样保留本信息。
Spring Cloud Gateway VS Zuul 比较,怎么选择?的更多相关文章
- 纠错帖:Zuul & Spring Cloud Gateway & Linkerd性能对比 (转载)
		纠错帖:Zuul & Spring Cloud Gateway & Linkerd性能对比 Spring Cloud Spring Cloud Spring Cloud Gatew ... 
- Spring cloud gateway
		==================================为什么需要API gateway?==================================企业后台微服务互联互通, 因为 ... 
- Spring Cloud Gateway(一):认识Spring Cloud Gateway
		1.Spring Cloud Gateway 简介 Spring Cloud Gateway 系列目录 Spring Cloud Gateway(一):认识Spring Cloud Gateway S ... 
- spring Cloud网关之Spring Cloud Gateway
		Spring Cloud Gateway是什么?(官网地址:https://cloud.spring.io/spring-cloud-gateway/reference/html/) Spring C ... 
- spring cloud gateway之filter篇
		转载请标明出处: https://www.fangzhipeng.com 本文出自方志朋的博客 在上一篇文章详细的介绍了Gateway的Predict,Predict决定了请求由哪一个路由处理,在路由 ... 
- Spring Cloud Gateway真的有那么差吗?
		动机 已经不止一次看到"Spring Cloud Gateway性能比Zuul更差"的言论了,不少人人云亦云,来问我,既然如此,那Spring官方还开发Spring Cloud G ... 
- 使用Spring Cloud Gateway保护反应式微服务(一)
		反应式编程是使你的应用程序更高效的一种越来越流行的方式.响应式应用程序异步调用响应,而不是调用资源并等待响应.这使他们可以释放处理能力,仅在必要时执行处理,并且比其他系统更有效地扩展. Java生态系 ... 
- API网关性能比较:NGINX vs. ZUUL vs. Spring Cloud Gateway vs. Linkerd  API 网关出现的原因
		API网关性能比较:NGINX vs. ZUUL vs. Spring Cloud Gateway vs. Linkerd http://www.infoq.com/cn/articles/compa ... 
- 最全面的改造Zuul网关为Spring Cloud Gateway(包含Zuul核心实现和Spring Cloud Gateway核心实现)
		前言: 最近开发了Zuul网关的实现和Spring Cloud Gateway实现,对比Spring Cloud Gateway发现后者性能好支持场景也丰富.在高并发或者复杂的分布式下,后者限流和自定 ... 
随机推荐
- Opencv— — Color Gradient
			// define head function #ifndef PS_ALGORITHM_H_INCLUDED #define PS_ALGORITHM_H_INCLUDED #include < ... 
- 「ZJOI2007」「LuoguP1169」棋盘制作(并查集
			题目描述 国际象棋是世界上最古老的博弈游戏之一,和中国的围棋.象棋以及日本的将棋同享盛名.据说国际象棋起源于易经的思想,棋盘是一个8×88 \times 88×8大小的黑白相间的方阵,对应八八六十四卦 ... 
- 「LuoguP1379」 八数码难题(迭代加深
			[P1379]八数码难题 - 洛谷 题目描述 在3×3的棋盘上,摆有八个棋子,每个棋子上标有1至8的某一数字.棋盘中留有一个空格,空格用0来表示.空格周围的棋子可以移到空格中.要求解的问题是:给出一种 ... 
- codevs 1155今明的预算方案(复习有依赖性的背包问题)
			1155 金明的预算方案 [题目大意]买附件必须买主件. 在一定钱数内 求总价值最大. [题解]有依赖性的背包问题. [code] #include<iostream> #include& ... 
- python BaseManager分布式学习
			如果我们已经有一个通过Queue通信的多进程程序在同一台机器上运行,现在,由于处理任务的进程任务繁重,希望把发送任务的进程和处理任务的进程分布到两台机器上.怎么用分布式进程实现?原有的Queue可以继 ... 
- Foreign Postcards
			题意: 给定 n 张排成一堆的的卡片,每一次从堆顶上等概率随机取出 [1~当前卡片数] 个卡片,如果堆顶的卡片是反面朝上, 则将所有取出的卡片翻转,求问期望取出多少个反面朝上的卡片. 解法: 考虑dp ... 
- Bean的基于注解的配置方式
			Boss.class import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.a ... 
- 密码破解工具John the Ripper使用说明
			John the Ripper John 包描述 John the Ripper 既功能丰富又运行快速. 它在一个程序中结合了几种破解模式,并且可以根据您的特定需求进行全面地配置(你甚至可以使用支持C ... 
- TensorFlow数据集(二)——数据集的高层操作
			参考书 <TensorFlow:实战Google深度学习框架>(第2版) 一个使用数据集进行训练和测试的完整例子. #!/usr/bin/env python # -*- coding: ... 
- TopJUI通过简单的代码实现复杂的批量提交功能
			业务系统的批量提交是常用的操作功能,使用传统的EasyUI开发时需要写不少代码才能实现,该功能在TopJUI中是如何实现的呢?本篇我们将通过简单的代码,把批量操作的具体实现分享给大家参考. <a ... 
