httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Noria <...@hashref.com>
Subject [users@httpd] performance of ProxyPass vs rewrite
Date Fri, 27 Jul 2007 14:48:54 GMT
In an Apache + mod_proxy_balancer setup you can base the dispatch on  
ProxyPass or on "rewrite to the balancer unless the file exists".  
That is

   ProxyPass /images      !
   ProxyPass /stylesheets !
   ProxyPass /javascripts !
   ...
   ProxyPass / balancer://cluster/
   ProxyPassReverse / balancer://cluster/

versus

   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
   RewriteRule ^/(.*)$ balancer://cluster%{REQUEST_URI} [P,QSA,L]

I've read the ProxyPass approach has the pro of avoiding a stat call.  
But the number of dynamic requests is proportionally quite small in  
the websites I work in, since a regular page normally means a request  
for the application server (Mongrel in my case) and a handful of  
requests for static resources. So I wonder whether that's really a  
pro in practice.

On the other hand, you need to remember to have httpd.conf and public  
subdirectories in sync, and you can't have dynamic and static  
requests behind, say, /images. The configuration based on mod_rewrite  
is more orthogonal in that sense.

Does anybody have compared the performance of both approaches?

-- fxn


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message