What is anycast DNS?
Anycast DNS makes a DNS service address reachable at multiple network locations. A query sent to that address reaches one service instance selected by the routing system. Both authoritative nameservers and recursive resolvers can use anycast. The address identifies the distributed service; it does not identify one permanent physical server. RFC 4786 describes its operation.How routing chooses a location
For an Internet-wide deployment, multiple locations announce reachability to a prefix containing the service address. Networks use routing policy and path attributes to choose where to forward packets. BGP exchanges reachability information; it does not continually measure every DNS server's load or select the lowest query latency.
The selected instance may be nearby in network terms without being geographically closest. Peering arrangements and local routing policy can lead two clients in the same city to different locations. A route can also change while the client keeps using the same destination IP. These choices follow the routing mechanisms described in RFC 4271.
Client A -> shared DNS address -> service instance A
Client B -> shared DNS address -> service instance B
Routing decides which instance each client reaches.
The diagram does not imply equal load or equal latency.
Anycast and DNS answers are different layers
Anycast selects the DNS server instance that receives a query. The DNS answer then tells the client about the requested name. Using an anycast authoritative service does not automatically place a website near its visitors or make its web server address anycast.
It is also different from publishing several A or AAAA records. Multiple DNS answers give an application several addresses to consider; anycast can distribute requests sent to one service address. The two approaches can coexist.
What happens during a failure?
A distributed service can provide alternative locations when one becomes unreachable. Whether clients move successfully depends on the failure, health detection, route handling and remaining capacity. A DNS process can fail while its network still advertises reachability. The operator needs a response appropriate to that failure.
When routes change, networks take time to adopt their new paths. Some requests may fail or need retries during the transition. Existing connections can also break if packets move to an instance that lacks their connection state. RFC 7094 discusses these transport and architectural limits. Anycast alone is therefore insufficient evidence for an instant-failover promise.
Consistent service still matters
Authoritative instances need an appropriate process for distributing zone updates. A reachable instance with outdated records can return an unwanted answer. Independent server addresses and ordinary DNS retry behavior remain relevant alongside anycast, as explained in RFC 3258.
For a recursive service, differences in local cache contents can also explain why two clients receive different cached answers. A shared address does not imply a shared cache or identical query timing.
How to evaluate an anycast service
Measure from networks that represent the intended users. Check answer correctness, failures and response times over repeated observations, including both UDP and TCP where relevant. A single successful query from one location cannot verify every instance. A location count cannot substitute for those observations.
Distribution may help contain some attack traffic, but it does not divide traffic evenly or guarantee protection against overload. Ask how service health and capacity are handled, and examine the evidence behind performance or resilience claims. Treat benchmarks as specific to their test locations, time and method rather than as a universal property of anycast.