This post is a part of the series of articles about choices available to a rails developer. Previously we discussed about the choice of databases. This time it is about application and web servers. We can make the choice of an application and a web server separately, but as they are so closely related that it is better to look at them together.
Web Server
It is well known what a web server does, but for starters - the web server receives the HTTP requests first, and then responds by either serving the page requested or directing the request to our rails application server. The major web servers market-share wise (survey graph below) are Apache, IIS(Microsoft), nginx, GWS(Google) and lighttpd. We as rails developers are interested in all these except IIS and GWS. Not IIS because it is closed source and proprietary and not GWS because it is used internally by Google. Apache, nginx and lighttpd are all popular among rails developers.
Apache
The most popular web server in use. It supports a wide variety of features, and is reasonably fast as well. Many of the essential features are provided as compiled modules that extend the core. These include support for server side scripting languages like perl, php, tcl, python; support for authentication; support for ssl and tls and compression support.
The only issue with apache is that because it is process based, it spawns too many threads when there are too many simultaneous requests. This leads to excessive memory usage, so the performance can drop in restricted environments under heavy load.


