Anycast Routing
One IP address announced from many locations, with the network routing each user to the nearest — the backbone of CDNs, global DNS, and DDoS absorption.
What is anycast routing?
Anycast advertises the same IP address from multiple physical locations, and BGP routes each client to the topologically nearest one. Where unicast maps one address to one server, anycast maps one address to many, and the internet’s routing fabric does the load distribution and proximity selection for free. It’s the quiet infrastructure behind CDNs, the big public DNS resolvers (1.1.1.1, 8.8.8.8), and NTP — anywhere “nearest instance” and “survives node loss” both matter.
Why it’s the DDoS-absorption primitive
Anycast’s superpower is capacity multiplication and blast-radius division. A volumetric attack against an anycast IP gets split across every location announcing it — the flood that would drown one datacenter is diluted across dozens, which is why serious DDoS mitigation is built on anycast. The same property gives resilience: lose a location and BGP simply reroutes clients to the next nearest, no failover logic required, no DNS TTL to wait out. Proximity is the third win — users hit a nearby edge, cutting latency and TLS handshake round-trip time.
The catch: statelessness
Anycast routing can shift a client to a different location mid-conversation when BGP paths change, which is fine for stateless request/response (DNS query, CDN cache hit) and treacherous for long-lived stateful sessions — the new location has no memory of the old one’s TCP state. This is why anycast dominates connectionless and short-lived workloads and why anycast TCP services need careful design (consistent hashing, session stickiness, or tolerating occasional resets). It’s a routing tool, not a session manager.
What people get wrong
- Anycasting stateful long-lived connections and getting mysterious mid-session resets when routes flap.
- Assuming even distribution — BGP picks topologically nearest, not geographically or least-loaded; some locations take disproportionate traffic.
- Underestimating operational complexity — running anycast means running BGP well, which is its own specialty.
Primary source: Cloudflare — What is anycast?
Historical figures and technical concepts for informational purposes only. Not technical, professional, legal, or financial advice. Sources: Official Documentation.