[First, please read it all before marking it as being subjective, or irrelevant as of ServerFault's community guidelines.]

EDIT: I should have mentioned that the site I am building serves video files. It's a video sharing site.

Coming to the point, I plan to use Apache web server for serving dynamic content, and Lighttpd for serving static content like cached HTML, images, css, and js files, among others.

There's one small problem. I see that Lighttpd had some serious memory leak issues, and all those date back to a year or two ago. No talking about it recently. I would be very grateful if someone can clarify my doubts:

  • Does Lighttpd still suffer from these issues, or are these issues really subjective of a particular environment? (yes, I've read this bug report)

  • Do Lighttpd's memory leak issues apply when it's serving static content as well? (Most of those complaining are employing Lighttpd to serve dynamic content.)

  • From this benchmark test (by someone), I see that Lighttpd is probably the best web server around for serving static content. True? or is Nginx much more comparable in performance than shown in the benchmark test I linked to?

I am in need of some clarification. I do not intend to cause yet another THIS vs THAT flame war. I'd would appreciate your understanding, if my question isn't properly put.

link|improve this question
feedback

4 Answers

up vote 1 down vote accepted

Honestly. You'll be better off using Nginx than Lighttpd. You need only look at the development pace of the two to know that Lighttpd is past it's time of glory. 2 years ago it might have been close but these days I would never ever use lighttpd over Nginx.

Cherokee is an option but I haven't ever messed with it so I can't say anything about it. I can say that the benchmark you linked is largely bullshit, though. There's absolutely no way lighttpd is 1/3rd faster than Nginx, you'd have to seriously misconfigure Nginx to get those numbers.

link|improve this answer
Is Nginx's performance faster or at least comparable to Lighttpd and Cherokee for serving videos? I thought Lighttpd is a good choice because YouTube uses it. (I have updated my Question.) – user88753 Nov 12 '11 at 21:39
video is just static files like everything else. Both Nginx and Lighttpd have such small footprints that they're not going to be your bottleneck. You should focus on the hardware in your server instead of on your webserver. Of course, if you want to stream it then Nginx has a handy mp4/flv streaming module. – Martin Fjordvald Nov 13 '11 at 3:07
"but these days I would never ever use lighttpd over Nginx" you forget several basic things that nginx missing as: handling CGI, starting fastcgi processes, normal support of PATH_INFO by default, not-broken support of Status headers in SCGI protocol. More? Nginx is good as reverse proxy and for serving static content but it is very bad for handling dynamic content. – Artyom Jan 29 at 10:04
Artyom. thats quite subjective (personally i would simply say wrong). E.g. nginx is nowadays the webserver of choice for php applications – AD7six Jan 29 at 16:56
feedback

Have you considered using LiteSpeed?

If your goal is to handle more concurrent connections, this might save you some money and reduce the headache of handling two different web servers.

A customer of mine saved a lot of money by using LiteSpeed instead of purchasing more hardware.

link|improve this answer
Sorry, no. I want my project to be built and run from everything open source, unless when there's no way out. (And thanks for trying to help, I'll save that suggestion for later.) – user88753 Nov 12 '11 at 19:41
feedback

This is anecdotal only, but a pair of static-content-only lighttpd servers that I set up 2.5 years ago has never had an issue.

Not terribly high load, probably 25-50 requests/sec, but the lighttpd processes have probably cleared a year of uptime without a service restart - certainly no evidence of any memory leak in that deployment.

link|improve this answer
feedback

No it does not.

I explain what is the "problem"

Lighttpd caches the response of the FastCGI server and if the fastcgi server tries to send huge files as is lighttpd allocates memory. The solution is not to serve huge files via FastCGI directly (like video streams) but let lighttpd to do the job using X-Send-File.

See: http://redmine.lighttpd.net/boards/2/topics/4009

link|improve this answer
feedback

Your Answer

 
or
required, but never shown