performance of ProxyPass vs rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux