Thin vs. unicorn for development mode on Mac?
Asked Answered
W

2

19

I'm shocked that this question hasn't been asked already, but I swear I looked everywhere. Are there advantages of thin over unicorn, or vice versa, when running Rails 3 in development mode?

Whopper answered 7/7, 2011 at 18:44 Comment(0)
A
6

I decided to go with Thin for development because Heroku runs my apps on Thin in production.

It's always a good practice to make your dev ENV match your production ENV as much as possible.

Here's a couple breakdowns of Thin vs. Unicorn, although they're a little old.

http://snaprails.tumblr.com/post/441654760/thin-vs-unicorn-performance-benchmark

http://cmelbye.github.com/2009/10/04/thin-vs-unicorn.html

Astringent answered 9/7, 2011 at 1:8 Comment(3)
Does Thin have any trouble reloading classes in development mode? Does it tail the log the way WEBrick does? I'll award "correct" to any answer that'll tell me whether either server can function as a drop-in replacement for WEBrick. Thanks!Whopper
The shotgun gem reloads files just fine under thin.Logicize
I think that Heroku wiki pages instruct us to use Unicorn, last I've read.Koerlin
G
6

Unicorn runs very well on Heroku now, you may want to check this out: http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/

And of course this to get a better idea of why you'd want to use Unicorn: https://github.com/blog/517-unicorn

I'm moving away from Thin now myself after exploring this more fully.

**I should note, this is only possible on the Celadon Cedar stack, which should be something you're shifting towards at this point anyway.

Giddens answered 5/11, 2011 at 18:22 Comment(2)
Thanks! I'm more interested in development mode, though - i.e. what I should run locally on my Mac.Whopper
Well, i'm running it locally now. It is even more verbose for me locally than thin was. My goal when setting up environments is to match them as closely to production as possible and then of course the additional verbosity in unicorn vs thin is a real plus for me in development mode. So yeah, that's what I'm doing locally on my mac and am quite happier with it.Giddens

© 2022 - 2024 — McMap. All rights reserved.