Multi-threaded HTTP Server with Thread Pool
An HTTP server built on Boost.Asio that uses a fixed-size thread pool to handle concurrent connections, serves static files, and supports keep-alive connections, benchmarked under load. Learners practice asynchronous I/O, thread pool design, and performance-oriented C++ server architecture.
- Estimate
- ~12h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Boost.Asio · std::thread
Project roadmap
- 01
Set up async accept with Boost.Asio
~2hBuild the io_context-based acceptor loop that asynchronously accepts new connections.
- 02
Implement the thread pool running io_context
~2hRun multiple threads calling io_context.run() to process async handlers concurrently.
- 03
Implement HTTP request parsing and static file serving
~2.5hParse incoming requests and serve files from a document root with correct headers.
- 04
Add keep-alive connection handling
~2hSupport HTTP/1.1 keep-alive so a single connection can serve multiple sequential requests.
- 05
Add connection and request logging
~1.5hLog per-request timing and status thread-safely across the pool.
- 06
Benchmark under concurrent load
~2hUse a load-testing tool such as wrk to measure throughput and tune thread pool size.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack