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

osman picture osman · May 21, 2014 · Viewed 7.8k times · Source

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

Answer

Julien Viet picture Julien Viet · Oct 20, 2018

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

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.

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.