I recently tested a simple HTTP server using vert.x( java based) I was amazed by the throughput and api latency of http server, it is blazingly fast.
The same piece of code of http-server was run on java application with single thread, lock free and non-blocking. Performance was less than 1/3rd of vert.x one.
What I do not understand is, what is the core technical difference that the vert.x outperforms non-reactive java application ?
STATS :
Testing was done using Jmeter. Both jmeter and application was run on same machine- jmeter consuming cpu 25-50%, app consuming cpu 20-30% . All the tests were run for 5 minutes.
- Spring boot with 1 tomcat worker thread :
Jmeter with 1 client thread bombarding request (throughout :3474 per sec):

Jmeter with 50 client thread bombarding request concurrently (throughout :4285 per sec):

- Vert.x ( java based ) with only 1 vertical ( http processor vertical ) – meaning only 1 processor thread
Jmeter with 1 client thread bombarding request (throughout :9382 per sec) :

Jmeter with 50 client threads bombarding requests concurrently (throughout :20785 per sec):
