MirrorManager 1.3.2 (plus a hotfix) is now running on all Fedora Infrastructure application servers. This brings one new interesting feature – automatic mirror detection. How’s that you say?
As you know, Internet routing uses BGP (Border Gateway Protocol), and Autonomous System Numbers (ASNs) to exchange IP prefixes (aa.bb.cc.dd/nn) and routing tables. By grabbing a copy of the global BGP table a few times a day, MM can know the ASN of an incoming client request, and Hosts in the MM database have grown two new fields: ASN and “ASN Clients?”. MM then looks to see if there is a mirror with the same ASN as each client, and offers it up earlier in the list.
I’ve pre-populated the MM database, for public servers only, with ASNs, and set “ASN Clients?” = True, meaning such will offer to serve all clients on the same ASN. If you have a private server and wish to do likewise (remember, this doesn’t work for home systems or those behind NATs), you can fill in those fields yourself. The Fedora wiki page on mirroring gives an example on how to look up your ASN. I recommend this for all schools, research organizations, companies, and ISPs.
The mirrorlist lookup code now goes in preferential order:
- same netblock
- same ASN
- both on Internet2
- same country
- same continent
- global
For ISPs and schools, this should mean that most of the possible Fedora traffic will stay within your network – no transit costs. And as netblocks change, MM will keep up with them automatically.
To see this in action, try a query as such, and look for the ‘Using ASN ####’ in the result comment line.
$ wget -O – ‘http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-11&arch=i386′
# Using preferred netblock Using ASN XXXX country = US country = MX country = CA
your-local-mirror-here
…
I hope you enjoy this new feature.