简体   繁体   English

与Netty相比,vert.x如何实现卓越的性能?

[英]How does vert.x achieve superior performance compared to Netty?

The recent TechEmpower performance benchmarks have been showing vert.x on top of Netty, sometimes by a large amount. 最近的TechEmpower性能基准测试已经在Netty上显示了vert.x,有时甚至是大量的。 According to its website, vert.x uses Netty for "much of its network IO". 根据其网站,vert.x使用Netty作为“其大部分网络IO”。 If so, how does it achieve superior performance as compared to Netty? 如果是这样,与Netty相比,它如何实现卓越的性能?

(Note: This is not intended to be controversial or flamebait - I really want to know the computer science reasons behind the performance difference. Thanks.) (注意:这不是有争议的或者是火焰棒 - 我真的想知道计算机科学背后的性能差异。谢谢。)

It depends which benchmark and which round you are talking about, rounds have different performant results and performance results are different for each benchmark (plaintext, json, query, etc...). 这取决于你在谈论哪个基准和哪一轮,轮次具有不同的性能结果,并且每个基准(明文,json,查询等等)的性能结果是不同的。

It is very correct that Vertx uses Netty for its IO and on the benchmarks with no back-end the results are quite similar for this reason. Vertx使用Netty作为其IO并且没有后端的基准测试是非常正确的,因此结果非常相似。 In such tests usually Netty is bit faster than Vertx because it does less things than Vertx since Vertx is a library for developing applications while Netty is a networking library. 在这样的测试中,Netty通常比Vertx快一点,因为它比Vertx更少,因为Vertx是用于开发应用程序的库,而Netty是一个网络库。

In databases tests, stellar performance of Vertx is much related to the usage of the Reactive Postgres Client that is very optimised and provides also network pipelining that makes a difference is this benchmark. 在数据库测试中,Vertx的出色表现与Reactive Postgres Client的使用密切相关,后者经过了非常优化,并且还提供了网络流水线操作,这就是这个基准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM