GitPedia

Esa httpserver

An asynchronous event-driven HTTP server based on netty.

From esastack·Updated April 5, 2026·View on GitHub·

ESA HttpServer is an asynchronous event-driven http server based on netty. The project is written primarily in Java, distributed under the Apache License 2.0 license, first published in 2020. Key topics include: h2c, haproxy, http2, https, httpserver.

Latest release: v0.1.1Release v0.1.1
May 24, 2022View Changelog →

ESA HttpServer

Build
codecov
Maven Central
GitHub license

ESA HttpServer is an asynchronous event-driven http server based on netty.

Features

  • Asynchronous request handing
  • Http1/H2/H2cUpgrade
  • Https
  • HAProxy
  • Epoll/NIO
  • Chunked read/write
  • Body aggregation
  • Multipart
  • Metrics
  • more features...

Maven Dependency

xml
<dependency> <groupId>io.esastack</groupId> <artifactId>httpserver</artifactId> <version>${mvn.version}</version> </dependency>

Quick Start

java
HttpServer.create() .handle(req -> { req.onData(buf -> { // handle http content }); req.onEnd(p -> { req.response() .setStatus(200) .end("Hello ESA Http Server!".getBytes()); return p.setSuccess(null); }); }) .listen(8080) .awaitUninterruptibly();

Performance

Test cases

  • We built an echo server by ESA HttpServer and used a http client to do the requests for RPS testing with different bytes payload(16B, 128B, 512B, 1KB, 4KB, 10KB)
  • Also we used origin netty to build a server which is same with above for RPS testing (uses the HttpServerCodec, HttpObjectAggregator handlers directly).

Hardware Used

We used the following software for the testing:

  • wrk4.1.0

  • OSCPUMem(G)
    servercentos:6.9-1.2.5(docker)48
    clientcentos:7.6-1.3.0(docker)163

JVM Options

-server -Xms3072m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:logs/gc-${appName}-%t.log -XX:NumberOfGCLogFiles=20 -XX:GCLogFileSize=480M -XX:+UseGCLogFileRotation -XX:HeapDumpPath=.

Server Options

  • we set the value of IO threads to 8.

RPS

16B128B512B1KB4KB10KB
Netty133272.34132818.53132390.78127366.2885408.749798.84
ESA HttpServer142063.99139608.23139646.04140159.592767.5353534.21

Contributors

Showing top 3 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from esastack/esa-httpserver via the GitHub API.Last fetched: 6/23/2026