httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject mod_proxy: optimising ProxyPass per directory
Date Wed, 20 Oct 2010 23:43:23 GMT
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
--

Mime
View raw message