Eitaro Fukamachi presented on the Woo web server project for Common Lisp. Woo is an event-driven, multithreaded web server built on top of fast-http and QURI for fast HTTP and URI parsing. It aims to be the fastest web server in Common Lisp. Key aspects that contribute to its speed include using the libev event library, avoiding bottlenecks from HTTP and URI parsing, and having a multithreaded event-driven architecture. Future work includes improving multithreading performance using Legion and adding SSL and HTTP/2 support.
17. 3 difficult things
• Network I/O is the largest bottleneck
• Need to handle a vast amount of requests
at once
• Need to handle various HTTP clients
(fast / slow / unstable)
18. Why fast?
1. Better architecture
2. The libev event library
3. Fast HTTP & URI parsing
23. Event-driven
• Handle many
clients at the same
time
• Asnyc ACCEPT/
READ/WRITE
• ex) Woo, Wookie,
Tornado, nginxServer process
(single-threaded)
Event loop
28. libev
• Wrapper of epoll, kqueue, POSIX select, poll
• Thin
• Fast
• Poor Windows support
• I don’t think people run a web server on
Windows
29. First choice: cl-async
• Wookie built on top of cl-async
• cl-async was used to use libevent2
• Node.js uses libuv
• libevent2 might be the bottleneck
• cl-async has moved to libuv now
31. HTTP parsing can be a bottleneck
• Wookie's largest bottleneck is HTTP parsing
• http-parse (uses regular expression)
• fast-http (byte to byte parser)
• 135 times faster than http-parse
• http://slideshare.net/fukamachi/writing-
a-fast-http-parser
32. URI parsing can be a bottleneck
• Wookie & Woo parses URI for dispatching
• PURI is *not really* fast
• QURI
• 6 times faster than PURI
42. Photo by Robert Couse-Baker licensed under the CC BY 2.0
Status
• Still alpha version
• Use at your own risk
• Tested with SBCL on Linux/Mac OS
• The latest bug:
• Cannot run in Americas (TZ problem)