Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the performance comparison of Zuul & Spring Cloud Gateway & Linkerd?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you what the performance comparison of Zuul & Spring Cloud Gateway & Linkerd is like. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

motivation

I have seen the remark that "the performance of Spring Cloud Gateway is worse than that of Zuul" more than once, and many people have followed suit and asked me, in that case, why does Spring officially develop Spring Cloud Gateway? Is it just to support persistent connections and Web Socket that are not supported by Zuul 1.x?

So write a blog to correct everyone's wrong views.

The beginning

I searched the Internet and said that the performance of Spring Cloud Gateway was worse than that of Zuul. The comment came from: http://www.servicemesh.cn/?/article/45.

The author uses ab for benchmark, and the operation is very standard. Judging from the results, it is true that Spring Cloud Gateway is much worse than Zuul.

But let's open the official Issue:Throughput problems when compared with Netflix Zuul and Nginx, where the official replied:

Reactor-netty has issues with http 1.0 and hence ab. Reactor/reactor-netty#21

Track it to reactor/reactor-netty#21 and see what it says:

As discussed recently about the issue raised on https://jira.spring.io/browse/SPR-14964, a very simple ab-n1-c1 http://localhost:8082/items/10 on Spring + Reactor Netty based server block forever likely because Reactor Netty does not support HTTP 1.0.

It says that Reactor Netty does not support HTTP 1.0, while Spring Cloud Gateway relies on reactor-netty.

That is to say, because of reactor-netty 's bug, the result of ab stress test is not accurate!

Correct posture

The official recommendation is to use wrk for benchmark testing. Not only that, officials also created a benchmark project called spring-cloud-gateway-bench, which compares:

Spring Cloud Gateway

Zuul

Linkerd

The performance of the three.

The idea is simple: the static project is a simple server written in the go language; then use Gateway/Zuul/Linkerd to proxy the service's endpoints and compare them.

End result:

Component RPS (request per second) Spring Cloud GatewayRequests/sec: 32213.38ZuulRequests/sec: 20800.13LinkerdRequests/sec: 28050.76

From the results, we can see that the RPS of Spring Cloud Gateway is 1.6 times that of Zuul1! Better than Linkerd performance!

The Zuul in this article, which refers to Zuul 1.x, is an API Gateway based on blocking io.

Spring Cloud Gateway is a promising project, which is easy to use and powerful.

Linkerd is also a very promising project, which is based on Scala and is currently the only production-level Service Mesh on the market (others such as Istio and Conduit are not yet available for production).

Zuul has released Zuul 2.x, which is based on Netty and is also non-blocking, which supports long connections, but Spring Cloud has no integration plans yet.

The above is what the performance comparison of Zuul & Spring Cloud Gateway & Linkerd is like. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report