Jim Jagielski wrote:

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>

Seems to be that we should simply make ProxyPass more
pattern aware... We don't need a full regex for 95% of
the cases, and so we'd have a nice faster impl.

Needing to switch to (and load in) mod_rewrite for something
that the proxy module should do itself seems backwards :)
Agreed.
By the way, ProxyPass /servlet/ balancer://mycluster
does the 2nd part of what you want, it's just the
'*.jsp' stuff we're missing... So basically,
ProxyPass more JkMount-like...
Gotcha.

--
Jess Holle

Reply via email to