Hosting a ruby on rails blog on Heroku cloud hosting

Posted on 24 June 2010

I've taken the plunge and moved my site over to Heroku ruby cloud host. My initial impressions of the service are great so I thought I'd post up my experience so far.

I've opted for the basic free setup to see how it goes. It's difficult to compare what you get to other hosts because Heroku is so different. Everything is hosted in the cloud on Amazon EC2, you create a 'compiled slug' which is a read only version of your app. For all the gory details check out heroku.com/how.

I have one dyno which is kind of equivalent to a single Mongrel, essentially the more Dyno's the more concurrent your app. I figure that as my blog is so simple that concurrency is a non issue, anyway if it became one I can easily add more dynos.

Dynos are actually spread across multiple servers. The main difference is that I don't have ssh access and I can't write to anywhere. This means user uploads (not that I have any) would need to be stored somewhere like Amazon S3. Plugins like Paperclip make this so easy anyway that it's pretty much a non-issue.

The other main change is the pure git work-flow. That's right no Capistrano. I couldn't believe how easy it is to deploy to Heroku though, all you do is push code to your repository and it's live.

But what about database migrations? Well as far as I can tell you need to pull down your database, make any changes locally and then push it back up to Heroku. I guess you would need to temporarily take down the site between updating the code and the database. I need to investigate further here but for my blog I can't see it being a problem.

Heroku provide a lot of addons to extend your app. I'm making full use of the free 5mb of memcache and while that doesn't sound like much everything appears to be running so much faster, I can always upgrade for a fee if I want.

Moving my domain couldn't have been easier because of the way Heroku have integrated with Zerigo for DNS, no sign up required at all.

I'm also using another addon for sending email through SendGrid. I have this just for notifications of new comments or exceptions. I can send upto 200 emails per day for free.

So far everything has gone so smoothly, fingers crossed it stays that way as I'm loving the zero hosting costs!

About Paul

Paul works for Kyan web design agency in Surrey, UK as a Ruby on Rails developer.

Follow Paul on Twitter

Email: paulsturgess [at] gmail.com

Read more articles in the archive →

Comments...

  • I'm hosting my blog on Heroku as well - it's been running for maybe a month or so. So far it has gone quite well. I don't get very much volume so one dyno is sufficient for now.

    I started off using Zerigo too, but there are limits to the number of queries it will forward before you need a paid account. The fact is, you don't need Zerigo - if you can manage cname records through your domain name provider, then you can point your domain right to Heroku rather than using a paid proxy.

    look through the Heroku support site - there are a few documents that describe how to do this.

    Chris Holtz at 27 Jun 10 at 07:26

  • I've been using Heroku for a while now for quite a few things and can't fault it at all. The workflow seems almost too easy but I love it.

    You can also run any rake tasks or get a console if you need to do migrations. Just make sure you have the gem and run heroku rake db:migrate or heroku console etc

    Steve Smith at 28 Jun 10 at 01:58

  • @Chris I've actually had to stop using Zerigo as it turns out I don't get enough free dns lookups. It predicted i'd be over 3 times the amount you get for free for this month!

    I'm using zoneedit.com instead as my domain name provider doesn't allow me to manage cname records.

    Paul Sturgess at 16 Jul 10 at 14:19

  • What blog software are you using ? Wordpress?

    Gotham at 04 Aug 10 at 11:26

  • @Gotham this is a hand rolled blog that I wrote in order to start learning Ruby on Rails. The underlying code is pretty outdated now but it's still doing the job!

    Paul Sturgess at 14 Aug 10 at 10:41

  • I've been looking at switching from Wordpress to my own rails made blog/site software for awhile now but couldn't find a decent host. After seeing this post and finally giving Heroku a try I feel inspired to start hacking!

    Steve Smith is right - it does seem almost too easy to deploy but that looks to be part of Heroku's charm.

    Thanks.

    Jon Hocking at 19 Dec 10 at 10:31

  • Heroku is definitely the best Rails hosting platform simply for ease of use and simplicity. We use it for sites that undergo heavy heavy national TV advertising and when you combine Heroku with a bit of memcached it's amazing the throughput you can get - plus we're typically only running 2 dynos so it's damn cheap for something that's almost infinitely scalable.

    John Beynon at 07 Jan 11 at 01:27

  • I regularly write about my experience, experiments and trials with Salesforce, Ruby on rails and Heroku

    http://www.forcelabs.net/

    Harshit at 07 May 11 at 14:53

Got something to say?