Nginx, IMO

Of course it's just my opinion. I'm here to make it yours.

How I “discovered” Nginx

I’ve been using Nginx since the early days. Prior to that, I’d used Apache, Lighttpd, and Pound as solutions for my webserver stack. This is an old story, but it remains remarkably relevant six years later.

In August of 2006, Bob Ippolito replied to a discussion between myself and another person about whether to use Pound or Lighttpd as a reverse-proxy in front of TurboGears applications. I held that Pound is the correct solution as it is a proxy, whereas Lighttpd is a web server that can act as one. Further, I expressed my frustration regarding the state of Lighttpd development and the unmaintainability of its config files.

Bob offered up the following information:

One problem with Lighty is that it leaks memory like a sieve [1]. I audited it for a little bit and I gave up, it’s a mess. I’d steer clear of it, it will quickly ruin your day if you throw a lot of traffic at it.

The only solution I know of that’s extremely high performance that offers all of the features that you want is nginx [2], but its documentation is largely in Russian. I can’t read Russian, but I was able to figure it out (the configuration language isn’t Russian, neither is C source). I currently have nginx doing reverse proxy of over tens of millions of HTTP requests per day (thats a few hundred per second) on a *single server*. At peak load it uses about 15MB RAM and 10% CPU on my particular configuration (FreeBSD 6).

Under the same kind of load, apache falls over (after using 1000 or so processes and god knows how much RAM), pound falls over (too many threads, and using 400MB+ of RAM for all the thread stacks), and lighty *leaks* more than 20MB per hour (and uses more CPU, but not significantly more).

[1] http://trac.lighttpd.net/trac/ticket/758
[2] http://sysoev.ru/en/

The main thing that’s changed between then and now is that Nginx now has extensive English documentation.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Information

This entry was posted on 2012/03/27 by and tagged .

Pages

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: