Pushing a naive C++ web server implementation to 9k req/SEC
Pushing a naive C++ web server implementation to 9k req/SEC
Hey HN, I've spent the last few years doing web/desktop/IoT dev and I'm currently pivoting to low-latency/Quant. I built this as an exercise to see how far I could push a standard blocking C++23 socket architecture before the OS became the bottleneck. I covered zero-copy parsing, struct alignment, and Gather I/O. I'm currently working on tearing this down for an io_uring/kqueue rewrite for Part 2. All of the code can be found at GitHub ( https://github.com/TDiblik/cpp-web-server ) where I have a README documenting the process of optimizations and where I'll implement the mentioned enhancements in the future. Would love any feedback from here and/or people in the industry!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Servasm – Literate web server in x86 assembler
C on the Web with This C to WASM Build Server and CDN
bashttp - a very (very) simple web server in Bash
C# WebServer - Simple abstracted web server
A Simple Web Server in Lisp (Gisp) in Go
Qpackt – web server that can serve two versions of your website
Grace - graceful server restarting (not just web)
Easy-to-configure Web Server in Go
HTTPLab – An interactive web server
90s – an async C++23 web server with templating engine