Mongrel Cluster -> mod_rails  June 23rd, 2008

Passenger (aka. mod_rails) is the new Big Deal™ these days. Besides the performance benefits it's also simpler to setup and maintain (read: no maintenance). I decided to take the leap on a client's server this weekend and so far (*fingers crossed*) there hasn't been a single issue!

Shocked is the most apt description of the look on my face after installing this excellent gem. It went down like this:

  1. Remove all the mongrel cluster crap from /etc/apache2/sites-enabled/pcw. Especially satisfying was removing all the BalancerMember http://127.0.0.1:8000-ish stuff.
  2. A couple of changes to the actual environment:
  3. Install passenger gem:
  4. Get the apache module configured and installed:
  5. Put the new configuration in place of the 150 or so lines removed in step 1:
  6. Remove anything that auto-loads/boots up the mongrel instances.
  7. Finally, due to using Windows from age 10 to about age 20, I felt the urge to reboot, but probably I could have just restarted apache.

And that should do it. You can remove your mongrel cluster configuration files and all that stuff, but I just left it there just to cover the possibility of having to go back (unlikely at this point).

We noticed a significant performance boost over the next day, in hindsight I think I had too few mongrels running in the original configuration. The only real hiccup was having to replace apache2-mpm-worker with -prefork, it seems that Ubuntu Server Edition comes with the former, and passenger complained about only being tested with the latter. After that everything kind of 'just worked', and I was delighted :)

Some social stuff: