<?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>Brainspl.at: Dead Simple Deployment</title>
    <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Brainspl.at</description>
    <item>
      <title>"Dead Simple Deployment" by Bang Bros</title>
      <description>Hello everyone. Nice to meet you here ;-) interesting article - i'll put it in bookmarks, i guess will use it any day.</description>
      <pubDate>Sun, 06 May 2007 22:00:25 +0000</pubDate>
      <guid>urn:uuid:dd80963f-062a-47bb-a5b5-95c7a5ae23e7</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4345</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by nice ass</title>
      <description>How to include PHP using smarty tags?</description>
      <pubDate>Fri, 04 May 2007 22:52:32 +0000</pubDate>
      <guid>urn:uuid:e7329ab7-a99a-4f10-a689-f12ed884917d</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4326</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>a</description>
      <pubDate>Fri, 04 May 2007 20:36:01 +0000</pubDate>
      <guid>urn:uuid:58d6faf0-0e00-4b0f-8934-c48561e22096</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4308</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>a</description>
      <pubDate>Fri, 04 May 2007 20:35:48 +0000</pubDate>
      <guid>urn:uuid:06b6590a-21e8-4141-a258-ae368d8668f9</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4307</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>a</description>
      <pubDate>Fri, 04 May 2007 20:35:39 +0000</pubDate>
      <guid>urn:uuid:c412c861-4779-4b59-9660-b59e0da9e3cd</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4306</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>aaaa</description>
      <pubDate>Fri, 04 May 2007 20:35:23 +0000</pubDate>
      <guid>urn:uuid:956ce02e-506d-46b9-b901-e59f7971e1e7</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4305</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>aa</description>
      <pubDate>Fri, 04 May 2007 20:35:10 +0000</pubDate>
      <guid>urn:uuid:9e08811e-e7f9-4ba9-8558-467778279ebc</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4304</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by a</title>
      <description>a</description>
      <pubDate>Fri, 04 May 2007 20:35:01 +0000</pubDate>
      <guid>urn:uuid:172f46c0-93d1-4bd7-bedf-e7d8ee9c2c69</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4303</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by http://www.m150.org</title>
      <description>   http://www.m150.org</description>
      <pubDate>Fri, 04 May 2007 20:34:49 +0000</pubDate>
      <guid>urn:uuid:653572fc-0833-4c65-8a58-54f74a64d60b</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4302</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by http://insuranceready.googlepages.com</title>
      <description>   a</description>
      <pubDate>Fri, 04 May 2007 20:34:20 +0000</pubDate>
      <guid>urn:uuid:3284f464-8193-4910-adec-968fb796d8d9</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4301</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by coloring pages</title>
      <description>very good</description>
      <pubDate>Fri, 04 May 2007 20:33:38 +0000</pubDate>
      <guid>urn:uuid:7fe34636-7712-4848-af7a-fff9e640a95c</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4300</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by coloring pages</title>
      <description>nice</description>
      <pubDate>Fri, 04 May 2007 20:33:24 +0000</pubDate>
      <guid>urn:uuid:651ace79-f7e2-455e-ad2f-9c3ae111378c</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4299</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by cartoon wallpaper</title>
      <description>very good site</description>
      <pubDate>Fri, 04 May 2007 20:32:59 +0000</pubDate>
      <guid>urn:uuid:bbacda76-dd8d-4bf0-8b09-499de51f2050</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4298</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by big tits</title>
      <description>Ruby block with link adding in a line seems to be useless, imho.</description>
      <pubDate>Fri, 04 May 2007 15:20:41 +0000</pubDate>
      <guid>urn:uuid:1483ac18-c8c4-4d1e-b58d-73f505b0fd2d</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4291</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by bang bros</title>
      <description>Hello everyone, wanna be part of some kind of community, possible here? anyone here?</description>
      <pubDate>Thu, 03 May 2007 19:00:23 +0000</pubDate>
      <guid>urn:uuid:37898700-23c3-42d3-8d6d-d5bec4297886</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4280</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by bang bus</title>
      <description>Hello everyone. Nice to meet you here ;-)  interesting article - i'll put it in bookmarks, i guess will use it any day.</description>
      <pubDate>Mon, 30 Apr 2007 16:48:13 +0000</pubDate>
      <guid>urn:uuid:acc89b46-65a5-40c9-ac38-d17290846f08</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4257</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by bang bus</title>
      <description>Hello everyone. Nice to meet you here ;-)  interesting article - i'll put it in bookmarks, i guess will use it any day.</description>
      <pubDate>Mon, 30 Apr 2007 16:47:39 +0000</pubDate>
      <guid>urn:uuid:6ed8451d-a020-4ac9-b46f-b6eab26cf6f9</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4256</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by baghdad dog from lava love marine named war</title>
      <description>This site is interesting and very informative, nicely interface. Enjoyed browsing through the site.</description>
      <pubDate>Mon, 30 Apr 2007 08:03:28 +0000</pubDate>
      <guid>urn:uuid:170104ab-8e4c-4c2c-bb02-06eaf8b5c27e</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4241</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by ass parade</title>
      <description>Pretty being in Berlin watched their show, welcome everyone - i can pay for invitation!</description>
      <pubDate>Sun, 29 Apr 2007 21:06:32 +0000</pubDate>
      <guid>urn:uuid:a607e16a-7dd1-45de-8b7e-49bd4846f75f</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4238</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by We Live Together</title>
      <description>Hello everyone, wanna be part of some kind of community, possible here? anyone here?</description>
      <pubDate>Sat, 28 Apr 2007 19:49:55 +0000</pubDate>
      <guid>urn:uuid:bdcb4550-cd8f-4696-a3c0-d8fccd20ccfc</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4220</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by captain stabbin</title>
      <description>Captain on the bridge:-) kiddin' around, nice article! :-)</description>
      <pubDate>Tue, 24 Apr 2007 22:19:49 +0000</pubDate>
      <guid>urn:uuid:3e677e85-cf06-4cb3-bb10-e454ec8b72d3</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4207</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by bang bros</title>
      <description>I am here to notify you that in the end of April 2007 will be Ruby and WP community party at NY, US.</description>
      <pubDate>Tue, 24 Apr 2007 10:33:27 +0000</pubDate>
      <guid>urn:uuid:375075ae-9a17-40b0-8216-87e04cb25153</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4193</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by nipple slip</title>
      <description>Buenos Noches indigo valenico grates tuta!</description>
      <pubDate>Mon, 23 Apr 2007 22:00:07 +0000</pubDate>
      <guid>urn:uuid:8e440137-468d-47f1-8874-f8c976098d9c</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4185</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by Nipple Slip</title>
      <description>Creation from Ruby or from Wordpress is useless from some points of view. IMHO.</description>
      <pubDate>Thu, 19 Apr 2007 22:29:41 +0000</pubDate>
      <guid>urn:uuid:b868e53e-6cb7-4566-b1f9-54e652987dea</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4160</link>
    </item>
    <item>
      <title>"Dead Simple Deployment" by Nipple Slip</title>
      <description>Creation from Ruby or from Wordpress is useless from some points of view. IMHO.</description>
      <pubDate>Thu, 19 Apr 2007 22:25:13 +0000</pubDate>
      <guid>urn:uuid:23143926-748b-41d0-a865-8aad367a3a5d</guid>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment#comment-4159</link>
    </item>
    <item>
      <title>Dead Simple Deployment</title>
      <description>&lt;p&gt;I have been experimenting with mongrel clusters for the past week or so. I tested pound, balance and finaly settled on pen http://siag.nu/pen/  for a load balancer in front of the mongrel cluster. Pen was the fastest out of those three load balancers in my tests, and is dead simple to set up.&lt;/p&gt;


	&lt;p&gt;I created a pool of 6 mongrels on my macbook pro and ran pen in front of them. I was able to get 800-900req/sec for static files and 70-150 req/sec for dynamic full blown rails pages. It was also rock solid. I abused the hell out of it with httperf and ab and was very impressed with the performance and stability.&lt;/p&gt;


	&lt;p&gt;I want to say a huge thank you to Zed Shaw (author of mongrel) and the folks supporting his effort finacially. Mongrel is an awesome addition to the ruby world.&lt;/p&gt;


	&lt;p&gt;Not once did I get &lt;strong&gt;any&lt;/strong&gt; 500 errors or zombied mongrel processes.&lt;/p&gt;


	&lt;p&gt;Pen can do either round-robin balancing or &amp;#8216;sticky session&amp;#8217; adaptive routing. &amp;#8216;sticky sessions&amp;#8217; means that you can get session affinity between requests.  But in my tests round-robin was faster by a little bit. And if sessions are in the db or memcached or drb then sticky sessions don’t matter.&lt;/p&gt;


