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.
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub
GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
See all alternatives

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