Even if your data is "in the cloud," it's still housed somewhere. And as we've written about before, the location of cloud providers and data centers can be an important factor in performance, as ideally you want to route and store data through the server that's the closest.

In preparation for the launch of its new backup and migration tool, Turnkey Linux has done some work to automate selection of the nearest regional data center.

The company plans to use the Amazon S3 for its new TurnKey Linux Backup and Migration (TKLBAM) mechanism), so there are four "regions" to choose from: North California (US-West-1), North Virginia (US-East-1), Ireland (EU-West-1) and Singapore (AP-Southeast-1).

Using Django's GeoIP, TurnKey can map the location of customers' servers. But as TurnKey co-founder Alon Swartz notes in a blog post explaining this process, "The problem is creating an index of each and every country in the world, as well as each US state - and associating them with their closest Amazon region." So Swartz generated a mapping of country and state codes with their coordinates, generated a reference map of server farm coordinates, and used that to generate the closest region.

The output indexes are available for public use: by country and by state.

Below is a map that plots the countries with their associated Amazon region:

And for an interesting comparison, here's a map of worldwide underground cables: