6 ms·
It depends on your needs and the needs of your application. These days, I almost never even consider Passenger because I find Unicorn and Puma easier to setup a
by rubiquity 12y ago
It depends on your needs and the needs of your application. These days, I almost never even consider Passenger because I find Unicorn and Puma easier to setup and scale. The benefit of Passenger being "deploy many apps on one machine" sounds like a good way to get yourself into a single point of failure situation for all of your applications.
I almost always start with Puma[0]. It uses threads, so your code, as well as any gems you are using, have to be threadsafe. Chances are you'll be ok. Puma shines for applications that do a lot of IO, which is most Rails applications. The type of performance you get out of Puma depends on the hardware underneath, but on a 1:1 comparison Puma tends to outperform Unicorn.
In the odd chance that your app is CPU bound a lot, go with Unicorn. It's fairly performant but due to it's single threaded nature you'll need to run more Unicorn workers and thus use more RAM.
As far as deployment, Capistrano is a lot better since version 3. If you're only deploying to one machine checkout Mina[1] or Recap[2]. Mina actually generates a shell script of your deployment tasks, which is pretty neat. Recap only works for Ubuntu.
0 - http://puma.io http://puma.io
1 - https://github.com/mina-deploy/mina https://github.com/mina-deploy/mina
2 - https://github.com/tomafro/recap https://github.com/tomafro/recap
- rubiquity 12y agoI wonder why I was downvoted. Tough crowd.