<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simply Excited - Technology, Outdoor and Design &#187; Deployment</title>
	<atom:link href="http://scoop.simplyexcited.co.uk/category/deployment/feed/" rel="self" type="application/rss+xml" />
	<link>http://scoop.simplyexcited.co.uk</link>
	<description>Technology, Design and Outdoor</description>
	<lastBuildDate>Fri, 23 Dec 2011 11:33:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Heroku Overview and Performance comparisons</title>
		<link>http://scoop.simplyexcited.co.uk/2009/11/06/heroku-overview-and-performance-comparisons/</link>
		<comments>http://scoop.simplyexcited.co.uk/2009/11/06/heroku-overview-and-performance-comparisons/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:48:03 +0000</pubDate>
		<dc:creator>pyrat</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Deployment]]></category>

		<guid isPermaLink="false">http://scoop.simplyexcited.co.uk/2009/11/06/heroku-overview-and-performance-comparisons/</guid>
		<description><![CDATA[	


	Heroku recently went live with a git-based deployment cloud hosting solution for rails applications. (mouthful!)

	I recently bought a new camera and had the need for a daily uploader to flickr. Heroku have a free plan which is exciting as it essentially means that you can now reliably host a simple rails application for free.

	However, there [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://www.shopify.com/static/images/developers/heroku_logo.png" alt="" border="0" /></p>


	<p><a href="http://heroku.com" title="">Heroku</a> recently went live with a git-based deployment cloud hosting solution for rails applications. (mouthful!)</p>

	<p>I recently bought a new camera and had the need for a <a href="http://dailyphotoapp.com" title="">daily uploader</a> to flickr. Heroku have a free plan which is exciting as it essentially means that you can now reliably host a simple rails application for free.</p>

	<p>However, there are a few barriers to entry and things to be aware of.</p>

	<h2>Git</h2>

	<p>You need to have a working knowledge of git the distributed version control system. This has an initial steep learning curve but once master is a power tool in your arsenal. The heroku <a href="http://docs.heroku.com/" title="">documentation</a> is a good place to start.</p>

	<h2>File Uploads</h2>

	<p>The filesystem is read-only, this means you have only one option when it comes to uploaded assets. They need to be stored elsewhere, ideally on a <span class="caps">CDN</span>. I used Amazon S3 which is not strictly a <span class="caps">CDN</span> but can be configured like so if you use <a href="http://aws.amazon.com/cloudfront/" title="">Amazon Cloudfront</a></p>

	<h2>Heroku Platform</h2>

	<p>Spend some time reading the <a href="http://docs.heroku.com/" title="">documentation</a> so you know how to do things like:</p>

	<ul>
		<li>database migrations</li>
		<li>packaging gems</li>
		<li>running crons</li>
		<li>adding custom domains</li>
	</ul>

	<h2>Email</h2>

	<p>Heroku do not provide email for free accounts so if your application needs to work with email you need to outsource your email.</p>

	<p>The best place to outsource your email in my opinion is Google Apps for your domain. You can use the <a href="http://github.com/openrain/action_mailer_tls" title="">action_mailer_tls plugin</a> to interact with google in a fairly reliable manner.</p>

	<h2>Alternatives</h2>

	<p>The big alternative in the free hosting arena is google app engine (GAE). It is possible to install ruby apps on there now, and I am keen to try it out.</p>

	<p>There is an interesting performance comparison of <a href="http://www.jzlabs.com/2009/05/18/sinatra-deployment-and-performance-on-slicehost-heroku-and-google-app-engine/" title="">Slicehost vs Heroku vs Google App Engine</a> for a simple sinatra application.</p>

	<p>Overall, I think that heroku is amazing for hosting those simple &#8216;toy&#8217; rails apps that you dont want to spend money hosting. The pay plans are a little overpriced in my opinion as they still do not compete with the price of a <span class="caps">VPS</span>. I would like to see how heroku copes with high traffic sites and if the platform opens up with the paid plans, eg ability to run a postfix mail server.</p>

	<p>However, it needs to be noted in terms of heroku costings, you do not need to concern your self with system administration tasks. Although you pay more for hosting you may save a lot in man hours.</p>

	<h2>Benchmarks</h2>

	<p>I have done some basic benchmarks using <a href="http://www.hpl.hp.com/research/linux/httperf/" title="">httperf</a> a great tool provided by Hewlett Packard.</p>

	<p>Currently we have Heroku free plan versus slicehost 256mb slice running one thin instance behind nginx and mysql server on the same machine. (A cheap setup.)</p>

	<p>I hoped to deploy the application to google app engine but it seems like getting rails applications running on this platform is currently a bit of an effort. You also need to almost design your application for the restrictions imposed by the platform. I dont like platform restrictions; while they are likely there to help large applications scale, it serves to cripple the small lightweight app.</p>

	<p>For example, there is a 1000 file limit for <span class="caps">GAE</span> apps which you can easily reach with a rails app.<br />
It is also not possible to use ActiveRecord as the database provided (BigTable) is a key/value store.</p>


	<p>However, running something like sinatra with Datamapper as an <span class="caps">ORM</span> is a valid choice for a <span class="caps">GAE</span> deployment.<br />
A great <a href="http://www.igvita.com/2009/09/23/deploying-jruby-on-google-app-engine/" title="">blog post</a> on setting up a sinatra app with <span class="caps">GAE</span>.</p>

	<p>Heroku &#8211; 58.5 requests per second stddev=3.6<br />
Slicehost &#8211; 47.9 requests per second stddev=2.1</p>

	<p><img src="http://scoop.simplyexcited.co.uk/wp-content/uploads/2009/11/comparison.png" alt="Comparison" border="0" /></p>

	<p>Surprisingly Heroku is faster than the equivalent setup on a small <span class="caps">VPS</span>. However, on testing earlier in the day I only managed a maximum of 25 req/s average. This means that you may be subject to competition for resources which are beyond your control.. a little like being on a shared server.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://scoop.simplyexcited.co.uk/2009/11/06/heroku-overview-and-performance-comparisons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

