Pu

Pushing a naive C++ web server implementation to 9k req/SEC

Hacker News

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 card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
81%81% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
75%75% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Product HuntOn track for Day 1 leaderboard · Strong signals: code · Missing: mac, agents, macos
63%63% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
21%21% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Se
Servasm – Literate web server in x86 assembler70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Servasm – Literate web server in x86 assembler

Hacker News117
C
C on the Web with This C to WASM Build Server and CDN78%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

C on the Web with This C to WASM Build Server and CDN

Hacker News14
ba
bashttp - a very (very) simple web server in Bash46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

bashttp - a very (very) simple web server in Bash

Hacker News92
C#
C# WebServer - Simple abstracted web server55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

C# WebServer - Simple abstracted web server

Hacker News1
A
A Simple Web Server in Lisp (Gisp) in Go57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Simple Web Server in Lisp (Gisp) in Go

Hacker News6
Qp
Qpackt – web server that can serve two versions of your website49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Qpackt – web server that can serve two versions of your website

Hacker News4
Gr
Grace - graceful server restarting (not just web)56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Grace - graceful server restarting (not just web)

Hacker News1
Ea
Easy-to-configure Web Server in Go60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easy-to-configure Web Server in Go

Hacker News106
HT
HTTPLab – An interactive web server65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HTTPLab – An interactive web server

Hacker News171
90
90s – an async C++23 web server with templating engine49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

90s – an async C++23 web server with templating engine

Hacker News1