[Mongrel] balancer://mongrel_cluster

Kris Leech krisleech at interkonect.com
Tue Sep 5 03:46:40 EDT 2006


hemant wrote:

> 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.

So Mongrel is threaded but can't process concurrent requests so requires 
multiple instances...
Am I getting that right?

>
> 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 
> <mailto:wyhaines at gmail.com>> wrote:
>
>     On 9/4/06, Kris Leech <krisleech at interkonect.com
>     <mailto: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 <mailto:Mongrel-users at rubyforge.org>
>     http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
>
>
> -- 
> nothing much to talk
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Mongrel-users mailing list
>Mongrel-users at rubyforge.org
>http://rubyforge.org/mailman/listinfo/mongrel-users
>




More information about the Mongrel-users mailing list