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发现后者性能好支持场景也丰富.在高并发或者复杂的分布式下,后者限流和自定 ...
随机推荐
- BZOJ2599:[IOI2011]Race
浅谈树分治:https://www.cnblogs.com/AKMer/p/10014803.html 题目传送门:https://www.lydsy.com/JudgeOnline/problem. ...
- bzoj3625
fft 分治虽然是万能的,但是太慢了 分治是nlog^2n的,太慢了,于是我们用求逆和开根 设f(x)表示答案为x的方案数 c表示物品的生成函数 那么f=f*f*c+1 f*f表示左右儿子的方案数 c ...
- 【旧文章搬运】Windows中全局钩子DLL的加载过程
原文发表于百度空间,2011-03-24========================================================================== 看雪上别人 ...
- 机器学习之K-means算法
前言 以下内容是个人学习之后的感悟,转载请注明出处~ 简介 在之前发表的线性回归.逻辑回归.神经网络.SVM支持向量机等算法都是监督学习算法,需要样本进行训练,且 样本的类别是知 ...
- Visual Studio 2013 Update 1
Visual Studio 2013 Update 1 VS2013.1.iso 共 245 MB http://download.microsoft.com/download/8/2/6/826E2 ...
- 1.5 sqoop安装及基本使用
一.安装sqoop 1.解压 ##解压 [root@hadoop-senior cdh]# tar zxf sqoop-1.4.5-cdh5.3.6.tar.gz -C /opt/cdh-5.3.6/ ...
- 3、css边框以及其他常用样式
一.边框 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- 【eclipse插件开发实战】Eclipse插件开发1——eclipse内核结构、扩展点机制
Eclipse插件开发实战1--eclipse内核结构.扩展点机制 一.前言 本系列总体介绍eclipse插件开发基本理论.插件项目结构及开发步骤,最后再给出两个插件开发实例. 总体安排结构如下: 1 ...
- MVC 基本工具(Visual Studio 的单元测试、使用Moq)
3.Visual Studio 的单元测试 有很多.NET单元测试包,其中很多是开源和免费的.本文打算使用 Visual Studio 附带的内建单元测试支持,但其他一些.NET单元测试包也是可用的. ...
- 3DMAX 1快捷键及常用操作
开启,关闭快捷键 ,使用快捷键时要按下这个按钮 快捷键查看与修改 自定义-自定义用户界面(cutomize user interface):设置和查看快捷键 位置变换 Z: 复位---物体被移动飞了的 ...