[mirror-admin] Mirror configuration and proxies caching yum metadata

Warren Togami warren at togami.com
Wed Aug 6 20:48:12 EDT 2008


Matt_Domsch at Dell.com wrote:
> I've received reports that caching proxy servers, those inbetween Fedora
> public mirrors and Fedora end users, may be caching the yum metadata
> (the contents of repodata/*) which then causes problems when the mirrors
> update their content but the intermediate cache serves "stale" content.
> As suggested by the OpenSUSE download redirector, I've added a section
> to the recommended HTTPd config guidelines at
> https://fedoraproject.org/wiki/Infrastructure/Mirroring#Caching_of_metad
> ata
> 
> 
> Caching of metadata
> 
> We don't want caching proxy servers between our mirrors and our end user
> systems to cache our yum repository metadata. So, add explicit metadata
> handling. (Suggested by the OpenSUSE download redirector.)
> 
>    <LocationMatch "\.(xml|xml\.gz|xml\.asc|sqlite)">
>        Header set Cache-Control "must-revalidate"
>        ExpiresActive On
>        ExpiresDefault "now"
>    </LocationMatch>

It looks like the above is only for Apache proxy.  If you use squid 
either as a transparent proxy or dedicated reverse proxy cache HTTP only 
mirror, I have found the following to be especially good.

refresh_pattern repodata/.*$    0       0%      0
refresh_pattern images/.*$    0 0%      0
refresh_pattern .*rpm$    0     0%      0

This forces your squid server to check the upstream server upon every 
access to repodata, RPM packages, or images/ directory for HTTP 
installs.  These are files that change URL but not contents, stuff that 
proxy cache servers screw up for yum and anaconda HTTP installs.  If the 
upstream has no changed since the last download, then the file is served 
from the cache, so it remains a lot faster than no proxy cache server.

Warren Togami
wtogami at redhat.com

--


More information about the Mirror-admin mailing list