networknt / microservices-framework-benchmark

Raw benchmarks on throughput, latency and transfer of Hello World on popular microservices frameworks
MIT License
705 stars 127 forks source link

Jooby 1.1.0 #18

Closed jknack closed 7 years ago

jknack commented 7 years ago
jknack commented 7 years ago

@stevehu Here is an update to latest Jooby :)

What do you think of adding a comment when the test run in the IO vs Worker thread?

Jooby for example doesn't allow to run any code in IO thread.

stevehu commented 7 years ago

I think most new frameworks won't allow to run business logic in IO thread and this is what non-blocking is about. I think only servlet contain these days are using one thread for the request/response chain.

jknack commented 7 years ago

I'm probably reading it wrong, but this code run in the IO thread, no?

stevehu commented 7 years ago

I got the result published and it is a big improvement compare with the previous version. what has been changed? Yes. My code is using IO thread as for this test it is not necessary to start another thread. For database or other IO access, it will be changed to worker thread.

jknack commented 7 years ago

Somewhere in the path I introduced a performance regression. The 404 handler was creating a lot of garbage per each new request. This wasn't need it (of course), it was just a really silly mistake.

After I fixed that did some minor/micro improvements.

Regarding to the IO thread. Yes, I know we could run this test in the IO thread... just saying we should probably mention it. Running code in the IO thread will always give us better results (of course)

stevehu commented 7 years ago

Are you still using servlet container?

jknack commented 7 years ago

Never used a Servlet Container :)

Jooby comes with 3 server implementations Netty, Undertow and Jetty.

Jetty is a servlet container, but I tried to use plain/raw Jetty API as much as possible.

stevehu commented 7 years ago

Cool. Then you have a lot of room to go.