Why I Ditched Lighttpd For Nginx

Everyone makes mistakes.

Two years ago in early 2008 I chose lighttpd 1.5 as my preferred lightweight webserver and Apache alternative (for those of you who don't follow HTTP server software, Apache is a bloated memory hogging beast, especially when running mod_php). I have nothing but praise for the actual lighttpd software--it's fast and flexible and gets the job done. While some have complained about lighttpd memory leaks, I have not experienced such stability issues, though my usage was not with high-volume sites. So, why am I no longer using it?

I originally picked lighttpd over nginx ("engine x", another lightweight server, created by Russian Igor Sysoev) since I believed the lighttpd project had a larger community and was more active. English documentation for nginx was somewhat sparse back then, and benchmark comparisons demonstrated the speed difference between the two servers was negligible.

Now lighttpd feels like vaporware as new releases happen once in a blue moon and there's still no official 1.5 release (one must download from the SVN repository). The development team also decided to start over and build lighttpd 2.0 from scratch. This would mean a brand new, unproven codebase. At they same time, they would also continue work on and support 1.4 and 1.5. This sounds rather ambitious.

In the meantime, nginx usage continued to grow. From looking at various statistics, it has become quite clear that nginx has beaten out lighttpd:

Market Share for Top Servers Across All Domains
August 1995 - September 2010

Developer August 2010 Percent September 2010 Percent Change
Apache 119,664,128 56.06% 129,782,948 57.12% 1.06
Microsoft 53,434,586 25.03% 54,787,167 24.11% -0.92
Google 15,526,781 7.27% 15,312,751 6.74% -0.53
nginx 11,713,607 5.49% 12,779,550 5.62% 0.14
lighttpd 1,821,824 0.85% 1,818,032 0.80% -0.05

Source: Netcraft September 2010 Web Server Survey

And with Google Trends, we can compare popularity:

Charts don't tell the entire story, however. Here's what really made me decide to switch to nginx:

  • Fast, stable, proven, and no grand ambitions — Netcraft has found that nginx growth has really taken off in the top one million websites. It's hard to argue against high-traffic websites that trust nginx to serve their pages. In an interview with Pingdom, we can see nginx author Igor Sysoev is dedicated to the project, working on making it even faster and more efficient, one piece at a time.

  • Active community — Community contributions are extremely important for open-source software. The more people giving back, the faster it can grow, add improvements, and attract new adopters. This is where nginx blows lighttpd out of the water. On lighttpd's module page, there are only five user-written modules listed, while nginx has over 50 third-party modules! This means if we want a special, unque feature, there's a good possibility someone has already created it. And knowing that nginx is modular in nature is a comforting thought.
  • Easy transition — Don't get scared off by the strange name. nginx is easy to configure, especially rewrite rules. It's common for the Wiki documentation to reference Apache settings, giving good alternatives and explanations. I've come to enjoy configuring nginx--everything just works!

Comments

Thanks for this, i was

Thanks for this, i was thinking of changing from Lighttpd to nginx but wasn't sure. That just about made my mind. :)

And now begins my project. . .

So I guess it's time I move away from Apache and start looking at NGinx.

I've been thinking about it for awhile, but this article definitely convinced me. . .

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: [code], [blockcode], [bash], [css], [html], [ini], [javascript], [mysql], [php], [sql], [xml]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options