I want to set up a download area within a site, (FTP or HTTP, doesn't matter) and I would like to have at least a handful of mirrors scattered around the world. I would like the download links to choose a mirror transparently for the user. It may be random, round-robin, or it may have some smart IP proximity logic. Is there some good package (e.g. a Python or PHP library) I could use for that end?
The simplest way to do that would be to add a DNS name like "files.example.com" and set multiple A records. This would be a round robin distribution over all the hosts.
The problem is that every server has to have the exact same file structure.