<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: What is so hard about Rails deployment?</title>
	<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<pubDate>Sat, 05 Jul 2008 18:36:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: 赖洪礼的 blog &#187; Rails deployment: wouldn&#8217;t it be great if it worked like this?</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7642</link>
		<dc:creator>赖洪礼的 blog &#187; Rails deployment: wouldn&#8217;t it be great if it worked like this?</dc:creator>
		<pubDate>Sun, 27 Jan 2008 22:27:37 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7642</guid>
		<description>[...] mean by &#8216;hard&#8217;?&#8221; I read their posts more carefully. I read the comments. I also asked around on my blog and the Ruby on Rails mailing list. As with most questions in life, there is not a single answer, [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] mean by &#8216;hard&#8217;?&#8221; I read their posts more carefully. I read the comments. I also asked around on my blog and the Ruby on Rails mailing list. As with most questions in life, there is not a single answer, [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Ansfield</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7633</link>
		<dc:creator>Kevin Ansfield</dc:creator>
		<pubDate>Mon, 21 Jan 2008 16:34:54 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7633</guid>
		<description>Have any of you tried using the Litespeed webserver instead of apache/lighttpd/nginx/etc proxying to mongrel? It's ruby_lsapi module makes virtual host setup much easier (plus it has a web based administration interface) and doesn't use mongrel at all. I've found the free a lot more stable in low-memory situations than apache 2 with mod_proxy and a mongrel cluster.</description>
		<content:encoded><![CDATA[<p>Have any of you tried using the Litespeed webserver instead of apache/lighttpd/nginx/etc proxying to mongrel? It&#8217;s ruby_lsapi module makes virtual host setup much easier (plus it has a web based administration interface) and doesn&#8217;t use mongrel at all. I&#8217;ve found the free a lot more stable in low-memory situations than apache 2 with mod_proxy and a mongrel cluster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7588</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Tue, 15 Jan 2008 21:05:59 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7588</guid>
		<description>The issue with Rails apps isn't deployment, which is simple, but "deployed maintenance". Keeping an app running in production, monitoring mongrels, worrying about memory leaks, and all the fun that goes along with that. Sure, when you deploy one app, or two apps, no problem, but let's say you have ten or fifteen or twenty. Let's say you have hundreds of apps that you need to keep running. Would you rather have one process (Tomcat) or several hundred Mongrels? In PHP, deployed maintenance was an afterthought. I never worried about server config. I didn't use God, I didn't use Monit. It wasn't ever an issue. If Apache is running, your app is running (excluding php-fcgi). Even in Java, sure, a WAR file is hard to create (potentially), and requires editing configuration files, but once you battle for several days trying to keep your app running, you won't mind doing some (likely scriptable) editing.

Not to sound like I'm bashing Rails, I've been using it since early 2005, and have deployed dozens upon dozens of apps with Rails, but the deployment of Rails is really a problem. I've supported my self virtually entirely from writing Rails code since late 2005. I'm a big fan. 

I don't think JRuby is ultimately the answer. I hope Rubinius is, but even then someone needs to find a universal way to deploy Rails apps, by dropping a .rba (or whatever) into a directory and having everything "just work".

Someone needs to step up and rewrite mod_ruby or write a mod_mongrel, or most companies will start deploying to J2EE containers.</description>
		<content:encoded><![CDATA[<p>The issue with Rails apps isn&#8217;t deployment, which is simple, but &#8220;deployed maintenance&#8221;. Keeping an app running in production, monitoring mongrels, worrying about memory leaks, and all the fun that goes along with that. Sure, when you deploy one app, or two apps, no problem, but let&#8217;s say you have ten or fifteen or twenty. Let&#8217;s say you have hundreds of apps that you need to keep running. Would you rather have one process (Tomcat) or several hundred Mongrels? In PHP, deployed maintenance was an afterthought. I never worried about server config. I didn&#8217;t use God, I didn&#8217;t use Monit. It wasn&#8217;t ever an issue. If Apache is running, your app is running (excluding php-fcgi). Even in Java, sure, a WAR file is hard to create (potentially), and requires editing configuration files, but once you battle for several days trying to keep your app running, you won&#8217;t mind doing some (likely scriptable) editing.</p>
<p>Not to sound like I&#8217;m bashing Rails, I&#8217;ve been using it since early 2005, and have deployed dozens upon dozens of apps with Rails, but the deployment of Rails is really a problem. I&#8217;ve supported my self virtually entirely from writing Rails code since late 2005. I&#8217;m a big fan. </p>
<p>I don&#8217;t think JRuby is ultimately the answer. I hope Rubinius is, but even then someone needs to find a universal way to deploy Rails apps, by dropping a .rba (or whatever) into a directory and having everything &#8220;just work&#8221;.</p>
<p>Someone needs to step up and rewrite mod_ruby or write a mod_mongrel, or most companies will start deploying to J2EE containers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7584</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 14 Jan 2008 22:17:11 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7584</guid>
		<description>Jason,

I'm not sure why you think that multiple Mongrel processes won't help. If you find that your server's responsiveness is still jammed, just increase the number of Mongrel processes. If you find that your server can't handle that number of processes, then you have too many visitors.

PHP doesn't solve it. In fact, PHP really isn't much different. By default, Apache allocates up to 150 or so request handlers, which can run concurrently. Each request handler can run exactly one PHP script at a time (i.e. process one HTTP request at a time). The PHP script is run inside the Apache process. If you configure Apache to only use 1 request handler, and your PHP script jams for 10 seconds, then your web server will be unresponsive.
Mongrel_cluster is similar. The number of concurrent requests that your clusters can handle is proportional to the number of Mongrel processes in the cluster.

So the difference with PHP is that PHP uses Apache's number of request handlers, and thus doesn't require any additional configuration. Mongrel_cluster requires you to manually set the number of processes in the cluster.</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>I&#8217;m not sure why you think that multiple Mongrel processes won&#8217;t help. If you find that your server&#8217;s responsiveness is still jammed, just increase the number of Mongrel processes. If you find that your server can&#8217;t handle that number of processes, then you have too many visitors.</p>
<p>PHP doesn&#8217;t solve it. In fact, PHP really isn&#8217;t much different. By default, Apache allocates up to 150 or so request handlers, which can run concurrently. Each request handler can run exactly one PHP script at a time (i.e. process one HTTP request at a time). The PHP script is run inside the Apache process. If you configure Apache to only use 1 request handler, and your PHP script jams for 10 seconds, then your web server will be unresponsive.<br />
Mongrel_cluster is similar. The number of concurrent requests that your clusters can handle is proportional to the number of Mongrel processes in the cluster.</p>
<p>So the difference with PHP is that PHP uses Apache&#8217;s number of request handlers, and thus doesn&#8217;t require any additional configuration. Mongrel_cluster requires you to manually set the number of processes in the cluster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7583</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Mon, 14 Jan 2008 22:03:14 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7583</guid>
		<description>Hongli,

That's good, but multiple Mongrel's does not save you from long running processes jamming your responsiveness.  Which is what Ikai was hinting at with background image processing.

Out of interest, how does PHP solve this issue?  I'd be surprised if it had an automatic queue for long running processes... which is the exact issue.... and even if it did, it would not be 'painless' since it would require some level of work to set up :)</description>
		<content:encoded><![CDATA[<p>Hongli,</p>
<p>That&#8217;s good, but multiple Mongrel&#8217;s does not save you from long running processes jamming your responsiveness.  Which is what Ikai was hinting at with background image processing.</p>
<p>Out of interest, how does PHP solve this issue?  I&#8217;d be surprised if it had an automatic queue for long running processes&#8230; which is the exact issue&#8230;. and even if it did, it would not be &#8216;painless&#8217; since it would require some level of work to set up <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7582</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Mon, 14 Jan 2008 21:58:24 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7582</guid>
		<description>“Right, i’ll need to set up a clustering database, a balancing proxy, and grab 4GB of ram just to be on the safe side”

The difference there is that your Rails app is massively popular, and your PHP one is just used by your grandma.</description>
		<content:encoded><![CDATA[<p>“Right, i’ll need to set up a clustering database, a balancing proxy, and grab 4GB of ram just to be on the safe side”</p>
<p>The difference there is that your Rails app is massively popular, and your PHP one is just used by your grandma.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7581</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 14 Jan 2008 17:36:43 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7581</guid>
		<description>Ikai, you are correct that Mongrel only handles 1 request at the same time. But you don't seem to know that that's what mongrel_cluster is for. Basically, you use mongrel_cluster to run 2 Mongrel instances (or any number of instances you like). This can be setup with literally two commands - step 1: create config file which contains the number of commands and the starting port; step 2: start the instances with a single command.
Then you setup Apache, Lighttpd, or whatever you use, to proxy to those Mongrel instances. Apache/lighttpd will automatically proxy to the instance that isn't currently busy. This has been the preferred Rails deployment method for a while now.

In addition, you can setup Lighttpd to serve static files directly, instead of letting them go through Mongrel. This is an example of a stock Lighttpd snippet that I use:
&lt;pre&gt;
NO_PROXY_EXTENSIONS = "\.(png&#124;gif&#124;jpg&#124;css&#124;js&#124;iso&#124;exe&#124;wmv&#124;mpg&#124;avi&#124;rar&#124;zip)$"
...
} else $HTTP["host"] =~ "(^&#124;\.)kennissysteem\.com$" {
        $HTTP["host"] == "beta.kennissysteem.com" {
                server.document-root = "/home/webapps/kennissysteem/systeem/public"
                $HTTP["url"] !~ NO_PROXY_EXTENSIONS {
                        proxy.server = ("" =&gt; (
                                ("host" =&gt; "127.0.0.1", "port" =&gt; 3865),
                                ("host" =&gt; "127.0.0.1", "port" =&gt; 3866)
                        ))
                }
                accesslog.filename = "/home/webapps/kennissysteem/systeem/log/lighttpd.log"
        } else $HTTP["host"] =~ "" {
                url.redirect = ( "^/(.*)" =&gt; "http://beta.kennissysteem.com/$1" )
                accesslog.filename = "/dev/null"
        }
&lt;/pre&gt;
Here you see beta.kennissysteem.com powered by 2 Mongrel instances. Whenever I deploy a new site, I copy &#038; paste this snippet and change a few values.

I have experience with Ferret and acts_as_ferret. In fact my current project uses it. I run the Ferret server. I agree that it's less than ideal, but why is it a problem? I only had to run one command - it's fire-and-forget.
The underlying problem is that Ferret stores the index of the filesystem. If there's a PHP indexing engine that also use the filesystem, I'm pretty sure it would run into similar issues.

I really do not understand why you talk about "risk". All this stuff seems fairly simple to me.
- How do you count risk?
- It seems like you're counting "risk" by the number of manual steps. Is that really an accurate way to count risk? Let us take, for example PHP. The number of effective PHP instances is equal to the number of concurrent Apache request handlers. This is setup in your Apache config file. Now suppose that PHP one day decides to force you to enter this number manually, in a seperate configuration option. And that you have to start these PHP instances manually, instead of letting Apache start them automatically for you. This will be just like how mongrel_cluster works. Will PHP's risk have increased?
- Why do you think JRuby will reduce risk? Is it only because it uses Java, which you already know, or are there other reasons as well?</description>
		<content:encoded><![CDATA[<p>Ikai, you are correct that Mongrel only handles 1 request at the same time. But you don&#8217;t seem to know that that&#8217;s what mongrel_cluster is for. Basically, you use mongrel_cluster to run 2 Mongrel instances (or any number of instances you like). This can be setup with literally two commands - step 1: create config file which contains the number of commands and the starting port; step 2: start the instances with a single command.<br />
Then you setup Apache, Lighttpd, or whatever you use, to proxy to those Mongrel instances. Apache/lighttpd will automatically proxy to the instance that isn&#8217;t currently busy. This has been the preferred Rails deployment method for a while now.</p>
<p>In addition, you can setup Lighttpd to serve static files directly, instead of letting them go through Mongrel. This is an example of a stock Lighttpd snippet that I use:</p>
<pre>
NO_PROXY_EXTENSIONS = "\.(png|gif|jpg|css|js|iso|exe|wmv|mpg|avi|rar|zip)$"
...
} else $HTTP["host"] =~ "(^|\.)kennissysteem\.com$" {
        $HTTP["host"] == "beta.kennissysteem.com" {
                server.document-root = "/home/webapps/kennissysteem/systeem/public"
                $HTTP["url"] !~ NO_PROXY_EXTENSIONS {
                        proxy.server = ("" => (
                                ("host" => "127.0.0.1", "port" => 3865),
                                ("host" => "127.0.0.1", "port" => 3866)
                        ))
                }
                accesslog.filename = "/home/webapps/kennissysteem/systeem/log/lighttpd.log"
        } else $HTTP["host"] =~ "" {
                url.redirect = ( "^/(.*)" => "http://beta.kennissysteem.com/$1" )
                accesslog.filename = "/dev/null"
        }
</pre>
<p>Here you see beta.kennissysteem.com powered by 2 Mongrel instances. Whenever I deploy a new site, I copy &#038; paste this snippet and change a few values.</p>
<p>I have experience with Ferret and acts_as_ferret. In fact my current project uses it. I run the Ferret server. I agree that it&#8217;s less than ideal, but why is it a problem? I only had to run one command - it&#8217;s fire-and-forget.<br />
The underlying problem is that Ferret stores the index of the filesystem. If there&#8217;s a PHP indexing engine that also use the filesystem, I&#8217;m pretty sure it would run into similar issues.</p>
<p>I really do not understand why you talk about &#8220;risk&#8221;. All this stuff seems fairly simple to me.<br />
- How do you count risk?<br />
- It seems like you&#8217;re counting &#8220;risk&#8221; by the number of manual steps. Is that really an accurate way to count risk? Let us take, for example PHP. The number of effective PHP instances is equal to the number of concurrent Apache request handlers. This is setup in your Apache config file. Now suppose that PHP one day decides to force you to enter this number manually, in a seperate configuration option. And that you have to start these PHP instances manually, instead of letting Apache start them automatically for you. This will be just like how mongrel_cluster works. Will PHP&#8217;s risk have increased?<br />
- Why do you think JRuby will reduce risk? Is it only because it uses Java, which you already know, or are there other reasons as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ikai Lan</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7580</link>
		<dc:creator>Ikai Lan</dc:creator>
		<pubDate>Mon, 14 Jan 2008 17:12:31 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7580</guid>
		<description>Your deployment steps only work on very simple sites. Rails does not thread well, and HTTP requests are blocking for Mongrel. While this is not an issue for most instances, larger deployments realize the need to offload processing for things such as image processing or upload processing to background processes - this is a non issue with PHP or J2EE. As a result, we need to create background services in our applications to solve a problem that doesn't exist in other frameworks/languages, so it's a few more steps (making sure the background process has finished its tasks, shutting it down, updating code, and restarting). While it doesn't seem difficult to do, from a project management standpoint, it's another point of failure and adds to deployment risk. A related issue is with one of the popular search indexing Gems, Ferret - Ferret indexing in acts_as_ferret does NOT work well with more than one Mongrel instance. You MUST disable indexing or run it as a service.

But in the end, it all comes down to the threading issue, which, because of the way a Mongrel Rails stack is architectured, introduces risk. There is virtually no risk in deploying a PHP application; the upload either completed, or didn't complete. Maybe painful is not the best description. "High risk" is probably a better term. This is part of the reason I'm looking so closely at JRuby - in theory, Glassfish could solve all these problems.</description>
		<content:encoded><![CDATA[<p>Your deployment steps only work on very simple sites. Rails does not thread well, and HTTP requests are blocking for Mongrel. While this is not an issue for most instances, larger deployments realize the need to offload processing for things such as image processing or upload processing to background processes - this is a non issue with PHP or J2EE. As a result, we need to create background services in our applications to solve a problem that doesn&#8217;t exist in other frameworks/languages, so it&#8217;s a few more steps (making sure the background process has finished its tasks, shutting it down, updating code, and restarting). While it doesn&#8217;t seem difficult to do, from a project management standpoint, it&#8217;s another point of failure and adds to deployment risk. A related issue is with one of the popular search indexing Gems, Ferret - Ferret indexing in acts_as_ferret does NOT work well with more than one Mongrel instance. You MUST disable indexing or run it as a service.</p>
<p>But in the end, it all comes down to the threading issue, which, because of the way a Mongrel Rails stack is architectured, introduces risk. There is virtually no risk in deploying a PHP application; the upload either completed, or didn&#8217;t complete. Maybe painful is not the best description. &#8220;High risk&#8221; is probably a better term. This is part of the reason I&#8217;m looking so closely at JRuby - in theory, Glassfish could solve all these problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snailrails</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7577</link>
		<dc:creator>Snailrails</dc:creator>
		<pubDate>Mon, 14 Jan 2008 14:21:56 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7577</guid>
		<description>To a person that lacks any sort of linux or admin experience. Setting up apache to proxy requests to a mongrel cluster
sounds a lot more painful than uploading PHP files via FTP.

Given the lack of support by hosting providers its certainly does make this experience _painful_ 

But once you know how and are using the proper tools for deployment, it couldn't be easier.</description>
		<content:encoded><![CDATA[<p>To a person that lacks any sort of linux or admin experience. Setting up apache to proxy requests to a mongrel cluster<br />
sounds a lot more painful than uploading PHP files via <a href="http://FTP." rel="nofollow">http://FTP.</a></p>
<p>Given the lack of support by hosting providers its certainly does make this experience _painful_ </p>
<p>But once you know how and are using the proper tools for deployment, it couldn&#8217;t be easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: August Lilleaas / leethal</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7576</link>
		<dc:creator>August Lilleaas / leethal</dc:creator>
		<pubDate>Mon, 14 Jan 2008 14:08:01 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2008/01/14/what-is-so-hard-about-rails-deployment/#comment-7576</guid>
		<description>Keep in mind that deploying PHP when PHP was 3 years old is just as hard as deploying Rails is now. You had to compile it into apache. Very painful stuff. Work is going to be done on mod_ruby, we'll get there.</description>
		<content:encoded><![CDATA[<p>Keep in mind that deploying PHP when PHP was 3 years old is just as hard as deploying Rails is now. You had to compile it into apache. Very painful stuff. Work is going to be done on mod_ruby, we&#8217;ll get there.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
