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 5.9K 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.
Apache Tomcat
Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.
Microsoft IIS
Internet Information Services (IIS) for Windows Server is a flexible, secure and manageable Web server for hosting anything on the Web. From media streaming to web applications, IIS's scalable and open architecture is ready to handle the most demanding tasks.
OpenResty
OpenResty (aka. ngx_openresty) is a full-fledged web application server by bundling the standard Nginx core, lots of 3rd-party Nginx modules, as well as most of their external dependencies.
See all alternatives

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