What is anycast? Why 1.1.1.1 is fast everywhere

Anycast lets many servers around the world share one IP address. How it works, who uses it, its limits, why an anycast IP has no real location, and how to see your node.

Popo
On this page

Ping 1.1.1.1 from Tokyo, London and São Paulo and you'll often get a reply within a few milliseconds in all three (see the measurement in Ping and traceroute). Light covers about 200 km per millisecond in fiber, so no single server can be that close to all of those cities at once. The answer is that 1.1.1.1 isn't one server. It's one address shared by many of Cloudflare's servers around the world, an approach called anycast. Cloudflare's website lists data centers in 348 cities (as of 26 November 2026).

Unicast and anycast

An ordinary address is unicast: one address, one place. The block is announced to the internet from a single location, and everyone's traffic goes there.

Anycast announces the same block from many places at once. BGP has each network pick the best of the routes it hears, so traffic from each region is delivered to whichever node is closest in routing terms. To users there's only one address, but the machine that actually serves you depends on where you are.

Unicast198.51.100.10

Announced from Frankfurt only

São Paulo9,829 km awayFrankfurtTokyo9,333 km away

Anycast1.1.1.1

Announced from all three cities

São PauloFrankfurtTokyo
The unicast address only lives in Frankfurt, so users in São Paulo and Tokyo cross nearly 10,000 km to reach it. The anycast address is announced from all three cities, and routing sends each user's traffic to one of them, usually a nearby one. The unicast address is reserved for documentation.

Who uses anycast

  • DNS: the 13 root server identities are spread across more than 2,000 instances using anycast, and public resolvers such as 1.1.1.1 and 8.8.8.8 are anycast too. DNS queries are small and latency-sensitive, which makes them a perfect fit.
  • CDNs: content delivery networks such as Cloudflare put site content on nodes around the world and use anycast to send users to a nearby one.
  • DDoS protection: attack traffic is spread across nodes worldwide by routing, so each node absorbs only a share of it, which is much easier to withstand than everything hitting one server.

Each root server has a single address, such as 193.0.14.129 for K-root. Wherever you query it from, you ask that one address and one of its instances answers. The size of each deployment varies widely:

Instances of each root server

  1. F-rootISC655
  2. E-rootNASA355
  3. D-rootUniversity of Maryland248
  4. L-rootICANN240
  5. K-rootRIPE NCC151
  6. J-rootVerisign147
  7. I-rootNetnod106
  8. A-rootVerisign56
  9. M-rootWIDE Project34
  10. C-rootCogent13
  11. H-rootUS Army Research Lab12
  12. B-rootUSC ISI6
  13. G-rootUS DISA6
Data: active sites listed by root-servers.org on 26 November 2026 (excluding decommissioned and suspended ones): 2,029 instances at 1,575 sites in 179 countries and regions.

Anycast also brings resilience: if a node fails, its announcement is withdrawn, and the traffic that would have gone there shifts to the next closest node automatically.

Anycast's limits

"Closest" means closest by routing, not by distance. BGP chooses routes by business relationships and the number of networks, not latency. You end up at whichever node your ISP connects to best. From China, for example, sites on Cloudflare are often served from Hong Kong, Japan or even the US West Coast, depending on your ISP.

We used Globalping probes around the world to request Cloudflare's own website and see which node each one reached:

Reached a node in the same city

  • TokyoNRT1 ms
  • SingaporeSIN1 ms
  • MumbaiBOM2 ms
  • SydneySYD2 ms
  • FrankfurtFRA1 ms
  • LondonLHR1 ms
  • JohannesburgJNB1 ms
  • LagosLOS2 ms
  • São PauloGRU2 ms
  • New YorkEWR5 ms

Sent to a node far away

  • SeoulNRTTokyo33 ms
  • CairoMRSMarseille47 ms
  • TehranFRAFrankfurt73 ms
  • Beijing, Guangzhou, Nanjing, GuilinLAXLos Angeles183–1,278 ms
Globalping measurement of www.cloudflare.com/cdn-cgi/trace on 26 November 2026. Node codes come from the colo= line in the response; the milliseconds are the TCP handshake time, roughly one round trip.

A node in the same city answers within a millisecond or two; being sent elsewhere adds tens to hundreds of milliseconds to the handshake. The Chinese probes here sit in data center networks; in another run, six probes in Shiyan, Shanghai, Shenzhen, Wuhan, Chengdu and Guilin all reached Los Angeles too. Home broadband results depend on the ISP.

It suits short connections best. If routing changes mid-connection, later packets can land on a different node that knows nothing about the connection. One-shot requests like DNS queries aren't affected; long-lived connections need extra handling on the provider's side.

Before the route changes

You
Packets 1–3
Node AHolds this connection

After the route changes

You
Packet 4
Node BDoesn’t know it, so resets it
Nodes don't share their connection records. A DNS query is over in one round trip, so switching nodes halfway doesn't matter; long-lived connections such as big downloads or video calls can be cut off.

Troubleshooting is harder. The same address leads to different machines from different places, so when one region is slow and another is fine, you first need to know which node you're reaching.

The "location" of an anycast address

For an anycast address, an IP location means very little. A geolocation database either records one place, usually the operator's headquarters or one of its nodes, or leaves it blank, while the node you actually reach may be on another continent; see How IP geolocation works. Here are four public DNS addresses in MaxMind's free GeoLite database:

Terminal
for ip in 1.1.1.1 8.8.8.8 9.9.9.9 208.67.222.222; do \  curl -s "https://stat.ripe.net/data/maxmind-geo-lite/data.json?resource=$ip" \  | jq -r '.data | .located_resources[].locations[] as $l | "\(.parameters.resource) \($l.country) \($l.latitude),\($l.longitude)"'; \  done1.1.1.1/32 ? 0.0,0.08.8.8.8/32 US 37.751,-97.8229.9.9.9/32 ? 0.0,0.0208.67.222.222/32 US 37.751,-97.822

1.1.1.1 and Quad9's 9.9.9.9 have no location, with a question mark for the country. Google's 8.8.8.8 and OpenDNS's 208.67.222.222 sit at 37.751,-97.822, which is the US default point and only means "somewhere in the US". For the same reason, an anycast address isn't really native or cross-border: it has no single country of use.

That's why CKIP's lookup results flag Anycast separately in the Network & anycast row. When an address is anycast, its location only represents one of its nodes.

Global ping detects anycast directly. If two probes thousands of kilometers apart both get replies within a few milliseconds, no single server can be that close to both, so the address is anycast and the results say so; see Ping and traceroute.

Seeing which node you reach

CKIP's Cloudflare check requests several sites that use Cloudflare and shows the node each one served you from, as an airport code such as HKG for Hong Kong or LAX for Los Angeles, alongside where your exit IP is.

You can also check from the command line. Any site on Cloudflare shows details of the current connection at /cdn-cgi/trace, ckip.net included:

Terminal
curl -s https://ckip.net/cdn-cgi/trace | grep -E '^(colo|loc)='colo=NRTloc=JP

That's the result from a server in Tokyo: colo= is the node it reached, and loc= is the country Cloudflare places the visitor's IP in. Swap in https://1.1.1.1/cdn-cgi/trace to see which 1.1.1.1 node you're using. From mainland China, though, HTTPS connections to that address often fail: all four Chinese probes we tried timed out.