Documentation: sjanel.github.io/aeronet
aeronet is a modern, fast, modular and ergonomic HTTP / WebSocket C++ server & client library for Linux, macOS and Windows focused on predictable performance, explicit control and minimal dependencies.
- Fast & predictable: edge‑triggered reactor model, zero/low‑allocation hot paths and minimal copies, horizontal scaling with port reuse. In CI benchmarks
aeronetranks among the fastest tested implementations across multiple realistic scenarios. - Modular & opt‑in: enable only the features you need at compile time to minimize binary size and dependencies
- Ergonomic: easy API, automatic features (encoding, telemetry), RAII listener setup with sync / async server lifetime control, developer friendly with no hidden global state, no macros
- Configurable: extensive dynamic configuration with reasonable defaults, per path options and middleware helpers, run-time router / config updates
- Standards compliant: HTTP/1.1, HTTP/2, WebSocket, Compression, Streaming, Trailers, TLS, CORS, Range & Conditional Requests, Static files, URL Decoding, multipart/form-data, etc.
- Batteries included: beyond the server, a matching HTTP client and a JWT (JWS) module for signing/verifying tokens - same opt‑in, zero‑extra‑dependency design (both reuse the server's own transport / TLS / crypto bricks).
- Cloud native: Built-in Kubernetes-style health probes, opentelemetry support (metrics, tracing) with built-in spans and metrics, dogstatsd support, perfect for micro-services
- Cross‑platform: primary platform is Linux (epoll); macOS (kqueue) and Windows (WSAPoll) are supported with a portable abstraction layer. Some Linux‑specific optimizations (kTLS,
MSG_ZEROCOPY,sendfile) are automatically disabled on other platforms.
aeronet is designed to be very fast, optimized for Linux. In our automated wrk-based benchmarks (HTTP/1.1), h2load-based benchmarks (HTTP/2), and k6-based benchmarks (WebSocket) against other popular frameworks (run in CI against a fixed set of competitors such as drogon, pistache, Crow, a Rust Axum server, Undertow in Java, Go and Python), aeronet:
- Achieves the highest requests/sec in most scenarios
- Consistently delivers lower average latency in those same scenarios
- Maintains competitive or better throughput and memory usage
You can inspect the latest benchmark tables generated on main from the CI benchmarks job and detailed methodology here:
You can browse the latest rendered benchmark tables directly on GitHub Pages:
- HTTP/1.1 Live benchmark dashboard
- HTTP/2 clear-text Live benchmark dashboard
- HTTP/2 TLS Live benchmark dashboard
- WebSocket Live benchmark dashboard
- HTTP/1.1 client Live benchmark dashboard (aeronet
HttpClientvs libcurl / drogon / beast) - HTTP/2 clear-text client Live benchmark dashboard (aeronet
HttpClientvs libcurl, h2c) - HTTP/2 TLS client Live benchmark dashboard (aeronet
HttpClientvs libcurl, ALPNh2)
Spin up a basic HTTP server that responds on /hello in just a few lines.
All code examples in the README and the documentation pages are guaranteed to compile as they are covered by a CI check.
#include <aeronet/aeronet.hpp> // unique 'umbrella' header, includes all public API
using namespace aeronet;
int main() {
Router router;
router.setPath(http::Method::GET, "/hello", [](const HttpRequestView& req) {
return HttpResponse(200).header("x-req-body", req.body()).body("hello from aeronet\n");
});
HttpServer server(HttpServerConfig{}, std::move(router)); // default port is ephemeral, OS will pick an available one
server.run(); // blocking. Use start() for non-blocking
}See the full program.
Streaming responses, coroutine (async) handlers, routing, middleware and the rest are covered in the documentation: start with Your first server, then Routing, Streaming responses and Async handlers.
Minimal server examples for typical use cases (multi-threaded server, TLS, HTTP/2, WebSocket, static files, sendfile, HTTP client, ...) are provided in the examples directory.
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target aeronet-server-minimal
./build/examples/aeronet-server-minimal 8080 # or omit 8080 for ephemeralTest with curl:
curl -i http://localhost:8080/hello
HTTP/1.1 200
date: Tue, 27 Oct 2026 06:35:01 GMT
server: aeronet
content-type: text/plain
content-length: 347
Hello from aeronet minimal server! You requested /hello| Area | Highlights | Documentation |
|---|---|---|
| HTTP/1.1 server | Keep-alive, pipelining, chunked bodies, trailers, limits, streaming, duplicate header policy | Servers and lifecycle, conformance |
| Routing & requests | Path parameters, wildcards, route groups, per-route options, query / forms / multipart | Routing, Requests, Responses |
| Middleware | Global + per-route hooks, rate limiting (in-memory / Redis), CORS | Middleware, CORS |
| Compression | gzip / deflate / zstd / brotli, outbound negotiation and inbound decompression | Compression |
| Static files | sendfile, range and conditional requests |
Static files |
| Async handlers | Coroutines (RequestTask), background work off the event loop |
Async handlers |
| TLS (flag) | ALPN, mTLS, SNI, tickets, OCSP stapling, CRLs, kTLS, HTTP to HTTPS redirect | TLS |
| HTTP/2 (flag) | RFC 9113, HPACK, ALPN h2, h2c, multiplexing | HTTP/2 |
| WebSocket (flag) | RFC 6455, permessage-deflate, ping/pong, close handshake | WebSocket |
| HTTP client (flag) | HTTP/1.1 + HTTP/2, keep-alive pool, redirects, proxy, streamed bodies, auto (de)compression | HTTP client |
| JWT (flag) | RFC 7519 JWS sign / verify, JWK / JWKS, rejects alg:none |
JWT |
| Observability | OpenTelemetry (experimental), DogStatsD, logging, metrics callback | Observability |
| Operations | Kubernetes-style probes, graceful drain, signal handling, runtime config / router updates, JSON / YAML configuration | Health probes, Kubernetes examples, JSON and config files |
| Performance | Edge-triggered reactor, SO_REUSEPORT scaling, writev, MSG_ZEROCOPY |
Performance and tuning |
The complete list is in the feature overview. Every feature marked flag is opt-in at compile time, see the build configuration reference. Runtime options are listed in the server and client configuration references.
| Platform | Status | I/O backend |
|---|---|---|
| Linux (x86_64, aarch64) | Full support (primary; tested on Ubuntu and Alpine in CI) | epoll (edge-triggered) |
| macOS (Apple Silicon / x86_64) | Supported | kqueue |
| Windows (x64, MSVC) | Supported | WSAPoll |
Linux-specific optimizations (kTLS, sendfile, MSG_ZEROCOPY, eventfd / timerfd, DogStatsD over Unix sockets) are automatically disabled on other platforms.
64-bit targets only: 32-bit targets (i386, armv7...) are not supported and fail at configure time, see Installation and build.
Full build, install, package manager (Conan, vcpkg), find_package / FetchContent and C++ modules instructions live in docs/getting-started/install.md.
The full documentation, with search and navigation, is at sjanel.github.io/aeronet; its sources are in docs. See also the changelog and the roadmap.
Compression libraries (zlib, zlib-ng, zstd, brotli), OpenSSL, Opentelemetry and spdlog provide the optional feature foundation; thanks to their maintainers & contributors.
This project also includes code from the following open source projects:
- amc, licensed under the MIT License.
- flat_hash_map, no license.
- CityHash, licensed under the MIT License.
Licensed under the MIT License. See LICENSE.
