
I built FastJava – a lightweight SIMD-assisted web server using optimisation based on Java's Vector API (106k req/s)
Hey everyone,
I’ve been working on a lightweight HTTP server prototype called FastJava, and I wanted to share its current progress. The main goal of this project is to explore low-indirection internals and utilize Java's Vector API (jdk.incubator.vector) for SIMD-assisted parsing.
It exposes a servlet-style API inspired by Tomcat and Jakarta Servlet (though it isn't fully binary-compatible with the complete servlet spec yet).
I recently ran some cross-framework benchmarks, and the results have been really promising.
The Benchmarks (Throughput):
I tested a simple GET /hello endpoint (150,000 requests, 64 concurrency, isolated JVM per server). FastJava managed to edge out some of the heavyweights in pure throughput:
Aggregate median results:
| Server | Throughput (req/s) | Avg Latency (ms) | p95 (ms) | p99 (ms) | Errors |
|---|---:|---:|---:|---:|---:|
| FastJava | 106993.25 | 0.593 | 1.086 | 2.046 | 0 |
| Undertow | 93112.02 | 0.680 | 1.294 | 2.364 | 0 |
| Netty | 82846.07 | 0.766 | 1.573 | 2.676 | 0 |
| Tomcat | 74225.89 | 0.859 | 1.793 | 2.655 | 0 |
You can checkout project at https://github.com/tanoaks14/fastJava