Hi all,

On sites with large numbers of ProxyPass directives, these directives are matched in turn on every request, and this can take a lot of time, especially when we've already done a location walk.

A simple optimisation is to allow this existing syntax:

<Location /foo>
  ProxyPass http://somewhere/foo
</Location>

to simply be a single mod_proxy alias in a per-directory context.

If this syntax is used, the need to walk the proxy alias list is eliminated, and a significant amount of time is saved.

This also has the side effect that ProxyPass inside LocationMatch starts working properly (it was broken before):

<LocationMatch ^/foo(.*)>
  ProxyPass http://somewhere/$1
</LocationMatch>

In theory, the "ProxyPass /foo http://somewhere/"; and "ProxyPassMatch ^/foo(.*) http://somewhere/$1"; syntaxes can be deprecated, as Location/ LocationMatch is way simpler to handle.

Regards,
Graham
--

Attachment: httpd-mod_proxy-perlocation.patch
Description: Binary data


Reply via email to