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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I think puma just added in some new features along this line. ~Spaceghost On Fri, Feb 8, 2013 at 11:46 AM, S Ahmed <sahmed1020-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.