Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any easy instructions for migrating from Phusion Passenger to Unicorn?

I am running into deployment issues with Phusion Passenger on a fairly large app: stalled processes on high loads, idle processes, slow firing up of an instance, etc. So I was looking into Unicorn, which I like very much from an architecture/performance perspective.

Are there any easy to follow migration guides to go from Nginx Phusion Passenger to Unicorn?

like image 945
ginger72 Avatar asked Feb 08 '10 15:02

ginger72


2 Answers

This question is old, and my answer doesn't answer the question directly, but I just came across a fairly details deployment guide for a stack using Unicorn, nginx, etc:

http://techbot.me/2010/08/deployment-recipes-deploying-monitoring-and-securing-your-rails-application-to-a-clean-ubuntu-10-04-install-using-nginx-and-unicorn/

Thought I would throw it out there for people who come across this question in the future.

like image 58
Joel C Avatar answered Sep 30 '22 16:09

Joel C


Because newer versions of Rails use Rack under the hood, it should be fairly easy to switch between web servers. When simply starting Unicorn with your application in a development environment, what specific issues are you encountering?

You should be able to keep using Nginx as a reverse proxy. From what I've gathered, Unicorn is supposed to do the load balancing across workers itself, because it only has a single listening socket/port it shares across them. Thus Nginx should normally be configured as a very simple reverse proxy and asset server, without load balancing. (Except, of course, when spreading workers across machines.)

Is there a specific dependence on Passenger within your application that you're hoping to solve? Or are you asking for generic deployment instructions for Unicorn?

like image 25
Stéphan Kochen Avatar answered Sep 30 '22 14:09

Stéphan Kochen