HACKER Q&A
📣 BraverHeart

How can the google.com domain point to different IPs based on location?


Don't "A" DNS records point to a single IP address?


  👤 metadat Accepted Answer ✓
* 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...


👤 hayst4ck
The concept you want to understand is Global Server Load Balancing (GSLB).

You can get a taste by perusing through Route53's DNS routing policies.

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ro...