Lwan logo

Lwan

Experimental, scalable, high performance HTTP server
1
6
+ 1
4

What is Lwan?

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 is a tool in the Web Servers category of a tech stack.
Lwan is an open source tool with 6K GitHub stars and 549 GitHub forks. Here’s a link to Lwan's open source repository on GitHub

Who uses Lwan?

Developers
Pros of Lwan
1
C and Lua Scripting
1
Free
1
High-performance http server
1
Performance

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

Lwan Alternatives & Comparisons

What are some alternatives to Lwan?
NGINX
nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server, written by Igor Sysoev. According to Netcraft nginx served or proxied 30.46% of the top million busiest sites in Jan 2018.
Apache HTTP Server
The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet.
Amazon EC2
It is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.
Firebase
Firebase is a cloud service designed to power real-time, collaborative applications. Simply add the Firebase library to your application to gain access to a shared data structure; any changes you make to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.
Amazon Web Services (AWS)
It is a comprehensive and broadly adopted cloud platform, offering over 200 fully featured services from data centers globally.
See all alternatives

Lwan's Followers
6 developers follow Lwan to keep up with related blogs and decisions.