,

The Battle of the Web Servers: Apache Vs Nginx Vs Lighttpd


The Apache HTTP Server, commonly referred to as Apache, is a web server notable for playing a key role in the initial growth of the World Wide Web. It simply is the most popular with millions of users. If you are a newbie there is a great likelihood that you will pick Apache simply due to its heritage and you would not be making a mistake. But as your sites pick up speed more complex situations arise and more research is necessary to find a server that meets your requirements better.

So things have changed. Others like Nginx and Lighttpd have different and useful approaches. All of these are open source. Lets look at them one by one.

Apache

i-apache-2.2

1. It is a process based server meaning each simultaneous connection requires a thread which incurs significant overhead. If there is a low volume of connections then there isn’t much difference between these three servers. Please read on for better understanding. But Apache is undoubtedly the best process based server

2. Has features like

  • Static file serving.
  • SSL/TLS support.
  • Virtual hosts.
  • Reverse proxying.
  • Load balancing.
  • Compression.
  • Access controls.
  • URL rewriting.
  • Custom logging.
  • Server-side includes.
  • Limited WebDAV.
  • FLV streaming.
  • FastCGI

3. The new Apache 2 has a long list of improvements though. And one thing for sure is an Apache has more tricks than the other two servers we  are comparing here. Please visit their site for better understanding.

4. Huffingtonpost.com uses Apache.

Nginx

Nginx Server

 

1. It is an asynchronous system meaning it handles requests in a single (or at least, very few) threads. This causes less use of resource and hence is faster. The main advantage of the asynchronous approach is scalability.

2. Has all the main features that an Apache has. Nginx focuses on a smaller pool of functions which is probably why it does these things efficiently.

3. Serving 10,000 simultaneous connections would probably only cause Nginx to use a few megabytes of RAM whereas Apache would probably consume hundreds of megabytes (if it could do it at all). Please visit their site for better understanding. Worpress runs slightly faster in Nginx than Apache. Nginx install slightly faster as well which is not a major advantage really.

Also Read :  Lighttpd – the little sister of the server family

4. Quora.com uses Nginx

Lighttpd

light_logo_wide1

1. Again Lighttpd is an asynchronous server. It runs as single process with a single thread and non-blocking I/O (it is technical so click the link for detail).

2. Nginx and Lighttpd are very alike and bear similar features. Lighttpd runs as a single process with a single thread and non-blocking I/O where as nginx works as one master process but delegates its work unto worker processes.

3. Various websites have clearly suggested that Nginx is faster and more reliable than Lighttpd. Please visit their site for better understanding.

4. Isohunt.com uses Lighttpd.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.