« OpenGL -> Quicktime | Main | OpenGL -> Image snapshots »
February 26, 2005
High-performance httpd components
One last note, I spent an evening last week doing some exploratory work on a foundation for an accelerated http server framework. I'm using a single-threaded select loop server based on libevent (which scales much higher than apache and other http implementations), and am working on the http layer now. My test platform (2 x 2.0Ghz Powermac) will run static apache requests at a max of 8k rps, but the raw libevent code will scale much higher than that (20k-25k) because its per-request overhead is much, much lower than apache. I'm slowly working on an efficient http core, taking hints from BSD-licensed http server code on the net.
Originally, I wanted to use servlets for this (because Java gives you a wealth of implementations for monitoring, configuration, middleware, etc), but they are just too much overhead. I've thought a little bit about getting one of the open servlet containers to use libevent through JNI, but it still feels like the servlet call chain for each request would be pretty slow.
I've been interested in http caches/accelerators for a while, so that's the arena I'm aiming for with the libevent httpd work I'm doing. A nice side-effect is when you're doing caches, your http layer doesn't need to be as complex as a bona-fide http server. There is still a lot of stuff to keep track of, but anything to reduce complexity is good.
Posted by djb at February 26, 2005 04:30 PM