Free — no signup required

Beyond Routing: Geo-DNS

2 min read

The Limits of BGP

BGP is excellent at finding a path across networks, but it has no awareness of physical geography or real-time latency. A route with a short AS-Path could still physically traverse an ocean and introduce hundreds of milliseconds of delay. BGP routes packets efficiently across the network topology — but "efficient network topology" and "physically close" are not the same thing.

To ensure users connect to servers that are physically near them, large-scale services use Geo-DNS (also called Latency-Based DNS or GeoDNS).

When your browser looks up www.netflix.com, the DNS query travels to Netflix's authoritative DNS servers. Instead of returning a single static IP address, those servers examine the source IP address of the DNS resolver making the request (typically your ISP's DNS server, which is geographically close to you) and use it to estimate your location.

  • If the resolver appears to be in London → return the IP of a Netflix server in the UK.
  • If the resolver appears to be in Tokyo → return the IP of a Netflix server in Japan.
  • If the resolver appears to be in São Paulo → return the IP of a Netflix server in Brazil.

This happens entirely within the DNS layer, before any TCP connection is made and before BGP routing even comes into play. The result is that your BGP-routed packets are already heading toward a geographically appropriate destination.

Limitations of Geo-DNS:
- It relies on the DNS resolver's IP, not the user's actual IP. Users of large public resolvers like 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) may be mapped to the wrong region because those resolvers are anycast and may appear to be in a different country.
- DNS TTLs mean that location changes (like a user on a VPN) may not be reflected immediately.
- It doesn't account for real-time network conditions — a geographically close server might be overloaded.

Key Point: Geo-DNS directs users to geographically optimal servers at the DNS resolution layer, before routing begins. It is the first line of latency optimization for global services.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free