Anycast failover
Anycast gives one address to many sites and lets network routing pick the site. A GeoDNS answer is cached for its time to live, so a 60 s TTL kept half of the traffic on a stopped edge, and availability fell to 62.5 percent. Route withdrawal kept it at 100 percent.
See it on the board
The same traffic runs on two boards. The simulator measured both when this page was built.
| Measure | Goal | GeoDNS with a 60 s TTL | Anycast with route withdrawal |
|---|---|---|---|
| Availability | at least 97% | 62.5% Fail | 100% Pass |
| p99 latency | under 300 ms | 68 ms Pass | 68 ms Pass |
| Monthly cost | 12 USD/mo | 12 USD/mo | |
| Error rate | 37.5% | 0% |
Key numbers
| Number | Value |
|---|---|
| Default answer lifetime of GeoDNS | 300 s |
| Default health check interval of GeoDNS | 10 s |
| Requests per second, one anycast part | 10,000 ops/s |
Anycast · edge A stops at 0:10 · availability 100%
How it works
A global API has an edge in two places and one name. Two common ways send users to the nearest working edge.
GeoDNS answers a name lookup with the address of an edge. Resolvers and clients keep that answer for the time to live. When the edge stops, DNS can return a new address, but clients that hold the old answer keep using it until it expires. In the mini board the answer lives for 60 s. Edge A stops at 0:10, and about half of the traffic stays on the stopped edge, so availability falls to 62.5 percent.
Anycast announces the same address from both edges. The network routes each packet to the nearest announcement. When an edge stops, it withdraws its route, and routers send new packets to the other edge. Nothing is cached in the client, so traffic moves in seconds. Availability stays at 100 percent in the mini board.
Anycast has limits. A long connection can break when routes change, and the client must reconnect. Routing picks the closest edge by network distance, not by load. GeoDNS still gives you control over where each user goes.
In the levels you pick the failover plan and compare the availability.