unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Hongli Lai <hongli@phusion.nl>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Unicorn on shared apps platform
Date: Tue, 26 Feb 2013 16:36:23 +0100	[thread overview]
Message-ID: <CAM3ce8G1nFJehhYA36=LPu+V901KiaU8hm=es5YOVYY_2+9jkg@mail.gmail.com> (raw)
In-Reply-To: <1361891291.86483.YahooMailNeo@web120106.mail.ne1.yahoo.com>

On Tue, Feb 26, 2013 at 4:08 PM, Amol Dev <devamol@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

Web: http://www.phusion.nl/
E-mail: info@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

  reply	other threads:[~2013-02-26 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 15:08 Unicorn on shared apps platform Amol Dev
2013-02-26 15:36 ` Hongli Lai [this message]
2013-02-26 16:08   ` Amol Dev
2013-02-26 16:55     ` Ben Somers
2013-02-26 18:15       ` Amol Dev
2013-02-26 17:26   ` Eric Wong
2013-02-26 17:30     ` Hongli Lai
2013-02-26 17:46       ` Eric Wong
2013-02-26 18:18     ` Amol Dev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM3ce8G1nFJehhYA36=LPu+V901KiaU8hm=es5YOVYY_2+9jkg@mail.gmail.com' \
    --to=hongli@phusion.nl \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).