<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>I&#39;ve set up Perlbal to do the re-proxying for my MogileFS (store images).&nbsp; I&#39;d like to set up some sort of caching though, so that the tracker doesn&#39;t have to hit the database with every request.
</div>
<div>&nbsp;</div>
<div>Can my existing install of Perlbal help with this?&nbsp; Perhaps through Memcached lookups so that image requests go from:</div>
<div>&nbsp;</div>
<div>user &lt;-&gt; perlbal &lt;-&gt; app &lt;-&gt; tracker &lt;-&gt; db &lt;-&gt; tracker &lt;-&gt; app &lt;-&gt; perlbal&nbsp;&lt;-&gt;&nbsp;image server&nbsp;&lt;-&gt;&nbsp;perlbal&nbsp;&lt;-&gt; user</div>
<div>&nbsp;</div>
<div>To:</div>
<div>&nbsp;</div>
<div>user&nbsp;&lt;-&gt; perbal&nbsp;&lt;-&gt; memcache (or whatever)&nbsp;&lt;-&gt; image server&nbsp;&lt;-&gt; perlbal&nbsp;&lt;-&gt; user</div></blockquote></div><br>Yep, look at setting the reproxy_cache_maxsize value on the service.&nbsp; This will tell Perlbal to start caching these reproxy URLs which changes the path to skip the entire backend application hit and jump straight to the location that contains the resource.
<br><br>On top of that, your application must return a new header when it returns X-REPROXY-URL, this new header is of the form:<br><br>X-REPROXY-CACHE-FOR: &lt;time&gt;;&lt;header list&gt;<br><br>Where time is some time in seconds to cache this for and the header list is a space separated list of headers that should be saved and replayed when we construct a response from the cache.&nbsp; Headers you&#39;ll want to save are things such as Content-Type, Last-Modified, etc.
<br><br>With everything running, doing a &quot;show service foo&quot; will give you more information and show you such things as the cache hit/miss rate, size, etc.<br><br><br>-- <br>Mark Smith / xb95<br><a href="mailto:smitty@gmail.com">
smitty@gmail.com</a>