Experimental, scalable, high performance HTTP server
Why people like Lwan
Add a one-liner



In development for almost 3 years, Lwan was until now a personal research effort that focused mostly on building a solid infrastructure for a lightweight and speedy web server.

Lwan's Features
  • Low memory footprint (~500KiB for 10k idle connections)
  • Minimal memory allocations & copies
  • Minimal system calls
  • Hand-crafted HTTP request parser
  • Static file serving uses the most efficient way according to file size
  • No copies between kernel and userland for files larger than 16KiB
  • Smaller files are sent using vectored I/O
  • Header overhead is considered before considering deflate compression
  • Mostly wait-free multi-threaded design
  • One thread accepts connections, one I/O thread per logical CPU handles them
  • Hand-crafted coroutines makes asynchronous I/O a breeze in C
  • Linux only, as it relies on epoll()
  • Purpose-built I/O loop
  • Efficient loading cache used for
  • Directory listing
  • File information (size, last modified date, MIME type, etc)
  • Compressed files
  • Diminute codebase with roughly 7200 lines of C code

Explore other Application Hosting tools that are known for:



Group

Layer