
Benchmark: Apache2 vs. Lighttpd (Static HTML Files) - joschi
http://www.howtoforge.com/benchmark-apache2-vs-lighttpd-static-html-files
======
sunkencity
totally useless benchmark... yea, of course lighttpd is faster in standard
configuration, but what if he would have turned off 20 or so useless apache
mods that are not needed for a machine serving static requests? If you really
want performance from apache you can make it very fast, and there's tons of
different ways to have kick ass caching inside apache. Though I'd say that
lighttpd is probably faster with tweaks. The reason to go for apache is battle
tested stability, robustness and extensibility.

~~~
ajross
Actually, asymptotically (as you peel off the overhead) I'm sure they're in a
dead tie. Ultimately, serving a static file consists of reading the header,
opening the target file and calling the sendfile() syscall. The bulk of the
work is obviously the data transfer, and on a modern OS that happens in the
kernel. I have a hard time believing that any web server is going to
significantly distinguish itself on the basis of header parsing, of all
things.

And since when is service of static files a significant performance problem
anyway? Unless you're youtube, this is the _easy_ part of web application
optimization.

~~~
ComputerGuru
Unfortunately, if you take a look at the Apache source code you'll see that a
ton of hooks are inserted into the entire process all over the place, adding a
ton of useless calls that don't benefit you anything in exchange for allowing
certain uber-cool tricks to be done _in the future_ by other devs, but
unfortunately affecting their own bottom line.

~~~
ajross
I have read through the apache source, actually. If those hooks are disabled,
they're just a branch not taken. Compared to the work of moving a 32k (or
whatever) file through the page cache and out the network interface, it's just
noise.

I'm not holding up apache as a model of clean code, mind you. Like all mature
software, it's terribly crufty in places. I'm just saying that serving static
files is something that even crufty software can do quickly. If you want to
show up apache, this isn't the test to use.

------
quasimojo
pointless discussion. apache2 can saturate the typical outbound connection for
static files. you can't push any more data than that. this is why people gave
up on the linux kernel http daemon so long ago...its pointless.

in any case your static files should be on a cdn like akamai.

