MarkUs Blog

MarkUs Developers Blog About Their Project

A revisit to Mongrel, the pros and cons

with one comment

If you know about Mongrel already, chances are that you probably heard that we are moving away from using this in our production setup since it is not maintained anymore.  But before we completely depart from Mongrel (since we still use it I believe in production), I want to write a short educational blurb about it.

First off, here is some background for people unfamiliar with Mongrel.  Mongrel is an open-source HTTP library and web server which Ruby on Rails applications run on top of.  This setup is usually seen in the production environment for a Rails application.  Mongrel is written by a combination of Ruby and C, and can be run on Windows and any Unix-like systems (Linux, BSD, OSX, etc.).  Fun fact, Twitter used Mongrel as their very first web server!

The next question you’re probably wondering about is why are we moving away from Mongrel?  The simple answer is, its being maintained anymore and doesn’t support Ruby on Rails 3 which is what MarkUs will be running on soon.

Next I will discuss the pros and cons that Mongrel brings:


– Can get good stability and speed when handling real-life(production) load when used in conjunction with other web server applications, a common configuration seen in production is having an Apache HTTP server working as a load balancer, proxy and handles concurrency delegation over a cluster of Mongrel servers

– Uses its own HTTP library which has a much higher performance and stability than conventional CGI scripts such as FastCGI and SCGI (this is what caused the original movement from CGI to Mongrel)

– Mongrel services use TCP which offers security and reliability in data transmission


– Doesn’t support Ruby 1.9 and on!

– Does not handle concurrency well by itself (a big requirement especially if there will a lot of traffic coming in and out), needs to bring in other web applications such as Apache HTTP server which handles the load balance and concurrency tasks

– Awful speeds when it comes to serving static files (static html pages, CSS files, Javascript files, pictures) which is why configurations with other web server applications are commonly seen (Apache dominates in this area)

– Nowadays web server applications such as Thin (a web server which uses Mongrel’s library and parser), Passenger and Unicorn all provide much easier deployment processes as well as faster speeds through using Unix socket connections to the web server rather than TCP, not to mention you can easily run Rails 3 applications on top of these web servers

– No support for tracing, which is a useful ability that show developers the exact HTTP transactions that are going through, web servers like Thin can do this

I hope this post helps educate you a little bit about Mongrel, and its ups and downs.  I found this to be a very interesting topic to research on since Mongrel’s original author, Zed Shaw is quite the interesting character.  One of the main reasons why the releases of Mongrel stopped was because he left the Ruby on Rails community after making a public rant on rails programmers (he likes to use a lot of vulgar language, beware!).

Here is a link that I found was useful comparing Mongrel with Thin:

Here is another link from stackoverflow  which talks a bit about different Rails web servers in production:


Written by alee

April 2nd, 2012 at 6:47 am

Posted in Uncategorized

One Response to 'A revisit to Mongrel, the pros and cons'

Subscribe to comments with RSS or TrackBack to 'A revisit to Mongrel, the pros and cons'.

  1. This site certainly has all the information I needed concerning this subject and didn’t know who to ask.


    13 Jan 15 at 8:10 pm

Leave a Reply