Modern C++23 High-Performance Web API Server
APIServer2 is a high-performance, multi-reactor EPOLL-based web server written in Modern C++23. Engineered from the ground up to handle massive concurrent loads with low latency, it serves as an ideal foundation for scalable and robust backend services.
The system leverages the Linux Kernel's SO_REUSEPORT for efficient load balancing across multiple reactor threads.
Built using the latest C++ standards to ensure memory safety, efficiency, and cleaner code syntax. 100% written with AI assistance.
Designed for cloud-native environments. Deploy effortlessly with our dedicated MicroK8s Tutorial.
Utilizes multi-reactor pattern and EPOLL for non-blocking I/O, capable of handling thousands of concurrent connections.
Maximize your infrastructure. Run a robust 3-Pod cluster on a single node with just 4 cores and 4GB RAM, delivering high availability at a fraction of the cloud cost.
Create a blazing fast, compiled machine-code API in just three steps.
Define a strict contract using modern C++23 rules and lambdas for validation.
Implement the logic. The framework handles input extraction using strong types, and sql::get executes the stored procedure directly with a potentially cached prepared statement, avoiding SQL injection attacks.
Register the API endpoint in main(). The true flag at the end enables automatic secure authentication.
Invoke your new API using curl with a Bearer Token and pipe to jq for formatting.
We prioritize stability and correctness. APIServer2 allows you to write C++ with confidence.
AddressSanitizer (ASan), LeakSanitizer (LSan), and ThreadSanitizer (TSan) to guarantee memory safety, zero leaks, and race-free concurrency.
Optimized for high-density cloud deployments, APIServer2 delivers maximum performance with a minimal footprint.
RAM Usage
On a 4GB K8s Node under load
Binary Size
Compact executable, all APIs included
Startup Time
Blazing fast initialization
CPU Requirement
Full performance with single core dedication
For Windows users, we strongly recommend simulating a cloud environment using Multipass. This allows you to run Ubuntu 24.04 VMs seamlessly.
The recommended topology consists of two VMs: demodb.mshome.net for the database and mk8s.mshome.net for the Kubernetes cluster.