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/pe开发者_JS百科rformance perspective.
Are there any easy to follow migration guides to go from Nginx Phusion Passenger to Unicorn?
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.
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?
These issues have since been solved in Phusion Passenger. Phusion Passenger 4 fully supports asynchronous process spawning, offers protection against stuck processes, supports rolling restarts, etc. From an architectural perspective, Phusion Passenger 4 has adopted a hybrid evented/multi-threaded/multi-process design. It's like a merge between Unicorn, Rainbows and Puma, but it offers easy configuration options to seamlessly switch mode.
精彩评论