Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A domain abc.com has two web servers located in two different location one in India and another in Malaysia. If the request are handled by the servers depending on the location from where the request originates then how DNS server resolves for such geographically distributed servers when my client system is configured to a local DNS server in Indian or a DNS server in Malyasia ?

Warm Regards

Supratik

share|improve this question

5 Answers 5

up vote 2 down vote accepted

There are 2 ways of doing this. One is Geo-aware DNS as mentioned by tore, and the other way is by having Anycast DNS. ( see : http://serverfault.com/questions/30567/geo-dns-providers )

Anycast DNS is slightly different as the authoritative DNS server advertise one IP address but on different location (eg one in malaysia and one in US). When someone querying Anycast DNS, they will reach the closest server, and each server will have different sets of answer. ( See : http://www.netlinxinc.com/netlinx-blog/45-dns/118-introduction-to-anycast-dns.html)

share|improve this answer

Using DNS to handle geo-aware redirection is commonly done, but is not always optimal.

The reason for this is that there's zero guarantee that the IP address in the DNS request is in any way correlated with the physical location of the user. Most times it might well be, but that's just a coincidence. What happens if the user is using OpenDNS - how do you redirect them then?

The "right" answer is application level redirection - have your servers look at the IP address of the actual HTTP request, and then redirect to another server (with a different name) if the client has hit the wrong server.

Google and a few others are currently proposing a new DNS extension at the IETF DNSEXT Working Group which allows open DNS services (such as OpenDNS) to tell Content Delivery Networks (e.g. Akamai) what your real address is, but it's quite controversial because of the privacy implications.

share|improve this answer

What you need is a Geo-aware DNS service of your own or get a hold of a provider which can provide you with this service.

What the DNS server will do if it is Geo-aware, is look at the IP requesting a lookup for abc.com, and based on that DNS server settings, it will return an IP to either Location A or B.

To simplify it, you could set up an DNS server to return 127.0.0.1 as the IP for the zone google.com for all requests, unless you come from e.g. Europe.

share|improve this answer

It does not. DNS simply does not care. Every server caching the zone will round robin between all IP addresses it has. Point.

If you want efficient routing, you would have to publish your web servers under UNICAST IP addresses. This requires a LOT of infrastructure. Normal hosters do not do that ;)

share|improve this answer

As far as I can recall, there isn't anything in DNS that deals with resolving one host name to different IP addresses based on the geographic location of the requester. DNS doesn't know or care where you are, where it is, or where the hosts its being asked to resolve are on a map of the world, just on a map of the Internet.

You might need to have a generic landing page at www.example.com that looks at the user's IP and then pulls content from india.example.com or malaysia.example.com, and so on, depending on user's location, or work with people like akamai if its going to be very high volume traffic.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.