Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Heroku's Provisionless Hosting for Rails Apps is Revolutionary

Heroku's Provisionless Hosting for Rails Apps is Revolutionary

Leia em Português

This item in japanese


Heroku debuted a commercial version of their Rails hosting solution last week, after a free beta stage that lasted over a year. They describe their service as "provisionless deployment" because it operates and scales automatically, without any system administration. While it is more expensive than alternatives and (for now) is based on Amazon's EC2 cloud with its accompanying SLA limitations, we think that they have a solid offering that is worth further examination.


Last week a couple of my engineers and I spoke to James Lindebaum, co-founder of Heroku, to pick his brain about the service. He jovially calls his company a bunch of "Ruby guys". A little over a year and a half ago, with support from YCombinator, James and his two partners, Adam Wiggins and Orion Henry started working on a service to allow dead-simple deployment of Rails applications. We think that what they have accomplished is nothing short of revolutionary.


Using Heroku, deployment of a new Ruby web application from scratch is accomplished with little more than a handful of commands from your terminal. No emails, phone calls or support tickets needed. We've been using their service at Hashrocket to host our internal staging environments and I can attest, it is unlike any other deployment experience you've ever had. Capistrano setup and deployment is a thing of the past with Heroku. After registering with the service and creating a new application instance in Heroku's cloud via their command-line tool, deployment is as easy as typing "git push heroku master".


The push triggers a processing hook which compiles your application into a self-contained, read-only instance Heroku calls a “slug”. It is automatically tested to assure that it can actually start. Gem dependencies are automatically installed and maintained via a .gems manifest file in your application's root directory, one of the only differences from a plain-vanilla Rails application. It's worth mentioning that Merb and Sinatra (actually, any Rack) applications are supported too.


Once the push succeeds, the slug is instantiated in one or more slots in a specially-designed grid computing environment, where it is given access to its database and cache information, and brought to life. The only major database supported is Postgres. According to James, Heroku does not currently support MySQL because it does not have transactional DDL execution.


Once a slug is activated, it becomes a fully-functioning web application called a “dyno”. Each dyno is a  process running on a server in the grid, and contains a unique copy of the application code, framework, middleware, Rack, application server, Ruby virtual machine, and POSIX environment. The app server used in a dyno is their slightly-modified version of Thin, with a 250 MB memory allocation.


In response to changing demand, Heroku’s intelligent infrastructure can launch additional, fully-independent dynos at new locations in the grid, or shut down existing idle ones. Startup time for a new dyno is less than 2 seconds, a fact that gives Heroku’s platform an unprecedented level of dynamism. The custom routing system can actually put a request "on hold" while it spins up a new dyno instance in order to meet high demand. Four dynos give the equivalent compute performance as one server instance in conventional environments.


Heroku's grid itself is built on a robust cloud computing infrastructure which allows it to expand and contract as required to accommodate as many dynos from as many different applications as necessary. Above the grid is a sophisticated and highly concurrent routing mesh that allocates requests among the dynos. Additional elements, such as an HTTP cache and a memory cache, reduce the requests to the dynos and database, respectively.


According to James, the routing mesh is proprietary and an important part of Heroku's innovation. The initial version of the system was implemented as Nginx C-modules and worked well until they reached about 10,000 applications deployed and performance started suffering. The second version of the routing system is written in Erlang and is working very well.


Heroku itself is hosted on a pool of extra-large EC2 instances. I asked James how much of a premium he charges over direct usage of EC2, a question he found hard to answer. Since Heroku includes a full system architecture that would need 6 or 7 EC2 instances to replicate for a single app, it's hard to draw a valid price comparison between the two services. On the other hand, the ease with which new Heroku dynos can be activated and deactivated means that cost savings from carefully managing consumption is easier to accomplish than with normal EC2 deployments.


Heroku's pricing model is designed to charge users for only the resources they consume, and to meet the needs of users of all levels. There are a variety of tiers to accommodate everyone, from enterprises with large applications and millions of unique hits per month, down to entry-level users. Prices range from thousands of dollars a month down to less than a hundred, and the platform includes a free offering great for testing the service and rapid prototyping. As mentioned earlier, we've been using the free offering for internal staging deployments and it works very well.


Heroku’s service has been battle tested during an extended beta period in which over 25,000 Ruby apps have been deployed to the platform by more than 23,000 different developers. By conservative estimates, this makes Heroku’s platform 10 times larger than the next most popular Ruby deployment provider. Even though the commercial offering is new, James told us that he's had paying customers right from the beginning and that with support from his investors, they are ready to offer a strong and lasting commitment to new clients. (Heroku raised a $3MM Series A from Redpoint Ventures in May 2008.)


Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • It really is as easy as Obie claims

    by Jeremy Weiskotten,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I recently launched Twackit and chose Heroku over a VPS. I have absolutely no regrets! Initial configuration and deployment took less than 30 minutes and the application has worked without a hiccup.

  • Heroku Rocks

    by Tom Mullwicky,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I started using Heroku for some personal projects, and over the last couple of months I've launched several serious production apps with them. It is truly excellent, I couldn't be happier. Others may disagree, but for me their pricing is right inline with the amount of productivity I'm gaining (and I am damn good at deploying ruby apps to slicehost).

  • This is the sex...

    by Rick Branson,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    There aren't enough explicit adjectives to describe how awesome Heroku is. It's like a developer's shark with frickin' laser beams attached to their head, or a flying car right fucking now. For developers with web applications that will fit within the Rails + Heroku setup, which is like 80% of everything out there, this is a dream come true. Being involved in building a dynamic, scalable cloud computing production architecture, I have an infinite amount of respect for what they've achieved. Just the idea that they can hold a request while a new dyno spins up is remarkable. Even with a ton of custom code made by badasses who write unit tests for their assembly code, this is such an error-prone process that involves linking together so many components on so many different systems. Nothing but respect. I would work with these guys in a heartbeat... for free.

  • Not ready yet

    by John Holman,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    From attending their RailsConf demo, I think their stuff is slick but the product's still pretty half-baked. They couldn't even get a GEM to install, and only a command line tool (really?).

  • Morph has been doing this for quite some time

    by Robert Dempsey,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    We've been using for easy deploys for over a year. I can get an app up and going there in less than 5 minutes from start to finish. Having said that though, there are tradeoffs. Morph is a PaaS offering that sits atop EC2, and has it's own load-balancing hardware in a separate datacenter.

    In return for being able to quickly deploy, scale my application with the click of a mouse, having the app and database servers backed up automatically, and not having to manage anything, I give up having SSH access to the server, file system access, and I have to vendor all my gems (which is good practice anyhow). This setup works well for many applications out there though. and their pricing is easy to understand.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p