Perfect web server

2 Comments

There is no perfect web server. The application picks the web server. :) Here is a quick run down:

Nginx, great, super fast, but lacks some features. To setup a PHP site, one needs fastcgi/spawn-cgi, which only is available with lighttpd (well, they have been separated now, but still...). So, we need two web servers installed? Too much hassle. Not a big fan of PHP but there are some things that are done in PHP, which are nice.

Apache, let's not go there. Great features, but a hog. Doesn't work right out of the box for large web sites, who wants to deal with prefork, workers and more. The last we tried, Sun's Coolstack SAMP stack didn't have all of these modules either.

This brings us to Lighttpd. It is the next best thing, but there is no LUA support in the version shipped with OpenSolaris 2009.06. That would be nice so we can use mod_magnet instead of some hack that is recommended for using this Habari blogging software. Lighttpd has worked quite well in our environment, but nginx can't be beat in terms of performance and simplicity in configuration and logic (of course, not that Lighttpd is difficult).

Our conclusion, after working with all three of them: Use nginx, if it works for you (or if you don't need PHP). You'll gain the simplicity of using nginx as well as its super performance for doing reverse proxy or just plain non-dynamic sites. Next try, Lighttpd, followed by Apache.

(We haven't evaluated Cheetah. These are just some high level overviews. This article is not meant to be a big technical comparison of these servers.)

Adam Retter

I am making use of nginx on one of your Solaris Virtual Private Servers, and I have to say in defense of nginx that I am really impressed. It was incredibly easy to setup (I dont use PHP) and its super lighweight.

2009-08-04 01:43:48

James Lee

Nice summary. I've been struggling with Apache lately and just tried switching to Yaws, which I've blogged about at http://thestaticvoid.com/.

2009-08-04 21:11:12