Here is a simple way to test this setup out for yourself.
First compile pen:
&lt;pre&gt;
$ curl -O http://siag.nu/pub/pen/pen-0.17.0.tar.gz
$ tar xzvf pen-0.17.0.tar.gz
$ cd pen-0.17.0
$ ./configure
$ make
$ sudo make install
&lt;/pre&gt;
Lets install the mongrel &amp;#38; mongrel_cluster gems
&lt;pre&gt;
$ sudo gem install mongrel mongrel_cluster --include-dependencies
&lt;/pre&gt;
mongrel_cluster is a gem plugin for mongrel that makes it easy to manage a cluster of mongrels. Thanks to Bradley Taylor for making this available. You can read his blog about it here: http://fluxura.com/articles/2006/04/24/easy-mongrel-clustering-with-mongrel_cluster. Lets configure our rails app to use it.

cd into your rails application&amp;#8217;s root directory and run:
&lt;pre&gt;
$ mongrel_rails cluster::configure -p 5000 -e production -a localhost
&lt;/pre&gt;
This will create the file:
&lt;pre&gt;
$ cat config/mongrel_cluster.yml
--- 
num-procs: 1024
docroot: public
timeout: 120
cwd: /Users/ez/ez
log_file: log/mongrel.log
port: 5000
config_script: 
debug: false
environment: production
servers: 6
pid_file: log/mongrel.pid
address: localhost
mime_map:
&lt;/pre&gt;
This is the config file that the cluster::configure just made. The only thing I changed was the number of servers: which i set to 6. Now lets start the mongrel cluster:
&lt;pre&gt;
$ mongrel_rails cluster::start
&lt;/pre&gt;
You can now stop or restart the cluster with these commands:
&lt;pre&gt;
$ mongrel_rails cluster::stop
or
$ mongrel_rails cluster::restart
&lt;/pre&gt;
Then once the cluster is running we can fire up pen. This command runs pen in debug mode in the foreground so you can see the requests being handled by different mongrels. This is also using round robin. If you turn off -d(debug) and -f(foreground) it will be a little bit faster still.

