Does unicorn work like phusion in that it automatically forks based on
traffic levels?

Or is that what thin does also?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Frederick Cheung at Feb 8, 2013 at 10:19 am

    On Friday, February 8, 2013 4:34:26 AM UTC+8, Gitted wrote:
    Does unicorn work like phusion in that it automatically forks based on
    traffic levels?
    No - with unicorn you have a set number of workers (although you can change
    this by sending the appropriate signal to the master process)

    Fred
    Or is that what thin does also?
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zN9KcTxvrEkJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • S Ahmed at Feb 8, 2013 at 7:24 pm
    I see, so is phusion the only one that automatically grows to meet demand?

    On Fri, Feb 8, 2013 at 2:27 AM, Frederick Cheung wrote:


    On Friday, February 8, 2013 4:34:26 AM UTC+8, Gitted wrote:

    Does unicorn work like phusion in that it automatically forks based on
    traffic levels?
    No - with unicorn you have a set number of workers (although you can
    change this by sending the appropriate signal to the master process)

    Fred
    Or is that what thin does also?
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/zN9KcTxvrEkJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Johnneylee Rollins at Feb 9, 2013 at 1:10 am
    I think puma just added in some new features along this line.

    ~Spaceghost

    On Fri, Feb 8, 2013 at 11:46 AM, S Ahmed wrote:

    I see, so is phusion the only one that automatically grows to meet demand?


    On Fri, Feb 8, 2013 at 2:27 AM, Frederick Cheung <
    frederick.cheung@gmail.com> wrote:
    On Friday, February 8, 2013 4:34:26 AM UTC+8, Gitted wrote:

    Does unicorn work like phusion in that it automatically forks based on
    traffic levels?
    No - with unicorn you have a set number of workers (although you can
    change this by sending the appropriate signal to the master process)

    Fred
    Or is that what thin does also?
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/zN9KcTxvrEkJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sunny Juneja at Feb 9, 2013 at 3:39 am
    I think these posts might help you Gitter:
    http://stackoverflow.com/questions/4113299/ruby-on-rails-server-options
    http://tomayko.com/writings/unicorn-is-unix
    On Thursday, 7 February 2013 12:34:26 UTC-8, Gitted wrote:

    Does unicorn work like phusion in that it automatically forks based on
    traffic levels?

    Or is that what thin does also?
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/S_rHx4SHTeAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Hongli Lai at Feb 9, 2013 at 9:54 am

    On Thursday, February 7, 2013 9:34:26 PM UTC+1, Gitted wrote:

    Does unicorn work like phusion in that it automatically forks based on
    traffic levels?

    Or is that what thin does also?
    At present, and as far as I know, Phusion Passenger is the only *working*
    server that supports forking more worker processes based on traffic.
    Apache's FastCGI module is supposed to be able to do that, but it's broken
    in various ways so nobody uses it.

    As others mentioned, Unicorn is single-threaded, multi-processed. It cannot
    adjust the number of processes automatically based on traffic, but require
    you to command it to do so.

    Thin is a single-thread, single-process, evented server. It does not fork
    worker processes for you at all, and does not manage worker processes like
    Unicorn and Phusion Passenger does. Since Rails and most Ruby frameworks
    are not very suitable to the evented I/O style of programming[1], one
    usually needs to run multiple Thin processes in parallel to achieve
    concurrency. The number of processes is defined by the user, and can be
    adjusted while Thin is running, but not automatically based on traffic.

    Puma does not support forking more worker processes based on traffic
    either. That's because Puma is a multithreaded server: it creates threads,
    not processes. I do not know whether Puma can create or shutdown threads
    on-the-fly based on traffic, but since threads are lightweight there is
    relatively little advantage in adjusting the number of threads on-the-fly
    compared to adjusting the number of processes.

    Phusion Passenger Enterprise has, and Phusion Passenger 4 will, introduce
    all kinds of new features that you may be interested in. Phusion Passenger
    4 *also* support multiple threads, on top of supporting multiple processes.
    It will allow the user to choose the I/O model, number of threads and
    number of processes. Here's a short comparison between Phusion Passenger
    and Unicorn/Thin: http://news.ycombinator.com/item?id=5097667

    [1] I mention this for completeness sake. There are ways to get around it,
    e.g. using fibers, but I dislike that solution because I think they're
    error prone and can introduce concurrency issues worse than even
    multithreading. With fibers you still have to worry about concurrency but
    now you suddenly don't have mutexes anymore that can help you. You have to
    be very careful about where to yield, and also where *not* to yield.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GjD5ZcX_VkgJ.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 7, '13 at 8:34p
activeFeb 9, '13 at 9:54a
posts6
users5
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase