stravid / hulkort

Track and save your Git commit statistics
hulkort.com
1 stars 0 forks source link

Rails Webserver #26

Closed stravid closed 12 years ago

stravid commented 12 years ago

Usually Rails uses WebBrick, as far as I know it's slow. There are alternatives: Thin and Unicorn. On Heroku we can decide which we want to use.. I think we should do some research on this!

tombu commented 12 years ago

I already used Thin in my last QPT. It was necessary for my project because I did parallel HTTP requests and the gem I used (typhoeus) required it. I don´t have a big knowledge about it at the moment but it met my needs back then.

stravid commented 12 years ago

I searched and read a little bit yesterday, my conclusion: Thin / Unicorn are very likewise regarding memory / performance. But the way Unicorn works it allows higher concurrency rates, especially with setups like on heroku. On the the other hand I think it's more work to get running with unicorn, but we would benefit more.

Would be great if can read some stuff too (I listed my sources) and post your thoughts!

http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/ http://snaprails.tumblr.com/post/441654760/thin-vs-unicorn-performance-benchmark http://cmelbye.github.com/2009/10/04/thin-vs-unicorn.html https://github.com/blog/517-unicorn http://news.ycombinator.com/item?id=2608183 http://www.mikeperham.com/2011/06/01/optimizing-heroku/

stravid commented 12 years ago

We now use Unicorn in production. Let's see what happens :-)

Locally you can still use rails s which will start Webrick. Or you can start Unicorn with foreman start (remember to install the Foreman gem with gem install foreman)