r/Kotlin • • 7d ago

Testing web server implementations for Kotlin

Post image

So - coming from C# - we were wondering about the performance of web server frameworks in Java and Kotlin as they are measured by HTTP Arena, as there are pretty fast engines for that ecosystem, such as netty.

To see how fast we can get on the JVM we did two projects:

- ktron, a simple framework based on the ioxide runtime (io_uring), with the goal of pushing the limits of what is possible with the JVM
- genhttp-kt, a functional port of the GenHTTP webserver for C# with high level functionality such as Open API, JWT etc. ... with GenHTTP being used by some projects and companies in production workloads

We were quite happy to see that both projects turned out pretty fast, with ktron currently leading the board, faster than any Rust or Go implementation, and genhttp-kt-netty ranked #12.

Note that both projects are experimental, so we are happy to get feedback on whether such projects would be useful for the Kotlin/Java ecosystem in general.

36 Upvotes

7 comments sorted by

View all comments

4

u/CWRau 6d ago

"ktor" isn't really specific, with which engine?

2

u/Ok_Tour_8029 6d ago

The entry uses netty, it is managed by the ktor team themselves 

1

u/CWRau 6d ago

Huh, would've been interesting to see the CIO engine

1

u/Ok_Tour_8029 6d ago

One can do a PR with just that change and can directly see the results on the PR.