I'm building a global CDN and have a DNS service that will direct customers to the closest server. However I need rapid failover if one of the data centers e.g. Germany goes down users need to be instantly served from London.
The DNS service I'm looking at provides DNS failover but it requires a low TTL which increases queries and is therefore costly - and some ISP's don't respect TTL, so you're still going to best case have a delay of 300 seconds before switchover and worst case up to 48 hours as a bad ISP caches a DNS entry in their servers.
Any ideas on how to provide rapid failover from one data center to another at a reasonable price?
The technology you are looking for is called Anycast. http://en.wikipedia.org/wiki/Anycast
I would also suggest you read on BGP.