internet marketing | search engine optimization | web strategy

XLsuite now runs on Phusion's Passenger

When I started coding what was to become XLsuite, we were serving the pages using FastCGI on DreamHost. Then, Zed Shaw built and released Mongrel, and I immediately changed our infrastructure to use Mongrel on RimuHosting. At that time, XLsuite hadn't been conceived and we were still building We Put Up Lights, protected by Apache. This occured in late 2005. Since then, Mongrel has served us well, but now is the time to use something easier to manage.

Unless you've been living in a cave for the past 2 years, you should have heard about Phusion's Passenger. This Apache module allows Rails applications to be deployed just as easily as PHP. Tuesday evening (after Montreal.rb), instead of going to bed, I decided to see how hard it could be to deploy XLsuite on Passenger. After 3 hours, I was running with no problems (well, just a tiny one).

A week ago, I watched Engine Yard's Solo screencast. In it, Ezra briefly mentioned he preferred to use Amazon EC2 c1.medium instances for his servers. I chose to give that a try, instead of our usual m1.small. Wow, was I in for a surprise!

Description Average time per request Total requests in 60 seconds Requests/second Cost (USD/hour)
1×c1.small with Apache and HAProxy
2×c1.small with 5 Mongrels each
Old Setup
789.703 ms 608 10.13 3×0.10 = 0.30
1×m1.medium with Apache running 12 instances of XLsuite
New Setup
377.107 ms 1273 21.21 1×0.20 = 0.20

Results obtained using: ab -t 60 -c 8 http://HOST/sessions/new

Look at the table again. Our new setup is faster, cheaper and easier to manage. And it costs us less per hour! Who said we can't have all three?

The only problem I had was related to this Twitter post I made:

We were previously using REQUEST_PATH, and apparently the environment variable wasn't set to what we expected to do with it. For the details, see PagesController#load_page_by_slug.

After having done the work, I have to say that the Phusion guys have done an amazing job of making things very easy to use. And they have other plans for the future. And to that end, they need our help. Phusion has announced their Community sponsorship campaign. This is where we, the community, can contribute to the continued improvement of Passenger. Go ahead and pledge some money, just like we did.

Click here to lend your support to: Phusion Passenger first community sponsorship and make a donation at www.pledgie.com !

Nobody commented on this post.

Write a comment