Lwan - an experimental, scalable, high-performance http server
Lwan is a high-performance & scalable web server for glibc/Linux platforms.
In development for almost 4 years, Lwan was until now a personal research effort that focused mostly on building a solid infrastructure for a lightweight and speedy web server:
Low memory footprint (~500KiB for 10k idle connections)
Minimal memory allocations & copies
Minimal system calls
Hand-crafted HTTP request parser
Files are served using the most efficient way according to their size
No copies between kernel and userland for files larger than 16KiB
Smaller files are sent using vectored I/O of memory-mapped buffers
Header overhead is considered before compressing small files
Mostly wait-free multi-threaded design
Diminute code base with roughly 7200 lines of C code