Anycast is a network addressing technique where the same IP prefix is announced from multiple geographic locations simultaneously. BGP's best-path selection means each client is routed to whichever site the network topology considers nearest — without any client-side configuration or DNS tricks.
In unicast addressing, each IP address maps to exactly one destination. Anycast breaks that assumption: multiple servers in different locations all advertise the same IP prefix into the global BGP routing table. From the internet's perspective, there are several valid paths to the same address, and each intermediate router picks the best one according to its local BGP policy.
The result is that a client in Tokyo may reach a server physically located in Singapore, while a client in Frankfurt reaches a different machine in Amsterdam — both using the same destination IP. Neither client knows about the other site; the routing infrastructure handles the selection transparently.
When a site announces an anycast prefix, it originates a BGP route. That announcement propagates to neighboring ASes and spreads across the internet. When two paths to the same prefix exist, BGP's decision process favors the one with the shorter or more preferred AS path — in practice, the path through fewer networks, which tends to correlate with geographic proximity and lower latency.
This is topological proximity, not pure geographic distance. A site that is physically closer but reachable only through a long AS path may lose to a more distant site with a shorter, better-connected path. The selection depends on the peering relationships between the autonomous systems involved.
Anycast is a foundational technique for any service requiring low latency and high availability at global scale:
When an anycast site goes offline or needs to be taken out of service, the operator withdraws the BGP announcement from that location. Routers that previously used that site recalculate their best path and begin forwarding traffic to the next-best site automatically. This failover happens at the routing layer — no DNS changes, no TTL wait, no client reconfiguration required.
The speed of failover depends on BGP convergence time: how quickly the withdrawal propagates to all affected routers. In practice this takes seconds to a few minutes depending on the network topology and BGP timer configuration.
Anycast introduces a subtle diagnostic challenge: different vantage points reach different physical servers. A service can be fully operational from most of the world while being broken at one specific anycast site. A user in one city reporting an outage may be reaching a completely different backend than an engineer who runs the same check from their laptop and sees no problem.
This means that "works for me" is not sufficient to dismiss an anycast outage report. Proper diagnosis requires checking the service from multiple geographic vantage points. Running a traceroute from different regions will reveal different AS paths and different final hops, confirming that anycast routing is functioning and identifying which site a given probe reaches.
Trace anycast paths with the traceroute tool
Open Traceroute