Spring Cloud Gateway 或 Zuul2,哪一个是 Zuul1 的正确替代品? [英] Spring Cloud Gateway or Zuul2, Which one is the right replacement for Zuul1?

查看:32
本文介绍了Spring Cloud Gateway 或 Zuul2,哪一个是 Zuul1 的正确替代品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 Spring Cloud 团队放弃了 Zuul 模块的开发,我们正在转向 Spring Cloud Gateway 或 Zuul2,但我相信 Zuul2 需要在架构上进行大量更改,并且需要在微服务上进行较大更改(如果我错了,请纠正我),谁能推荐一下 zuul2 或 Spring-Cloud-Gateway,有没有人或您认识任何使用 Spring-Cloud-Gateway 的技术大公司?

解决方案

Zuul1 正在阻塞,而 Zuul2 和 spring cloud gateway 是非阻塞的,这是网关的主要性能因素,因为与阻塞网关相比,非阻塞模型需要更少的资源来处理相同数量的请求.

现在,来到 spring cloud gateway 和 Zuul2 - Spring Cloud 不提供与 Zuul2 的任何开箱即用的集成.网关具有许多 Zuul2 公共版本中不可用的功能,例如速率限制等.此外,通过网关,您可以为每个路由定义自定义过滤器,并且还定义了大量内置过滤器,这有助于很多开始.

其实很多事情在这里是无法解释的.您可以在此处遵循网关文档 - https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.0.2.RELEASE/single/spring-cloud-gateway.html>

Since Spring Cloud team has abandoned development of Zuul module, we are moving to Spring Cloud Gateway or Zuul2 but I believe Zuul2 needs a lot of changes in the architecture and needs big changes in the microservices(correct me if i'm wrong), can anyone gives a recommendation on zuul2 or Spring-Cloud-Gateway, has anyone or you know any big player in tech using Spring-Cloud-Gateway?

解决方案

Zuul1 is blocking whereas Zuul2 and spring cloud gateway are non-blocking and this is a major performance factor for a gateway, as a non-blocking model requires less resources to serve the same amount of requests as compared to a blocking gateway.

Now, coming to spring cloud gateway and Zuul2 - Spring Cloud does not provide any out of the box integration with Zuul2. Gateway has many features that are not available in the public version of Zuul2 such as Rate limiting, etc. Also, with the gateway you can have custom filters defined per route and there are tons of built-in filters defined as well, which helps a lot to get started.

Actually, there are many things which are not possible to explain here. You can follow the gateway documentation here - https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.0.2.RELEASE/single/spring-cloud-gateway.html

这篇关于Spring Cloud Gateway 或 Zuul2,哪一个是 Zuul1 的正确替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