3 ms·
Interesting. Reminds me of when I worked on the Zeus Web Server: https://en.wikipedia.org/wiki/Zeus_Web_Server https://en.wikipedia.org/wiki/Zeus_Web_Server It
by pjc50 7y ago
Interesting. Reminds me of when I worked on the Zeus Web Server: https://en.wikipedia.org/wiki/Zeus_Web_Server https://en.wikipedia.org/wiki/Zeus_Web_Server
It was a static content focused poll-based (might have had epoll too) web server written in non-STL C++ which dramatically outperformed multi-threaded Apache. I remember it had a "stat cache" to reduce the number of syscalls made, and a nice set of string classes for passing around substrings of e.g. HTTP headers.
- shuss 7y agoString handling in C is such a PITA. Especially if you're used to languages like Python.
- joosters 7y agoI don't think the epoll/kqueue version ever got an official release :( The syscall reduction was pretty extreme, even down to keeping a shared-memory copy of time() to share across processes. IIRC that was only a benefit for HP-UX/IRIX or something like that...