<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Team,<br>
<br>
    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:<br>
<ul>
  <li>Pull the mirrorlist while preserving the requesting IP as
X-Fowarded-For (for geoIP)<br>
  </li>
  <li>Parse the mirrorlist</li>
  <li>Random loop the mirrorlist and request the HEAD for foo.rpm from
a given mirror, if not 404 continue</li>
  <li>Redirect the request for foo.rpm to a public mirror (using 302)
that has verified it has the file</li>
</ul>
Things I plan on doing:<br>
<ul>
  <li>Cache results (assuming no DB backend, do RAM caching based on
session; IP, remote mirror, etc)<br>
  </li>
  <li>Maybe rate public mirrors based on:</li>
  <ul>
    <li>Number of missing files (404)</li>
    <li>Latency (granted this is from the rewrite server)</li>
    <li>Bitrate test (ran every hour or something, also from the
rewrite server)</li>
  </ul>
  <li>Setup a database that can be prepopulated with this data,
potentially using data from mirrormanager</li>
</ul>
If needed, round robin would help keep things going.. or even just use
pound (or something else) between two machines.<br>
<br>
Any thoughts? I'd like to have Fedora Project to provide this feature.
If not, I will be setting it up anyways.<br>
<br>
Jonathan Steffan<br>
daMaestro<br>
</body>
</html>