Loggerhead setting 'Cache-Control' header for static fields
Martin Pool
mbp at canonical.com
Mon May 3 02:36:14 BST 2010
On 1 May 2010 13:20, Michael Hudson <michael.hudson at canonical.com> wrote:
> FWIW, I don't think there is a squid between the internet and loggerhead at
> all in the data centre currently. The flow goes like this
>
> (internet)->Apache->Loggerhead
>
> Apache use mod_rewrite to serve Loggerhead's static images (^/static/.*
> URLs) and a prg rewrite map to decide when to serve static branch data.
> Code-browsing requests are proxied straight to a loggerhead process running
> on another host.
So istm that the first step is to install a squid there, with some
disk allocated to its cache, and with a sane configuration that is at
least not caching too strongly. Then we can gradually change
loggerhead to let more stuff be cached. There is an on-hold RT asking
for this, perhaps we should finish that off.
> Loggerhead has a mix of never-change URLs -- static resources and +filediff
> URLs based on revision ids, which would only change when loggerhead changes,
> rarely-change URLs -- e.g. revision pages for a given revno, which would
> only change in a non-append-only push and pages that change fairly
> frequently, e.g. the front /changes page that changes whenever new revisions
> arrive on the branch.
Ian's data (ooh, data) showed that many of the hits for the window we
sampled were for annotation of a particular file revision, which
should be both very cacheable and relatively expensive. Clearly we do
need different caching regimes per type of page.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list