How to redirect users to different servers based on their location?

In addition to what answered by @Gabriel-Talavera, I'd add a couple of notes:

  • Network routing, as well as Geographical Load Balancing, is totally unrelated to "data synchronization" between different servers. They are two problems addressed with plenty of very different technologies.

As the title of your question seems to be focused on the networking side, I'll focus on the first part (the network routing issues).

  • From a strict networking point of view, the distribution of load across several locations/datacenters can be achieved with "anycast addressing". A useful discussion about anycast can be retrieved on this other SF posts:
    • What is “anycast” and how is it helpful?
    • What is needed to use anycast IPs?

As you can see by yourself, requirements are hard to be met by small ICT companies. But "global" companies (like the ones you mentioned in your OP), will have no problem adopting it.

As a side note, the first time I heard about "anycast" was thanks to a CloudFlare BLOG post, where they discussed (...among lots of other things), how anycast can be also adopted as a counter-measure to D-DOS attacks.


You can give selective DNS responses based on location with BIND Views if you are using BIND as your external DNS server. The Technical Preview of the new version of Windows Server also has a feature called DNS Policies which looks very promising.

To serve content based on client location and other criteria such as User Agent or schedules, F5 has an appliance called Global Traffic Manager which used in conjuntion with their load balancers achieves what you are looking for. In Cloud environments, Amazon's Route 53 can accomplish the same.

In order to keep the data in sync you must have a storage backend capable of do synchoronous replication, or use the replication provided by MySQL, which will keep the replicated data consistent.