-1

Is it that the DNS queries from a particular region goes to DNS servers located nearest? How DNS servers are made aware of the geographical location of requesting IP address?

Is that how the CDN works?

nitins
  • 2,579
  • 15
  • 44
  • 68

2 Answers2

1

All you need to search is "GeoDNS". Here is some more details on how it works.

Nehal Dattani
  • 581
  • 2
  • 10
1

There are two ways to send the client to the nearest CDN edge location. The first is to have the DNS server return the IP of the nearest location, or to use an HTTP redirect from a central service to the nearest edge location.

There are then two approaches to actually accomplish this. The first is to use a database which maps IP subnets to geographical locations, called IP geolocation. The DNS or HTTP server would lookup the source IP of the request in this database to get a location, and then choose and return the nearest CDN IP or hostname.

The second approach is to use anycast, which only works with DNS. In this case there would be multiple DNS servers (preferably co-located with the CDN edge locations) all operating on the same IP address. DNS requests from clients would get routed to the closest (in the network sense, not geographic) DNS server. Each DNS server would always respond with the same IP, corresponding to the closest CDN edge location to that DNS server.

mgorven
  • 30,615
  • 7
  • 79
  • 122