On 10/29/2006 04:15 PM, Jess Holle wrote:
> Ruediger Pluem wrote:
> 
>> I guess we should create a directive like DefineWorker (I do not
>> really care about
>> the exact name), that enables the administrator to define / create a
>> worker.
>> That would be really handy for mod_rewrite as in the reverse proxy
>> case the number of
>> different backend targets are usually limited and known to the
>> administrator.
>> This would avoid the need for nasty tricks like "pseudo balancers"
>> with only one member.
>>   
> 
> Sounds good.
> 
> On a related note, our practice with mod_jk is to route only *.jsp,
> /servlet/*, and a few other URL patterns to Tomcat and let Apache handle
> everything else.  We also want to support load balancing with sticky
> sessions, of course.
> 
> That combination is pretty easy and straightforward with mod_jk.  It has
> been *baffling* with mod_proxy_ajp.  Perhaps we just haven't spent long
> enough on mod_rewrite, etc, but so far we're not getting anywhere...

How about

RewriteEngine On
RewriteRule ^(.*\.jsp|/servlet/.*)$ balancer://mycluster$1 [P]


<Proxy balancer://mycluster>
ProxySet stickysession=JSESSIONID nofailover=On
BalancerMember ajp://1.2.3.4:8009 route=tomcat1 max=10
BalancerMember ajp://1.2.3.5:8010 route=tomcat2 max=10
</Proxy>

Regards

RĂ¼diger

Reply via email to