[Mongrel] balancer://mongrel_cluster

Kris Leech krisleech at interkonect.com
Tue Sep 5 03:44:26 EDT 2006


Vishnu Gopal wrote:

>mongrel_cluster is installed with the mongrel gem and makes it easy to
>serve multiple mongrel instances.
>
>`mongrel_rails cluster::configure -h` for help.
>  
>

Ummmm.... An earlier poster said mongrel_rails is mod_proxy_balancer, I 
thought the mod_* where compiled code, that about looks like ruby code?

>
>On 9/4/06, Jeroen Houben <jeroen at supercool.nl> wrote:
>  
>
>>Kris Leech wrote:
>>    
>>
>>>Jeroen Houben wrote:
>>>
>>>
>>>      
>>>
>>>>Kris Leech wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>A couple of questions please:
>>>>>
>>>>>What is the benefit of having more than one Mongrel/Rails instance on
>>>>>the same machine, could one instance not serve as many requests as say
>>>>>three instances?
>>>>>
>>>>>Is Mongrel Cluster a Apache add-in (like mod_*) or a separately  running
>>>>>load balancer which runs on a separate port, I could not work it out
>>>>>
>>>>>          
>>>>>
>>>>>from the sample Apache config...
>>>>
>>>>        
>>>>
>>>>>|# Redirect all non-static requests to cluster
>>>>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
>>>>> RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
>>>>>
>>>>>How does ||balancer://mongrel_cluster |work?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>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.
>>>
>>>      
>>>
>>Well I'm not entirely sure about that. I think mongrel can do threads
>>but you really shouldn't use Rails with threads.
>>http://david.planetargon.us/articles/2006/08/08/why-you-need-multiple-mongrel-instances-with-rails
>>    
>>
>>>>The balancer is a module for apache >= 2.1
>>>>the balancer itself is not a seperate process, the pack of mongrels of
>>>>course are seperate processes.
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>Thanks, does it replace mod_proxy_balance?
>>>
>>>
>>>      
>>>
>>No balancer://mongrel_cluster *is* mod_proxy_balancer, please look at
>>http://mongrel.rubyforge.org/docs/apache.html for more details.
>>
>>Jeroen
>>
>>_______________________________________________
>>Mongrel-users mailing list
>>Mongrel-users at rubyforge.org
>>http://rubyforge.org/mailman/listinfo/mongrel-users
>>
>>    
>>
>_______________________________________________
>Mongrel-users mailing list
>Mongrel-users at rubyforge.org
>http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
>
>  
>




More information about the Mongrel-users mailing list