hella-http
is a hella fast HTTP library for Java that uses nio_uring for I/O. It has a very small codebase and is one of the most scalable HTTP servers available for Java today.
Feedback, suggestions, and contributions are most welcome!
- Linux >= 5.1
- Java >= 8
For both of these, the higher the version the better - free performance!
Hella will be published to Maven central once the API has stabilized.
public static void main(String[] args) {
byte[] body = "Hello, world!".getBytes(StandardCharsets.UTF_8);
String bodyLength = body.length + "";
Response response = Response.builder()
.status(200)
.header("Content-Type", "text/plain")
.header("Content-Length", bodyLength)
.body(body)
.build();
new HttpServer(request -> response)
.start()
.join();
}
Hella scales exceptionally well with large amounts of clients. The following benchmarks were conducted between two EC2 c5.2xlarge instances, which have 8 virtual CPUs and 16GB of RAM. The library used to conduct and measure the benchmarks was wrk
.
X axis: number of clients
Y axis: requests per second
X axis: number of clients
Y axis: latency in microseconds
MIT. Have fun and make cool things!