[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic mirror selection

On Fri, Feb 01, 2008 at 02:38:04AM +0100, Leo costela Antunes wrote:
> Hey there,
> As an incredibly late follow-up to this [0] small thread, I created a
> small script to act as backend for pdns and return a mirror for the
> user's country.
> It's a simple DNS based geographic mirror selection idea.

Hell yeah.  Finally.

We got plenty of packages which pull debs from their author's country:
ftp.pl.debian.org, ftp.uk.debian.org.  It would be helluva better to have
them use geoip by default.

I once gave this a though, but never went any farther than checking which
mirrors work.  The status page is still online:
although it doesn't even update the mirror list.  There are better such
status pages elsewhere, too, except none checks IPv4 and IPv6 separately.

> It works by:
> - using logic based on D-I to select a mirror from a copy of
> Mirrors.masterlist[1], making it behave like a user that selects his own
> country during installation.

Since the packaged version of geoip gives you just the country, my idea
would be to simply give a cname for ftp.XX.debian.org.  On MaxMind's page,
you can also get a "geoip-city-lite" database which appears to be dfsg free
once you purge nondistributable parts about ISPs (city and ISP data is
intermingled in a single file).  That could perhaps provide some better
resolution than just country.

> - filtering by country and arch, with a fallback host if the country
> isn't found or no mirrors provide the needed arch.

Uhm, and how exactly do you get the arch?  At DNS time you don't have
anything but the requester's or his ISP's IP.

> I'd like to put this to use for Debian, but I face two small problems:
> - I currently don't have access to any server in which I could host this.

Would a vserver, one IP and a NS delegation for a test subdomain be enough
for your tests?  No fallover or anything, though.

> - our d.net domains apparently[2] can't contain NS records, which means
> I couldn't have anything more "integrated" without DSA's approval, even
> if I had a machine.

What about this:
  ftptest.debian.net CNAME debian.XXX
  debian.XXX NS your_vserver.XXX
(where XXX is any domain you can control without bothering the DSA for every

> So, which friendly soul could I ask about getting this running on a
> Debian server with a d.net domain, assuming there's some interest in it
> aside from my own? The DSA through a ticket?

This would be a great addition to the official infrastructure.  If this goes
official, it would need some reliable hosting, but for tests, you can use
any machine, even one of mine.

> Please fire away if you have any comments on the idea, but keep in mind
> it's not intended to supplant anything we currently have and it's
> obviously not intended for every scenario.

To the contrary, with the name "ftp.debian.org" being deprecated, I can
think of a perfect case you can supplant once you go official :p

Great work, carry on!

1KB		// Microsoft corollary to Hanlon's razor:
		//	Never attribute to stupidity what can be
		//	adequately explained by malice.

Reply to: