Today is again a full $job day. Thanks to Jesse, I discovered the amazing lighttpd web server (the equivalent of SQLite of web servers), and promptly hacked Jifty::Script::FastCGI to support it. These two lines of config worked wonders on a FreeBSD setup, providing such an instaneous feedback that I simply wasn't used to:
server.event-handler = "freebsd-kqueue"
server.stat-cache-engine = "fam"
On another 350mhz AIX machine (on which I can't manage to get mod_perl2 or mod_fastcgi built), the response speed is easily twice that of Jifty's native web server, and the memory footprint is a mere 3mb. Authentication is also made much easier with the builtin FastCGI authorizer.
Much kudos to Jan Kneschke and the lighttpd team for creating this lovely lighty creature. :-)
as a longtime vet of a major web serving company (decode from my name), i continue to be perplexed by the interest in "light" http servers, which have been rejected here whenever they are proposed. apache can saturate a 100baseT connection on almost any semi-modern piece of hardware without imposing undue load. to consider alternatives is to embrace losing functionality without any meaningful gain in resource allocation.
Posted by: grumpY! | 2006.01.13 at 01:58 AM
Why should I pay the overhead of configuring, installing, and running all of Apache httpd when I just want to serve a few static files as quickly as possible or do a little testing on my laptop or don't have access to mod_perl on a shared host but can run my own lightweight web server processes?
Not every environment looks exactly like Yahoo!
Posted by: chromatic | 2006.01.14 at 10:47 AM
On a really highly loaded environment, with lighttpd you can achieve some real cut in the load. Do it just for the static files, and you won't lose any functionality.
Posted by: András Bártházi | 2006.01.15 at 05:46 AM
chromatic - every major operating system has available for it a prepackaged up-to-date version of apache with sensible defaults, so beyond your other reasons (which seem flimsy), i don't by the argument that apache is difficult to install and maintain. in any case the notion that apache is "heavyweight" simply because the alternatives call themselves lightweight is a fallacy.
Posted by: grumpY! | 2006.01.15 at 05:47 AM
In my personal experience, I worked on an apache system serving a simple SSI(returning only one interesting piece of data), which sat near a 100 load most of the time. It was still remarkably usable, and the page it was serving was tiny, but it was only able to serve around 250 requests per second. A custom apache module took it to 350 or so.
The Cherokee webserver, with a similar custom module, took it to a .3 load (or there abouts; a much more reasonable number), and able to serve 3000+ requests per second.
I guess where I'm going with this is: apache probably scales fine to saturate a large pipe with a good sized number of larger requests -- but it doesn't do as well with a huge number of tiny pages.
All that being said, I use apache for everything at the moment :)
Posted by: Christopher Pruden | 2006.01.15 at 09:39 AM
Yeah, the operative word in my post is 350mhz -- also the machine itself is alrady under considerable load (3 or so). :-)
Posted by: Audrey T | 2006.01.15 at 10:55 AM
I refuse to believe that a distribution has shipped Apache httpd with "sensible defaults" if the default httpd.conf includes and enables mod_imap... but hey, I'm just picking at little pieces of your argument like you picked at mine.
Maybe it really is "flimsy" that running a single Apache httpd hosting multiple virtual domains for separate customers is rather... difficult... to support if some need some features and others need other features, yet it really happens. A little mod_rewrite, mod_proxy, or other magic can make the pain almost all go away.
Posted by: chromatic | 2006.01.16 at 07:29 AM
I use lighty because of one thing, I find it alot easier to configure than Apache, and I don't need all those funky modules... ;-)
My internal (read play) server is an AMD64 3000+ with a gig of ram. So the load or memory usage wouldn't be something that matter, if it weren't that just because it's a play server I run alot of other things on it, so after all memory footprint and load starts to count...
Posted by: digits | 2006.04.20 at 04:32 AM