GeoDNS / Geo-routing
DNS that returns different IPs based on the geographic location of the querier. Used to route users to the closest region.
GeoDNS (geographic DNS) returns different DNS answers depending on where the query comes from. A US visitor gets your US datacenter; a European visitor gets your EU one. Same hostname, different IPs.
example.com → 198.51.100.10 (queried from US)
example.com → 203.0.113.10 (queried from EU)
example.com → 192.0.2.10 (queried from Asia)
How providers implement it
The DNS provider looks at the source IP of the query (or the EDNS Client Subnet, if the recursive resolver included one) and matches it against a geographic database. Returns the answer configured for that region.
Anycast vs GeoDNS
These get confused all the time. They're different:
- Anycast DNS routes the DNS QUERY to a nearby PoP. The answer it returns is the same regardless of location.
- GeoDNS returns different ANSWERS based on the querier's location. The actual DNS query can still be anycast-routed.
You usually want both: anycast for fast lookup, GeoDNS for region-aware answers.
Why SaaS uses it
- Multi-region deployments. Customer hits the closest data center automatically.
- Compliance. EU customers stay on EU servers; US customers stay on US servers. Helps with data residency.
- CDN traffic shaping. Different regions get different edge IPs to balance load.
Caveats
- Recursive resolvers blur the location. A query from a user in France going through 8.8.8.8 might appear to come from wherever Google's resolver is located. EDNS Client Subnet helps but isn't universally supported.
- Some users opt out. Public resolvers like 1.1.1.1 don't forward client subnet info by default for privacy.
- DNS-level routing is coarse. For sub-second region switching during outages, BGP anycast on your application IPs is more responsive.