与Netty相比,vert.x如何实现卓越的性能? [英] How does vert.x achieve superior performance compared to Netty?

查看:970
本文介绍了与Netty相比,vert.x如何实现卓越的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近的 TechEmpower性能基准在Netty上显示了vert.x,有时显示为大量的.根据其网站,vert.x使用Netty作为其网络IO的大部分".如果是这样,与Netty相比,它如何实现卓越的性能?

The recent TechEmpower performance benchmarks have been showing vert.x on top of Netty, sometimes by a large amount. According to its website, vert.x uses Netty for "much of its network IO". If so, how does it achieve superior performance as compared to 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.)

推荐答案

这取决于您在谈论哪个基准测试和哪个回合,各回合的性能结果不同,每个基准测试(纯文本,json,查询等)的性能结果也不同...).

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...).

Vertx使用Netty作为其IO是非常正确的,并且在没有后端的基准测试中,由于这个原因,结果非常相似.在此类测试中,Netty通常比Vertx快一点,因为它做的事情比Vertx少,因为Vertx是用于开发应用程序的库,而Netty是网络库.

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. 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.

在数据库测试中,Vertx的出色性能与 Reactive Postgres Client的使用密切相关. 是经过优化的,并且还提供了使这一点有所不同的网络流水线.

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.

这篇关于与Netty相比,vert.x如何实现卓越的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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