Caduvelox

High-Performance C++ HTTPS Server Framework

A modern, zero-copy web server built with C++20, io_uring, and kTLS. Designed for maximum performance with minimal CPU overhead through kernel-space optimizations.

Quick Start

Get up and running in minutes:

# Clone the repository
git clone https://github.com/thosey/caduvelox.git
cd caduvelox
git submodule update --init --recursive
# Build the project
mkdir build && cd build
cmake ..
make -j$(nproc)

# Run the static HTTPS server demo
cd ../examples/static_https_server/build
cmake .. && make
./static_https_server ../static_site 8443 # Add: [log_file] [cert.pem] [key.pem]

๐Ÿ“ Note: Requires Linux 5.11+ with io_uring support and OpenSSL 3.0+ for kTLS.

โญ• io_uring

Async I/O with Linux's fastest interface. Batched syscalls with efficient completion polling.

๐Ÿ” Kernel TLS

TLS encryption offloaded to the kernel, reducing userspace overhead and CPU usage.

๐Ÿ”— Zero-Copy

Direct fileโ†’socket transfers via linked splice operations.

โš™๏ธ Job-Based

Composable task primitives that chain together for complex workflows. Build custom protocols from reusable building blocks.

Flexible API Design

Build exactly what you need with two complementary APIs:

๐ŸŒ High-Level HTTP API

Express-style routing for REST APIs, web services, and rapid prototyping.

server.addRoute("GET", "/api/users", [](auto& req, auto& res) {
  res.json("{\"users\": []}");
});

server.addRoute("POST", "/api/data", [](auto& req, auto& res) {
  res.status(201).json(processData(req.body));
});

โš™๏ธ Low-Level Job API

Define custom io_uring handlers for maximum control. Build custom protocols, proxies, or specialized servers.

Composable Job Types:

Multi-shot operations automatically rearm for maximum efficiency. Combine these building blocks or create your own Job types to build exactly what you need.