Hacker News new | ask | show | jobs
by metadat 1325 days ago
* A big company (for example, Google) has DNS POP servers all over the place.

* The authoritative upstream DNS server(s) can give region-specific DNS replies depending on the GeoIP of who's asking. This makes it possible to direct traffic to geographically proximate IP addresses, and spread these results to an ISPs particularly DNS server for a given area.

* Multiple IPs can come back from a single DNS A record lookup. It's then up to the client to select which IP they want to connect to.

* BGP routing may be used to route traffic destined for the same IP address (e.g. 1.1.1.1) to different physical locations.

Further reading:

https://networkengineering.stackexchange.com/questions/48125...

2 comments

Additionally who "owns" an IP is public knowledge. So Google could serve different addresses based on from who owns the address the request comes form.

Specially if they are peering(exchanging traffic on equal basis) with ISPs in certain locations, they could give addresses that are closest to this point of peering. Namely some room with big routers and many service providers.

How can one set up region-specific DNS replies? is it exclusive to large companies?
Many open source DNS servers support region specific responses based upon group or edns subnet info. The venerable bind which is available on almost all systems supports it. There are some such as gdnsd which are purpose specific for this use case. In addition many managed DNS providers support geo based DNS replies.
All you need is a properly configured authoritative domain DNS server with the appropriate logic to inspect client GeoIP details and spit out the appropriate result. Anyone who wants to bother creating, setting up, and operating/ / maintaining such a system can do it.
If you host your DNS via route53 (that's the DNS product provided by AWS) you can do this trivially.

Other DNS providers such as Dyn, EasyDNS, and similar will let you do it.

Google "geo dns" for examples and to get started.