[Mongrel] balancer://mongrel_cluster

hemant gethemant at gmail.com
Mon Sep 4 14:31:38 EDT 2006

Somebody asked similar question earlier i guess...why run multiple instances
of mongrel..when it is threaded?
The simple answer is...ruby threads are not native threads.And hence..all
the ruby threads are running your current interpretor.

Also, if you have multi-core CPUs..you won't be able to take advantage of
that with single mongrel process..even though it is threaded and hence in
production mode....you should run 8 to 10 mongrel servers( as per official
documentation,but depends upon your hardware and hit rate)

Again..i could be wrong..but thats my humble opinion.

On 9/4/06, Kirk Haines <wyhaines at gmail.com> wrote:
> On 9/4/06, Kris Leech <krisleech at interkonect.com> wrote:
> > Jeroen Houben wrote:
> > >My understanding is that one mongrel can only handle one request at a
> > >time. Therefore 3 mongrel can process 3 request simultaniously.
> > >
> > >
> > I see, and this is because Mongrel is not threaded, so its kind of like
> > replicating threads by using whole instances.
> Mongrel is threaded.  It will create a new thread for each connection.
> However, Rails does bad, unfriendly things when one tries to run
> multiple threads of it at the same time.  So the Mongrel handler for
> Rails synchronizes Rails calls so that only one runs at a time.  Thus,
> to handle simultaneous Rails requests with Mongrel one needs more than
> one Mongrel process.
> Kirk Haines
> Kirk Haines
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

nothing much to talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060905/2c683866/attachment.html 

More information about the Mongrel-users mailing list