Lurker News

Comments (57) 16 threads

Show all comments

Showing thread 2 of 16

pjc502 replies#
Interesting. Reminds me of when I worked on the 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#
String handling in C is such a PITA. Especially if you're used to languages like Python.
joosters#
I 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...