# ProxyPass versus mod\_rewrite

**URL:** <https://www.ruby-forum.com/t/proxypass-versus-mod-rewrite/109863>\
**Category:** Deployment\
**Created:** [July 19, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/proxypass-versus-mod-rewrite/109863 "2007-07-19T19:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 19, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/proxypass-versus-mod-rewrite/109863/1 "2007-07-19T19:10:27Z")

</div>

In an Apache + Mongrel Cluster setup you can base the dispatch on  
ProxyPass or on “rewrite to the balancer unless the file exists”.

In theory the ProxyPass approach has the pro of avoiding a stat call.  
But the number of dynamic requests is proportionally quite small,  
since a page normally means a request for Mongrel and a handful of  
requests for static resources. So I wonder whether that’s really a  
pro in practice (for a regular website, not [Amazon.com](http://Amazon.com)).

On the other hand, you need to remember to have httpd.conf and public  
subdirectories in sync, and you can’t have a controller called  
ImagesController with ProxyPass. The configuration based on  
mod\_rewrite is more orthogonal.

Does anybody have compared the performance of both approaches?

– fxn
