What is Anycast DNS? | How Anycast works with DNS

Using Anycast with DNS helps speed up the DNS resolution process for users and ensures DNS reliability.



  • Understand how Anycast works
  • Learn how Anycast makes DNS resolving faster and more efficient
  • Explain why Anycast helps mitigate DNS flood DDoS attacks


What is Anycast DNS?

In Anycast, one IP address can apply to many servers. Anycast DNS means that any one of a number of DNS servers can respond to DNS queries, and typically the one that is geographically closest will provide the response. This reduces latency, improves uptime for the DNS resolving service, and provides protection against DNS flood DDoS attacks.

What is Anycast?

Typically, any device or server that connects directly to the Internet will have a unique IP address. Communication between network-connected devices is 1-to-1; each communication goes from one specific device to the targeted device on the other end of the communication. Anycast networks, in contrast, allow multiple servers on the network to use the same IP address, or set of IP addresses. Communication with an Anycast network is 1-to-many.

Anycast DNS

Ordinarily, an IP address functions like a street address: it specifies the one specific location where the message is going. But suppose a friend had multiple residences around the country. Imagine a letter addressed to one of her houses could go to any one of those other houses based on which one was closest to the sender, even though the letter was addressed to a house in another city. This is sort of how Anycast routing works: one IP address can be associated with multiple locations.

For example, a request to an IP address within the Cloudflare CDN can be responded to by any data center Cloudflare operates, instead of one specific server. For more on Anycast and how a CDN can use it, see "What is Anycast?"

How does Anycast DNS work?

DNSは、Domain Name System(ドメインネームシステム)の略称であり、ドメイン名(Webサイトの名前)をマシンが判読できる英数字のIPアドレスに変換するシステムです。このことを「名前解決」と呼んでいて、DNSリゾルバーは解決を管理するサーバーです。ユーザーがWebサイトを読み込む場合、クライアントデバイスは、そのWebサイトのIPアドレスをDNSリゾルバーに問い合わせる必要があります。



Cloudflare offers DNS resolving on our distributed CDN with data centers in 250 cities. Because the CDN is Anycast, DNS queries can be resolved from any data center in the network. Any DNS resolver in the network can respond to any DNS query.

How does DNS resolving work without Anycast?


How does Anycast DNS provide resilience against DDoS attacks?



エニーキャストネットワークは、DDoS攻撃対策を提供しますが、これはトラフィックがネットワーク全体に分散するためです。言い換えれば、1つのIPアドレスへのリクエストに多くのサーバーが応答できるので、数千のリクエストは1つのサーバーを圧倒せずに多くのサーバーに負荷が分散されます。したがって、エニーキャストDNSは大部分のDNSフラッド攻撃の影響をあまり受けず、こうした理由から、Cloudflare DNSサービスはDDoS攻撃に対して耐性があります。