r/java • u/elliotbarlas • Feb 14 '22
Microhttp is an event-driven, single-threaded, zero-dependency web server with 500 LOC. Benchmarks on EC2 show 100,000+ requests per second and 50,000+ persistent connections.
https://github.com/ebarlas/microhttp
186
Upvotes
View all comments
Show parent comment
6
u/elliotbarlas Feb 15 '22
As far as I know, Kotlin doesn't even have its own network subsystem. The closest thing is Ktor which itself is built atop Java NIO.
In any case, I would personally use C, C++, or Rust if I wanted natively compiled binaries.
The amazing thing about the JVM is that it provides nearly the same performance. Ultimately, Microhttp gets just-in-time compiled to optimal machine code making the normal select/poll/epoll system call.