On Jul 5, 2006, at 5:45 PM, Bryan Liles wrote:
> On Jul 5, 2006, at 8:40 PM, Jason A. Hoffman wrote:
>> On Jul 5, 2006, at 4:59 PM, Bryan Liles wrote:
>>
>>> If this was in the docs, I've missed it.  How can I have multiple
>>> mongrel clusters on a server?  All the documentation that I am  
>>> seeing
>>> seems to assume that I am only running one cluster.
>>
>> For different applications?
>>
>> You just run the "mongrel_rails cluster::configure" command in the
>> root of each rails application and then edit config/
>> mongrel_cluster.yml to start at different port numbers, and make sure
>> that the number of processes doesn't overlap any of the ranges.
>
> I understand that part.  I'm more interesting the apache proxy
> balancer integration.

Everything with mod_proxy and mod_proxy_balancer can be in virtual  
hosts. We tend to define them in a directory (as single files so they  
can be managed and distributed from one location).

So in a simple setup, you would define multiple proxy balancers like

<Proxy balancer://joyent-mongrel>
BalancerMember http://10.7.108.15:8000
BalancerMember http://10.7.108.15:8001
BalancerMember http://10.7.108.15:8002
BalancerMember http://10.7.108.15:8003
BalancerMember http://10.7.108.15:8004
BalancerMember http://10.7.108.15:8005
BalancerMember http://10.7.108.15:8006
BalancerMember http://10.7.108.15:8007
BalancerMember http://10.7.108.15:8008
BalancerMember http://10.7.108.15:8009
</Proxy>
<Proxy balancer://koz-mongrel>
BalancerMember http://10.7.108.15:9000
BalancerMember http://10.7.108.15:9001
BalancerMember http://10.7.108.15:9002
BalancerMember http://10.7.108.15:9003
BalancerMember http://10.7.108.15:9004
BalancerMember http://10.7.108.15:9005
BalancerMember http://10.7.108.15:9006
BalancerMember http://10.7.108.15:9007
BalancerMember http://10.7.108.15:9008
BalancerMember http://10.7.108.15:9009
</Proxy>

And then have different virtual hosts point to different balancers.

<VirtualHost 207.7.107.15:8080>
ServerName connector1.joyent.com
ProxyPass /logs !
ProxyPass /icons !
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /javascripts !
ProxyPass / balancer://joyent-mongrel/
ProxyPreserveHost On
</VirtualHost>
<VirtualHost 207.7.107.15:8080>
ServerName connector2.joyent.com
ProxyPass /logs !
ProxyPass /icons !
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /javascripts !
ProxyPass / balancer://zonekoz-mongrel/
ProxyPreserveHost On
</VirtualHost>
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to