Hacker News new | ask | show | jobs
by indigodaddy 593 days ago
I get a single A rec for google.com. Pretty sure there should be multiple, no?
3 comments

not necessarily -- google.com is using anycast. authoritative servers for google.com will return an IP for your request for an A for google.com with an IP that they believe is appropriate for (read: closest to) your geolocation. ssh to a few boxes in different countries and do simultaneous A lookups on google.com and you'll get single results in each case, and each will return different IPs.
Just to be clear, returning different resource records (IP addresses, A records) in the answer section of a DNS response to different clients, based on geographical location, measured latency, etc, is different from anycast routing in which there exist multiple different routes to multiple different hosts all sharing the same IP address.
Or use this tool and to check globally: https://www.whatsmydns.net/#A/google.com

Some locations are returning one ip, others are returning multiple, but to your point, they're different in different regions.

Google uses GEODNS, the IP are different for different users.

Also at googles scale round robin might cause unexpected issues.

dig returns a single IP address (one IPv4 and one IPv6) as well.