&lt;pre&gt;
$ sudo pen -r -a -f -d  localhost:80 localhost:5000 localhost:5001 \
localhost:5002 localhost:5003 localhost:5004 localhost:5005 localhost:5005
&lt;/pre&gt;

	&lt;p&gt;With pen running in the foreground and debug mode like this you can see pen balancing requests between our six mongrels. You will want to turn off the -d and -f switches when you want to run in production.&lt;/p&gt;


	&lt;p&gt;Then you can go use ab or preferably httperf to test the setup. I think you will agree this little pack of wolves&amp;#8230;err.. mongrels is hungry! ;-)&lt;/p&gt;


	&lt;p&gt;I am very impressed with this setup and it consumes very little resources. Pen is the fastest, lightest &lt;span class="caps"&gt;HTTP&lt;/span&gt; load balancer that can be a front end for https as well, that I could find for free. Its about 5-10% faster then balance and pound in my tests. And I am getting better performance with this setup then I do with lighttpd-&gt;standalone fcgi listeners on my macbook.&lt;/p&gt;


	&lt;p&gt;Very cool stuff.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;EDIT&lt;/span&gt;: With this type of setup you will need one IP address for each app you want to run. Or you can put lighty or apache in front of pen to use vhosting capabilities. I will post more instructions on how to do this if people need to see them.&lt;/p&gt;</description>
      <pubDate>Wed, 26 Apr 2006 05:20:00 +0000</pubDate>
      <guid>urn:uuid:0024b2fe-334f-4341-bb29-675cce143f4e</guid>
      <author>ezmobius</author>
      <link>http://www.brainspl.at/articles/2006/04/26/dead-simple-deployment</link>
      <category>mongrel</category>
      <category>pen</category>
      <category>load-balance</category>
      <category>http</category>
      <trackback:ping>http://www.brainspl.at/articles/trackback/416</trackback:ping>
    </item>
  </channel>
</rss>

