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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to