views:

1945

answers:

5

What is your experience using Ruby on Rails on Heroku in production mode?

Apart of the issue of the expensive https, do you see any drawback in the way it manages processes, memory and storage?

The people at Heroku is quite nice and I'm sure they are willing to answer my questions, but I would like some opinions in the customer side.

+4  A: 

Seeing as how every app/website/blog/doggie day care center has its differences, I think your best bet is to try it out. The pricing is cheap enough that you can't really go wrong for a month or so.

We have two relatively small websites running on Heroku and they work great. Haven't noticed any problems, yet, aside from their recent removal of access to your Zerigo add-on to manage DNS (which we've been assured will be back shortly).

If bumping your dynos and database don't handle your load, then you might have to move, but I think it's worth a shot.

theIV
+1 for "doggie day care center"
Wayne Conrad
+37  A: 

I have two systems in production on Heroku (1 Dyno, 6 Dynos respectively), and I am about to launch a pretty significant project using the platform.

I absolutely love it.

I want to focus on the value I provide in the chain - a carefully crafted application, with great user experience and great support.

The real value of Heroku is that all of the administration overhead is removed. I have previously worked with VPS hosting (Slicehost, Linode) and found that tuning a single application stack can be really quite complicated without a dedicated sysadmin resource. Once you start getting into the realm of multiple servers you can find yourself mired in system administration and not application development and support.

Heroku provide a stack that includes a reverse proxy and http cache on top of the actual Rails app process management ... setting all of this up within a VPS environment would be quite a serious and expensive undertaking.

If a sysadmin resource is $100/hour and a dyno is $36/month, you can go a long way throwing dynos at your application before the cost-benefit starts to change.

Storage prices have also just changed - you now get 20gb of shared database resource for $15/month which really changes the game for many smaller applications.

Memory is no longer something you have to worry about ... a dyno seems to automatically have enough memory to run. Which makes sense - Thin, Mongrel, Passenger all load the Rails application instance into memory, making the memory resourcing requirements quite predictable (outside of memory leaks, of course). With Heroku, if there is a problem with an instance, it is simply shut down and a new one started - all of which happens transparently.

The other big BIG win for me is that that Heroku's routing mechanism ensures a nearly linear response ... if a request takes 100ms to process, your throughout will essentially be 10 requests/second. The Heroku routing mesh ensures your processes don't get overloaded within reasonable load limits (if you get truly hammered you will need to add resources, but short-term burst loads seem to be handled quite well).

On my current project, I have performance tested each major feature as it has been built to get a feel for the overall performance of the system, and the stack itself pretty much flies - untuned read-heavy requests in my app average sub-50ms response times (single dyno, shared database).

I am yet to hit a bottleneck in the platform itself.

All of this said, the underlying assumption with Heroku is that you have a "vanilla" rails application - database, CRUD app, etc etc. Some things simply aren't possible on Heroku.

There is a certain point in scale where running your own servers (particularly outside a virtualised stack) becomes much more cost effective (GitHub's recent move from EngineYard to RackSpace highlights this point).

As mentioned by @theIV, the best thing to do is try it and see. It is very easy to setup an app, and there are no architectural changes required (apart from not using the local filesystem (not a problem for me as I always push user-generated files to Amazon S3). The basic NewRelic RPM Add-On is free, so you can get instant insight into your app performance.

Toby Hede
Thank you Toby!
Victor P
very helpful answer, you get the prize!
Victor P
This is fantastic!
Ryan Bigg
+4  A: 

What I love about Heroku is that you nearly have everything you need without any configuration overhead. The only thing I currently miss is a document oriented database like Mongo DB.

I really like the easy to use caching architecture provided by their Varnish proxy. It could not be easier to cache requests. Recently I had to build a service which consumes data from a slow server and turns it into JSON which is then used to feed a JQTouch application on an iPhone. Since there was no need to store the data in a database I simply used HTTP Headers to set proper expire dates and I was good to go. I don't know how long it would have taken me to set up a similar infrastructure. But it definitively would have taken some time.

But I think the most amazing fact is that you simply have to push your repository and everything works out of the box.

t6d
Have you thought about connecting to a database on MongoHQ if you want Mongo access? I'm currently in the process of setting up a very small website / app for my software commpany and am planning to use Heroku in combination with the free or cheapest MongoHQ plan.
jkp
+7  A: 

I have been deploying an app to Heroku over the past 3 months that has reached the private beta stage, and we anticipate a full launch very soon. (Our prod app is currently at 4 dynos.) I will say that overall I am pleased with the administrative and deployment convenience that Heroku offers, but it certainly has a couple of imperfections.

I will acknowledge the pros firstly. I have experience running my own Rails apps on Thin clusters reverse-proxied into Nginx on my own VPS for some time. It is a bit of a pain to get set up, but generally nothing that an intelligent developer couldn't handle with some learning and practice. Because I did not have time to go through this set-up stage, but I also really needed a high-performance production environment, I was excited to find the sophisticated solution that Heroku has to offer. The ease of deployment and flexibility of its system have saved me more than enough hours to realize an ROI since I have been able to largely focus on application development. Deployment is basically as easy as a git-push, and scaling up dynos can be handled with a couple of mouse clicks.

The complaints I have are, however, a little concerning. I want to reiterate what theIV mentioned about Heroku removing the Zerigo add-on. They did this with no forewarning, and it actually came at a time when I needed to make a change to some of my DNS records. To Heroku's defense, I will say that within an agitated support ticket or two later (whether that expedited the situation) they did restore access to the add-on. But by then, I had already jumped ship with our DNS and migrated our name servers into a fully-fledged Zerigo (paid) account.

This is not the only hiccup I have experienced with Heroku so far. About a month or two ago and for a period of a couple weeks, I was experiencing really unreliable deployments. I would get sporadic taps errors that would block deployment. (Taps is Heroku's home-grown database migration Rubygem.) After a support ticket and a couple of days this did get sorted out and the problem was apparently that an incorrect version of taps was deployed onto some dynos. Through dumb luck I did not have this issue botch any deployments to Prod., but this experience has undermined my trust in Heroku's reliability.

So far Heroku's support has been very helpful, but sometimes not as responsive as one would desire for a host of a production website. This is exacerbated by the fact that they currently only offer email-based support, and there is no emergency phone line. I believe I read or heard somewhere that they plan to implement a support phone line, but who knows when that will happen. (They seem to be somewhat slow to convert their "coming soon" add-ons to add-ons that you can actually use!)

I want to double back and underline my opinion that Heroku has been generally a good experience, but their system isn't as slick as it ought to be yet. It really feels like they don't have the human resources that they need to be able to support their business as fully as they should, but I am optimistic that they will improve on this.

Heroku has inspired me to seek out a cloud host for my personal sites. I'm not made of money, so I went with Rackspace Cloud and will just have to find time to set everything up so I can migrate my personal sites from my current VPS host (RootBSD, who I would recommend highly if you are looking for a VPS). In fact, I think when I get comfortable enough with my set-up on Rackspace Cloud, and probably also after my company is able to hire a full-time admin, I very well might have us migrate our app from Heroku to Rackspace Cloud for 2 reasons: 1) When we get to the point where we have a large number of dynos, Rackspace will probably yield a greater ROI, and 2) They have a support phone line; I have called once so far and was immediately answered and promptly supported by a friendly voice!

However, until we reach the point where I have time to worry about handling our own server admin, Heroku will spare me this headache (especially concerning server security)!

David Rivers
A: 

Heroku is great. There are some limitations but those are being addressed. There is also a much cheaper solution for SSL in beta. I find things to be wicked fast with the reverse proxy.

schof