[ Skip menu ]

The poor state of mongrel_cluster frontend web servers

Well, it’s true, almost all web servers do not proxy efficiently to a cluster of mongrel servers as was detailed in “Yet another post on how to setup Ruby on Rails to deal with high traffic websites.” I tried, in order, apache 2.2, pound 2.0, nginx 0.4.13 which are the more popular web server frontends for a rails mongrel cluster that are available as debian etch packages. All of them fell victim to the behavior documents by Paul Butcher in Why Rails + mongrel_cluster + load balancing doesn’t work for us and the beginning of a solution.” I even replicated his test procedure for good measure.

I did, however, find one solution that excelled in handling the proxy requests and that is the proxy solution pen (0.15.0, plus pen-service taken from “Pound vs. Pen“). Pen can correctly be configured to only send 1 request to each mongrel instance and queue the rest, sending them to each mongrel instance as they become free. In the highly articial testing I used I saw performance improvements of 3x more requests handled by pen than by the other web server proxy solutions.

The downside is that pen only does proxying. The other reason to use a webserver frontend to a rails web application is to have it server static content like images, stylesheets, javascript, static html, etc so that the mongrel instances can be free to handle dynamic content. So until a webserver with appropriate proxying comes along that means a rails setup might look like this:

webserver (apache, lighttpd, nginx) <-> pen <-> mongrel

Obviously having to proxy twice is not ideal but it is probably the fastest solution until one of the webservers can do proxying properly for rails.

1 comments so far

"The poor state of mongrel_cluster frontend web servers" was written on January 25, 2007 and filed in all, ruby on rails

Comments

  1. Kylie Batt1 says:

    ???????????? ?????…

    http://rel” rel=”nofollow”> IT ???????? / ????????? IT ?????? / ????????? ????????????? ” I tried, in order, apache 2.2, pound 2.0, nginx 0.4.13 which are the more popular web server […….

    June 13, 2010 @ 2:23 am

RSS Feed Comments | TrackBack URI

Write Comment

You have to be logged in to write a comment.