Aegon

Aegon

High-Performance C++23 Asynchronous Web & Networking Framework

Aegon is an asynchronous, thread-per-core C++23 application and networking framework engineered from the ground up for extreme HTTP throughput, ultra-low latency, and modern developer ergonomics across both x86_64 and ARM64 (aarch64).

Built around standard C++ coroutines (co_await), Aegon provides first-class support for modern networking protocols, including HTTP/1.1 (pipelined), cleartext and TLS HTTP/2 (h2c and h2), HTTP/3 over QUIC, and full RFC 6455-compliant WebSockets.


Key Architectural Highlights

Thread-per-Core Model

Runs a shared-nothing event loop cluster pinned to individual hardware threads. Eliminates cross-thread mutex contention, cache-line bouncing, and lock overhead on the request hot path.

Multi-Protocol Engine

Native support for HTTP/1.1 with pipelining, HTTP/2 multiplexing, HTTP/3 over QUIC (RFC 9000 & RFC 9114), and high-throughput WebSockets.

Tiered SIMD Acceleration

Step-down vectorized processing for string operations, HTTP routing, header validation, and UUID generation supporting AVX-512, AVX2, and SSE4.2 on x86, with ARM NEON parity on AArch64.

Kernel Async I/O

Pluggable kernel engines featuring Linux io_uring direct submission/completion rings, scalable epoll fallback, and Windows IOCP.

Zero-Allocation Routing

SIMD-accelerated Radix Tree routing with support for parameterized routes (:id), wildcards (*path), route grouping, and chained middlewares.

Compile-Time Reflection

Integrated with Glaze for zero-overhead JSON serialization, automatic request binding (ctx.bind_json<T>()), and declarative validation.


Real-World Performance (HttpArena Benchmarks)

Aegon is independently verified as the #1 C++ Web Framework and #1 Java Web Framework on the bare-metal HttpArena benchmarking platform under scientifically controlled conditions on a 64-core AMD Ryzen Threadripper PRO 3995WX processor:

ProfileConcurrencyPeak ThroughputAvg Latencyp99 LatencyRanking
baseline-h2c (HTTP/2 Cleartext)1,02414,444,079 req/s5.31 ms20.57 ms#1 of 22
echo-ws-pipeline (WebSocket)4,09663,623,190 msg/s1.03 ms1.36 ms#1 of 27
pipelined (HTTP/1.1 Pipelined)4,09627,608,511 req/s2.37 ms3.14 ms#3 of 77
baseline (HTTP/1.1 Plaintext)4,0963,996,171 req/s1.02 ms1.71 ms#1 of 83
echo-ws (WebSocket Standard)4,0964,283,047 msg/s956 µs1.30 ms#1 of 30
baseline-h3 (HTTP/3 QUIC)642,981,569 req/s1.78 ms4.82 ms#3 of 16

CPU Efficiency Under Load

In fixed-rate paced latency tests (latency-1m), Aegon sustained 1 Million requests per second while consuming only 14.92 µs of CPU per request (measured directly from Linux cgroup v2 cpu.stat), outperforming leading frameworks across C++, Rust, and Go.


Minimal Example: High-Performance REST API

Here is a complete, working example of an Aegon HTTP service with routing, JSON request binding, and coroutines:

main.cpp
#include <aegon/http/Server.h>
#include <aegon/core/Task.h>
#include <iostream>

using namespace aegon;

// Request DTO (parsed via compile-time reflection)
struct CreateUserRequest {
    std::string username;
    std::string email;
};

// Response DTO (serialized directly to JSON)
struct UserResponse {
    uint64_t id;
    std::string username;
    std::string email;
    std::string status;
};

int main() {
    http::Router router;

    // 1. Plaintext health check endpoint
    router.get("/health", [](http::Context& ctx) {
        ctx.res().status(http::StatusCode::Ok).text("OK");
    });

    // 2. Coroutine-based JSON endpoint
    router.post("/api/v1/users", [](http::Context& ctx) -> core::Task<void> {
        // Automatically parses JSON body; responds with 400 Bad Request if invalid
        auto req_body = ctx.bind_json<CreateUserRequest>();
        if (!req_body) {
            co_return;
        }

        UserResponse response{
            .id = 1001,
            .username = std::move(req_body->username),
            .email = std::move(req_body->email),
            .status = "active"
        };

        // Serialize response using Glaze compile-time reflection
        ctx.res().status(http::StatusCode::Created).json(response);
        co_return;
    });

    // 3. Configure HTTP server and bind to port 8080
    http::Server server(std::move(router));
    server.listen(8080, "0.0.0.0");

    std::cout << "Server starting on http://0.0.0.0:8080 across all available cores\n";

    // 4. Launch thread-per-core event loop cluster
    server.run(std::thread::hardware_concurrency());
    return 0;
}

Notice that route handlers in Aegon can be either synchronous (void(http::Context&)) or asynchronous (core::Task<void>(http::Context&)). The framework handles both uniformly without performance penalties.


Authors & Maintainers

Aegon is developed and actively maintained by:

Open-source under the MIT License. Built for mission-critical, low-latency microservices.