views:

57

answers:

2

Suppose I have to put x.com CMS app to Japan, Mexico, US, Australia, and to London. They all access a central MySQL database over IP.

Is there something before the load balance or is it just you receive the IP on your code, geo-locate it and redirect to page to appropriate domain?

Is there a way to have x.com to point to different IP's on DNS level without changing the domain name?

A: 

If you are doing something that has extremely distributed servers, you can put a MySQL master replication server somewhere on the globe, with read-only replicated servers in each area. Have all writes be done to the master server, and they will propagate to the replicated servers. See MySQL Replication Reference.

To distribute the request to the appropriate server, you can use IP geolocation to get the closest server then forward the request from x.com to us.x.com, asia.x.com or london.x.com.

As per DNS, you can add multiple IPs to a single domain name, but the client will just pick one at random. It will not try and determine the best one. For more information see the msdn page on DNS round robin.

Mitch
A: 

The GeoDNS plug-in for Simple DNS Plus should do the trick.

Jesper