Networking

What is Anycast?

Definition

Anycast announces the same IP address from several locations at once, so each user is routed to the nearest instance by BGP. It reduces latency without DNS propagation delay and absorbs volumetric attacks by spreading them across sites.

Why Anycast matters

It reduces latency without DNS propagation delay and absorbs volumetric attacks by spreading them across sites. It requires the provider to control its own address space and ASN.

Anycast in practice

When you manage an Anycast server, you notice that different traceroutes to the same IP show different paths depending on your location. You might see your packets arrive at a site you didn't directly configure, because BGP picks the nearest instance. To make this work, you control your own ASN and address space, and you advertise the same prefix from each site. If you get it wrong—say, you don't coordinate routing policies—you can end up with asymmetric paths or a black hole.

What people get wrong about Anycast

A common mistake is thinking Anycast means a single server is mirrored everywhere. In reality, it's the same IP advertised from multiple independent instances; each one must handle the traffic it receives. The correction: Anycast doesn't replicate your data or state; it only routes connections to the closest instance, so each instance must be able to serve any client independently.

Anycast — common questions

How does Anycast affect my connection latency?

Anycast can reduce latency by routing you to the nearest instance, but only if the provider has points of presence close to you. You might measure a lower ping compared to a unicast setup, but the improvement depends on the network topology and BGP routing decisions.

Can Anycast help with DDoS protection?

Yes, because Anycast spreads incoming traffic across multiple sites, which can absorb some volumetric attacks. However, the effectiveness depends on the provider's overall scrubbing capacity—our always-on mitigation includes up to 12 Tbps—and whether the attack saturates the links to all sites.

More from networking

ASN
An ASN identifies a network that controls its own routing policy and announces its address space to the global routing table via BGP.
BGP
BGP is the protocol that autonomous systems use to exchange routing information and decide how traffic crosses the internet.
IXP
An IXP is a shared physical facility where networks interconnect directly rather than paying a transit provider to carry traffic between them.
Peering
Peering is a direct interconnection between two networks that exchange traffic with each other without paying a third party to carry it.
IP transit
Transit is a paid service in which one network carries another network's traffic to the rest of the internet.
IPv6
IPv6 is the current version of the Internet Protocol, using 128-bit addresses to replace the exhausted 32-bit IPv4 space.
Reverse DNS
Reverse DNS maps an IP address back to a hostname through a PTR record, the inverse of a normal DNS lookup.
Port 25
Port 25 is the TCP port used for server-to-server SMTP mail delivery.