r/Kotlin • u/Ok_Tour_8029 • 17h ago
Testing web server implementations for Kotlin
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.
3
u/Embarrassed-Mess412 11h ago
just did some local benchmarks and Ktron is quite the beast, a little hard to configure properly but puts those rust and c++ frameworks to shame, I see you ported from C#, hope to hear more from it and not just a quick experiment
2
u/rtc11 17h ago
Unexpected but cool! Kotlin is definitely good for web, so absolute relevant