Ruby on Rails – What server to use?

With Ruby on Rails there are a number of options on what server to use. Supposedly Lighttpd is “fast as lightning” but FastCGI on Apache is the “standard” method for production use.

Out of curiosity, I went to a site which I knew ran Ruby on Rails and gets a lot of traffic, and inspected the HTTP headers.

Unsurprisingly, the response when requesting the main page included this header:
Server: Apache/1.3.33 (Unix) mod_deflate/1.0.21 mod_fastcgi/2.4.2

However, as the browser started requesting images, they came back with this header:
Server: WEBrick/1.3.1 (Ruby/1.8.2/2004-12-25)

It seems like they’re using the so-called not-for-production webserver to serve up static content. That’s interesting, given that some have described the usage of that server to be reserved for cases when you have low concurrent users and mostly dynamic content. This qualifies as neither.

2 thoughts on “Ruby on Rails – What server to use?

  1. Under Rails is WEBrick commonly listed as “not for production use”.

    I’m using a nice single-process WEBrick server with a wrapper around sendfile() fronting a MogileFS file store to make image sending work. I haven’t yet optimized it for performance.

    Another large site that uses WEBrick is the Ruby Application Archive, http://raa.ruby-lang.org

Comments are closed.