Need email infrastructure? Try PostScale -- transactional email API built in the EU. PostScale

    What is Anycast DNS? A Plain-Language Guide

    Anycast DNS explained from the ground up — what it is, why it matters, how BGP routing makes one IP reachable from many places, and why every modern DNS provider runs it.

    Updated

    TL;DR

    Anycast lets many physical servers share the same IP address. The internet's routing fabric (BGP) automatically sends each query to whichever server is topologically closest to the asker. For DNS this means lower latency worldwide (clients hit a nearby server, not one halfway across the globe), automatic failover (when a server fails, BGP reroutes queries to the next-nearest one within seconds), and DDoS dilution (attack traffic spreads across the entire footprint instead of overwhelming one location). Every modern DNS provider — DNScale, Cloudflare, Route 53, Google Cloud DNS — runs anycast. It's not a feature anymore; it's the default.

    What you'll learn

    • Define anycast in plain language and contrast it with unicast
    • Understand at a high level how BGP makes anycast routing work
    • Identify the three main benefits of anycast for DNS (latency, failover, DDoS dilution)
    • Recognise when anycast matters and when it doesn't
    Anycast DNS routing: four PoPs announce the same IP; BGP routes queries to the nearest PoP; failover when a PoP goes dark

    If you've used a managed DNS provider in the last decade, you've used anycast — even if nobody told you. It's the technology that makes "the same IP address" reachable from different physical servers in different parts of the world, and it's why your DNS queries get answered in tens of milliseconds instead of seconds.

    This guide is the plain-language introduction. For the deeper architectural picture — how DNScale specifically implements anycast, including the dual-AS EU/Global model — see What is an Anycast DNS Network?. For the comparison with unicast, see Anycast DNS vs Unicast DNS.

    Anycast in One Sentence

    Anycast lets many servers share a single IP address, and the internet automatically sends each request to the nearest one.

    That's it. Everything else is mechanics.

    The Mental Model

    In the traditional, "unicast" model:

    1.2.3.4  ──────────────  one specific server in one specific place

    Every request to 1.2.3.4 goes to that one server. If you're in Tokyo and the server is in New York, your packets travel half the world. If the server fails, every request fails until you bring it back up or change DNS to point elsewhere.

    In anycast:

    1.2.3.4  ──────────────  server in Frankfurt
    1.2.3.4  ──────────────  server in Singapore
    1.2.3.4  ──────────────  server in São Paulo
    1.2.3.4  ──────────────  server in San Francisco
    1.2.3.4  ──────────────  ... and 20 more locations

    All of these servers announce the same IP address into the internet's routing system. When you make a request, your packets are routed to whichever server is topologically closest to you. From Tokyo, you reach Singapore. From Berlin, you reach Frankfurt. From Buenos Aires, you reach São Paulo. None of this requires you to know where the server is, or for the server to know where you are.

    The "magic" is that this isn't really magic. It's just BGP doing what it does.

    How BGP Makes It Work

    BGP — Border Gateway Protocol — is how networks tell each other "I have a route to these IP addresses." Every Autonomous System (AS) on the internet runs BGP and exchanges routing information with its neighbours.

    When a DNS provider runs anycast:

    1. They allocate an IP block (say, 203.0.113.0/24) to their nameservers.
    2. From each PoP, their BGP-speaking router announces "I have a route to 203.0.113.0/24" to its peers.
    3. Those peers propagate the announcement to their peers, and so on across the internet.
    4. Now every router on the internet knows multiple paths to 203.0.113.0/24 — one through each PoP.
    5. Each router picks the shortest path (by AS-path length, then by various tiebreakers) to forward traffic.

    Result: traffic from each region of the internet ends up routed to the topologically nearest PoP. No central traffic director, no application-layer logic, no client-side configuration. It's all happening at the routing fabric.

    For a DNS query specifically:

    [ Client in Tokyo ]
        │ asks "what's the A record for example.com?"
    
    [ Local recursive resolver ]
        │ needs to query the authoritative nameserver at 203.0.113.5
    
    [ Tokyo ISP's BGP routes the query toward 203.0.113.5 ]
        │ which means whichever DNScale PoP is topologically closest
    
    [ DNScale Singapore PoP ] ← closest to Tokyo by AS path
        │ answers the query
    
    [ Client in Tokyo gets the answer in ~30ms ]

    A client in Berlin doing the same query reaches the Frankfurt PoP. Same IP, different physical destination. Both get the same answer (because every DNScale PoP serves the same authoritative zone data), but the latency is shaped by physical proximity.

    The Three Big Benefits

    1. Lower latency

    DNS queries are tiny and round-trip-time-sensitive. Every web page load typically involves multiple DNS lookups; if each takes 200ms instead of 20ms, users feel it. Anycast minimises the resolver-to-authoritative round-trip by ensuring "the authoritative" is physically close.

    Concrete numbers from a typical setup:

    • Within a metro (e.g., Frankfurt to Frankfurt): 1–10ms
    • Within a continent (e.g., Berlin to Frankfurt or to Amsterdam): 10–30ms
    • Cross-continent (e.g., Tokyo to Singapore): 30–80ms
    • Worst case across the world (anycast routes a Tokyo client to a far PoP because nearer PoPs are unreachable): 200ms+

    Compare to unicast at e.g. New York: every non-North American client pays 100ms+ minimum just for the round-trip.

    2. Automatic failover

    When an anycast PoP fails — server crash, datacentre outage, network partition — the BGP advertisement from that PoP is automatically withdrawn (either by the local routers' health checks or by the PoP becoming unreachable). The internet's routing fabric reconverges within seconds, and traffic that was hitting the failed PoP now hits the next-nearest one.

    There's no DNS change. No traffic re-steering. No central decision. The failure is absorbed at the routing layer.

    For comparison: in unicast, a server failure means every client trying to reach that IP fails until you either bring the server back up or update DNS to point at a different IP — a process that can take minutes to hours of cache TTL aging out.

    3. DDoS dilution

    A DDoS attack against an anycast IP doesn't concentrate at one location. Attack traffic from all over the internet is routed by the same BGP rules — meaning attackers in Asia hit the Asian PoPs, attackers in Europe hit the European PoPs, attackers in North America hit the North American PoPs.

    A 1 Tbps DDoS distributed across 30 PoPs is 33 Gbps per PoP. Each PoP can absorb that with local scrubbing; no single PoP is overwhelmed. This is one of the structural reasons anycast became the default for high-availability DNS — it makes volumetric DDoS structurally harder.

    (Application-layer attacks, like NXDOMAIN floods or water-torture attacks, still need additional defences. Anycast handles volume; it doesn't auto-handle every attack pattern.)

    When Anycast Matters

    Almost always, for any DNS that serves real users. Specifically:

    • Public-facing websites and APIs — every page load involves DNS, and latency adds up.
    • Email — MX lookups happen on every inbound message; receiving servers are often far from your domain's authoritative server.
    • Mobile applications — mobile networks have variable resolver paths; anycast minimises the variance.
    • Multi-region SaaS — your customers are global; your DNS should be too.

    When does anycast not matter?

    • Internal-only DNS — corporate corp.example.com zones served only inside a private network. Use a single DNS server or simple primary/secondary inside the network; anycast is overkill.
    • Single-region services — if all your users are in one metro and you have a single nearby DNS PoP, anycast adds little.
    • Test / staging zones — if downtime is acceptable, anycast's resilience benefit is wasted.

    In practice, even single-region services usually benefit from a managed anycast provider because the operational cost is the same — and the multi-region resilience comes free.

    What "Anycast" Doesn't Mean

    A few common misconceptions:

    • Anycast is not magic load balancing for stateful services. It works perfectly for stateless UDP DNS. For stateful TCP / HTTPS, the same client must reliably reach the same server through the connection lifetime — which usually does happen but isn't guaranteed by BGP. CDNs use anycast for the front door but other techniques (consistent hashing, stateful PoP affinity) for the connection state.
    • Anycast is not faster than the speed of light. It minimises the routing path, but if all your PoPs are in Europe and your client is in São Paulo, the answer still has to cross the Atlantic.
    • Anycast is not a substitute for DNSSEC. Anycast is a delivery mechanism; DNSSEC is data authentication. Both layers are independently valuable. See What is DNSSEC?.
    • Anycast is not the same as "global anycast." Some providers run regional anycast (e.g., EU-only for sovereignty reasons); some run global anycast everywhere. The distinction matters for jurisdiction-conscious deployments. DNScale runs both — see DNS delegation for DNScale regions.

    Anycast vs Other Distribution Strategies

    StrategyHow it distributesProsCons
    UnicastOne IP, one serverSimple, easy to reason aboutNo redundancy, no latency optimisation, single point of failure
    DNS round-robinMultiple A records, resolver picksEasy, no special infrastructureNo health-check, slow failover (TTL-bound), uneven distribution
    GeoDNSDNS provider returns different IPs based on client geographyCoarse geo-routingAdds DNS-layer logic; granularity limited to GeoIP databases
    AnycastOne IP, BGP routes to nearest serverFast, automatic failover, DDoS dilutionRequires BGP expertise, IP space, AS number; or managed provider

    For DNS specifically, anycast is the answer the industry converged on for the same reason TCP/IP converged on packet switching: it just works at the layer where it matters.

    Where DNScale Sits

    DNScale runs anycast as the default for every zone — there's no "anycast plan." Specifically:

    • Two anycast networks — an EU-only anycast for jurisdictionally-isolated DNS, and a Global anycast for worldwide low latency. Customers choose per zone.
    • Direct BGP control — DNScale operates under its own AS numbers, not as a tenant in a larger provider's AS. This means we can withdraw a PoP from BGP within seconds during incident response, without coordinating through an upstream.
    • Public footprint — AS numbers, IXP peering, PoP locations are all published. See DNScale infrastructure and EU operations.

    This isn't unique to DNScale — every modern managed DNS provider runs some form of anycast. The differences between providers are about jurisdiction, peering depth, IaC parity, and pricing, not about whether anycast is offered.

    References

    • IETF RFC 4786 — Operation of Anycast Services
    • IETF RFC 1546 — Host Anycasting Service (historical foundation)
    • IETF RFC 7094 — Architectural Considerations of IP Anycast
    • BGP routing references: RFC 4271 (BGP-4)
    • RIPE / ARIN: AS number and IP allocation policies

    Frequently asked questions

    Is anycast different from a CDN?
    Anycast is a network-layer technique (IP addresses); CDNs are a content-distribution architecture that often uses anycast underneath. A CDN like Cloudflare or Akamai runs anycast for both DNS and content delivery. For DNS specifically, anycast is the standard mechanism for distributing authoritative servers across the globe — you don't need a 'CDN for DNS', you just need anycast DNS.
    Do I need anycast DNS for my small website?
    Probably yes — but you almost certainly already have it without thinking about it. Every major managed DNS provider (DNScale, Cloudflare, Route 53, Google Cloud DNS, ClouDNS, Bunny, etc.) runs anycast by default. You're getting anycast as a side-effect of choosing a managed provider; you don't need to opt in or pay extra. The exception is if you're self-hosting DNS on a single VPS — that's unicast, and for production traffic you'd benefit from moving to anycast.
    How is anycast different from a load balancer?
    A load balancer is a single IP that distributes traffic across backend servers behind it — the load balancer itself is a single point. Anycast distributes the IP itself across many physical locations using BGP. With anycast, there's no central balancer; the routing fabric of the internet decides which server each client reaches. For DNS specifically (small UDP queries with no session state), anycast is a near-perfect fit; for stateful TCP services it's more complex.
    What happens when an anycast server fails?
    BGP, the routing protocol of the internet, automatically reconverges. The failed server's BGP advertisement is withdrawn, and the routing fabric picks the next-nearest available server announcing the same IP. Convergence typically takes seconds to tens of seconds — fast enough that DNS clients (which retry on timeout) usually never notice. This is one of anycast's headline benefits: failover is automatic and infrastructure-driven, not application-driven.
    Can I run my own anycast?
    Yes, but it's substantial work. You need an Autonomous System (AS) number from a regional internet registry (RIPE in Europe, ARIN in North America), your own IP space, BGP-speaking routers in multiple locations, peering or transit agreements at internet exchanges, and 24/7 network operations. Most companies skip this entirely and use a managed DNS provider that already runs anycast — at a fraction of the cost and operational complexity.
    What does 'anycast PoP' mean?
    PoP stands for Point of Presence — a physical site where a provider has servers connected to one or more networks. An anycast network has many PoPs, each announcing the same IP address(es). When a client queries an anycast IP, BGP routes the query to the topologically closest PoP. DNS providers typically have 20+ to 200+ PoPs distributed globally.

    Ready to manage your DNS with confidence?

    DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.

    Start free