The Best Web Servers

The Best Web Servers

On the one hand, the web server is possibly the most prominent component of your stack. It’s the devoted waiter handling every request and response for your application.

But here’s the real secret: it doesn’t matter what HTTP Server you choose to power your stack early on. If your tech team recommends anything even resembling the descriptions on this page, just go with it.

Web Server software (aka HTTP servers) have been around literally since the first web page was created, so the general principles and the problem set they are solving are extremely well understood. At their core, a web server implements the HTTP Protocol, of which the version we use today (HTTP/1.1) was formalized in 1999, and was already in wide adoption all the way back to 1996.

Recommendations

ClearlyTech favors Apache for general use. It is, not coincidentally, also the most popular web server today, powering over 50% of the Internet.[1] In recent years, the bloom is off Apache’s rose a bit, with a flood of new players (see below) entering the scene with compelling general and specialty alternatives. Nevertheless, the amount of resources out there, support for every platform and every feature, and a battle-hardened codebase, Apache is still the king of web servers.

We also strongly recommend nginx as the rising star among general purpose web servers, known for its raw speed, low memory footprint, and ability to handle a huge amount of concurrent connections.

We support lighttpd as a solid contender in a similar spirit to nginx for high-traffic, highly concurrent sites.

The Rise of Application Servers

As most web properties are now being powered by full-stack web applications,[2] and various flavors of web frameworks are emerging, a number of specialty HTTP servers have become popular.

Pure “application servers”

In the simple case of running a web application, a traditional HTTP server will execute an auxiliary program (like PHP, Python, PERL, etc) to process application code and generate the resulting HTML response.[3]

Unfortunately, this model presents some technical limitations, performance concerns, and deployment and maintenance headaches. In response, a number of solutions have been developed in the form of special-purpose web servers. They make it easier to shepherd requests between your web server and your code, and are optimized to return results directly from your code, rather than returning static HTML and images off a hard drive.

Many development teams find a pure application server combines the best of the maturity and support of a classic web server with great native support and speed to run complex web application code.

ClearlyTech supports Phusion Passenger, which provides an extension to either Apache or nginx for powering Ruby, Python, and Node.js applications.

ClearlyTech supports mod_wsgi, an Apache module for running Python applications.

Combo “application+web servers”

There is also a class of servers that combine the HTTP protocol handling with custom support for application code. The rabbit hole goes deep on these. For Ruby alone, there are dozens, the popular ones include Unicorn, Thin, Puma, Goliath.

These stand-alone servers can provide great performance using fewer resources than a dedicated web server. However, there are some drawbacks:

  • You’ll generally need to run a regular web server as well for static files, images, etc. These are good only for handling URLs directly into your application code.
  • In order to achieve full performance, another web server acting as a reverse-proxy may be necessary.[4] This adds back most of the operational complexity that you save by having a combination app+web server.
  • Most of these servers don’t come with mature tools for monitoring and managing the process, restarting it if the server goes down, and other operational benefits of a long-standing traditional HTTP server.

Further Resources


  1. http://en.wikipedia.org/wiki/Web_server#Market_share  ↩

  2. As opposed to static HTML and image files  ↩

  3. Tech Basics on how this works: http://www.clearlytech.com/web-pages-apps  ↩

  4. http://unicorn.bogomips.org/PHILOSOPHY.html  ↩