Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use thin or unicorn on Heroku Cedar

I recently 'upgraded' my app to the cedar platform on Heroku. By default, I am using thin as a web server. But I have always been tempted to use unicorn for concurrency and having my dyno dollar go father. But I worry there are some gotchas in using something other than Thin.

Does anyone have real-life experience with this decision?


Notes:

  • This was the article that got me excited about the idea: http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/
  • I know every app is different, and that you should build a staging env and try it for yourself. But if it looks great in your staging env, are they any pitfalls that we should know about?

I want to know reasons why everyone shouldn't do this

like image 469
Jonathan Avatar asked Mar 20 '12 17:03

Jonathan


2 Answers

Update -- 3 months later.

I have been using unicorn in production for 3 months, and I have been very pleased. I use 4 unicorn workers per dyno.

One thing you do need to keep an eye out for is memory consumption and leakage. In effect instead of having 512MB of memory per dyno -- you have that divided by the number of heroku workers. But keeping that in mind -- it has been a great cost saver

like image 62
Jonathan Avatar answered Sep 20 '22 18:09

Jonathan


No reason not to do it - I use Unicorn on Heroku with much success.

like image 45
John Beynon Avatar answered Sep 20 '22 18:09

John Beynon