<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've set up Perlbal to do the re-proxying for my MogileFS (store images). I'd like to set up some sort of caching though, so that the tracker doesn't have to hit the database with every request.
<div>Can my existing install of Perlbal help with this? Perhaps through Memcached lookups so that image requests go from:</div>
<div>user <-> perlbal <-> app <-> tracker <-> db <-> tracker <-> app <-> perlbal <-> image server <-> perlbal <-> user</div>
<div>user <-> perbal <-> memcache (or whatever) <-> image server <-> perlbal <-> user</div></blockquote></div><br>Yep, look at setting the reproxy_cache_maxsize value on the service. 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: <time>;<header list><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. Headers you'll want to save are things such as Content-Type, Last-Modified, etc.
<br><br>With everything running, doing a "show service foo" 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:firstname.lastname@example.org">