Unicorn on shared apps platform
devamol at yahoo.com
Tue Feb 26 16:08:14 UTC 2013
Thanks. Did went through Phusion Passenger Enterprise 4 features, you guys did neat work Hongli. However the cost of it is driving us to check on alternate solutions.
Can one signal unicorn to increase workers or just spin new set of workers. Any one tried alicorn? https://github.com/bensomers/alicorn.
Provisioning double memory on deploy can be solved differently by spinning new server that has upgrade and moving load balancer to divert trafic, the netflix way.
----- Original Message -----
From: Hongli Lai <hongli at phusion.nl>
To: unicorn list <mongrel-unicorn at rubyforge.org>
Sent: Tuesday, February 26, 2013 7:36 AM
Subject: Re: Unicorn on shared apps platform
On Tue, Feb 26, 2013 at 4:08 PM, Amol Dev <devamol at yahoo.com> wrote:
> We are hosting multiple Rails applications on same server and using Passenger + Apache. I can see Unicorn be useful for seamless deploys, few questions running it on Rails platform with 50+ rails apps:
> a) How does unicorn scale if app is known to be slow with long running quieres to database? Is there a way to a have master worker spin up new workers aka dynamic workers?
Unicorn is designed for short-running requests. Long-running requests
are best taken care of with app servers designed for that purpose, for
example Rainbows! or Phusion Passenger Enterprise 4. Both app servers
can be used in combination with Apache or Nginx. Rainbows! is designed
for a reverse proxy setup while Phusion Passenger Enterprise 4 can
also integrate with the web server.
As far as I know only Phusion Passenger supports dynamic workers.
Unicorn and Rainbows! are both designed for a static number of
workers. Unicorn and Rainbows! allow modifying the number of workers
during runtime through signals, but not automatically according to
traffic as is done by Phusion Passenger.
> b) Can Unicorn be configured to start with zero worker and master spawning first worker as first request comes in? Very useful to stack multiple apps that are not used all the time.
No, because it does not support spawning processes based on traffic.
As far as I know only Phusion Passenger does this.
> c) Unicorn for zero lost connection (no downtime during deploy and changes) needs new workers spinned up before old workers are sent USR2 signal, does this not mean that one has to provision double memory for servers?
Yes it does. Although it's possible to change this behavior through a
script that sends signals in a certain order.
Phusion | Ruby & Rails deployment, scaling and tuning solutions
E-mail: info at phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
Unicorn mailing list - mongrel-unicorn at rubyforge.org
Do not quote signatures (like this one) or top post when replying
More information about the mongrel-unicorn