Heroku is Not for Beginners

Posted by Jim on 08/27/2012 in Rails Hosting Information, Rails Community, and Heroku.

Sure, like a drug dealer, they give you a little bit for free. But, how good is the stuff?

Heroku's main appeal is to take away the DevOps hassles and allow developers to "git push production" and not worry about what happens after the (insanely slow) deploy process. But, like most things in life, if it's too good to be true, then...yep, it's not true.

Heroku: The good, the bad, and the ugly

The Good:

  • See your app live on the Net for free.
  • Easily "heroku ps:scale web=10" to scale out your web tier or workers
  • Don't have to worry about log rotations, updating server software, creating your own deploy scripts, etc...
  • The Bad:

  • Once you get up and running a few dynos and workers, with a reasonable database, it's NOT cheap (i.e. you are spilling hundreds at this point).
  • Connectivity issues between dynos and third party services (e.g. Amazon S3) is too often unreliable.
  • Meet Virginia. Your web servers are forced into Amazon's Virginia datacenter, which is a serious problem if you need to target a specific area of the world to get faster speeds.
  • The Ugly:

  • TIMEOUT ERROR (And connection refused) HELL. Too many H12s and H18s for comfort. It's a nightmare for some apps.
  • CPU LIMITING. Heroku packs a gazllion of their dynos, presumably, onto large Amazon virtual server instances. When you are virtualizing an already-virtualized environment, you are going to run into CPU issues. We have seen requests that take 6 seconds only because they were allotted a total of 1 second of CPU time, over spurts, in that interval.
  • TOO MANY BLACK BOXES. You loose waaaaay to much customizability (and thus performance) when too many parts of your DevOps are behind the scenes.
  • Why Heroku *can* work for advanced developers

    Experienced developers that are building relatively simple apps that can be heavily HTML cached (and stuck up into a CDN) can probably save a little time by using Heroku for their Web tier. In addition, while spinning up your own VPS instances gives you a little bit of wiggle room if your code isn't 100% optimal, Heroku dynos are less forgiving and will punish you with lesser performance as a result.

    Thus, we recommend that most developers stay away from Heroku. If you have a relatively low traffic app (i.e. less than 20k hits a day), then you are fine running on VPS instances on hosts like DreamHost.