Beating the Speed of Light
The primary reason to deploy Anycast is speed. Physics imposes a hard limit: light travels through fiber optic cable at roughly 200,000 km/s, which translates to approximately 5ms of latency per 1,000 km of cable distance. You cannot engineer around this — you can only move the destination closer.
Consider a concrete example. If you host your API server only in Virginia, USA (a unicast deployment):
- A user in Sydney, Australia is roughly 16,000 km away by fiber path.
- The minimum round-trip time is approximately 160ms, just from physics.
- Add protocol overhead (TCP handshake, TLS negotiation) and the first byte of a response can take 400–600ms.
With Anycast and a POP (Point of Presence) in Sydney:
- The Sydney user hits the local server.
- Round-trip drops to 10–20ms.
- TLS handshake completes in under 50ms.
This is not theoretical. Cloudflare operates over 300 POPs globally using Anycast. Their median DNS resolution time is under 14ms worldwide. A unicast equivalent would be impossible to achieve at that scale.
For DNS specifically, Anycast is almost mandatory. DNS is the first step in every internet connection. A 200ms DNS lookup adds 200ms to every page load, API call, and service request. All 13 DNS Root Server clusters (labeled A through M) use Anycast, which is why a query to a.root-servers.net resolves in milliseconds regardless of where you are on Earth.
Interviewers often ask: "Why do the DNS Root Servers not get overwhelmed? There are only 13 of them." The answer is Anycast. There are not 13 physical machines — there are 13 identities, each served by hundreds of physical servers worldwide. As of 2024, the F-Root alone has over 200 instances globally. The number 13 is a historical artifact of the original DNS protocol design (fitting root server names in a single 512-byte UDP packet), not a physical constraint.