<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>I.NFECTIO.US: Choosing a Rails Deployment Platform - So Many Choices</title>
    <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>"Nothing in life is worth doing if you have no life while doing it"</description>
    <item>
      <title>Choosing a Rails Deployment Platform - So Many Choices</title>
      <description>Choosing a Rails Deployment Platform is a well-documented but still confusing activity. You have so many choices you need to make, FCGI, Mongrel, Apache, Lighttpd, &lt;a href="http://litespeedtech.com"&gt;LiteSpeed&lt;/a&gt;, LSAPI, Rewrite Engine, 404 Handler, mod_proxy ... and the list goes on. 

&lt;h3&gt;The Plan&lt;/h3&gt;
&lt;p&gt;
I just ordered a new webserver to replace my aging Dual 850mhz box and I thought I had a plan worked out. Since I still have legacy PHP applications, I chose to use LiteSpeed to power them. LiteSpeed outperforms Apache/mod_php by quite a bit of margin when serving PHP generated content. LiteSpeeds UI for administration also makes it much simpler to manage all the VIrtual Host setups as well.&lt;/p&gt;
&lt;p&gt;All the cool kids are using mongrel nowadays for Rails Deployment. Always wanting to hang with the cool kids, I decided that Apache2 would proxy balance to a mongrel cluster for my applications. I planned on running Apache2 on a separate interface anyways to host my projects with SVN.&lt;/p&gt;
&lt;h3&gt;Testing It&lt;/h3&gt;
&lt;p&gt;Ok, we have LiteSpeed and Apache2 running on different interfaces on the server. I run ab2 against the LiteSpeed/PHP first using a static html file, then using a Hello World PHP page. The static page registered in at 20K+ rps. Wow, looking good so far. The PHP clocked in at 5K+ rps. Pretty good numbers so far. +1 for choosing LiteSpeed to run the PHP applications.&lt;/p&gt;
&lt;p&gt;Moving on to Apache2. I created a Hello World Rails application, lit up a 6-pack of mongrels (using a concurrency of 10 in ab2), ran ab2 and WTH????. 60rps. What a let down. I rerun the test just hitting the index.html of the Rails app, and the numbers come back up to 15K+. Doesn't sound right to me so I tweaked Apache for awhile but to no avail.&lt;/p&gt;
&lt;p&gt;Just for SAG, I decided to setup a Hello World Rails application in LiteSpeed. For this configuration, I chose the LSAPI and used a 404 Redirect. Since I didn't want my hopes dashed right away, I decided to just hit the index.html of the Rails app. 10K rps. Hmmmm. That's lower than the Apache2 marks. Maybe this wasn't a good idea. So I'm thinking the Hello World will cash in around 45-50 rps. Let's run it. WTH????. Averaging 400 rps in this configuration. I tinkered around with Apache2 some more to try to get the numbers up, but it just didn't happen.
&lt;h3&gt;The Result&lt;/h3&gt;
With the simple benchmarks I did, they gave me enough information to make a better choice for a deployment platform for Rails. I didn't test lighttpd at all and don't plan to. I don't really care that LiteSpeed is a commercial offering, the developers listen to their customers (even the freeloaders like me) and incorporate changes or fixes quickly. They've been extremely supportive of the Rails community and continue to make changes tailored to running Rails applications.</description>
      <pubDate>Sat, 12 Aug 2006 09:13:18 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:9c15e241-f015-428e-957a-2fb528fe6cfd</guid>
      <author>Bob Silva</author>
      <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices</link>
      <category>Ruby on Rails</category>
    </item>
    <item>
      <title>"Choosing a Rails Deployment Platform - So Many Choices" by Matijs</title>
      <description>Strange. I'm getting much better numbers than that with a combination of Apache2 and fcgid. So, just to make sure:

&lt;ul&gt;
&lt;li&gt; Did you make sure Rails is in production mode?&lt;/li&gt;
&lt;li&gt; Did you pass the -n flag to ab2?&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Thu, 07 Sep 2006 03:28:09 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:d6a000ba-eec1-429e-8845-e1f6c4818612</guid>
      <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices#comment-122</link>
    </item>
    <item>
      <title>"Choosing a Rails Deployment Platform - So Many Choices" by Xing Li</title>
      <description>Bob, I think you would be happy to know the that we have released LiteSpeed Web Server 2.2, a major feature designed to be the killer platform for Ruby on Rails users/developers.

Check it out. We have made Rails application binding a piece of cake.

You are right about LiteSpeed. We do listen to our users, even if they are freeloaders, and especially the Ruby ones. =P</description>
      <pubDate>Fri, 25 Aug 2006 14:44:48 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:a7a9c193-ecc4-4f5f-ac29-98b037cfd8a5</guid>
      <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices#comment-61</link>
    </item>
    <item>
      <title>"Choosing a Rails Deployment Platform - So Many Choices" by Bob Silva</title>
      <description>You could figure out the "shits and giggles" but not "requests per second"?&lt;br /&gt;&lt;br /&gt; 

Maybe this guide will help:&lt;br /&gt;

SAG = Shits and Giggles&lt;br /&gt;
rps = requests per second&lt;br /&gt;
PHP = PHP Hypertext Processor&lt;br /&gt;
FCGI = Fast Common Gateway Interface&lt;br /&gt;
LSAPI = Litespeed Application Programming Interface&lt;br /&gt;
mhz = megahertz&lt;br /&gt;
UI = user interface&lt;br /&gt;
SVN = Subversion&lt;br /&gt;
K = thousand&lt;br /&gt;
lit up a 6-pack = started a cluster of six mongrel processes &lt;br /&gt;
WTH = what the hell&lt;br /&gt;
&lt;br /&gt;
If you don't like what I have to say just say so, if you have a question, ask, no need for the "we know you're kewl" crap.
&lt;br /&gt;&lt;br /&gt;
Cheers,&lt;br /&gt;
Bob Silva</description>
      <pubDate>Tue, 15 Aug 2006 19:59:27 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:16fc6ccb-ae9c-423e-9c8b-a9b9481f3bef</guid>
      <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices#comment-46</link>
    </item>
    <item>
      <title>"Choosing a Rails Deployment Platform - So Many Choices" by ahem</title>
      <description>we know you're kewl an all, but can you please cut-down on the shorthand?

What do you mean by "rps", SAG (hopefully its not shits and giggles)

did you mean Real Piece of Sh*t by rps?</description>
      <pubDate>Mon, 14 Aug 2006 18:01:24 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:76ecf004-2544-4690-9e03-f4f81a56867b</guid>
      <link>http://i.nfectio.us/articles/2006/08/12/choosing-a-rails-deployment-platform-so-many-choices#comment-45</link>
    </item>
  </channel>
</rss>
