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.
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.
- filtering by country and arch, with a fallback host if the country
isn't found or no mirrors provide the needed arch.
- applying a _very_ simple priority scheme to the mirrors that match,
giving top points to hosts that match "ftp{1,2}.{2}.
debian.org" and also
preferring "leaf" over "push" mirrors.
This last point is something I am still reluctant about: the logic was
"leafs will tend to be less loaded", but this is really not true;
perhaps some priority like "secondary > primary > leaf", to offload
primaries, but keep leafs as a last resort would be better.