DEV Community

Bitan Sarkar
Bitan Sarkar

Posted on Originally published at bitsar.net

A 5ms Blocking Call Took My Service From 17,189 to 549 req/s

A 5 millisecond blocking call. Nobody would call that slow. It passes code
review and looks fine in a trace.

On a Tomcat worker thread, my service did 17,189 req/s while an unrelated
endpoint answered in 0ms. The identical call on a Netty event loop: 549 req/s,
and that same unrelated endpoint went to 217ms.

Same call. Same machine. Same JVM. The only difference was which thread it was
allowed to occupy — so I measured it properly against real Netty 4.1 and real
embedded Tomcat 10.1.

Visit : https://bitsar.net/blog/tomcat-forgives-blocking-event-loop-doesnt

Top comments (0)