13

I'm optimizing our system for some faster static content delivery, and was wondering if anyone has any proper experience with the fastest web servers out there for such a purpose.

From the three main candidates I've considered, Nginx, Cherokee and Lighttpd, each seems to have its own problems - but the reports I've read online are somewhat biased and lean towards whichever server the user is currently using.

Any ideas on where to see a proper benchmark for this specific purpose, or at least a non-biased list of pros and cons? Any personal experiences and pitfalls I should be vary of?

Thanks

Edit: Serverfault.com gave the answer as nginx. I'd still like to hear some developer thoughts from this end of the universe.

Swader
  • 509
  • 2
  • 5
  • 17
  • 1
    @Swader: Please don't repost. The usual flow of things is for this question to get automatically migrated there when it gets enough close votes (5). Having two identical questions makes it hard for there to be one, definitive source for answers. – Cameron Mar 19 '11 at 01:30

5 Answers5

12

A few additional links and comments:

  • There was a recent benchmark comparing Nginx, Apache, Varnish, and GWan for serving 100 byte static files.
  • The Cherokee site has a few benchmarks comparing Nginx and Lighttpd.
  • More links: One, Two, Three, Four, Five
  • Be aware that benchmarks typical have a narrow band of validity, especially at this large a request rate. For example, the first benchmark is fine if all you're serving is 100 byte files but results may be significantly different if using 1kb, 10kb or a range of static file sizes. A lot of published benchmarks also have the issue that the author has good experience with only one of the products, meaning it has a very good configuration, and not of the other products, meaning they have a suboptimal or even bad configuration, which will skew the results.
  • At this large of a request rate there are going be to many things that can effect the benchmark results. Not only the web server configuration but the OS configuration and hardware itself. For example, using a SSD drive may increase request rates but may work with web server X better than Y.
  • Don't just look at the big maximum request rates from benchmarks but consider the average and minimums as well. For example, look at the Apache results from the first benchmark link.
  • The best benchmark is doing to be one you do yourself using the files your serving on the hardware you're doing to use. Even quick benchmarks may reveal issues and effects not apparent from other published results.
  • At this scale will it really matter if you can serve 15k or 20k requests/second? For example, at 20kr/s a 1.7kb file will require around 100TB of bandwidth a month. For the amount of money that the bandwidth will cost to buy another server (or 10) will be cheap by comparison. I would not choose solely by which server gives the biggest "number" but also consider how easy it is to setup/use, does it match the required feature set, is it well supported, etc....

Personally, I have used Lighttpd for years and couldn't be happier with it. I'm actually surprised at it performed compared to Nginx in the Cherokee benchmark results.

uesp
  • 3,384
  • 1
  • 17
  • 16
  • Brilliant stuff, very useful, thank you very much. – Swader Mar 21 '11 at 07:29
  • G-WAN is indeed very fast. This link is also interesting. http://kristianlyng.wordpress.com/2011/03/16/the-many-pitfalls-of-benchmarking/ Varnish seems to be very good under high load. – hookenz Dec 13 '11 at 02:49
2

I haven't read the article--doesn't seem to be on-line, it was searching for it that brought me here--but just looking at a single graph that Alvaro posted to his blog makes me wonder why that Linux Format benchmark was slanted against servers other than Cherokee. It happened to include the version numbers of the servers, and something struck me as odd so I did some research:

Server   | Tested (Released)   | Current (Released)
---------+---------------------+--------------------
Apache   | 2.2.14 (2009-10-05) | 2.2.17 (2010-10-19)
Cherokee | 1.0.15 (2010-12-29) | 1.0.15 (2010-12-29)
Lighttpd | 1.4.26 (2010-02-07) | 1.4.28 (2010-10-22)
Nginx    | 0.7.65 (2010-02-01) | 0.8.54 (2010-12-14)

A shiny new version of Cherokee was put up against older---and in some cases, much older---releases of the other servers. So I wouldn't give too much weight to the results, especially since the most competitive server, Nginx, had had a major release since the version they tested.

mdorman
  • 121
  • 2
1

LinuxFormat Magazine (Issue 142, March 2011) includes a benchmark of Apache, Cherokee, Lighttpd and Nginx. Cherokee is the fastest one, more than x2 compared with Apache, and up to 20% faster than Nginx.

  • Thank you! Just read the article, and while it's a shame only the last paragraph has some actually useful information, it's nonetheless a very valuable benchmark! – Swader Mar 18 '11 at 13:52
1

If it's purely static content then you just need a great cache in front of the real web server, I use Zeus's ZXTMs but there are lots of other options.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • 1
    In my case, it's about dozens of gigabytes of material, in all forms from tiny images to large flash documents. Caching would be insufficient here, I believe. The serving speed is what I need to boost, which is why we're setting up a static content server. Cost is no issue. Thanks though, that ZXTM sounds interesting, will take a look at that. – Swader Mar 20 '11 at 20:58
  • sounds very similar to our setup, we have several gig of static and those zxtms do a good job, they're 64 bit so we just stick 192GB of memory in each and it does it all from RAM. – Chopper3 Mar 21 '11 at 10:10
  • That sounds madly efficient and powerful. Could you name some more details about your configuration and the type of static you serve? Did you try comparing to other setups or was this one you're using used from the get-go? – Swader Mar 21 '11 at 11:42
0

have a look at

http://www.acme.com/software/thttpd/

paypal uses it to serve static content.

Vamsi Krishna B
  • 203
  • 3
  • 9
  • 1
    Thanks, I might look into that, but I'm incredibly prejudiced and biased towards people who do "software" and can't be bothered to put together a decent site. It looks like it got stuck in 1992 and never updated. Also, they never compared it to the top competitors I mentioned, I wonder if I can find a decent comparison somewhere... – Swader Mar 18 '11 at 13:54