Single Entry ReWrite Code - foo.rpm

Jonathan Steffan jonathansteffan at gmail.com
Thu Feb 22 21:23:57 UTC 2007


Team,

    I've been working on getting jigdo usable for Fedora Unity. In the
process, I needed a way to have a single url to access rpms on public
mirrors. Assume the requested file is foo.rpm What I have done so far is
setup a rewrite map that does the following:

    * Pull the mirrorlist while preserving the requesting IP as
      X-Fowarded-For (for geoIP)
    * Parse the mirrorlist
    * Random loop the mirrorlist and request the HEAD for foo.rpm from a
      given mirror, if not 404 continue
    * Redirect the request for foo.rpm to a public mirror (using 302)
      that has verified it has the file

Things I plan on doing:

    * Cache results (assuming no DB backend, do RAM caching based on
      session; IP, remote mirror, etc)
    * Maybe rate public mirrors based on:
          o Number of missing files (404)
          o Latency (granted this is from the rewrite server)
          o Bitrate test (ran every hour or something, also from the
            rewrite server)
    * Setup a database that can be prepopulated with this data,
      potentially using data from mirrormanager

If needed, round robin would help keep things going.. or even just use
pound (or something else) between two machines.

Any thoughts? I'd like to have Fedora Project to provide this feature.
If not, I will be setting it up anyways.

Jonathan Steffan
daMaestro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20070222/45744c43/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20070222/45744c43/attachment.bin 


More information about the infrastructure mailing list