[Zope] Apache ProxyPass + Zope == bad?

Richard Barrett R.Barrett@ftel.co.uk
Wed, 13 Mar 2002 15:42:01 +0000


At 12:13 13/03/2002 +0000, Stephan Goeldi wrote:
>>As a generalisation, using mod_proxy is probably less resource demanding
>>that using mod_rewrite and an entirely sensible choice in many cases.
>
>What leads you to this conclusion?

I should probably have said "...arguably less resource demanding...".

I would expect the amount of code that needs to be executed to match and 
rewrite the URL, and get the proxy request on the road is less with 
mod_proxy than mod_rewrite.

My reasoning is that:

1. using string comparison for a match at the head of a string and string 
concatenation to construct a revised string (a la mod_proxy) is probably 
cheaper in terms of memory used and mill time expended than pattern 
matching and substitution with a regular expression engine (a la mod_rewrite).

2. as with many things, deciding not to do something can often be a bigger 
burden that doing something. I would expect mod_proxy to faster deciding 
that an incoming URL did not match the ProxyPass criteria by using string 
comparison for a match at the head of a string than mod_rewrite running a 
regex match, even if mod_rewrite is using a compiled expression.

But this isn't a religious issue for me. I'm happy to concede the field 
rather than argue the pros and cons of when to use ProxyPass (for simple 
URL transformations in my view) and when to use RewriteRule (only when 
ProxyPass cannot handle it in my view).