Hi all,
Following up on the geographic DNS discussion on this list, triggered by
the upcoming Squid servers in France, I proposed a solution to the
developers/sysadmins on #mediawiki.
About six months ago, I implemented such a system for our IRC network
Blitzed[1]. We have several servers distributed over the globe, and we
thought it would be nice to send our users to a physically close server.
That's not unlike the situation with wikipedia visitors and the squids
in the US and France.
As I am more or less a PowerDNS[2] developer, I implemented a powerdns
backend for it, called Geobackend. It entered the powerdns source with
the latest release, and therefore is present in most major
distributions, including Debian.
Geobackend parses a rbldnsd format zonefile from countries.nerd.dk (a
well known and reliable DNSBL that maps IPs to their corresponding
countries) into an efficient memory data structure, and uses that to
direct incoming DNS requests to specific A records through CNAMEs, which
can be configured by a so called "director map file" for each "geo
record". In short, each country can be directed to a configured A record.
As a demonstration, I have setup a georecord for wikipedia on our
servers, using our infrastructure. (This costed me about 4 mins of time
to setup, and is therefore probably a faster way for initial tests than
to set it up on multiple wikipedia servers.)
To test, do a
$ dig
wikipedia.geo.blitzed.org CNAME
It will give an answer to either
squids.fl.us.wikipedia.org, or
squids.fr.eu.wikipedia.org, depending on your DNS resolver's location.
These DNS targets are fictious at the moment (the .fr squids are not on
their final colo location yet), but it's just for initial testing.
Also interesting is
$ dig
localhost.geo.blitzed.org A
It should respond with a dotted quad encoded 127.* ip, corresponding to
your country's ISO code number.
We've been using this on Blitzed for the past half year now without any
problems, and I think it would be useful for wikipedia as well.
More information can be found in the README[3] for this backend, and
perhaps in the brainstorming wiki pages[4] we used when writing it.
Proper documentation for it, to be included in the powerdns
documentation, is in the works.
[1]
http://www.blitzed.org
[2]
http://www.powerdns.com
[3]
http://cvs.blitzed.org/geo-dns/README?rev=1.8&content-type=text/vnd.vieā¦
[4]
http://wiki.blitzed.org/DNS_balancing
--
Mark
mark(a)nedworks.org