
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sun, 12 Apr 2026 02:15:25 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Our ongoing commitment to privacy for the 1.1.1.1 public DNS resolver]]></title>
            <link>https://blog.cloudflare.com/1111-privacy-examination-2026/</link>
            <pubDate>Wed, 01 Apr 2026 13:00:00 GMT</pubDate>
            <description><![CDATA[ Eight years ago, we launched 1.1.1.1 to build a faster, more private Internet. Today, we’re sharing the results of our latest independent examination. The result: our privacy protections are working exactly as promised. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Exactly 8 years ago today, <a href="https://blog.cloudflare.com/announcing-1111/"><u>we launched the 1.1.1.1 public DNS resolver</u></a>, with the intention to build the world’s <a href="https://www.dnsperf.com/#!dns-resolvers"><u>fastest</u></a> resolver — and the most private one. We knew that trust is everything for a service that handles the "phonebook of the Internet." That’s why, at launch, we made a unique commitment to publicly confirm that we are doing what we said we would do with personal data. In 2020, we <a href="https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination/"><u>hired an independent firm to check our work</u></a>, instead of just asking you to take our word for it. We shared our intention to update such examinations in the future. We also called on other providers to do the same, but, as far as we are aware, no other major public resolver has had their DNS privacy practices independently examined.</p><p>At the time of the 2020 review, the 1.1.1.1 resolver was less than two years old, and the purpose of the examination was to prove our systems made good on all the commitments we made about how our 1.1.1.1 resolver functioned, even commitments that did not impact personal data or user privacy. </p><p>Since then, Cloudflare’s technology stack has grown significantly in both scale and complexity. For example, we <a href="https://blog.cloudflare.com/big-pineapple-intro/"><u>built an entirely new platform</u></a> that powers our 1.1.1.1 resolver and other DNS systems. So we felt it was vital to review our systems, and our 1.1.1.1 resolver privacy commitments in particular, once again with a rigorous and independent review. </p><p>Today, we are sharing the results of our most recent privacy examination by the same Big 4 accounting firm. Its independent examination is available on our <a href="https://www.cloudflare.com/trust-hub/compliance-resources/"><u>compliance page</u></a>.</p><p>Following the conclusion of the 2024 calendar year, we began our comprehensive process of collecting and preparing evidence for our independent auditors. The examination took several months and required many teams across Cloudflare to provide supporting evidence of our privacy controls in action. After the independent auditors' completion of the examination, we're pleased to share the final report, which provides assurance that our commitments were met: our systems are as private as promised. Most importantly, <b>our core privacy guarantees for the 1.1.1.1 resolver remain unchanged and confirmed by independent review:</b></p><ul><li><p><b>Cloudflare will not sell or share public resolver users’ personal data with third parties or use personal data from the public resolver to target any user with advertisements.</b></p></li></ul><ul><li><p><b>Cloudflare will only retain or use what is being asked, not information that will identify who is asking it.</b> </p></li></ul><ul><li><p><b>Source IP addresses are anonymized and deleted within 25 hours.</b></p></li></ul><p>We also want to be transparent about two points. First: as we explained in <a href="https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination/"><u>our 2020 blog announcing the results of our previous examination</u>,</a> randomly sampled network packets (at most 0.05% of all traffic, including the querying IP address of 1.1.1.1 public resolver users) are used solely for network troubleshooting and attack mitigation.</p><p>Second, the scope of this examination focuses exclusively on our privacy commitments. Back in 2020, our first examination reviewed all of our representations, not only our privacy commitments but our description of how we would handle anonymized transaction and debug log data (“Public Resolver Logs”) for the legitimate operation of our Public Resolver and research purposes. Over time, our uses of this data to do things like power <a href="https://radar.cloudflare.com/"><u>Cloudflare Radar</u></a>, which was released after our initial 1.1.1.1 examination, have changed how we treat those logs, even though there is no impact on personal information or personal privacy. </p><p><a href="https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination/"><u>As we noted with the first review 6 years ago</u></a>: we’ve never wanted to know what individuals do on the Internet, and we’ve taken technical steps to ensure we can’t. At Cloudflare, we believe privacy should be the default. By proactively undergoing these independent examinations, we hope to set a standard for the rest of the industry. We believe every user, whether they are browsing the web directly or deploying an AI agent on their behalf, deserves an Internet that doesn't track their movement. And further, Cloudflare steadfastly stands behind the commitment in our <a href="https://www.cloudflare.com/privacypolicy/"><u>Privacy Policy</u></a> that we will not combine any information collected from DNS queries to the 1.1.1.1 resolver with any other Cloudflare or third-party data in any way that can be used to identify individual end users.</p><p>As always, we thank you for trusting 1.1.1.1 to be your gateway to the Internet. Details of the 1.1.1.1 resolver privacy examination and our accountant’s report can be found on Cloudflare’s <a href="https://www.cloudflare.com/trust-hub/compliance-resources/"><u>Certifications and compliance resources page</u></a>. Visit <a href="https://developers.cloudflare.com/1.1.1.1/"><u>https://developers.cloudflare.com/1.1.1.1/</u></a> to learn more about how to get started with the Internet's fastest, privacy-first DNS resolver. </p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Consumer Services]]></category>
            <category><![CDATA[Transparency]]></category>
            <guid isPermaLink="false">VOddnCi9jbM6zHOay1HCN</guid>
            <dc:creator>Rory Malone</dc:creator>
            <dc:creator>Hannes Gerhart</dc:creator>
            <dc:creator>Leah Romm</dc:creator>
        </item>
        <item>
            <title><![CDATA[What came first: the CNAME or the A record?]]></title>
            <link>https://blog.cloudflare.com/cname-a-record-order-dns-standards/</link>
            <pubDate>Wed, 14 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[ A recent change to 1.1.1.1 accidentally altered the order of CNAME records in DNS responses, breaking resolution for some clients. This post explores the technical root cause, examines the source code of affected resolvers, and dives into the inherent ambiguities of the DNS RFCs.   ]]></description>
            <content:encoded><![CDATA[ <p>On January 8, 2026, a routine update to 1.1.1.1 aimed at reducing memory usage accidentally triggered a wave of DNS resolution failures for users across the Internet. The root cause wasn't an attack or an outage, but a subtle shift in the order of records within our DNS responses.  </p><p>While most modern software treats the order of records in DNS responses as irrelevant, we discovered that some implementations expect CNAME records to appear before everything else. When that order changed, resolution started failing. This post explores the code change that caused the shift, why it broke specific DNS clients, and the 40-year-old protocol ambiguity that makes the "correct" order of a DNS response difficult to define.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <p><i>All timestamps referenced are in Coordinated Universal Time (UTC).</i></p><table><tr><th><p><b>Time</b></p></th><th><p><b>Description</b></p></th></tr><tr><td><p>2025-12-02</p></td><td><p>The record reordering is introduced to the 1.1.1.1 codebase</p></td></tr><tr><td><p>2025-12-10</p></td><td><p>The change is released to our testing environment</p></td></tr><tr><td><p>2026-01-07 23:48</p></td><td><p>A global release containing the change starts</p></td></tr><tr><td><p>2026-01-08 17:40</p></td><td><p>The release reaches 90% of servers</p></td></tr><tr><td><p>2026-01-08 18:19</p></td><td><p>Incident is declared</p></td></tr><tr><td><p>2026-01-08 18:27</p></td><td><p>The release is reverted</p></td></tr><tr><td><p>2026-01-08 19:55</p></td><td><p>Revert is completed. Impact ends</p></td></tr></table>
    <div>
      <h2>What happened?</h2>
      <a href="#what-happened">
        
      </a>
    </div>
    <p>While making some improvements to lower the memory usage of our cache implementation, we introduced a subtle change to CNAME record ordering. The change was introduced on December 2, 2025, released to our testing environment on December 10, and began deployment on January 7, 2026.</p>
    <div>
      <h3>How DNS CNAME chains work</h3>
      <a href="#how-dns-cname-chains-work">
        
      </a>
    </div>
    <p>When you query for a domain like <code>www.example.com</code>, you might get a <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-cname-record/"><u>CNAME (Canonical Name)</u></a> record that indicates one name is an alias for another name. It’s the job of public resolvers, such as <a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"><u>1.1.1.1</u></a>, to follow this chain of aliases until it reaches a final response:</p><p><code>www.example.com → cdn.example.com → server.cdn-provider.com → 198.51.100.1</code></p><p>As 1.1.1.1 traverses this chain, it caches every intermediate record. Each record in the chain has its own <a href="https://www.cloudflare.com/learning/cdn/glossary/time-to-live-ttl/"><u>TTL (Time-To-Live)</u></a>, indicating how long we can cache it. Not all the TTLs in a CNAME chain need to be the same:</p><p><code>www.example.com → cdn.example.com (TTL: 3600 seconds) # Still cached
cdn.example.com → 198.51.100.1    (TTL: 300 seconds)  # Expired</code></p><p>When one or more records in a CNAME chain expire, it’s considered partially expired. Fortunately, since parts of the chain are still in our cache, we don’t have to resolve the entire CNAME chain again — only the part that has expired. In our example above, we would take the still valid <code>www.example.com → cdn.example.com</code> chain, and only resolve the expired <code>cdn.example.com</code> <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/"><u>A record</u></a>. Once that’s done, we combine the existing CNAME chain and the newly resolved records into a single response.</p>
    <div>
      <h3>The logic change</h3>
      <a href="#the-logic-change">
        
      </a>
    </div>
    <p>The code that merges these two chains is where the change occurred. Previously, the code would create a new list, insert the existing CNAME chain, and then append the new records:</p>
            <pre><code>impl PartialChain {
    /// Merges records to the cache entry to make the cached records complete.
    pub fn fill_cache(&amp;self, entry: &amp;mut CacheEntry) {
        let mut answer_rrs = Vec::with_capacity(entry.answer.len() + self.records.len());
        answer_rrs.extend_from_slice(&amp;self.records); // CNAMEs first
        answer_rrs.extend_from_slice(&amp;entry.answer); // Then A/AAAA records
        entry.answer = answer_rrs;
    }
}
</code></pre>
            <p>However, to save some memory allocations and copies, the code was changed to instead append the CNAMEs to the existing answer list:</p>
            <pre><code>impl PartialChain {
    /// Merges records to the cache entry to make the cached records complete.
    pub fn fill_cache(&amp;self, entry: &amp;mut CacheEntry) {
        entry.answer.extend(self.records); // CNAMEs last
    }
}
</code></pre>
            <p>As a result, the responses that 1.1.1.1 returned now sometimes had the CNAME records appearing at the bottom, after the final resolved answer.</p>
    <div>
      <h3>Why this caused impact</h3>
      <a href="#why-this-caused-impact">
        
      </a>
    </div>
    <p>When DNS clients receive a response with a CNAME chain in the answer section, they also need to follow this chain to find out that <code>www.example.com</code> points to <code>198.51.100.1</code>. Some DNS client implementations handle this by keeping track of the expected name for the records as they’re iterated sequentially. When a CNAME is encountered, the expected name is updated:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.        IN    A

;; ANSWER SECTION:
www.example.com.    3600   IN    CNAME  cdn.example.com.
cdn.example.com.    300    IN    A      198.51.100.1
</code></pre>
            <p></p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>Encounter <code>cdn.example.com. A 198.51.100.1</code></p></li></ol><p>When the CNAME suddenly appears at the bottom, this no longer works:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.	       IN    A

;; ANSWER SECTION:
cdn.example.com.    300    IN    A      198.51.100.1
www.example.com.    3600   IN    CNAME  cdn.example.com.
</code></pre>
            <p></p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Ignore <code>cdn.example.com. A 198.51.100.1</code> as it doesn’t match the expected name</p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>No more records are present, so the response is considered empty</p></li></ol><p>One such implementation that broke is the <a href="https://man7.org/linux/man-pages/man3/getaddrinfo.3.html"><code><u>getaddrinfo</u></code></a> function in glibc, which is commonly used on Linux for DNS resolution. When looking at its <code>getanswer_r</code> implementation, we can indeed see it expects to find the CNAME records before any answers:</p>
            <pre><code>for (; ancount &gt; 0; --ancount)
  {
    // ... parsing DNS records ...
    
    if (rr.rtype == T_CNAME)
      {
        /* Record the CNAME target as the new expected name. */
        int n = __ns_name_unpack (c.begin, c.end, rr.rdata,
                                  name_buffer, sizeof (name_buffer));
        expected_name = name_buffer;  // Update what we're looking for
      }
    else if (rr.rtype == qtype
             &amp;&amp; __ns_samebinaryname (rr.rname, expected_name)  // Must match!
             &amp;&amp; rr.rdlength == rrtype_to_rdata_length (type:qtype))
      {
        /* Address record matches - store it */
        ptrlist_add (list:addresses, item:(char *) alloc_buffer_next (abuf, uint32_t));
        alloc_buffer_copy_bytes (buf:abuf, src:rr.rdata, size:rr.rdlength);
      }
  }
</code></pre>
            <p>Another notable affected implementation was the DNSC process in three models of Cisco ethernet switches. In the case where switches had been configured to use 1.1.1.1 these switches experienced spontaneous reboot loops when they received a response containing the reordered CNAMEs. <a href="https://www.cisco.com/c/en/us/support/docs/smb/switches/Catalyst-switches/kmgmt3846-cbs-reboot-with-fatal-error-from-dnsc-process.html"><u>Cisco has published a service document describing the issue</u></a>.</p>
    <div>
      <h3>Not all implementations break</h3>
      <a href="#not-all-implementations-break">
        
      </a>
    </div>
    <p>Most DNS clients don’t have this issue. For example, <a href="https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html"><u>systemd-resolved</u></a> first parses the records into an ordered set:</p>
            <pre><code>typedef struct DnsAnswerItem {
        DnsResourceRecord *rr; // The actual record
        DnsAnswerFlags flags;  // Which section it came from
        // ... other metadata
} DnsAnswerItem;


typedef struct DnsAnswer {
        unsigned n_ref;
        OrderedSet *items;
} DnsAnswer;
</code></pre>
            <p>When following a CNAME chain it can then search the entire answer set, even if the CNAME records don’t appear at the top.</p>
    <div>
      <h2>What the RFC says</h2>
      <a href="#what-the-rfc-says">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc1034"><u>RFC 1034</u></a>, published in 1987, defines much of the behavior of the DNS protocol, and should give us an answer on whether the order of CNAME records matters. <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-4.3.1"><u>Section 4.3.1</u></a> contains the following text:</p><blockquote><p>If recursive service is requested and available, the recursive response to a query will be one of the following:</p><p>- The answer to the query, possibly preface by one or more CNAME RRs that specify aliases encountered on the way to an answer.</p></blockquote><p>While "possibly preface" can be interpreted as a requirement for CNAME records to appear before everything else, it does not use normative key words, such as <a href="https://datatracker.ietf.org/doc/html/rfc2119"><u>MUST and SHOULD</u></a> that modern RFCs use to express requirements. This isn’t a flaw in RFC 1034, but simply a result of its age. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><u>RFC 2119</u></a>, which standardized these key words, was published in 1997, 10 years <i>after</i> RFC 1034.</p><p>In our case, we did originally implement the specification so that CNAMEs appear first. However, we did not have any tests asserting the behavior remains consistent due to the ambiguous language in the RFC.</p>
    <div>
      <h3>The subtle distinction: RRsets vs RRs in message sections</h3>
      <a href="#the-subtle-distinction-rrsets-vs-rrs-in-message-sections">
        
      </a>
    </div>
    <p>To understand why this ambiguity exists, we need to understand a subtle but important distinction in DNS terminology.</p><p>RFC 1034 <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-3.6"><u>section 3.6</u></a> defines Resource Record Sets (RRsets) as collections of records with the same name, type, and class. For RRsets, the specification is clear about ordering:</p><blockquote><p>The order of RRs in a set is not significant, and need not be preserved by name servers, resolvers, or other parts of the DNS.</p></blockquote><p>However, RFC 1034 doesn’t clearly specify how message sections relate to RRsets. While modern DNS specifications have shown that message sections can indeed contain multiple RRsets (consider <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/">DNSSEC</a> responses with signatures), RFC 1034 doesn’t describe message sections in those terms. Instead, it treats message sections as containing individual Resource Records (RRs).</p><p>The problem is that the RFC primarily discusses ordering in the context of RRsets but doesn't specify the ordering of different RRsets relative to each other within a message section. This is where the ambiguity lives.</p><p>RFC 1034 <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-6.2.1"><u>section 6.2.1</u></a> includes an example that demonstrates this ambiguity further. It mentions that the order of Resource Records (RRs) is not significant either:</p><blockquote><p>The difference in ordering of the RRs in the answer section is not significant.</p></blockquote><p>However, this example only shows two A records for the same name within the same RRset. It doesn't address whether this applies to different record types like CNAMEs and A records.</p>
    <div>
      <h2>CNAME chain ordering</h2>
      <a href="#cname-chain-ordering">
        
      </a>
    </div>
    <p>It turns out that this issue extends beyond putting CNAME records before other record types. Even when CNAMEs appear before other records, sequential parsing can still break if the CNAME chain itself is out of order. Consider the following response:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.              IN    A

;; ANSWER SECTION:
cdn.example.com.           3600  IN    CNAME  server.cdn-provider.com.
www.example.com.           3600  IN    CNAME  cdn.example.com.
server.cdn-provider.com.   300   IN    A      198.51.100.1
</code></pre>
            <p>Each CNAME belongs to a different RRset, as they have different owners, so the statement about RRset order being insignificant doesn’t apply here.</p><p>However, RFC 1034 doesn't specify that CNAME chains must appear in any particular order. There's no requirement that <code>www.example.com. CNAME cdn.example.com.</code> must appear before <code>cdn.example.com. CNAME server.cdn-provider.com.</code>. With sequential parsing, the same issue occurs:</p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Ignore <code>cdn.example.com. CNAME server.cdn-provider.com</code>. as it doesn’t match the expected name</p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>Ignore <code>server.cdn-provider.com. A 198.51.100.1</code> as it doesn’t match the expected name</p></li></ol>
    <div>
      <h2>What should resolvers do?</h2>
      <a href="#what-should-resolvers-do">
        
      </a>
    </div>
    <p>RFC 1034 section 5 describes resolver behavior. <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-5.2.2"><u>Section 5.2.2</u></a> specifically addresses how resolvers should handle aliases (CNAMEs): </p><blockquote><p>In most cases a resolver simply restarts the query at the new name when it encounters a CNAME.</p></blockquote><p>This suggests that resolvers should restart the query upon finding a CNAME, regardless of where it appears in the response. However, it's important to distinguish between different types of resolvers:</p><ul><li><p>Recursive resolvers, like 1.1.1.1, are full DNS resolvers that perform recursive resolution by querying authoritative nameservers</p></li><li><p>Stub resolvers, like glibc’s getaddrinfo, are simplified local interfaces that forward queries to recursive resolvers and process the responses</p></li></ul><p>The RFC sections on resolver behavior were primarily written with full resolvers in mind, not the simplified stub resolvers that most applications actually use. Some stub resolvers evidently don’t implement certain parts of the spec, such as the CNAME-restart logic described in the RFC. </p>
    <div>
      <h2>The DNSSEC specifications provide contrast</h2>
      <a href="#the-dnssec-specifications-provide-contrast">
        
      </a>
    </div>
    <p>Later DNS specifications demonstrate a different approach to defining record ordering. <a href="https://datatracker.ietf.org/doc/html/rfc4035"><u>RFC 4035</u></a>, which defines protocol modifications for <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>DNSSEC</u></a>, uses more explicit language:</p><blockquote><p>When placing a signed RRset in the Answer section, the name server MUST also place its RRSIG RRs in the Answer section. The RRSIG RRs have a higher priority for inclusion than any other RRsets that may have to be included.</p></blockquote><p>The specification uses "MUST" and explicitly defines "higher priority" for <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>RRSIG</u></a> records. However, "higher priority for inclusion" refers to whether RRSIGs should be included in the response, not where they should appear. This provides unambiguous guidance to implementers about record inclusion in DNSSEC contexts, while not mandating any particular behavior around record ordering.</p><p>For unsigned zones, however, the ambiguity from RFC 1034 remains. The word "preface" has guided implementation behavior for nearly four decades, but it has never been formally specified as a requirement.</p>
    <div>
      <h2>Do CNAME records come first?</h2>
      <a href="#do-cname-records-come-first">
        
      </a>
    </div>
    <p>While in our interpretation the RFCs do not require CNAMEs to appear in any particular order, it’s clear that at least some widely-deployed DNS clients rely on it. As some systems using these clients might be updated infrequently, or never updated at all, we believe it’s best to require CNAME records to appear in-order before any other records.</p><p>Based on what we have learned during this incident, we have reverted the CNAME re-ordering and do not intend to change the order in the future.</p><p>To prevent any future incidents or confusion, we have written a proposal in the form of an <a href="https://www.ietf.org/participate/ids/"><u>Internet-Draft</u></a> to be discussed at the IETF. If consensus is reached on the clarified behavior, this would become an RFC that explicitly defines how to correctly handle CNAMEs in DNS responses, helping us and the wider DNS community navigate the protocol. The proposal can be found at <a href="https://datatracker.ietf.org/doc/draft-jabley-dnsop-ordered-answer-section/">https://datatracker.ietf.org/doc/draft-jabley-dnsop-ordered-answer-section</a>. If you have suggestions or feedback we would love to hear your opinions, most usefully via the <a href="https://datatracker.ietf.org/wg/dnsop/about/"><u>DNSOP working group</u></a> at the IETF.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Post Mortem]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Standards]]></category>
            <category><![CDATA[Bugs]]></category>
            <category><![CDATA[Consumer Services]]></category>
            <guid isPermaLink="false">3fP84BsxwSxKr7ffpmVO6s</guid>
            <dc:creator>Sebastiaan Neuteboom</dc:creator>
        </item>
        <item>
            <title><![CDATA[ChatGPT's rivals, Kwai's quiet rise: the top Internet services of 2025]]></title>
            <link>https://blog.cloudflare.com/radar-2025-year-in-review-internet-services/</link>
            <pubDate>Mon, 15 Dec 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ AI competition intensified in 2025 as ChatGPT gained strong challengers. Instagram climbed, X declined, and platforms like Shopee, Temu, and Kwai reshaped global Internet usage. Our 2025 DNS data shows how Internet patterns evolved. ]]></description>
            <content:encoded><![CDATA[ <p>In 2025, the Internet is more central to our lives than ever, and we rely on an array of online services to get things done, connect with others, and enjoy ourselves. Cloudflare’s Top Internet Services of 2025 report explores how the connected world interacted this year, based on Cloudflare’s observations and analysis of DNS trends. </p><p>This report is part of the <a href="https://radar.cloudflare.com/year-in-review/2025"><u>2025 Cloudflare Radar Year in Review</u></a>, focused on shifts in popularity of Internet services. We hope you find the results are a compelling view of trends in nine major categories — who’s moving up, who’s sliding down, and who continues to hold our attention.</p><p>These rankings show relative popularity within each category, based on anonymized DNS query data from Cloudflare’s <a href="https://1.1.1.1/"><u>1.1.1.1</u></a> <a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"><u>DNS resolver</u></a> and a machine-learning-assisted ranking method introduced in <a href="https://blog.cloudflare.com/radar-domain-rankings/#our-approach"><u>2022</u></a>. A lower rank does not imply lower traffic, only that other services may have grown faster.</p>
    <div>
      <h4>Categories</h4>
      <a href="#categories">
        
      </a>
    </div>
    <ul><li><p>Generative AI <a href="#generative-ai-claude-perplexity-and-gemini-become-serious-chatgpt-competitors">➜</a></p></li><li><p>Social Media <a href="#social-media-instagram-and-snapchat-up-x-down">➜</a></p></li><li><p>E-commerce <a href="#e-commerce-shopee-and-temu-rise">➜</a></p></li><li><p>Video Streaming <a href="#video-streaming-youtube-and-netflix-lead-hbo-enters-top-10">➜</a></p></li><li><p>News <a href="#news-globo-and-bbc-global-perspectives">➜</a></p></li><li><p>Messaging <a href="#messaging-whatsapp-dominates-signal-rises">➜</a></p></li><li><p>Metaverse &amp; Gaming <a href="#metaverse-gaming-roblox-leads-playstation-overtakes-xbox">➜</a></p></li><li><p>Financial Services <a href="#financial-services-stripe-keeps-lead-with-no-changes-on-top">➜</a></p></li><li><p>Cryptocurrency Services <a href="#cryptocurrency-binance-leads-okx-shines-at-the-end-of-the-year">➜</a></p></li></ul>
    <div>
      <h3>Key trends and takeaways</h3>
      <a href="#key-trends-and-takeaways">
        
      </a>
    </div>
    <p>From the dominance of social media and streaming to the rapid growth of AI chatbots, the data reflects an Internet that is constantly adapting to user needs and new technologies. Some of the shifts we observed coincide with news events such as the short Israel-Iran war and Donald Trump’s inauguration — as well as global phenomena like Eurovision and Black Friday.</p><ul><li><p><b>Asian e-commerce climbs:</b> Shopee and Temu joined Amazon in the global e-commerce top 3.</p></li><li><p><b>ChatGPT still leads, but rivals emerge:</b> Claude, Gemini, Perplexity, and DeepSeek turned Generative AI into a crowded field, with Gemini holding the #2 spot by year’s end.</p></li><li><p><b>Instagram up, TikTok and X down:</b> Instagram rose to #5 overall (from #7) and #2 in Social Media, while TikTok slipped to #8 and X fell outside the Top 20.</p></li><li><p><b>Kwai’s quiet rise in emerging markets:</b> The Chinese short-video app climbed in our global social ranking and is now #3 in Brazil and high in several emerging markets.</p></li><li><p><b>Roblox still rules gaming, PlayStation overtakes Xbox:</b> Roblox kept the #1 spot in Metaverse &amp; Gaming, while PlayStation passed Xbox for #2.</p></li><li><p><b>Stripe and Nubank digital-first finance dominates</b>: Stripe remained #1 in Financial Services, while Brazilian neobank Nubank highlights Latin America's digital banking surge.</p></li><li><p><b>Crypto steadies, OKX surges:</b> Binance kept the top spot, but OKX jumped to #2 as crypto traffic spiked around Trump’s inauguration and market rallies.</p></li><li><p><b>News under AI pressure</b>: Globo and ESPN dominated the News category, and most traditional outlets slid in our Overall ranking as AI platforms are reshaping how people find information.</p></li></ul><p>We’re also including a by-country and by-region perspective on the most popular Internet services in our <a href="https://radar.cloudflare.com/year-in-review/2025"><u>Year in Review microsite</u></a> for the second year. It features Top 10 lists not only for the Overall ranking but also for Generative AI, Social Media, and Messaging across more than 100 countries and regions. At the end of this post, we highlight key trends from this localized data.</p><p>Explore the full <a href="https://radar.cloudflare.com/year-in-review/2025"><u>2025 Cloudflare Radar Year in Review microsite</u></a> for interactive visualizations, additional metrics, and deeper analysis of Internet traffic patterns, security trends, and network performance data. Check out the <a href="https://blog.cloudflare.com/radar-2025-year-in-review/"><u>2025 Year in Review blog post</u></a> for more insights.</p>
    <div>
      <h4>Methodology</h4>
      <a href="#methodology">
        
      </a>
    </div>
    <p>Our analysis uses anonymized DNS query data from the <a href="https://1.1.1.1/"><u>1.1.1.1</u></a> public <a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"><u>DNS resolver</u></a>, used by millions globally. We aggregate domains associated with each service (e.g., twitter.com, t.co, and x.com are grouped as “X”) and focus on services accessed by end users, excluding infrastructure domains like root-servers.net. </p>
    <div>
      <h2>Google is still #1, while Instagram and YouTube move up</h2>
      <a href="#google-is-still-1-while-instagram-and-youtube-move-up">
        
      </a>
    </div>
    <p>Since we introduced our current ranking method in <a href="https://blog.cloudflare.com/radar-2022-year-in-review/"><u>2022</u></a>, Google (which includes services like Google Maps and Google Calendar) has remained the #1 most popular Internet service globally. Facebook continued to hold the #2 position for the third year in a row.</p><p>Apple and Microsoft follow a similar pattern to Google in that their main domains (apple.com and microsoft.com) power many different services. Other services with distinct domains, such as Outlook or iCloud, are counted separately.</p>


<p><i>(Note: In these rankings we use <span>▲</span><span>▼</span> symbols to indicate changes from 2024.)</i></p>

<strong>Top 10 most popular Internet services in 2025, overall</strong>
<ol>
    <li>Google</li>
    <li>Facebook</li>
    <li>Apple</li>
    <li>Microsoft <span>▲</span></li>
    <li>Instagram <span>▲</span></li>
    <li>AWS <span>▼</span></li>
    <li>YouTube <span>▲</span></li>
    <li>TikTok <span>▼</span></li>
    <li>Amazon </li>
    <li>WhatsApp</li>
</ol>
<p>
Apple held #3 through most of the year, but beginning in the summer Microsoft briefly challenged it, reaching that spot on several days in late 2025. Even so, Apple finished the year at #3. Microsoft’s tools performed better overall than in 2024 — Outlook and Microsoft 365/Office were just outside the Top 10.</p><p>Instagram was one of 2025’s strongest performers. It started the year at #7, matching its 2024 position, but climbed to #5 by year-end, reaching #4 on several days in May and June. YouTube also improved, rising one place to #7. Another Meta service, WhatsApp, remained #10 but appeared more frequently at #9 in late 2025 and even reached #7 during parts of May and June.</p><p>TikTok declined in the Overall ranking after a turbulent start to the year, including a temporary ban in the U.S. It fell from #4 in late 2024 to #8 by the end of 2025, performing worst during and after the summer. Amazon Web Services (AWS), which is tracked separately from Amazon through the amazonaws.com domain, also slipped slightly, moving down one position to #6. Amazon remained #9 but faced stronger competition than in 2024.</p><p>The chart below shows how these top Internet services evolved throughout the year.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Jjm9FRa7YPVSviBV9APob/e9485d5203a4099f4d3a3cb8fd50d560/BLOG-3095_1_Overall_top_10.png" />
          </figure><p>X continued its downward trajectory. In 2022, it ranked as high as #10 and was close to Instagram. In 2023, it fell out of the Top 10 and, in 2024, dropped to around #14-15. In 2025, it began at #15 and slid further, ending the year outside the Top 20. More on X’s performance appears in the <a href="#social-media-instagram-and-snapchat-up-x-down">Social Media section</a> below.</p>
    <div>
      <h2>Generative AI: Claude, Perplexity, and Gemini become serious ChatGPT competitors</h2>
      <a href="#generative-ai-claude-perplexity-and-gemini-become-serious-chatgpt-competitors">
        
      </a>
    </div>
    <p>Generative AI became a globally recognized category in late 2022 with the launch of ChatGPT, which turned into a worldwide phenomenon throughout <a href="https://blog.cloudflare.com/radar-2023-year-in-review-internet-services/"><u>2023</u></a>. In 2025, as in 2024, OpenAI’s ChatGPT remained by far the most popular service in this category, which includes chatbots, coding assistants, and other AI tools. But it now faces serious all-purpose chatbot competitors, including Claude, Perplexity, and Google Gemini, which saw more growth as the year went on.</p>

<strong>Top 10 Generative AI services in 2025</strong>
<ol>
    <li>ChatGPT / OpenAI</li>
    <li>Claude / Anthropic <span>▲</span></li>
    <li>Perplexity <span>▲</span></li>
    <li>Google Gemini <span>▲</span></li>
    <li>Character.AI <span>▼</span></li>
    <li>GitHub Copilot  <span>▲</span></li>
    <li>Windsurf AI <span>▼</span></li>
    <li>QuillBot <span>▼</span></li>
    <li>Grok / xAI <span>▲</span></li>
    <li>DeepSeek <span>▲</span></li>
</ol>
<p>In 2024, the closest services behind ChatGPT were Character.AI (role-play chatbots), Codeium (the coding assistant that’s now Windsurf), and QuillBot (writing and paraphrasing). These tools dropped in the rankings in 2025, especially QuillBot, as users sought out broad, consumer-facing chatbots. The drop in Character.AI’s ranking also coincides with its October announcement that <a href="https://www.bbc.com/news/articles/cq837y3v9y1o"><u>it would be banning teens</u></a> from using its AI chatbots — by November it was oscillating between #5 and #7.</p><p>The biggest jump came from Google’s Gemini. It began 2025 outside the Top 10 but climbed steadily and, from mid-September onward, held the #2 position on most days. In our year-end weighted ranking, it finished at #4.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2P9pcO1tvMhqXCSN132jsr/8a8120f9fd5559120c2a933159ee4ed2/BLOG-3095_2_GenAI_top_10.png" />
          </figure>
    <div>
      <h2>Claude, Perplexity, Grok, and the explosive entrance of DeepSeek</h2>
      <a href="#claude-perplexity-grok-and-the-explosive-entrance-of-deepseek">
        
      </a>
    </div>
    <p>Claude, the AI assistant from Anthropic, delivered one of the year’s strongest performances, rising from #8-10 in early 2025 to #2 on most weekdays in July and August, before Gemini overtook it in mid-September. Consistent with its enterprise positioning, Claude showed markedly stronger weekday usage.</p><p>Perplexity climbed from #7 to secure #3 from September onward, while Grok (the chatbot from xAI) entered the Top 20 in mid-February and reached #9 by the end of the month, later peaking at #6 on several weekends in October and November.</p><p>DeepSeek, the Chinese chatbot and open-source model developer, made the year’s most notable entrance. Between January 28 and February 3, it surged from outside the Top 20 to #3, demonstrating how quickly new entrants can disrupt the GenAI landscape. It stabilized between #6 and #10 for the remainder of the year.</p><p>Clear weekend-versus-weekday patterns emerged: ChatGPT and Claude dominated weekdays, reflecting workplace adoption, while Grok, Perplexity, and DeepSeek performed better on weekends, indicating stronger consumer and potentially hobbyist appeal.</p><p>Among coding assistants, GitHub Copilot improved from #7 in 2024 to #6 in 2025, reaching #3 on several days during the first half of the year. Windsurf AI (formerly Codeium) started strong at #4 but declined to #7-8 by year-end as consumer-facing platforms rose.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7BLXH0PyTtxCuSn1dJiCoJ/13bfaa843a2c0202a86a831bc86ddfe5/BLOG-3095_3_GitHub_copilot.png" />
          </figure>
    <div>
      <h2>AI chatbots Doubao and Dola/Cici gaining traction</h2>
      <a href="#ai-chatbots-doubao-and-dola-cici-gaining-traction">
        
      </a>
    </div>
    <p>ByteDance’s Doubao, launched in 2023, performed strongly despite one complication: it operates under a <a href="https://www.wired.com/story/bytedances-ai-chatbot-is-quietly-gaining-traction-around-the-world/"><u>different name internationally</u></a> — Dola (formerly Cici). While the international version uses its own domains, network patterns suggest they may still rely on some shared backend infrastructure with Doubao, including endpoints associated with doubao.com. This overlap helps explain why Doubao shows up in global rankings even in regions where Dola/Cici are the consumer-facing brands. Doubao ranks highly outside China — it is #7 in the GenAI category in Australia, #8 in New Zealand, and #9 in the UK, and climbs even higher in several African countries (#2 in Angola and Congo).</p><p>Among specialized AI services, Hugging Face, the open-source model repository, had some of the sharpest spikes of the year, reaching #3 on September 20-21, likely driven by model releases. Google’s dedicated AI properties showed more modest traction: DeepMind peaked at #12 in May, while AI Studio briefly entered the Top 20 in mid-September.</p><p>ElevenLabs (AI voice generation) reached #13-14 during peak periods, while Poe (Quora’s multi-bot aggregator) declined from #11 to #18. Meta AI remained outside the Top 10, appearing only sporadically in August and again in October–November.</p>
    <div>
      <h2>ChatGPT’s growth to the Top 40 of our Overall category</h2>
      <a href="#chatgpts-growth-to-the-top-40-of-our-overall-category">
        
      </a>
    </div>
    <p>When looking at trends for Generative AI services within our larger <b>Overall</b> ranking, some notable trends included:</p><ul><li><p>ChatGPT continued its steady ascent in the Overall domain ranking. After launching in late 2022, it hovered around #200 in early 2023, nearing the Top 100 by year-end. It then approached the Top 50 in late 2024, helped by back-to-school and return-to-work patterns. In 2025, it started between #51-60 and peaked at #33 on November 25, consistently ranking higher on weekdays.
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7GXwjNKnWii2NZXonVyPrb/12b76cd5174174393d494e65adfa2e6f/BLOG-3095_4_ChatGPT_growth.png" />
          </figure></li><li><p>By late November, ChatGPT sat just behind X (between #26-29) and ahead of Discord, Pinterest, and Reddit, a significant milestone for a service that didn’t exist three years earlier.</p></li><li><p>Other GenAI services also climbed the Overall rankings, though none matched ChatGPT’s momentum. Gemini rose quickly after entering the Top 500 in mid-March, peaking at #133 on November 24. Claude, barely inside the Top 500 in January, reached #155 on December 2 and held a Top 200 position from August onward. Perplexity surged from around #450 in early 2025 to peak at #155 on October 19, hovering near #160 in November. Grok reached #223 on November 18.</p></li></ul>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6HmctomJlFSCHxXNb0RVJr/502deda8f5e0cc2f8f2dc283fd903257/BLOG-3095_5_Gemini_Claude.png" />
          </figure>
    <div>
      <h2>Social media: Instagram and Snapchat up, X down</h2>
      <a href="#social-media-instagram-and-snapchat-up-x-down">
        
      </a>
    </div>
    <p><a href="https://datareportal.com/social-media-users"><u>Reports</u></a> estimate that over 5 billion people worldwide use social media, and that number has been growing. Facebook remains the dominant global platform, but the biggest shift in our rankings was Instagram displacing TikTok to secure the #2 spot. These platforms, along with Facebook, all appear in the Top 10 most popular Internet services overall. </p>

<strong>Top 10 Social Media services in 2025</strong>
<ol>
    <li>Facebook</li>
    <li>Instagram <span>▲</span></li>
    <li>TikTok <span>▼</span></li>
    <li>Snapchat <span>▲</span></li>
    <li>Linkedin <span>▲</span></li>
    <li>X / Twitter <span>▼</span></li>
    <li>Kwai <span>▲</span></li>
    <li>Discord <span>▼</span></li>
    <li>Pinterest</li>
    <li>Reddit</li>
</ol>
<p>Instagram and TikTok swapped positions starting in May, with Instagram securing an uncontested #2 from late June onward. Snapchat moved into #4 in March, displacing X, which ended the year at #6, behind LinkedIn for the first time in our rankings. Discord and Reddit both briefly reached #7 before settling at #8 and around #9-10 respectively.</p>
    <div>
      <h2>Kwai’s rise in emerging markets</h2>
      <a href="#kwais-rise-in-emerging-markets">
        
      </a>
    </div>
    <p>Kwai (known as <a href="https://en.wikipedia.org/wiki/Kuaishou"><u>Kuaishou</u></a> in China) climbed from #8 in late 2024 to #7 in 2025, driven by <a href="https://www.chinadaily.com.cn/a/202503/02/WS67d0f077a310c240449da5b4.html"><u>growth</u></a> in Latin America and other emerging markets. The Chinese short-video platform now ranks #2 in Brazil’s social media category (behind Facebook) and #3 in Brazil’s overall ranking.</p><p>Kwai reached top 10 status in two major emerging markets — Brazil (#3) and Indonesia (#9). It also ranked #15 in Syria, #18 in Colombia, and #20 in Egypt. Beyond these, it showed meaningful presence in markets like the Dominican Republic (#25), Guyana (#26), Oman (#28), and Argentina (#30).</p><p>Our global ranking also highlights several non-Western platforms inside the Top 20. Douyin (the Chinese version of TikTok) held #11 for the second year in a row. VK (often described as Russia’s Facebook) remained at #12, and SnackVideo, a <a href="https://www.ipsos.com/en-id/uncovering-growth-short-video-indonesia"><u>Southeast Asian</u></a> TikTok rival also owned by Kuaishou, ranked #13. Xiaohongshu (<a href="https://en.wikipedia.org/wiki/Xiaohongshu"><u>RedNote</u></a>), which gained attention during the brief U.S. <a href="https://blog.cloudflare.com/tiktok-ban-traffic-decline-alternatives-rednote/"><u>TikTok ban</u></a> in January, ranked #14.</p><p>Looking at microblogging competitors to X, none gained significant traction. Meta’s microblogging app Threads did not enter the Top 20 at any point, and Bluesky only briefly appeared on January 30, during the U.S. TikTok ban. Tumblr was in the Top 20 for much of the year, and Mastodon servers appeared there through most of October.</p><p>OnlyFans, the subscription-based content platform, appeared consistently in the Top 20 between May and early August (around #19) but declined in the second half of the year. Here’s the Social Media Top 10 chart for 2024:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/76e8qhIdmEr6VbUquIWWNH/f18cb25ff1fc07046b956837a8925175/BLOG-3095_6_Social_media_top_10.png" />
          </figure>
    <div>
      <h2>X alternatives in the Overall ranking</h2>
      <a href="#x-alternatives-in-the-overall-ranking">
        
      </a>
    </div>
    <p>Let’s go beyond the Social Media category to see how these platforms performed in our Overall ranking, where bigger shifts between services are evident.</p><p>X alternatives showed limited DNS presence. <a href="https://en.wikipedia.org/wiki/Mastodon_(social_network)"><u>Mastodon</u></a> (aggregated servers) performed best, consistently ranking between #208 and #248, with stronger weekend traffic. Bluesky peaked around #240 in May but declined through most of the year, with a notable spike as the U.S. <a href="https://en.wikipedia.org/wiki/2025_United_States_elections"><u>held off-year, state and local elections</u></a> on November 4 (#229). This mirrors the pattern seen after the 2024 U.S. presidential election, when Bluesky performed better around election day and peaked on November 14 at #193.</p><p>Threads trailed both platforms, peaking at #279 in June but generally ranking around #360. <i>(Note: Threads uses Meta’s shared infrastructure, so some images could load from Facebook/Instagram domains, which may reduce its standalone DNS footprint.)</i></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4rp255ykzYIoFWgs2NaKVk/df3ad27ca91be18f7a8b5b0f55a7d71c/BLOG-3095_7_X_alternatives.png" />
          </figure><p>Usage patterns in the Overall ranking:</p><ul><li><p><b>Weekday vs. weekend trends</b>: X, LinkedIn, Snapchat, and Discord performed better on weekdays, while Kwai, Pinterest, Tumblr, and OnlyFans peaked on weekends. LinkedIn ranked highest Monday–Wednesday, and Tinder continued its pattern of Sunday peaks.</p></li><li><p><b>Growth stories</b>: Reddit stayed in the Top 50 throughout 2025 (an improvement over 2024), stabilizing in the #34-40 range after May and performing strongest Monday-Thursday. Kwai also had a strong second half of the year, peaking at #28 in September.</p></li><li><p><b>Declines</b>: Quora continued the downward trajectory seen in 2024, falling from around #160 to outside the Top 200. Tinder and Tumblr followed similar patterns, both dropping below #200. OnlyFans remained inside the Top 200 from April to June but declined in the second half of the year.</p></li><li><p><b>Event-driven spikes</b>: Instagram reached #4 for several days between mid-May and mid-June. X peaked at #15 on March 2 during the Oscars (compared with a #12 peak in 2024). Pinterest surged on November 30, the Sunday of Black Friday week.</p></li></ul>
    <div>
      <h2>E-commerce: Shopee and Temu rise</h2>
      <a href="#e-commerce-shopee-and-temu-rise">
        
      </a>
    </div>
    <p>Every Cyber Week and Black Friday season reminds us how central e-commerce has become to global Internet traffic. In this category, Amazon remained the undisputed leader in 2025, but the strongest momentum came from newer players that now round out the top three: Shopee (which launched in Singapore in 2015 and is popular in Southeast Asia) and China’s Temu (which expanded to the U.S. in 2022). Meanwhile, 2024’s top-three finishers Taobao and AliExpress both moved down the ranking to #5 and #10 respectively.</p>

<strong>Top 10 E-commerce services in 2025</strong>
<ol>
    <li>Amazon</li>
    <li>Shopee <span>▲</span></li>
    <li>Temu <span>▲</span></li>
    <li>Shopify</li>
    <li>Taobao <span>▼</span></li>
    <li>eBay <span>▲</span></li>
    <li>Alibaba <span>▼</span></li>
    <li>Shein</li>
    <li>Mercado Libre</li>
    <li>AliExpress <span>▼</span></li>
</ol>
<p>Shopee and Taobao began 2025 competing for the #2 position, but from mid-April to early July, Temu temporarily overtook both. From July onward, Shopee held #2 consistently, with Temu settling at #3. In 2024, Shopee was just outside the Top 10, while Temu finished at #5.</p><p>Shopify also strengthened its position. It opened the year at #6 and has remained steadily at #4 since July — the same finishing position as in 2024, but now ahead of Taobao and AliExpress and just behind Shopee and Temu.</p><p>eBay showed a clearer recovery: after ending 2024 at #7 (and 2023 at #3), it moved between #3 and #6 early in the year and ultimately held #6. Shein maintained #8, identical to 2024, and continued to outperform Mercado Libre (#9).</p><p>Just outside the Top 10 were Russia’s Wildberries, followed by Walmart and Japan’s Rakuten.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7nJKoPr94TSk2g6Gay4DZ7/df350a17261e5f4d8e7f0d0b43f2a92c/BLOG-3095_7_Ecommerce_Top_10.png" />
          </figure>
    <div>
      <h2>Black Friday impact in the Overall ranking</h2>
      <a href="#black-friday-impact-in-the-overall-ranking">
        
      </a>
    </div>
    <p>Looking at the broader Overall ranking, several patterns stood out:</p><ul><li><p><b>Amazon</b> followed a trajectory similar to 2024. It hovered between #9 and #10 after July, rose to #8 during Black Friday week, and peaked at #7 on November 29 (the day after Black Friday). It continued to perform better on Sundays.</p></li><li><p><b>Shopee</b> remained around #50 for most of the year, outperforming its Black Friday number on Singles' Day (November 11), when it reached #46 (vs. #48 on Black Friday). Shopify closed the gap in November: its best day was Black Friday, November 28, and it also hit #49 on November 6. Shopify continued to show stronger weekday performance.</p></li><li><p><b>Temu</b>, known for its low-cost marketplace model, peaked at #36 on May 18 (the day after the 2025 Eurovision final). It began the year near #60 (vs. outside the Top 100 in early 2024) and ended 2025 around #50. Black Friday did not visibly impact its ranking.
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Ho9YjNC8Jq9u0QYMaiZiJ/6b647192c480d8c56ad5bad2e9689ebb/BLOG-3095_8_Temu_and_company.png" />
          </figure><p></p></li><li><p><b>Shein</b> remained more stable this year, holding between #80 and #90 after finishing just outside the Top 100 in 2024. It peaked at #78 on November 29. Temu, which had a similar performance to Shein in 2024, clearly outpaced it in 2025.</p></li><li><p><b>eBay</b> improved its consistency, ranking between #46 and #62 throughout the year (vs. remaining outside the Top 70 in 2024). It peaked at #42 on April 15. As with previous years, Black Friday had little impact, reflecting lower seasonal demand for second-hand marketplaces.</p></li><li><p><b>Mercado Libre</b> grew meaningfully in 2025, entering the Top 100 from September onward. Its best day, as in 2024, was Black Friday (November 28), when it reached #82 (vs. #100 in 2024).</p></li></ul><p>Other retail services also had a Black Friday week impact in the Overall category:</p><ul><li><p><b>Adidas</b> entered the top 250, reaching #229 on Cyber Monday and #249 on Black Friday (similar to 2024).</p></li><li><p><b>Nike</b> slipped slightly, peaking at #287 on Black Friday.</p></li><li><p><b>Target</b> hit #117 on Cyber Monday, improving on its 2024 high of #127. It performed best on Saturdays.</p></li><li><p><b>Walmart</b> performed slightly better than Target, peaking at #101 on the August 23-24 weekend and reaching #120 ahead of Thanksgiving.</p></li><li><p><b>Ikea</b> showed a nearly identical pattern to 2024, peaking at #242 on June 2-3.</p></li></ul>
    <div>
      <h2>Video streaming: YouTube and Netflix lead, HBO enters Top 10</h2>
      <a href="#video-streaming-youtube-and-netflix-lead-hbo-enters-top-10">
        
      </a>
    </div>
    <p>Video streaming remained one of the most stable categories of 2025, even as industry consolidation intensified. The Top 3 did not change for the third year in a row: YouTube held #1, followed by Netflix and Twitch.</p>

<strong>Top 10 Video streaming services 2025</strong>
<ol>
    <li>YouTube</li>
    <li>Netflix</li>
    <li>Twitch</li>
    <li>Roku</li>
    <li>Disney Plus</li>
    <li>Prime Video</li>
    <li>Vimeo</li>
    <li>Pluto TV <span>▲</span></li>
    <li>Plex TV <span>▼</span></li>
    <li>HBO Max <span>▲</span></li>
</ol>
<p>HBO Max was the year’s biggest climber, entering the Top 10 for the first time and reaching #8 on Cyber Monday (December 1), boosted by new episodes of <a href="https://en.wikipedia.org/wiki/It_%E2%80%93_Welcome_to_Derry"><u>IT: Welcome to Derry</u></a>. The only other shift in the Top 10 was Pluto TV, a free ad-supported service, moving ahead of Plex TV.</p><p>Among paid services, Netflix remained the clear leader, followed by Disney Plus (#5) and Prime Video (#6). Hulu (#11), Peacock (#15), Apple TV+ (#17), and Paramount Plus (#20) stayed outside the Top 10. Roku consistently held #4 and briefly overtook Twitch during Black Friday week. Disney Plus held #5 throughout the year but climbed to #4 on several weekends between March and June, around the time of the premieres of <a href="https://en.wikipedia.org/wiki/Daredevil:_Born_Again"><u>Daredevil: Born Again</u></a> and later <a href="https://en.wikipedia.org/wiki/Andor"><u>Andor</u></a> season 2.</p><p>The Top 10 over 2025:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/HOB1C1kctSfTXMj1qKXmS/d958e749f6c0c01930a86b839455fb95/BLOG-3095_9_Video_streaming_top_10.png" />
          </figure>
    <div>
      <h2>
Content-driven weekend spikes in the Overall ranking</h2>
      <a href="#content-driven-weekend-spikes-in-the-overall-ranking">
        
      </a>
    </div>
    <p>Across the year, major premieres produced clear surges in the broader Overall ranking:</p><ul><li><p><b>YouTube</b> peaked at #5 on July 5, the day MrBeast released “<a href="https://www.youtube.com/watch?v=FWAdfuPpLOc"><u>World's Fastest Car Vs Cheetah!</u></a>”</p></li><li><p><b>Netflix</b> stayed near #11 on weekends from late June and peaked at #10 on November 30, following the release of Stranger Things season 5.</p></li><li><p><b>Disney Plus</b> ranged between #47 and #60, with its strongest spikes possibly tied to Daredevil: Born Again.</p></li><li><p><b>Prime Video</b> reached #53 after the launch of <a href="https://en.wikipedia.org/wiki/The_Family_Man_(Indian_TV_series)"><u>The Family Man</u></a> season 3 on November 22-23 and again on November 30.
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2YYOWLwl7ZUlLFVnDBs3ta/c79268f003c604bad66626976b5a0be9/BLOG-3095_10_Disney_Prime.png" />
          </figure><p></p></li><li><p><b>HBO Max</b> was consistently close to the Top 100 in our Overall ranking and peaked on November 23 during a release of IT: Welcome to Derry. Hulu showed similar Cyber Week behavior, reaching #132. Paramount Plus outperformed Peacock at the end of November on weekends, peaking at #197 on November 23 and 30.</p></li></ul><p>As with previous years, most paid streaming platforms were strongest on weekends, especially Sundays, reflecting global viewing habits.</p>
    <div>
      <h2>News: Globo and BBC global perspectives</h2>
      <a href="#news-globo-and-bbc-global-perspectives">
        
      </a>
    </div>
    <p>News organizations continue to inform the public, though their visibility and traffic appears increasingly <a href="https://digiday.com/media/google-ai-overviews-linked-to-25-drop-in-publisher-referral-traffic-new-data-shows/"><u>diminished</u></a> by AI-powered search and summarization tools (a trend we explored in our <a href="https://blog.cloudflare.com/crawlers-click-ai-bots-training/#google-referrals-fall-as-ai-overviews-expand"><u>August 2025 blog post</u></a>). This category, which includes traditional news outlets as well as aggregators, highlights several shifts in 2025.</p>

<strong>Top 10 News services in 2025</strong>
<ol>
    <li>Globo</li>
    <li>ESPN <span>▲</span></li>
    <li>BBC <span>▼</span></li>
    <li>NY Times <span>▼</span></li>
    <li>CNN <span>▼</span></li>
    <li>Fox News <span>▼</span></li>
    <li>Yahoo Finance</li>
    <li>Google News <span>▲</span></li>
    <li>NewsBreak <span>▲</span></li>
    <li>Times of India <span>▲</span></li>
</ol>
<p>Globo, the <a href="https://en.wikipedia.org/wiki/Grupo_Globo"><u>Brazilian media giant</u></a> spanning TV, radio, and print, held the #1 position for the third consecutive year. ESPN moved into #2, overtaking the BBC (#3), which operates globally in <a href="https://www.bbc.com/aboutthebbc/whatwedo/worldservice"><u>43 languages</u></a>. The New York Times (#4), CNN (#5), and Fox News (#6) each fell one place due to ESPN’s rise. </p><p>Google News rose to #8 (with a clear weekend bias) while NewsBreak, a U.S. local-news aggregator, surged late in the year and reached #7 on several days in November.</p><p>Outside the Top 10, The Guardian briefly reached #10 during Canada’s March <a href="https://en.wikipedia.org/wiki/2025_Liberal_Party_of_Canada_leadership_election"><u>leadership election</u></a>, while RT (Russian state media) declined from the Top 10 early in the year to around #20 by year-end. The Financial Times spiked to #4 between July 24-27 during high-stakes U.S.-EU tariffs-related trade negotiations.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6HTIcD7BBkQd4VpTrQf0Nv/6b5f9bf237a9ed2e9090defa9e466fc1/BLOG-3095_11_News_Top_10.png" />
          </figure>
    <div>
      <h3>Israel–Iran escalation, and Trump’s inauguration and trade deals</h3>
      <a href="#israel-iran-escalation-and-trumps-inauguration-and-trade-deals">
        
      </a>
    </div>
    <p>Across the broader Overall ranking, major geopolitical, political, and sporting events produced surges in news traffic. <a href="https://blog.cloudflare.com/radar-2024-year-in-review-internet-services/#us-elections-attacks-and-protests"><u>Last year</u></a>, the surge was election-driven.</p><ul><li><p><b>Trump inauguration</b> (January 20–21): CNN, New York Times (NYT), and Fox News all spiked prominently.</p></li><li><p><b>U.S.-UK trade deal</b> <b>announced &amp; VE Day 80th anniversary</b> (May 8): The year’s highest peaks: CNN (#126), NYT (#129), Fox News (#164), BBC (#106).</p></li><li><p><b>Israel-Iran conflict </b>(the conflict started on June 13, when Israel <a href="https://en.wikipedia.org/wiki/Iran%E2%80%93Israel_war"><u>launched</u></a> a bombing campaign against Iran, and ended on June 24): BBC reached its yearly peak (#101), with CNN (#125), NYT (#136), and Fox News (#160) showing parallel spikes.</p></li></ul><p>In the next chart we show rankings around the May and June peaks for BBC, CNN, NY Times, and Fox News.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3LeLgCNCUCSScGhPctaTDd/93fa036b09e0efe77d0bb031d4f44d5d/BLOG-3095_12_News_peaks_Israel_war.png" />
          </figure><ul><li><p><b>U.S. off-year Election Day </b>(November 5): CNN (#157), NYT (#169), and Fox News (#191) all saw moderate increases.</p></li></ul><p>Regional dynamics also stood out. Globo peaked during Brazil’s Supercopa do Brasil final on February 2, moving within the #60-77 range. ESPN saw similar event-driven spikes, reaching #82 on April 26 during the NFL Draft and NBA playoffs; and then #79 on September 28, when NFL Week 4 overlapped with the dramatic final day of the MLB regular season; and also at #79 on October 26, as the F1 Mexico City Grand Prix coincided with NFL Week 8 and the first week of the new NBA season, pushing fans to track multiple leagues at once.</p><p>Across the second half of 2025, most major U.S. news outlets showed a gradual decline in the Overall ranking, moving from higher early-year positions toward the #200 range. This suggests shifting consumption patterns as AI tools and social platforms increasingly intermediate how users access news.</p>
    <div>
      <h2>Messaging: WhatsApp dominates, Signal rises</h2>
      <a href="#messaging-whatsapp-dominates-signal-rises">
        
      </a>
    </div>
    <p>Messaging remains a core part of Internet communication, and this category shows continued maturity with stable leaders at the top. WhatsApp remained the clear #1 for the fourth consecutive year, while the standout shift in 2025 was Signal’s move into #5, reflecting growing demand for privacy-focused tools.</p><p><i>(Note: Apple’s iMessage is excluded because it lacks distinct domains. Messaging features inside social platforms — Instagram DMs, X messages, Snapchat — are not measurable as distinct from the other features of their respective social media platforms.)</i></p>

<strong>Top Messaging services in 2025</strong>
<ol>
    <li>WhatsApp</li>
    <li>QQ</li>
    <li>Telegram</li>
    <li>Rakuten Viber</li>
    <li>Signal <span>▲</span></li>
    <li>WeChat <span>▼</span></li>
    <li>LINE</li>
    <li>Messenger <span>▲</span></li>
    <li>Zalo.me <span>▲</span></li>
    <li>KakaoTalk <span>▲</span></li>
</ol>
<p>Chinese service QQ (<a href="https://en.wikipedia.org/wiki/Tencent_QQ"><u>Tencent QQ</u></a>) held #2 for the third year, supported by its integrated ecosystem of games, mobile payments, and communication tools. Telegram (#3) and Rakuten Viber (#4) held steady, remaining key platforms across Eastern Europe, Asia, and the Middle East. </p><p>Signal, the open-source encrypted messaging service, overtook Chinese app WeChat to secure #5 from October onward, reversing the order seen in 2024. Its rise highlights growing interest in open-source, end-to-end encrypted messaging, especially among security-conscious communities. Asian apps also performed strongly: LINE from Japan remained #7, while Vietnam’s Zalo.me reached #9, and South Korea’s KakaoTalk dropped to #10 (it was #8 in late 2024). Meta’s Messenger reached #8 after June.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4UJ3QOTO9RKQV2sn9er8BK/0896fa15fc74d993e4441220398dcc63/BLOG-3095_13_Messaging_Top_10.png" />
          </figure><p>Patterns in the Overall ranking:</p><ul><li><p><b>WhatsApp</b> maintained its #9 Overall position and reached #8 in January and on several days in November.</p></li><li><p><b>Telegram</b> peaked at #56 on July 1, coinciding with major regional unrest in the Middle East.</p></li><li><p><b>WeChat</b> slipped from near the Top 100 early in the year to around #130 by December.</p></li></ul>
    <div>
      <h2>Metaverse &amp; Gaming: Roblox leads, PlayStation overtakes Xbox</h2>
      <a href="#metaverse-gaming-roblox-leads-playstation-overtakes-xbox">
        
      </a>
    </div>
    <p>Gaming continues to drive substantial Internet traffic, even as “metaverse” news fades from public attention. Roblox dominated this category for the third year in a row, while the biggest shift in 2025 was PlayStation overtaking Xbox to claim the #2 position from May onward.</p>

<strong>Top 10 Metaverse &amp; Gaming services in 2025</strong>
<ol>
    <li>Roblox</li>
    <li>PlayStation <span>▲</span></li>
    <li>Xbox / Xbox Live <span>▼</span></li>
    <li>Epic Games / Fortnite <span>▼</span></li>
    <li>Steam <span>▼</span></li>
    <li>Electronic Arts</li>
    <li>Blizzard</li>
    <li>Minecraft <span>▲</span></li>
    <li>Riot Games / League of Legends <span>▼</span></li>
    <li>Nintendo <span>▲</span></li>
</ol>
<p>Steam held #4, continuing its strong performance after its surprise rise in 2024. It performed best on weekdays and during key release periods, reaching #3 on several days in March, April, and July. Its best day was April 24, when it reached #2, coinciding with the release of <a href="https://en.wikipedia.org/wiki/Fatal_Fury:_City_of_the_Wolves"><u>Fatal Fury: City of the Wolves</u></a>. </p><p>Electronic Arts (#6) and Blizzard (#7) remained steady, while Minecraft climbed to #8 (from #9), showing consistent weekend strength. Riot Games/League of Legends dropped to #9, and Nintendo returned to the Top 10. Meta’s Oculus stayed outside the Top 10 for the second year in a row, slipping from around the Top 100 to closer to #130 in the Overall ranking.</p><p>Here’s the top chart across 2025:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57PktZo0h1t7kCGDSPMWIs/9fbd2eefc63bfac328e5ddc1f08ee388/BLOG-3095_14_Metaverse_gaming_Top_10.png" />
          </figure><p>Usage patterns in the Overall ranking:</p><ul><li><p><b>Roblox</b> peaked at #15 on July 6 during its annual <a href="https://roblox.fandom.com/wiki/The_Hatch"><u>Hatch</u></a> event (July 2-12), and consistently was higher on weekends.</p></li><li><p><b>PlayStation</b> reached #30 during Black Friday week (November 22-23 and 29-30), its strongest performance of the year.</p></li><li><p><b>Minecraft</b> remained between #87 and #120, with predictable weekend spikes.</p></li><li><p><b>Oculus</b> declined across 2025, moving from around the Top 100 to roughly #130 by year-end, reflecting slower mainstream VR adoption.</p></li></ul><p>Gaming platforms such as Roblox, Xbox, Epic Games/Fortnite, Steam, and PlayStation, all displayed strong weekend effects, with most services ranking 20-40 positions higher on Saturdays and Sundays than during the workweek. This pattern reflects gaming’s role as a leisure-driven category.</p>
    <div>
      <h2>Financial services: Stripe keeps lead, with no changes on top</h2>
      <a href="#financial-services-stripe-keeps-lead-with-no-changes-on-top">
        
      </a>
    </div>
    <p>Digital-first financial services continued their dominance in 2025, even as traditional banks and tax tools remain present. Stripe, the Irish-American payment platform, kept its #1 spot for the third consecutive year after overtaking PayPal in 2023.</p>

<strong>Top 10 Financial Services in 2025</strong>
<ol>
    <li>Stripe</li>
    <li>TradingView</li>
    <li>Alipay</li>
    <li>PayPal</li>
    <li>Nubank</li>
    <li>Binance</li>
    <li>Banco do Brasil <span>▲</span></li>
    <li>Intuit <span>▲</span></li>
    <li>Google Pay <span>▲</span></li>
    <li>OKX <span>▲</span></li>
</ol>
<p>The first six positions in 2025 remained unchanged from late 2024. PayPal, usually #4, briefly reached #1 for a few days in late February and early March. TradingView, a platform for traders and investors, held a steady #2 (performing better on weekdays) and peaked at #1 on January 13, when U.S. markets <a href="https://www.nasdaq.com/articles/stock-market-news-jan-13-2025"><u>tumbled</u></a> after strong December jobs data renewed fears of persistent inflation. Alipay, the Chinese mobile and online payment platform, stayed at #3.</p><p>Brazil’s continued <a href="https://agenciabrasil.ebc.com.br/economia/noticia/2025-07/numero-de-pessoas-que-acessam-banco-online-cresce-22-milhoes-em-2-anos"><u>expansion</u></a> in online banking was clear again this year. Nubank, the world's <a href="https://qz.com/nubank-digital-bank-mexico-latin-america-1851096374"><u>largest</u></a> digital bank and a <a href="https://thefinancialbrand.com/news/banking-technology/latin-american-fintech-winner-nubank-taps-ai-for-expansion-muscle-193871"><u>major Latin American financial group</u></a>, held #5 for the second year in a row. Banco do Brasil entered the Top 10 for the first time, while fellow Brazilian bank Bradesco fell out.</p><p>Binance kept its #6 position, while Coinbase fell out of the Top 10. Intuit entered the Top 10 this year, peaking during the <a href="https://en.wikipedia.org/wiki/Tax_Day"><u>U.S. Tax Day</u></a> period (April 14-15) at #6. Google Pay and the cryptocurrency exchange OKX also reached the Top 10 for the first time, driven by strong end-of-year performance.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/lSZMlEac7J1fk8IFYzLu7/a684f81183481a32c3d9b3e92de879ec/BLOG-3095_15_Financial_Top_10.png" />
          </figure><p>Other financial services trends in the Overall ranking:</p><ul><li><p>Stripe had its best days late in the year, reaching #70 the day after Singles Day (November 12) and #71 on Cyber Monday (December 1). It continued to perform better on weekends and showed a steady upward trend in the Overall ranking, moving from around #80 to near #70.</p></li><li><p>PayPal ranked higher during Black Friday week, spiking at #82 on November 29. Its overall peak, however, came earlier in the year on March 2, when it reached #73.</p></li><li><p>Nubank performed best a few days before Carnival in Brazil (February 28-March 5), reaching #85 on February 22. It also spiked on Black Friday, November 28, hitting #96.</p></li></ul>
    <div>
      <h2>Cryptocurrency: Binance leads, OKX shines at the end of the year</h2>
      <a href="#cryptocurrency-binance-leads-okx-shines-at-the-end-of-the-year">
        
      </a>
    </div>
    <p>Alongside our Financial Services category, we track cryptocurrency-focused services separately. After several volatile years, the crypto ecosystem was relatively stable in 2025. Binance continued to lead the category, while the strongest momentum came from OKX, which climbed steadily from September onward to finish the year at #2 — overtaking Coinbase, which held that position in 2024.</p>

<strong>Top 10 Cryptocurrency services in 2025</strong>
<ol>
    <li>Binance</li>
    <li>OKX <span>▲</span></li>
    <li>Coinbase <span>▼</span></li>
    <li>CoinGecko <span>▲</span></li>
    <li>2miners.com <span>▼</span></li>
    <li>CoinMarketCap <span>▼</span></li>
    <li>Bybit</li>
    <li>MEXC <span>▲</span></li>
    <li>Exodus <span>▲</span></li>
    <li>Bitget <span>▲</span></li>
</ol>
<p>CoinGecko, the cryptocurrency data platform, rose from #6 to #4, while 2miners.com slipped to #5. The final three entries were all newcomers to the Top 10:</p><ul><li><p>MEXC (#8): a global cryptocurrency exchange known for spot and futures trading.</p></li><li><p>Exodus (#9): a multi-asset crypto wallet focused on ease of use and self-custody.</p></li><li><p>Bitget (#10): a cryptocurrency exchange specializing in derivatives and copy-trading (where users automatically replicate the trades of experienced traders) features.</p></li></ul>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ueXqxiN2zjH2Y1xvsQYAT/4b0e82d7746f53a604479e9d48320d23/BLOG-3095_16_Crypto-Top10.png" />
          </figure>
    <div>
      <h2>Event-driven spikes in the Overall ranking</h2>
      <a href="#event-driven-spikes-in-the-overall-ranking">
        
      </a>
    </div>
    <p>The U.S. presidential inauguration of Donald Trump on January 20 produced noticeable traffic surges across crypto platforms, building on the elevated interest that followed the November 2024 election:</p><ul><li><p>Binance peaked at #95 on January 20.</p></li><li><p>Coinbase reached #121 the same day.</p></li><li><p>OKX peaked earlier, at #157 on January 19.</p></li></ul>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6UrOr9uGNn8scOXn1qsuM9/5f8494db8300da2e93af34bfb3c82d9b/BLOG-3095_17_Binance_and_company-US-inauguration.png" />
          </figure><p>CoinGecko showed a clear downward trend in the Overall ranking, starting the year near the Top 200 and ending around #270. Binance and Coinbase remained relatively stable throughout 2025, while OKX showed clear growth beginning in September, rising toward the #150 range.</p>
    <div>
      <h2>Beyond the categories: notable spikes and seasonal patterns</h2>
      <a href="#beyond-the-categories-notable-spikes-and-seasonal-patterns">
        
      </a>
    </div>
    <p>Outside our primary categories, several services showed significant traffic spikes </p><p>tied to major events, cultural moments, and seasonal behaviors:</p><p><b>Crisis and real-time tracking</b></p><ul><li><p>FlightRadar24 spiked to #260 on June 13-15 during <a href="https://en.wikipedia.org/wiki/Iran%E2%80%93Israel_war"><u>Israeli airstrikes</u></a> on Iranian nuclear facilities, reflecting heightened global demand for real-time airspace disruption tracking.
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/792yECKEvdNBjkcxil4MCO/b18044376cb44aabca7768f78bc2a980/BLOG-3095_18_FlightRadar.png" />
          </figure><p></p></li><li><p>NOAA Tides &amp; Currents reached #300 on October 27 as Hurricane Melissa — an extremely powerful Category 5 storm — intensified and threatened the Caribbean.</p></li></ul><p><b>Entertainment and media</b></p><ul><li><p>Spotify held a stable #16–19 range throughout 2025, similar to 2024. It performed strongest in September and November, spending most of those months at #16. (Our dataset ends December 2, so the impact of the December 3 Spotify Wrapped release was not captured.)</p></li><li><p>IMDb peaked on September 14, coinciding with the Primetime Emmy Awards.</p></li><li><p>Wikipedia typically ranked between #22 and #24 but peaked at #19 on July 5, the same day of this viral moment: a failed “<a href="https://en.wikipedia.org/wiki/July_2025_Japan_megaquake_prophecy"><u>July 5, 2025, disaster prophecy</u></a>” from a 1999 manga, which caused “Nothing happened in Japan” to trend #1 on China’s Sina Weibo.</p></li></ul><p><b>Sports</b></p><ul><li><p>The NBA reached #237 on April 19, the opening day of the NBA Playoffs, highlighted by a dramatic Nuggets-Clippers overtime game.</p></li><li><p>FIFA made a rare appearance in the Top 500, peaking at #373 on November 17 when FIFA and the U.S. State Department announced the FIFA Priority Appointment Scheduling System (<a href="https://inside.fifa.com/organisation/media-releases/world-cup-2026-ticket-holders-prioritised-visa-appointments-united-states"><u>FIFA PASS</u></a>) for World Cup 2026 ticket holders.</p></li></ul>
    <div>
      <h4>Developer tools</h4>
      <a href="#developer-tools">
        
      </a>
    </div>
    <ul><li><p>GitHub remained between #27 and #36 for most of the year, mirroring its 2024 performance and underscoring its status as core development infrastructure.</p></li></ul>
    <div>
      <h2>Insights by country/region</h2>
      <a href="#insights-by-country-region">
        
      </a>
    </div>
    <p>In our country and region-specific Popular Internet Services lists on the Year in Review <a href="https://radar.cloudflare.com/year-in-review/2025"><u>microsite</u></a>, we saw Google rank #1 in almost every location (Libya, dominated by Facebook, was a rare exception). In addition to our Overall list, this year we are sharing specific categories: Social Media, Generative AI, and Messaging. </p><p>Here are several other highlights worth noting from the Overall rankings in particular countries:</p><p><b>AI’s strength in emerging markets</b></p><p>ChatGPT performed unexpectedly well outside traditional tech hubs, reaching the Top 30 in countries such as Kyrgyzstan, Somalia, the United Arab Emirates, and Ethiopia  — evidence that AI adoption is spreading quickly in a wide range of markets.</p><p>Google Gemini also showed notable traction in emerging regions. It ranked highest in Ethiopia (#94), Sri Lanka (#105), Guatemala (#118), Rwanda (#122), and Thailand (#124), with similar patterns across Peru, Taiwan, Nepal, Vietnam, and Malawi (where Gemini ranked #128-137). </p>
    <div>
      <h4>Regional fragmentation in social platforms</h4>
      <a href="#regional-fragmentation-in-social-platforms">
        
      </a>
    </div>
    <p>Facebook held #1-2 in many countries, but regional players built strong footholds. Kwai reached #3 in Brazil and showed significant presence across Latin America and the Middle East. Instagram ranked highest in parts of Central Asia and the Gulf region, while TikTok dominated broad stretches of Latin America, Africa, and Southeast Asia.</p><p>Snapchat performed best in markets such as Iraq, Libya, Palestine, and Pakistan. LinkedIn showed a dual profile, ranking high in advanced economies like Australia and France as well as fast-growing markets including Bangladesh, Peru, and Saudi Arabia.</p>
    <div>
      <h4>Entertainment and messaging follow regional lines</h4>
      <a href="#entertainment-and-messaging-follow-regional-lines">
        
      </a>
    </div>
    <p>Netflix remained strongest in Latin America (#8-10 in multiple countries) but ranked lower in Asia and much of Europe, where Spotify performed best, especially in the Nordics and Southern Europe.</p><p>Messaging showed clear geographic divides. WhatsApp led across the Caribbean, Africa, and parts of Asia; Telegram ranked highest in Eastern Europe and Central Asia; Signal gained share in privacy-minded markets such as Ukraine and Switzerland; and Viber continued to dominate the Balkans.</p>
    <div>
      <h2>ChatGPT dominated everywhere, except Venezuela</h2>
      <a href="#chatgpt-dominated-everywhere-except-venezuela">
        
      </a>
    </div>
    
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4IZl2YISypOuqBOTXYAHJ4/d23f23e5927db4b752c90538e5591c3a/BLOG-3095_19_cloudflare-radar-dev_yir2025-internet-services-table_ve_20251203-20251210.png" />
          </figure><p>GenAI highlights by country/region include:</p><ul><li><p>ChatGPT ranked #1 in the Generative AI category across nearly every country, with one exception: Venezuela, where Google Gemini took the top spot.</p></li><li><p>Google Gemini secured #2 across Latin America (including Brazil, Mexico, and Colombia) and Southeast Asia (Thailand, Indonesia), reflecting Google's platform strength in mobile-first emerging markets.</p></li><li><p>Perplexity dominated as the #2 choice across Europe (Germany, France, Spain) and #3 in major English-speaking markets (U.S., UK, Australia), suggesting strong appeal among information-seeking users.</p></li><li><p>Claude showed selective strength at #3-5, performing best in Western Europe (Georgia, Switzerland) and developed markets like Germany, France or Japan, aligning with its enterprise and developer focus.</p></li><li><p>Lovable, the Swedish vibe coding platform, reached #10 in the GenAI category in one country: Angola. It reached #16 in Sweden and Slovenia, and #17 in Brazil.</p></li></ul><p>ChatGPT remains the clear global leader, yet the contest for second place is highly regional: Google Gemini in emerging markets, Perplexity across Europe, and Claude in more technologically advanced economies. It’s a reminder that the Internet contains a multitude of local behaviors shaped by culture, infrastructure, and economic context.</p>
    <div>
      <h2>2025 on the Internet: AI competition heated up as platforms saw fragmentation</h2>
      <a href="#2025-on-the-internet-ai-competition-heated-up-as-platforms-saw-fragmentation">
        
      </a>
    </div>
    <p>The Internet’s evolution in 2025 showed both stability and disruption. Google, Facebook, and Instagram remained dominant in our Overall rankings, but the year’s defining story was generative AI’s rapid maturation. ChatGPT climbed into the global Top 40, while Claude, Gemini, Perplexity, and DeepSeek became credible challengers in a category that barely existed three years ago. By late November, Gemini had secured the #2 spot in our GenAI rankings, directly contesting ChatGPT’s lead.</p><p>Social media continued to fragment: Instagram rose to #5 overall while X fell outside the Top 20, and emerging platforms like Kwai gained meaningful traction across Latin America, the Middle East, and Southeast Asia. In e-commerce, Shopee and Temu joined Amazon in the global top three, displacing long-established Chinese marketplaces. Cryptocurrency stabilized after earlier volatility, with traffic surging around events such as the U.S. presidential inauguration.</p><p>Global developments triggered coordinated spikes across news and other real-time information services, underscoring how quickly real-world events shape online behavior.</p><p>These rankings reflect continued data validation and methodological refinement by our team. We <a><u>welcome</u></a> your feedback and suggestions for categories to explore in future editions.</p><p><i>Thanks to data scientist Sabina Zejnilovic, who played a crucial role in gathering the Internet services data.</i></p> ]]></content:encoded>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Trends]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Year in Review]]></category>
            <guid isPermaLink="false">7FGmUuKceINtevY1MTsBd1</guid>
            <dc:creator>João Tomé</dc:creator>
        </item>
        <item>
            <title><![CDATA[From .com to .anything: introducing Top-Level Domain (TLD) insights on Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/introducing-tld-insights-on-cloudflare-radar/</link>
            <pubDate>Mon, 27 Oct 2025 12:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare Radar has launched a new Top-Level Domain (TLD) page, providing insights into TLD popularity, traffic, and security. The top-ranking TLD may come as a surprise. ]]></description>
            <content:encoded><![CDATA[ <p>Readers of a certain age may remember the so-called "dot com boom" that took place in the early 2000's. The boom's "dot com" is what is known as a Top-Level Domain (TLD). <a href="https://www.rfc-editor.org/rfc/rfc920.html"><u>Originally</u></a> intended to organize domain names into a small set of categorical groupings, over the past 40+ years, the set of TLDs has expanded to include country code top-level domains (ccTLDs, like <a href="https://radar.cloudflare.com/tlds/us"><code><u>.us</u></code></a>, <a href="https://radar.cloudflare.com/tlds/pt"><code><u>.pt</u></code></a>, and <a href="https://radar.cloudflare.com/tlds/cn"><code><u>.cn</u></code></a>), as well as additional generic top-level domains (gTLDs) beyond the initial seven, such as <a href="https://radar.cloudflare.com/tlds/biz"><code><u>.biz</u></code></a>, <a href="https://radar.cloudflare.com/tlds/shop"><code><u>.shop</u></code></a>, and <a href="https://radar.cloudflare.com/tlds/nyc"><code><u>.nyc</u></code></a>. Internationalized TLDs, such as <a href="https://radar.cloudflare.com/tlds/xn--80aswg"><code><u>.сайт</u></code></a>, <a href="https://radar.cloudflare.com/tlds/xn--80asehdb"><code><u>.онлайн</u></code></a>,<code> </code><a href="https://radar.cloudflare.com/tlds/xn--ngbc5azd"><code><u>.شبكة</u></code></a>, <a href="https://radar.cloudflare.com/tlds/xn--unup4y"><code><u>.游戏</u></code></a>, and brand TLDs, like <a href="https://radar.cloudflare.com/tlds/google"><code><u>.google</u></code></a> and <a href="https://radar.cloudflare.com/tlds/nike"><code><u>.nike</u></code></a> have also been added. As of October 2025, <a href="https://data.iana.org/TLD/tlds-alpha-by-domain.txt"><u>over 1,400 entries</u></a> can be found in ICANN's list of all valid top-level domains, and a further expansion is <a href="https://newgtldprogram.icann.org/en/application-rounds/round2"><u>expected to begin in April 2026</u></a>.</p><p><a href="https://radar.cloudflare.com/"><u>Cloudflare Radar</u></a> has long published <a href="https://radar.cloudflare.com/domains"><u>domain ranking</u></a> information, providing insights into popular and trending domains. And in February 2025, we <a href="https://blog.cloudflare.com/new-dns-section-on-cloudflare-radar/"><u>added</u></a> a number of <a href="https://radar.cloudflare.com/dns"><u>DNS-related insights to Radar</u></a>, based on analysis of traffic to our <a href="https://one.one.one.one/"><u>1.1.1.1</u></a> Public DNS Resolver.</p><p>Building on this, today we are launching a <a href="https://radar.cloudflare.com/tlds"><u>new TLD page</u></a> on Radar that, based on aggregated data from multiple Cloudflare services, provides insights into TLD popularity, activity, and security, along with links directly into <a href="https://domains.cloudflare.com/"><u>Cloudflare Registrar</u></a> to enable users to register domain names in <a href="https://domains.cloudflare.com/tlds"><u>supported TLDs</u></a>.</p>
    <div>
      <h2>Initial security-related insights</h2>
      <a href="#initial-security-related-insights">
        
      </a>
    </div>
    <p>Before today, Radar already offered insights into TLDs, though these were distributed across a couple of different pages and datasets.</p><p>In March 2024, when we <a href="https://blog.cloudflare.com/email-security-insights-on-cloudflare-radar/"><u>launched</u></a> the <a href="https://radar.cloudflare.com/security/email"><u>Email Security page</u></a>, we introduced the <a href="https://radar.cloudflare.com/security/email#most-observed-tlds"><u>“Most abused TLDs”</u></a> metric. This chart highlights TLDs associated with the largest shares of malicious and spam email. The analysis is based on the sending domain’s TLD, extracted from the <code>From:</code> header in email messages, with data sourced from <a href="https://www.cloudflare.com/zero-trust/products/email-security/"><u>Cloudflare’s cloud email security service</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/53HpBXjJBYPbDq72R1e5WG/8d56e5518b5f2aa7771af494a95a49a3/image10.png" />
          </figure><p>More recently, during 2025’s Birthday Week, we <a href="https://blog.cloudflare.com/new-regional-internet-traffic-and-certificate-transparency-insights-on-radar/#introducing-certificate-transparency-insights-on-radar"><u>introduced</u></a> <a href="https://radar.cloudflare.com/certificate-transparency"><u>Certificate Transparency (CT) insights</u></a> on Radar, leveraging data from <a href="https://developers.cloudflare.com/radar/glossary/#certificate-transparency"><u>CT logs</u></a> monitored by Cloudflare. One highlight is the <a href="https://radar.cloudflare.com/certificate-transparency#certificate-coverage"><u>Certificate Coverage</u></a> section, which visualizes the distribution of pre-certificates across the top 10 TLDs. These insights give a different perspective on TLD activity, complementing email-based metrics by showing which domains are actively securing web traffic.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/595UGFz1v7EJN2iy7G09WT/60b65333882e612b0949a4299c6bb138/image6.png" />
          </figure>
    <div>
      <h2>A new aggregate overview based on DNS Magnitude</h2>
      <a href="#a-new-aggregate-overview-based-on-dns-magnitude">
        
      </a>
    </div>
    <p>Today, we’re excited to announce the new <a href="http://radar.cloudflare.com/tlds"><u>TLD page</u></a> on Radar. The landing page and the dedicated per-TLD pages provide TLD managers and site owners with a perspective on the relative popularity of TLDs they manage or may be considering domains in, as well as insights into TLD traffic volume and distribution.</p><p>Located under the DNS menu, the landing page introduces a ranking of top-level domains based on <a href="https://www.icann.org/en/system/files/files/dns-magnitude-05aug20-en.pdf"><u>DNS Magnitude</u></a> — a metric originally developed by <a href="https://www.nic.at/media/files/pdf/dns-magnitude-paper-20200601.pdf"><u>nic.at</u></a> to estimate a domain’s overall visibility on the Internet.</p><p>Instead of simply counting the total number of DNS queries, DNS Magnitude incorporates a sense of how many unique clients send queries to domains within the TLD. This approach gives a more accurate picture of a TLD’s reach, since a small number of sources can generate a large number of queries. Our ranking is based on queries observed at Cloudflare’s 1.1.1.1 resolver. We aggregate individual client IP addresses into subnets, referred to here as "networks".</p><p>The magnitude value ranges from 0 to 10, with higher values (closer to 10) indicating that the TLD is queried by a broader range of networks. This reflects greater global visibility and, in some cases, a higher likelihood of name collision across different systems. <a href="https://www.icann.org/resources/pages/name-collision-2013-12-06-en"><u>According to ICANN</u></a>, a name collision occurs when an attempt to resolve a name used in a private name space (such as under a non-delegated Top-Level Domain) results in a query to the public <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a>. When the administrative boundaries of private and public namespaces overlap, name resolution may yield unintended or harmful results. For example, if ICANN were to delegate <code>.home</code>, that could cause significant issues for hobbyists that use the (currently non-delegated) TLD within their local networks.</p><p>$Magnitude=\frac{ln(unique\ networks\ querying\ the\ TLD)}{ln(all\ unique\ networks)}*10$</p><p>The table displays a paginated ranking of the top 2,500 TLDs, along with several key attributes. Each entry includes the TLD itself — which links to a dedicated page for delegated TLDs — as well as its type:</p><ul><li><p><a href="http://radar.cloudflare.com/tlds?q=gTLD"><u>gTLD</u></a> (generic TLD): used for general purposes, such as <a href="https://radar.cloudflare.com/tlds/com"><code><u>.com</u></code></a> or<code> </code><a href="https://radar.cloudflare.com/tlds/info"><code><u>.info</u></code></a>.</p></li><li><p><a href="http://radar.cloudflare.com/tlds?q=grTLD"><u>grTLD</u></a> (generic restricted TLD): limited to specific communities or uses, such as<code> </code><a href="https://radar.cloudflare.com/tlds/name"><code><u>.name</u></code></a>.</p></li><li><p><a href="http://radar.cloudflare.com/tlds?q=ccTLD"><u>ccTLD</u></a> (country code TLD): assigned to individual countries or territories, such as<code> </code><a href="https://radar.cloudflare.com/tlds/uk"><code><u>.uk</u></code></a> or <a href="https://radar.cloudflare.com/tlds/jp"><code><u>.jp</u></code></a>.</p></li><li><p><a href="http://radar.cloudflare.com/tlds?q=iTLD"><u>iTLD</u></a> (infrastructure TLD): reserved for technical infrastructure, such as <a href="https://radar.cloudflare.com/tlds/arpa"><code><u>.arpa</u></code></a>.</p></li><li><p><a href="http://radar.cloudflare.com/tlds?q=sTLD"><u>sTLD</u></a> (sponsored TLD): operated by a sponsoring organization representing a defined community, such as <a href="https://radar.cloudflare.com/tlds/edu"><code><u>.edu</u></code></a> or <a href="https://radar.cloudflare.com/tlds/gov"><code><u>.gov</u></code></a>.</p></li></ul><p>The status column indicates whether the TLD is delegated, meaning it is officially assigned and active in the <a href="https://www.iana.org/domains/root/db"><u>root zone</u></a> of the DNS, or non-delegated, meaning it is not currently part of the public DNS. The table also shows the manager of each TLD — typically the organization or registry responsible for its operation — and the corresponding DNS magnitude value.</p><p>While the top 10 TLDs include stalwarts such as <a href="https://radar.cloudflare.com/tlds/com"><code><u>.com</u></code></a>/<a href="https://radar.cloudflare.com/tlds/net"><code><u>.net</u></code></a>/<a href="https://radar.cloudflare.com/tlds/org"><code><u>.org</u></code></a> and ccTLDs that have been commercially repurposed, such as <a href="https://radar.cloudflare.com/tlds/io"><code><u>.io</u></code></a>/<a href="https://radar.cloudflare.com/tlds/co"><code><u>.co</u></code></a>/<a href="https://radar.cloudflare.com/tlds/tv"><code><u>.tv</u></code></a>, the TLD at the top of the list may be a bit surprising: <a href="https://en.wikipedia.org/wiki/.su"><code><u>.su</u></code></a>.</p><p>This TLD was delegated for the Soviet Union back in 1990, but its use waned after the dissolution of the USSR, with constituent republics becoming independent and using their own dedicated ccTLDs. (ICANN reportedly <a href="https://domainnamewire.com/2025/03/11/icann-moves-to-retire-soviet-era-su-country-domain-name/"><u>plans to retire</u></a> <code>.su </code>in 2030.) Looking at a single day’s worth of data, the<code> .su</code> TLD does not rank #1 by unique networks. However, over a longer period of time, such as seven days, it sees queries from more unique networks than other TLDs, placing it atop the magnitude list. Further analysis of the top hostnames observed within this TLD suggests that they are mostly associated with a popular online world-building game. Interestingly, over half of the queries for .su domains <a href="https://radar.cloudflare.com/tlds/su#geographical-distribution"><u>come from</u></a> the United States, Germany, and Brazil.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3L7ya17Ef98tXD8oBnU8SG/e69c02bf749993a9e89d2e9ad7a6d037/image1.png" />
          </figure>
    <div>
      <h2>More detailed TLD insights</h2>
      <a href="#more-detailed-tld-insights">
        
      </a>
    </div>
    <p>The new TLD section also offers <a href="https://radar.cloudflare.com/tlds/com"><u>dedicated pages</u></a> for individual TLDs. By clicking on a TLD in the DNS Magnitude table or searching for a TLD in the top search bar, users can access a page with detailed insights and information about that TLD. It’s important to note that while non-delegated TLDs are included in the DNS Magnitude ranking, TLD-specific pages are only available for delegated TLDs. The list of delegated TLDs, along with their type and manager, is sourced from the <a href="https://www.iana.org/domains/root/db"><u>IANA’s Root Zone Database</u></a>.</p><p>When a user enters an individual TLD page, they see two main cards. The first card provides general information about the TLD, including its type, manager, DNS magnitude value, DNSSEC support, and RDAP support. DNSSEC support is determined by checking whether the TLD has a <a href="https://www.cloudflare.com/learning/dns/dns-records/dnskey-ds-records/"><u>Delegation Signer (DS) record</u></a> in the <a href="https://www.internic.net/domain/root.zone"><u>root zone</u></a>. We also parse the record to get the associated <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>DNSSEC algorithm</u></a>. <a href="https://developers.cloudflare.com/registrar/account-options/whois-redaction/#what-is-rdap"><u>RDAP</u></a> support is indicated if the TLD is listed in the <a href="https://data.iana.org/rdap/dns.json"><u>IANA RDAP bootstrap file</u></a>. RDAP (Registration Data Access Protocol) is a new standard for querying domain contact and nameserver information for all registered domains.</p><p>The second card contains <a href="https://www.cloudflare.com/learning/dns/what-is-domain-privacy/"><u>WHOIS</u></a> data for the TLD, including its creation date, the date of the last update, and the list of nameservers. If the TLD is supported by Cloudflare Registrar, an additional card appears, giving users direct access to registration options. As of today, Cloudflare Registrar supports <a href="https://domains.cloudflare.com/tlds"><u>over 400 TLDs</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2XoNlzH0pzDmwLay9O5123/44be6f897fea6e3cd94591192915e259/image5.png" />
          </figure><p>Below these cards, the page features the <a href="https://radar.cloudflare.com/tlds/com#dns-query-volume"><u>DNS query volume</u></a> section, which presents insights based on queries to Cloudflare’s 1.1.1.1 resolver for domains under the TLD. This section includes a chart showing DNS queries over the selected time period, along with a donut chart breaking down queries by type, response code, and DNSSEC support. A choropleth map further illustrates the percentage of DNS queries by country, highlighting which regions generate the most queries for domains under the TLD.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6dwNEKbnBrJLDpoIjvSnOf/d47321ed271115889551eaca6f882710/image4.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/303ZsAaOZFihRHII7KCW27/c24567953d1949b9d2ef223a98bfa601/image8.png" />
          </figure><p>Each individual TLD page also includes a <a href="https://radar.cloudflare.com/tlds/com#certificate-issuance-volume"><u>Certificate Transparency</u></a> section, offering visibility into <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS/SSL certificate issuance</a> for the TLD. This section displays a line chart showing the total number of certificates issued over the selected period, as well as a donut chart depicting the distribution of certificate issuance among the top Certificate Authorities.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/bohRgeA6ieFrAfkX1pMVx/c16be9eeb6da0372f4b251d69cb64e9e/image7.png" />
          </figure><p>When we <a href="https://blog.cloudflare.com/new-dns-section-on-cloudflare-radar/"><u>launched</u></a> the <a href="https://radar.cloudflare.com/dns"><u>DNS page</u></a> earlier in 2025, we provided query volumes by TLDs, but this was limited to ccTLDs. Today, we’re extending that dataset to include all delegated TLDs. With these new insights, we’ve added the <a href="https://radar.cloudflare.com/dns#top-level-domain-distribution"><u>“Top-level domain distribution”</u></a> section to the DNS page, featuring a line chart that shows the distribution of queries to 1.1.1.1 across the top 10 TLDs, alongside a table extending this ranking to the top 100. Not surprisingly, <a href="https://radar.cloudflare.com/tlds/com"><u>.com</u></a> tops the ranking with more than 60% of queries, followed by <a href="https://radar.cloudflare.com/tlds/net"><code><u>.net</u></code></a>, <a href="https://radar.cloudflare.com/tlds/arpa"><code><u>.arpa</u></code></a> (an infrastructure TLD), and <a href="https://radar.cloudflare.com/tlds/org"><code><u>.org</u></code></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/z5LgMRXqhqpMtPFSFlOZ5/331540312793d369b2aab7a88940830e/image3.png" />
          </figure><p>It is also worth noting that both Radar search and the API support both <a href="https://en.wikipedia.org/wiki/Punycode"><u>punycode</u></a> (<a href="https://datatracker.ietf.org/doc/html/rfc5890#section-2.3.2.1"><u>A-Label/ASCII-Label</u></a>) and <a href="https://en.wikipedia.org/wiki/Internationalized_domain_name"><u>internationalized domain name (IDN)</u></a> (<a href="https://datatracker.ietf.org/doc/html/rfc5890#section-2.3.2.1"><u>U-Label/UNICODE-Label</u></a>) representations of non-ASCII TLDs. For example, the U-Label representation of the South Korean TLD <a href="https://www.iana.org/domains/root/db/xn--3e0b707e.html"><u>.kr</u></a> is written as 한국 and the A-Label representation is <a href="https://radar.cloudflare.com/tlds/xn--3e0b707e"><code><u>xn--3e0b707e</u></code></a>.</p>
    <div>
      <h2>Looking ahead</h2>
      <a href="#looking-ahead">
        
      </a>
    </div>
    <p>Because TLDs are a foundational component of the Domain Name System, it is critical that the associated name servers are highly performant. Based on billions of daily queries to these name servers, we plan to add insights into their performance to Radar’s TLD pages in 2026. These insights will provide TLD managers with an external perspective on query responsiveness, and will give developers and site owners a perspective on the potential impact of the performance of the associated TLD name servers as they look to register new domain names.</p><p>The underlying data for these new TLD pages is available via the <a href="https://developers.cloudflare.com/api/resources/radar/subresources/tlds/"><u>API</u></a> and can be interactively explored in more detail using Radar’s <a href="https://radar.cloudflare.com/explorer?dataSet=dns&amp;groupBy=tld"><u>Data Explorer and AI Assistant</u></a>. And as always, Radar and Data Assistant charts and graphs are downloadable for sharing, and embeddable for use in your own blog posts, websites, or dashboards.</p><p>If you share our TLD charts and graphs on social media, be sure to tag us: <a href="https://x.com/CloudflareRadar"><u>@CloudflareRadar</u></a> (X), <a href="https://noc.social/@cloudflareradar"><u>noc.social/@cloudflareradar</u></a> (Mastodon), and <a href="https://bsky.app/profile/radar.cloudflare.com"><u>radar.cloudflare.com</u></a> (Bluesky). If you have questions or comments, or suggestions for data that you’d like to see us add to Radar, you can reach out to us on social media, or contact us via <a><u>email</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Registrar]]></category>
            <guid isPermaLink="false">3ByKEmji9raNHTQ39Ui1Xr</guid>
            <dc:creator>André Jesus</dc:creator>
            <dc:creator>David Belson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Addressing the unauthorized issuance of multiple TLS certificates for 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/</link>
            <pubDate>Thu, 04 Sep 2025 17:30:00 GMT</pubDate>
            <description><![CDATA[ Unauthorized TLS certificates were issued for 1.1.1.1 by a Certification Authority without permission from Cloudflare. These rogue certificates have now been revoked. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Over the past few days Cloudflare has been notified through our vulnerability disclosure program and the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>certificate transparency mailing list</u></a> that unauthorized certificates were issued by <a href="https://www.fina.hr/"><u>Fina CA</u></a> for 1.1.1.1, one of the IP addresses used by our <a href="https://one.one.one.one/"><u>public DNS resolver service</u></a>. From February 2024 to August 2025, Fina CA <a href="https://crt.sh/?iPAddress=1.1.1.1&amp;match=="><u>issued</u></a> twelve certificates for 1.1.1.1 without our permission. We did not observe unauthorized issuance for any properties managed by Cloudflare other than 1.1.1.1.</p><p>We have no evidence that bad actors took advantage of this error. To impersonate Cloudflare's public DNS resolver 1.1.1.1, an attacker would not only require an unauthorized certificate and its corresponding private key, but attacked users would also need to trust the Fina CA. Furthermore, traffic between the client and 1.1.1.1 would have to be intercepted.</p><p>While this unauthorized issuance is an unacceptable lapse in security by Fina CA, we should have caught and responded to it earlier. After speaking with Fina CA, it appears that they issued these certificates for the purposes of internal testing. However, no CA should be issuing certificates for domains and IP addresses without checking control. At present all certificates have been <a href="http://rdc.fina.hr/RDC2020/FinaRDCCA2020partc1.crl"><u>revoked</u></a>. We are awaiting a full post-mortem from Fina.</p><p>While we regret this situation, we believe it is a useful opportunity to walk through how trust works on the Internet between networks like ourselves, destinations like 1.1.1.1, CAs like Fina, and devices like the one you are using to read this. To learn more about the mechanics, please keep reading.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>Cloudflare operates a <a href="https://one.one.one.one/"><u>public DNS resolver 1.1.1.1 service</u></a> that millions of devices use to resolve domain names from a human-readable format such as example.com to an IP address like 192.0.2.42 or 2001:db8::2a.</p><p>The 1.1.1.1 service is accessible using various methods, across multiple domain names, such as <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a> and <a href="https://one.one.one.one"><u>one.one.one.one</u></a>, and also using various IP addresses, such as 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, and 2606:4700:4700::1001. <a href="https://one.one.one.one/family/"><u>1.1.1.1 for Families</u></a> also provides public DNS resolver services and is hosted on different IP addresses — 1.1.1.2, 1.1.1.3, 1.0.0.2, 1.0.0.3, 2606:4700:4700::1112, 2606:4700:4700::1113, 2606:4700:4700::1002, 2606:4700:4700::1003.</p><p>As originally specified in <a href="https://datatracker.ietf.org/doc/html/rfc1034"><u>RFC 1034</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc1035"><u>RFC 1035</u></a>, the DNS protocol includes no privacy or authenticity protections. DNS queries and responses are exchanged between client and server in plain text over UDP or TCP. These represent around 60% of queries received by the Cloudflare 1.1.1.1 service. The lack of privacy or authenticity protection means that any intermediary can potentially read the DNS query and response and modify them without the client or the server being aware.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6zbEvgOCwZomZTbgSGFuEo/d638f36eebdbf2577ea0b8172dff843e/image1.png" />
          </figure><p>To address these shortcomings, we have helped develop and deploy multiple solutions at the IETF. The two of interest to this post are DNS over TLS (DoT, <a href="https://datatracker.ietf.org/doc/html/rfc7858"><u>RFC 7878</u></a>) and DNS over HTTPS (DoH, <a href="https://datatracker.ietf.org/doc/html/rfc8484"><u>RFC 8484</u></a>). In both cases the DNS protocol itself is mainly unchanged, and the desirable security properties are implemented in a lower layer, replacing the simple use of plain-text in UDP and TCP in the original specification. Both DoH and DoT use TLS to establish an authenticated, private, and encrypted channel over which DNS messages can be exchanged. To learn more you can read <a href="https://blog.cloudflare.com/dns-encryption-explained/"><u>DNS Encryption Explained</u></a>.</p><p>During the <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS handshake</u></a>, the server proves its identity to the client by presenting a certificate. The client validates this certificate by verifying that it is signed by a Certification Authority that it already trusts. Only then does it establish a connection with the server. Once connected, TLS provides encryption and integrity for the DNS messages exchanged between client and server. This protects DoH and DoT against eavesdropping and tampering between the client and server.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/21YeKS2nYIFDI9uC3uClXE/6115e00945458d42627d973aef75076c/image2.png" />
          </figure><p>The TLS certificates used in DoT and DoH are the same kinds of certificates HTTPS websites serve. Most website certificates are issued for domain names like <a href="http://example.com"><u>example.com</u></a>. When a client connects to that website, they resolve the name <a href="http://example.com"><u>example.com</u></a> to an IP like 192.0.2.42, then connect to the domain on that IP address. The server responds with a TLS certificate containing <a href="http://example.com"><u>example.com</u></a>, which the device validates.</p><p>However, DNS server certificates tend to be used slightly differently. Certificates used for DoT and DoH have to contain the service IP addresses, not just domain names. This is due to clients being unable to resolve a domain name in order to contact their resolver, like <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a>. Instead, devices are first set up by connecting to their resolver via a known IP address, such as 1.1.1.1 in the case of Cloudflare public DNS resolver. When this connection uses DoT or DoH, the resolver responds with a TLS certificate issued for that IP address, which the client validates. If the certificate is valid, the client believes that it is talking to the owner of 1.1.1.1 and starts sending DNS queries.</p><p>You can see that the IP addresses are included in the certificate Cloudflare’s public resolver uses for DoT/DoH:</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
      Validity
          Not Before: Jan  2 00:00:00 2025 GMT
          Not After : Jan 21 23:59:59 2026 GMT
      Subject: C=US, ST=California, L=San Francisco, O=Cloudflare, Inc., CN=cloudflare-dns.com
      X509v3 extensions:
          X509v3 Subject Alternative Name:
              DNS:cloudflare-dns.com, DNS:*.cloudflare-dns.com, DNS:one.one.one.one, IP Address:1.0.0.1, IP Address:1.1.1.1, IP Address:162.159.36.1, IP Address:162.159.46.1, IP Address:2606:4700:4700:0:0:0:0:1001, IP Address:2606:4700:4700:0:0:0:0:1111, IP Address:2606:4700:4700:0:0:0:0:64, IP Address:2606:4700:4700:0:0:0:0:6400</code></pre>
            
    <div>
      <h3>Rogue certificate issuance</h3>
      <a href="#rogue-certificate-issuance">
        
      </a>
    </div>
    <p>The section above describes normal, expected use of Cloudflare public DNS resolver 1.1.1.1 service, using certificates managed by Cloudflare. However, Cloudflare has been made aware of other, unauthorized certificates being issued for 1.1.1.1. Since certificate validation is the mechanism by which DoH and DoT clients establish the authenticity of a DNS resolver, this is a concern. Let’s now dive a little further in the security model provided by DoH and DoT.</p><p>Consider a client that is preconfigured to use the 1.1.1.1 resolver service using DoT. The client must establish a TLS session with the configured server before it can send any DNS queries. To be trusted, the server needs to present a certificate issued by a CA that the client trusts. The collection of certificates trusted by the client is also called the root store.</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1</code></pre>
            <p>A Certification Authority (CA) is an organisation, such as DigiCert in the section above, whose role is to receive requests to sign certificates and verify that the requester has control of the domain. In this incident, Fina CA issued certificates for 1.1.1.1 without Cloudflare's involvement. This means that Fina CA did not properly check whether the requestor had legitimate control over 1.1.1.1. According to Fina CA:</p><blockquote><p>“They were issued for the purpose of internal testing of certificate issuance in the production environment. An error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers.”</p></blockquote><p>Although it’s not clear whether Fina CA sees it as an error, we emphasize that it is not an error to publish test certificates on Certificate Transparency (more about what that is later on). Instead, the error at hand is Fina CA using their production keys to sign a certificate for an IP address without permission of the controller. We have <a href="https://ripe84.ripe.net/archives/video/747/"><u>talked about</u></a> misuse of 1.1.1.1 in documentation, lab, and testing environments at length. Instead of the Cloudflare public DNS resolver 1.1.1.1 IP address, Fina should have used an IP address it controls itself.</p><p>Unauthorized certificates are unfortunately not uncommon, whether due to negligence — such as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1930029"><u>IdenTrust</u></a> in November 2024 — or compromise. Famously in 2011, the Dutch CA DigiNotar was <a href="https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/"><u>hacked</u></a>, and its keys were used to issue hundreds of certificates. This hack was a wake-up call and motivated the introduction of Certificate Transparency (CT), later formalised in <a href="https://datatracker.ietf.org/doc/html/rfc6962"><u>RFC 6962</u></a>. The goal of Certificate Transparency is not to directly prevent misissuance, but to be able to detect any misissuance once it has happened, by making sure every certificate issued by a CA is publicly available for inspection.</p><p>In certificate transparency several independent parties, including <a href="https://blog.cloudflare.com/introducing-certificate-transparency-monitoring/"><u>Cloudflare</u></a>, operate public logs of issued certificates. Many modern browsers do not accept certificates unless they provide proof in the form of signed certificate timestamps (<a href="https://certificate.transparency.dev/howctworks/"><u>SCT</u></a>s) that the certificate has been logged in at least two logs. Domain owners can therefore monitor all public CT logs for any certificate containing domains they care about. If they see a certificate for their domains that they did not authorize, they can raise the alarm. CT is also the data source for public services such as <a href="https://crt.sh"><u>crt.sh</u></a> and Cloudflare Radar’s <a href="https://radar.cloudflare.com/certificate-transparency"><u>certificate transparency page</u></a>.</p><p>Not all clients require proof of inclusion in certificate transparency. Browsers do, but most DNS clients don’t. We were fortunate that Fina CA did submit the unauthorized certificates to the CT logs, which allowed them to be discovered.</p>
    <div>
      <h3>Investigation into potential malicious use</h3>
      <a href="#investigation-into-potential-malicious-use">
        
      </a>
    </div>
    <p>Our immediate concern was that someone had maliciously used the certificates to impersonate the 1.1.1.1 service. Such an attack would require all the following:</p><ol><li><p>An attacker would require a rogue certificate and its corresponding private key.</p></li><li><p>Attacked clients would need to trust the Fina CA.</p></li><li><p>Traffic between the client and 1.1.1.1 would have to be intercepted.</p></li></ol><p>In light of this incident, we have reviewed these requirements one by one:</p><p>1. We know that a certificate was issued without Cloudflare's involvement. We must assume that a corresponding private key exists, which is not under Cloudflare's control. This could be used by an attacker. Fina CA wrote to us that the private keys were exclusively in Fina’s controlled environment and were immediately destroyed even before the certificates were revoked. As we have no way to verify this, we have and continue to take steps to detect malicious use as described in point 3.</p><p>2. Furthermore, some clients trust Fina CA. It is included by default in <a href="https://learn.microsoft.com/en-us/security/trusted-root/participants-list"><u>Microsoft’s root store</u></a> and in an <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls"><u>EU Trust Service provider</u></a>. We can exclude some clients, as the CA certificate is not included by default in the root stores of <a href="https://android.googlesource.com/platform/system/ca-certificates/+/master/files/"><u>Android</u></a>, <a href="https://support.apple.com/en-us/HT209143"><u>Apple</u></a>, <a href="https://wiki.mozilla.org/CA/Included_Certificates"><u>Mozilla</u></a>, or <a href="https://g.co/chrome/root-policy"><u>Chrome</u></a>. These users cannot have been affected with these default settings. For these certificates to be used nefariously, the client’s root store must include the Certification Authority (CA) that issued them. Upon discovering the problem, we immediately reached out to Fina CA, Microsoft, and the <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls/tl/HR"><u>EU Trust Service provider</u></a>. Microsoft responded quickly, and started rolling out an update to their <i>disallowed list</i>, which should cause clients that use it to stop trusting the certificate.</p><p>3. Finally, we have launched an investigation into possible interception between users and 1.1.1.1. The first way this could happen is when the attacker is on-path of the client request. Such man-in-the-middle attacks are likely to be invisible to us. Clients will get responses from their on-path middlebox and we have no reliable way of telling that is happening. On-path interference has been a persistent problem for 1.1.1.1, which we’ve been <a href="https://blog.cloudflare.com/fixing-reachability-to-1-1-1-1-globally/"><u>working on</u></a> ever since we announced 1.1.1.1.</p><p>A second scenario can occur when a malicious actor is off-path, but is able to hijack 1.1.1.1 routing via BGP. These are scenarios we have discussed in a<a href="https://blog.cloudflare.com/bgp-hijack-detection/"> <u>previous blog post</u></a>, and <a href="https://manrs.org/2024/05/rpki-rov-deployment-reaches-major-milestone/"><u>increasing adoption of RPKI route origin validation (ROV)</u></a> makes BGP hijacks with high penetration harder. We looked at the historical BGP announcements involving 1.1.1.1, and have found no evidence that such routing hijacks took place.</p><p>Although we cannot be certain, so far we have seen no evidence that these certificates have been used to impersonate Cloudflare public DNS resolver 1.1.1.1 traffic. In later sections we discuss the steps we have taken to prevent such impersonation in the future, as well as concrete actions you can take to protect your own systems and users.</p>
    <div>
      <h3>A closer look at the unauthorized certificates attributes</h3>
      <a href="#a-closer-look-at-the-unauthorized-certificates-attributes">
        
      </a>
    </div>
    <p>All unauthorized certificates for 1.1.1.1 were valid for exactly one year and included other domain names. Most of these domain names are not registered, which indicates that the certificates were issued without proper domain control validation. This violates sections 3.2.2.4 and 3.2.2.5 of the CA/Browser Forum’s <a href="https://cabforum.org/working-groups/server/baseline-requirements/requirements/#3224-validation-of-domain-authorization-or-control"><u>Baseline Requirements</u></a>, and sections 3.2.2.3 and 3.2.2.4 of the <a href="https://rdc.fina.hr/RDC2015/CPWSA1-12-en.pdf"><u>Fina CA Certificate Policy</u></a>.</p><p>The full list of domain names we identified on the unauthorized certificates are as follows:</p>
            <pre><code>fina.hr
ssltest5
test.fina.hr
test.hr
test1.hr
test11.hr
test12.hr
test5.hr
test6
test6.hr
testssl.fina.hr
testssl.finatest.hr
testssl.hr
testssl1.finatest.hr
testssl2.finatest.hr</code></pre>
            <p>It’s also worth noting that the Subject attribute points to a fictional organisation <b>TEST D.D.</b>, as can be seen on this unauthorized certificate:</p>
            <pre><code>        Serial Number:
            a5:30:a2:9c:c1:a5:da:40:00:00:00:00:56:71:f2:4c
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=HR, O=Financijska agencija, CN=Fina RDC 2015
        Validity
            Not Before: Nov  2 23:45:15 2024 GMT
            Not After : Nov  2 23:45:15 2025 GMT
        Subject: C=HR, O=TEST D.D., L=ZAGREB, CN=testssl.finatest.hr, serialNumber=VATHR-32343828408.306
        X509v3 extensions:
            X509v3 Subject Alternative Name:
                DNS:testssl.finatest.hr, DNS:testssl2.finatest.hr, IP Address:1.1.1.1</code></pre>
            
    <div>
      <h3>Incident timeline and impact</h3>
      <a href="#incident-timeline-and-impact">
        
      </a>
    </div>
    <p><i>All timestamps are UTC. All certificates are identified by their date of validity.</i></p><p>The <a href="https://crt.sh/?id=12116084225"><u>first certificate</u></a> was issued to be valid starting February 2024, and revoked 33 min later. 11 certificate issuances with common name 1.1.1.1 followed from February 2024 to August 2025. Public reports have been made on <a href="https://news.ycombinator.com/item?id=45089708"><u>Hacker News</u></a> and on the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ"><u>certificate-transparency mailing list</u></a> early in September 2025, which Cloudflare responded to.</p><p>While responding to the incident, we identified the full list of misissued certificates, their revocation status, and which clients trust them.</p><p>The full timeline for the incident is as follows.</p><table><tr><td><p><b>Date &amp; Time (UTC)</b></p></td><td><p><b>Event Description</b></p></td></tr><tr><td><p>2024-02-18 11:07:33</p></td><td><p><a href="https://crt.sh/?id=12116084225"><u>First certificate issuance</u></a> revoked on 2024-02-18 11:40:00</p></td></tr><tr><td><p>2024-09-25 08:04:03</p></td><td><p><a href="https://crt.sh/?id=14681939427"><u>Issuance</u></a> revoked on 2024-11-06 07:36:05</p></td></tr><tr><td><p>2024-10-04 07:55:38</p></td><td><p><a href="https://crt.sh/?id=14793030836"><u>Issuance</u></a> revoked on 2024-10-04 07:56:56</p></td></tr><tr><td><p>2024-10-04 08:05:48</p></td><td><p><a href="https://crt.sh/?id=14793121895"><u>Issuance</u></a> revoked on 2024-11-06 07:39:55</p></td></tr><tr><td><p>2024-10-15 06:28:48</p></td><td><p><a href="https://crt.sh/?id=14939369380"><u>Issuance</u></a> revoked on 2024-11-06 07:35:36</p></td></tr><tr><td><p>2024-11-02 23:45:15</p></td><td><p><a href="https://crt.sh/?id=15190039061"><u>Issuance</u></a> revoked on 2024-11-02 23:48:42</p></td></tr><tr><td><p>2025-03-05 09:12:23</p></td><td><p><a href="https://crt.sh/?id=16939550348"><u>Issuance</u></a> revoked on 2025-03-05 09:13:22</p></td></tr><tr><td><p>2025-05-24 22:56:21</p></td><td><p><a href="https://crt.sh/?id=18603461241"><u>Issuance</u></a> revoked on 2025-09-04 06:13:27</p></td></tr><tr><td><p>2025-06-28 23:05:32</p></td><td><p><a href="https://crt.sh/?id=19318694206"><u>Issuance</u></a> revoked on 2025-07-18 07:01:27</p></td></tr><tr><td><p>2025-07-18 07:05:23</p></td><td><p><a href="https://crt.sh/?id=19749594221"><u>Issuance</u></a> revoked on 2025-07-18 07:09:45</p></td></tr><tr><td><p>2025-07-18 07:13:14</p></td><td><p><a href="https://crt.sh/?id=19749721864"><u>Issuance</u></a> revoked on 2025-09-04 06:30:36</p></td></tr><tr><td><p>2025-08-26 07:49:00</p></td><td><p><a href="https://crt.sh/?id=20582951233"><u>Last certificate issuance</u></a> revoked on 2025-09-04 06:33:20</p></td></tr><tr><td><p>2025-09-01 05:23:00</p></td><td><p><a href="https://news.ycombinator.com/item?id=45089708"><u>HackerNews submission</u></a> about a possible unauthorized issuance</p></td></tr><tr><td><p>2025-09-02 04:50:00</p></td><td><p>Report shared with us on HackerOne, but was mistriaged</p></td></tr><tr><td><p>2025-09-03 02:35:00</p></td><td><p>Second report shared with us on HackerOne, but also mistriaged.</p></td></tr><tr><td><p>2025-09-03 10:59:00</p></td><td><p><a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>Report sent</u></a> on the public <a><u>certificate-transparency@googlegroups.com</u></a> mailing picked up by the team.</p></td></tr><tr><td><p>2025-09-03 11:33:00</p></td><td><p>First response by Cloudflare on the mailing list about starting the investigation</p></td></tr><tr><td><p>2025-09-03 12:08:00</p></td><td><p>Incident declared</p></td></tr><tr><td><p>2025-09-03 12:16:00</p></td><td><p>Notification of an unauthorised issuance sent to Fina CA, Microsoft Root Store, and EU Trust service provider</p></td></tr><tr><td><p>2025-09-03 12:23:00</p></td><td><p>Cloudflare identifies an initial list of nine rogue certificates</p></td></tr><tr><td><p>2025-09-03 12:24:00</p></td><td><p>Outreach to Fina CA to inform them about the unauthorized issuance, requesting revocation</p></td></tr><tr><td><p>2025-09-03 12:26:00</p></td><td><p>Identify the number of requests served on 1.1.1.1 IP address, and associated names/services</p></td></tr><tr><td><p>2025-09-03 12:42:00</p></td><td><p>As a precautionary measure, began investigation to rule out the possibility of a BGP hijack for 1.1.1.1</p></td></tr><tr><td><p>2025-09-03 18:48:00</p></td><td><p>Second notification of the incident to Fina CA</p></td></tr><tr><td><p>2025-09-03 21:27:00</p></td><td><p>Microsoft Root Store notifies us that they are preventing further use of the identified unauthorized certificates by using their quick-revocation mechanism.</p></td></tr><tr><td><p>2025-09-04 06:13:27</p></td><td><p>Fina revoked all certificates.</p></td></tr><tr><td><p>2025-09-04 12:44:00</p></td><td><p>Cloudflare receives a response from Fina indicating “an error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers. [...] Fina will eliminate the possibility of such an error recurring.”</p></td></tr></table>
    <div>
      <h3>Remediation and follow-up steps</h3>
      <a href="#remediation-and-follow-up-steps">
        
      </a>
    </div>
    <p>Cloudflare has invested from the very start in the Certificate Transparency ecosystem. Not only do we operate CT logs ourselves, we also run a CT monitor that we use to <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/certificate-transparency-monitoring/"><u>alert customers when certificates are mis-issued for their domains</u></a>.</p><p>It is therefore disappointing that we failed to properly monitor certificates for our own domain. We failed three times. The first time because 1.1.1.1 is an IP certificate and our system failed to alert on these. The second time because even if we were to receive certificate issuance alerts, as any of our customers can, we did not implement sufficient filtering. With the sheer number of names and issuances we manage it has not been possible for us to keep up with manual reviews. Finally, because of this noisy monitoring, we did not enable alerting for all of our domains. We are addressing all three shortcomings.</p><p>We double-checked all certificates issued for our names, including but not limited to 1.1.1.1, using certificate transparency, and confirmed that as of 3 September, the Fina CA issued certificates are the only unauthorized issuances. We contacted Fina, and the root programs we know that trust them, to ask for revocation and investigation. The certificates have been revoked.</p><p>Despite no indication of usage of these certificates so far, we take this incident extremely seriously. We have identified several steps we can take to address the risk of these sorts of problems occurring in the future, and we plan to start working on them immediately:</p><p><b>Alerting</b>: Cloudflare will improve alerts and escalation for issuance of certificates for missing Cloudflare owned domains including 1.1.1.1 certificates.</p><p><b>Transparency</b>: The issuance of these unauthorised 1.1.1.1 certificates were detected because Fina CA used Certificate Transparency. Transparency inclusion is not enforced by most DNS clients, which implies that this detection was a lucky one. We are working on bringing transparency to non-browser clients, in particular DNS clients that rely on TLS.</p><p><b>Bug Bounty</b>: Our procedure for triaging reports made through our vulnerability disclosure program was the cause for a delayed response. We are working to revise our triaging process to ensure such reports get the right visibility.</p><p><b>Monitoring</b>: During this incident, our team relied on <a href="https://crt.sh"><u>crt.sh</u></a> to provide us a convenient UI to explore CA issued certificates. We’d like to give a shout to the <a href="https://www.sectigo.com/"><u>Sectigo team</u></a> for maintaining this tool. Given Cloudflare is an active CT Monitor, we have started to build a dedicated UI to explore our data <a href="https://radar.cloudflare.com/certificate-transparency"><u>in Radar</u></a>. We are looking to enable exploration of certs with IP addresses as common names to Radar as well.</p>
    <div>
      <h3>What steps should you take?</h3>
      <a href="#what-steps-should-you-take">
        
      </a>
    </div>
    <p>This incident demonstrates the disproportionate impact that the current root store model can have. It is enough for a single certification authority going rogue for everyone to be at risk.</p><p>If you are an IT manager with a fleet of managed devices, you should consider whether you need to take direct action to revoke these unauthorized certificates. We provide the list in the timeline section above. As the certificates have since been revoked, it is possible that no direct intervention should be required; however, system-wide revocation is not instantaneous and automatic and hence we recommend checking.</p><p>If you are tasked to review the policy of a root store that includes Fina CA, you should take immediate actions to review their inclusion in your program. The issue that has been identified through the course of this investigation raises concerns, and requires a clear report and follow-up from the CA. In addition, to make it possible to detect future such incidents, you should consider having a requirement for all CAs in your root store to participate in Certificate Transparency. Without CT logs, problems such as the one we describe here are impossible to address before they result in impact to end users.</p><p>We are not suggesting that you should stop using DoH or DoT. DNS over UDP and TCP are unencrypted, which puts every single query and response at risk of tampering and unauthorised surveillance. However, we believe that DoH and DoT client security could be improved if clients required that server certificates be included in a certificate transparency log.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>This event is the first time we have observed a rogue issuance of a certificate used by our public DNS resolver 1.1.1.1 service. While we have no evidence this was malicious, we know that there might be future attempts that are.</p><p>We plan to accelerate how quickly we discover and alert on these types of issues ourselves. We know that we can catch these earlier, and we plan to do so.</p><p>The identification of these kinds of issues rely on an ecosystem of partners working together to support Certificate Transparency. We are grateful for the monitors who noticed and reported this issue.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Certificate Authority]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">6dgQ2aH6eirkXOANX0QikR</guid>
            <dc:creator>Joe Abley</dc:creator>
            <dc:creator>Thibault Meunier</dc:creator>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Some TXT about, and A PTR to, new DNS insights on Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/new-dns-section-on-cloudflare-radar/</link>
            <pubDate>Thu, 27 Feb 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ The new Cloudflare Radar DNS page provides increased visibility into aggregate traffic and usage trends seen by our 1.1.1.1 resolver ]]></description>
            <content:encoded><![CDATA[ <p>No joke – Cloudflare's <a href="https://www.cloudflare.com/en-gb/learning/dns/what-is-1.1.1.1/"><u>1.1.1.1 resolver</u></a> was <a href="https://blog.cloudflare.com/dns-resolver-1-1-1-1"><u>launched</u></a> on April Fool's Day in 2018. Over the last seven years, this highly <a href="https://www.dnsperf.com/#!dns-resolvers"><u>performant</u></a> and <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>privacy</u></a>-<a href="https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination"><u>conscious</u></a> service has grown to handle an average of 1.9 Trillion queries per day from approximately 250 locations (countries/regions) around the world. Aggregated analysis of this traffic provides us with unique insight into Internet activity that goes beyond simple Web traffic trends, and we currently use analysis of 1.1.1.1 data to power Radar's <a href="https://radar.cloudflare.com/domains"><u>Domains</u></a> page, as well as the <a href="https://blog.cloudflare.com/radar-domain-rankings"><u>Radar Domain Rankings</u></a>.</p><p>In December 2022, Cloudflare <a href="https://blog.cloudflare.com/the-as112-project/"><u>joined the AS112 Project</u></a>, which helps the Internet deal with misdirected DNS queries. In March 2023, we launched an <a href="https://radar.cloudflare.com/as112"><u>AS112 statistics</u></a> page on Radar, providing insight into traffic trends and query types for this misdirected traffic. Extending the basic analysis presented on that page, and building on the analysis of resolver data used for the Domains page, today we are excited to launch a dedicated DNS page on Cloudflare Radar to provide increased visibility into aggregate traffic and usage trends seen across 1.1.1.1 resolver traffic. In addition to looking at global, location, and <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>autonomous system (ASN)</u></a> traffic trends, we are also providing perspectives on protocol usage, query and response characteristics, and <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>DNSSEC</u></a> usage.</p><p>The traffic analyzed for this new page may come from users that have manually configured their devices or local routers to use 1.1.1.1 as a resolver, ISPs that set 1.1.1.1 as the default resolver for their subscribers, ISPs that use 1.1.1.1 as a resolver upstream from their own, or users that have installed Cloudflare’s <a href="https://one.one.one.one/"><u>1.1.1.1/WARP app</u></a> on their device. The traffic analysis is based on anonymised DNS query logs, in accordance with <a href="https://www.cloudflare.com/privacypolicy/"><u>Cloudflare’s Privacy Policy</u></a>, as well as our <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>1.1.1.1 Public DNS Resolver privacy commitments</u></a>.</p><p>Below, we walk through the sections of Radar’s new DNS page, reviewing the included graphs and the importance of the metrics they present. The data and trends shown within these graphs will vary based on the location or network that the aggregated queries originate from, as well as on the selected time frame.</p>
    <div>
      <h3>Traffic trends</h3>
      <a href="#traffic-trends">
        
      </a>
    </div>
    <p>As with many Radar metrics, the <a href="https://radar.cloudflare.com/dns"><u>DNS page</u></a> leads with traffic trends, showing normalized query volume at a worldwide level (default), or from the selected location or <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>autonomous system (ASN)</u></a>. Similar to other Radar traffic-based graphs, the time period shown can be adjusted using the date picker, and for the default selections (last 24 hours, last 7 days, etc.), a comparison with traffic seen over the previous period is also plotted.</p><p>For location-level views (such as <a href="https://radar.cloudflare.com/dns/lv"><u>Latvia</u></a>, in the example below), a table showing the top five ASNs by query volume is displayed alongside the graph. Showing the network’s share of queries from the selected location, the table provides insights into the providers whose users are generating the most traffic to 1.1.1.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tFv24QhHPReek393iHte7/03894de5973a1fed2805f69dcd9323c6/01.png" />
            
            </figure><p>When a country/region is selected, in addition to showing an aggregate traffic graph for that location, we also show query volumes for the <a href="https://en.wikipedia.org/wiki/Country_code_top-level_domain"><u>country code top level domain (ccTLD)</u></a> associated with that country. The graph includes a line showing worldwide query volume for that ccTLD, as well as a line showing the query volume based on queries from the associated location. <a href="https://radar.cloudflare.com/dns/ai#dns-query-volume-for-ai-domains"><u>Anguilla’s</u></a> ccTLD is .ai, and is a popular choice among the growing universe of AI-focused companies. While most locations see a gap between the worldwide and “local” query volume for their ccTLD, Anguilla’s is rather significant — as the graph below illustrates, this size of the gap is driven by both the popularity of the ccTLD and Anguilla’s comparatively small user base. (Traffic for <a href="https://www.cloudflare.com/application-services/products/registrar/buy-ai-domains/">.ai domains</a> from Anguilla is shown by the dark blue line at the bottom of the graph.) Similarly, sizable gaps are seen with other “popular” ccTLDs as well, such as .io (<a href="https://radar.cloudflare.com/dns/io#dns-query-volume-for-io-domains"><u>British Indian Ocean Territory</u></a>), .fm (<a href="https://radar.cloudflare.com/dns/fm#dns-query-volume-for-fm-domains"><u>Federated States of Micronesia</u></a>), and .co (<a href="https://radar.cloudflare.com/dns/co#dns-query-volume-for-co-domains"><u>Colombia</u></a>). A higher “local” ccTLD query volume in other locations results in smaller gaps when compared to the worldwide query volume.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6LXc2OLAoHqAVbgspo5cjb/c01b9f7e90d1d27f66eb3dcb35bf2622/02.png" />
            
            </figure><p>Depending on the strength of the signal (that is, the volume of traffic) from a given location or ASN, this data can also be used to corroborate reported Internet outages or shutdowns, or reported blocking of 1.1.1.1. For example, the <a href="https://radar.cloudflare.com/dns/as8048?dateStart=2025-01-10&amp;dateEnd=2025-02-06"><u>graph below</u></a> illustrates the result of Venezuelan provider <a href="https://radar.cloudflare.com/as8048"><u>CANTV</u></a> reportedly <a href="https://x.com/vesinfiltro/status/1879943715537711233"><u>blocking access to 1.1.1.1</u></a> for its subscribers. A <a href="https://radar.cloudflare.com/dns/as22313?dateStart=2025-01-10&amp;dateEnd=2025-01-23"><u>comparable drop</u></a> is visible for <a href="https://radar.cloudflare.com/as22313"><u>Supercable</u></a>, another Venezuelan provider that also reportedly blocked access to Cloudflare’s resolver around the same time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1hR11TuJDhzWDFhoCo3Uh7/970ecbc951edd352f80a3b87f607e580/03.png" />
            
            </figure><p>Individual domain pages (like the one for <a href="https://radar.cloudflare.com/domains/domain/cloudflare.com"><u>cloudflare.com</u></a>, for example) have long had a choropleth map and accompanying table showing the <a href="https://radar.cloudflare.com/domains/domain/cloudflare.com#visitor-location"><u>popularity of the domain by location</u></a>, based on the share of DNS queries for that domain from each location. A <a href="https://radar.cloudflare.com/dns#geographical-distribution"><u>similar view</u></a> is included at the bottom of the worldwide overview page, based on the share of total global queries to 1.1.1.1 from each location.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2kchGpH4fmYxmX4up953VC/744632815d78a9a77526e97d8c4d1664/04.png" />
            
            </figure>
    <div>
      <h3>Query and response characteristics</h3>
      <a href="#query-and-response-characteristics">
        
      </a>
    </div>
    <p>While traffic trends are always interesting and important to track, analysis of the characteristics of queries to 1.1.1.1 and the associated responses can provide insights into the adoption of underlying transport protocols, record type popularity, cacheability, and security.</p><p>Published in November 1987, <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-4.2"><u>RFC 1035 notes</u></a> that “<i>The Internet supports name server access using TCP [</i><a href="https://datatracker.ietf.org/doc/html/rfc793"><i><u>RFC-793</u></i></a><i>] on server port 53 (decimal) as well as datagram access using UDP [</i><a href="https://datatracker.ietf.org/doc/html/rfc768"><i><u>RFC-768</u></i></a><i>] on UDP port 53 (decimal).</i>” Over the subsequent three-plus decades, UDP has been the primary transport protocol for DNS queries, falling back to TCP for a limited number of use cases, such as when the response is too big to fit in a single UDP packet. However, as privacy has become a significantly greater concern, encrypted queries have been made possible through the specification of <a href="https://datatracker.ietf.org/doc/html/rfc7858"><u>DNS over TLS</u></a> (DoT) in 2016 and <a href="https://datatracker.ietf.org/doc/html/rfc8484"><u>DNS over HTTPS</u></a> (DoH) in 2018. Cloudflare’s 1.1.1.1 resolver has <a href="https://blog.cloudflare.com/announcing-1111/#toward-a-better-dns-infrastructure"><u>supported both of these privacy-preserving protocols since launch</u></a>. The <a href="https://radar.cloudflare.com/dns#dns-transport-protocol"><b><u>DNS transport protocol</u></b></a> graph shows the distribution of queries to 1.1.1.1 over these four protocols. (Setting up 1.1.1.1 <a href="https://one.one.one.one/dns/"><u>on your device or router</u></a> uses DNS over UDP by default, although recent versions of <a href="https://developers.cloudflare.com/1.1.1.1/setup/android/#configure-1111-manually"><u>Android</u></a> support DoT and DoH. The <a href="https://one.one.one.one/"><u>1.1.1.1 app</u></a> uses DNS over HTTPS by default, and users can also <a href="https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/encrypted-dns-browsers/"><u>configure their browsers</u></a> to use DNS over HTTPS.)</p><p>Note that Cloudflare's resolver also services queries over DoH and <a href="https://blog.cloudflare.com/oblivious-dns/"><u>Oblivious DoH (ODoH)</u></a> for <a href="https://developers.cloudflare.com/1.1.1.1/privacy/cloudflare-resolver-firefox/"><u>Mozilla</u></a> and other large platforms, but this traffic is not currently included in our analysis. As such, DoH adoption is under-represented in this graph.</p><p>Aggregated worldwide between February 19 - February 26, distribution of transport protocols was 86.6% for UDP, 9.6% for DoT, 2.0% for TCP, and 1.7% for DoH. However, in some locations, these ratios may shift if users are more privacy conscious. For example, the graph below shows the distribution for <a href="https://radar.cloudflare.com/dns/eg"><u>Egypt</u></a> over the same time period. In that country, the UDP and TCP shares are significantly lower than the global level, while the DoT and DoH shares are significantly higher, suggesting that users there may be more concerned about the privacy of their DNS queries than the global average, or that there is a larger concentration of 1.1.1.1 users on Android devices who have set up 1.1.1.1 using DoT manually. (The 2024 Cloudflare Radar Year in Review found that <a href="https://radar.cloudflare.com/year-in-review/2024/eg#ios-vs-android"><u>Android had an 85% mobile device traffic share in Egypt</u></a>, so mobile device usage in the country leans very heavily toward Android.)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1srd6prVQCUxHvxw8eFNjL/987f2d925120be867174fd04a8c7eb2c/05-b.png" />
            
            </figure><p>RFC 1035 also defined a number of <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-3.3"><u>standard</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-3.4"><u>Internet specific</u></a> resource record types that return the associated information about the submitted query name. The most common record types are <code>A</code> and <code>AAAA</code>, which return the hostname’s IPv4 and IPv6 addresses respectively (assuming they exist). The <a href="https://radar.cloudflare.com/dns#dns-query-type"><b><u>DNS query type</u></b></a> graph below shows that globally, these two record types comprise on the order of 80% of the queries received by 1.1.1.1. Among the others shown in the graph, <a href="https://blog.cloudflare.com/speeding-up-https-and-http-3-negotiation-with-dns/#service-bindings-via-dns"><code><u>HTTPS</u></code></a> records can be used to signal HTTP/3 and HTTP/2 support, <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-ptr-record/"><code><u>PTR</u></code></a> records are used in reverse DNS records to look up a domain name based on a given IP address, and <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-ns-record/"><code><u>NS</u></code></a> records indicate authoritative nameservers for a domain.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3LI2EW249EtFFX5FvlONDg/4b150dfbdd8de5c0e9def9eb18c81d70/06.png" />
            
            </figure><p>A response code is sent with each response from 1.1.1.1 to the client. Six possible values were <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-4.1.1"><u>originally defined in RFC 1035</u></a>, with the list <a href="https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6"><u>further extended</u></a> in <a href="https://datatracker.ietf.org/doc/html/rfc2136"><u>RFC 2136</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc2671"><u>RFC 2671</u></a>. <code>NOERROR</code>, as the name suggests, means that no error condition was encountered with the query. Others, such as <code>NXDOMAIN</code>, <code>SERVFAIL</code>, <code>REFUSED</code>, and <code>NOTIMP</code> define specific error conditions encountered when trying to resolve the requested query name. The response codes may be generated by 1.1.1.1 itself (like <code>REFUSED</code>) or may come from an upstream authoritative nameserver (like <code>NXDOMAIN</code>).</p><p>The <a href="https://radar.cloudflare.com/dns#dns-response-code"><b><u>DNS response code</u></b></a> graph shown below highlights that the vast majority of queries seen globally do not encounter an error during the resolution process (<code>NOERROR</code>), and that when errors are encountered, most are <a href="https://datatracker.ietf.org/doc/html/rfc8020"><code><u>NXDOMAIN</u></code></a> (no such record). It is worth noting that <code>NOERROR</code> also includes empty responses, which occur when there are no records for the query name and query type, but there are records for the query name and some other query type.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ZXQ8kcT0H7zfb8najn42C/df8c8c2f54c492484bb5d59f437eee5d/07.png" />
            
            </figure><p>With DNS being a first-step dependency for many other protocols, the amount of queries of particular types can be used to indirectly measure the adoption of those protocols. But to effectively measure adoption, we should also consider the fraction of those queries that are met with useful responses, which are represented with the <a href="https://radar.cloudflare.com/dns#dns-record-adoption"><b><u>DNS record adoption</u></b></a> graphs.</p><p>The example below shows that queries for <code>A</code> records are met with a useful response nearly 88% of the time. As IPv4 is an established protocol, the remaining 12% are likely to be queries for valid hostnames that have no <code>A </code>records (e.g. email domains that only have MX records). But the same graph also shows that there’s still a <a href="https://blog.cloudflare.com/ipv6-from-dns-pov/"><u>significant adoption gap</u></a> where IPv6 is concerned.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6blxaHcK6UtPp67V3SGNML/daed03be6793aab32ec21b2bb2f08374/08.png" />
            
            </figure><p>When Cloudflare’s DNS resolver gets a response back from an upstream authoritative nameserver, it caches it for a specified amount of time — more on that below. By caching these responses, it can more efficiently serve subsequent queries for the same name. The <a href="https://radar.cloudflare.com/dns#dns-cache-hit-ratio"><b><u>DNS cache hit ratio</u></b></a> graph provides insight into how frequently responses are served from cache. At a global level, as seen below, over 80% of queries have a response that is already cached. These ratios will vary by location or ASN, as the query patterns differ across geographies and networks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/sj0gBv53GdPF0slfGlKlr/fa86ff6fc610aefad2e675c5dc926f54/09.png" />
            
            </figure><p>As noted in the preceding paragraph, when an authoritative nameserver sends a response back to 1.1.1.1, each record inside it includes information about how long it should be cached/considered valid for. This piece of information is known as the <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/"><u>Time-To-Live (TTL)</u></a> and, as a response may contain multiple records, the smallest of these TTLs (the “minimum” TTL) defines how long 1.1.1.1 can cache the entire response for. The TTLs on each response served from 1.1.1.1’s cache decrease towards zero as time passes, at which point 1.1.1.1 needs to go back to the authoritative nameserver. Hostnames with relatively low TTL values suggest that the records may be somewhat dynamic, possibly due to traffic management of the associated resources; longer TTL values suggest that the associated resources are more stable and expected to change infrequently.</p><p>The <a href="https://radar.cloudflare.com/dns#dns-minimum-ttl"><b><u>DNS minimum TTL</u></b></a> graphs show the aggregate distribution of TTL values for five popular DNS record types, broken out across seven buckets ranging from under one minute to over one week. During the third week of February, for example, <code>A</code> and <code>AAAA</code> responses had a concentration of low TTLs, with over 80% below five minutes. In contrast, <code>NS</code> and <code>MX</code> responses were more concentrated across 15 minutes to one hour and one hour to one day. Because <code>MX</code> and <code>NS</code> records change infrequently, they are generally configured with higher TTLs. This allows them to be cached for longer periods in order to achieve faster DNS resolution.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3r6ppahpkqyfAHi89LWNA1/6dc6f52e92c1d7aa2dfaeaa411deb982/10.png" />
            
            </figure>
    <div>
      <h3>DNS security</h3>
      <a href="#dns-security">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/dns/dns-security/"><u>DNS Security Extensions (DNSSEC)</u></a> add an extra layer of authentication to DNS establishing the integrity and authenticity of a DNS response. This ensures subsequent HTTPS requests are not routed to a spoofed domain. When sending a query to 1.1.1.1, a DNS client can indicate that it is DNSSEC-aware by setting a specific flag (the “DO” bit) in the query, which lets our resolver know that it is OK to return DNSSEC data in the response. The <a href="https://radar.cloudflare.com/dns#dnssec-client-awareness"><b><u>DNSSEC client awareness</u></b></a> graph breaks down the share of queries that 1.1.1.1 sees from clients that understand DNSSEC and can require validation of responses vs. those that don’t. (Note that by default, 1.1.1.1 tries to protect clients by always validating DNSSEC responses from authoritative nameservers and not forwarding invalid responses to clients, unless the client has explicitly told it not to by setting the “CD” (checking-disabled) bit in the query.)</p><p>Unfortunately, as the graph below shows, nearly 90% of the queries seen by Cloudflare’s resolver are made by clients that are not DNSSEC-aware. This broad lack of client awareness may be due to several factors. On the client side, DNSSEC is not enabled by default for most users, and enabling DNSSEC requires extra work, even for technically savvy and security conscious users. On the authoritative side, for domain owners, supporting DNSSEC requires extra operational maintenance and knowledge, and a mistake can cost your domain to <a href="https://blog.cloudflare.com/dnssec-issues-fiji/"><u>disappear from the Internet</u></a>, causing significant (including financial) issues.</p><p>The companion <a href="https://radar.cloudflare.com/dns#end-to-end-security"><b><u>End-to-end security</u></b></a> graph represents the fraction of DNS interactions that were protected from tampering, when considering the client’s DNSSEC capabilities and use of encryption (use of DoT or DoH). This shows an even greater imbalance at a global level, and highlights the importance of further adoption of encryption and DNSSEC.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6nErpp8o9tPuE0jt5PQ3fg/3e509065967a8f43c6679d400fd31454/11.png" />
            
            </figure><p>For DNSSEC validation to occur, the query name being requested must be part of a DNSSEC-enabled domain, and the <a href="https://radar.cloudflare.com/dns#dnssec-validation-status"><b><u>DNSSEC validation status</u></b></a> graph represents the share of queries where that was the case under the <b>Secure</b> and <b>Invalid</b> labels. Queries for domains without DNSSEC are labeled as <b>Insecure</b>, and queries where DNSSEC validation was not applicable (such as various kinds of errors) fall under the <b>Other</b> label. Although nearly 93% of generic Top Level Domains (TLDs) and 65% of country code Top Level Domains (ccTLDs) are <a href="https://ithi.research.icann.org/graph-m7.html"><u>signed with DNSSEC</u></a> (as of February 2025), the adoption rate across individual (child) domains lags significantly, as the graph below shows that over 80% of queries were labeled as <b>Insecure</b>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3shBkfRYcpHKgXI6Y9jcjq/26929261c5c6800fa1fee562dad5ce53/12.png" />
            
            </figure>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>DNS is a fundamental, foundational part of the Internet. While most Internet users don’t think of DNS beyond its role in translating easy-to-remember hostnames to IP addresses, there’s a lot going on to make even that happen, from privacy to performance to security. The new DNS page on Cloudflare Radar endeavors to provide visibility into what’s going on behind the scenes, at a global, national, and network level.</p><p>While the graphs shown above are taken from the DNS page, all the underlying data is available via the <a href="https://developers.cloudflare.com/api/resources/radar/subresources/dns/"><u>API</u></a> and can be interactively explored in more detail across locations, networks, and time periods using Radar’s <a href="https://radar.cloudflare.com/explorer?dataSet=dns"><u>Data Explorer and AI Assistant</u></a>. And as always, Radar and Data Assistant charts and graphs are downloadable for sharing, and embeddable for use in your own blog posts, websites, or dashboards.</p><p>If you share our DNS graphs on social media, be sure to tag us: <a href="https://x.com/CloudflareRadar"><u>@CloudflareRadar</u></a> and <a href="https://x.com/1111Resolver"><u>@1111Resolver</u></a> (X), <a href="https://noc.social/@cloudflareradar"><u>noc.social/@cloudflareradar</u></a> (Mastodon), and <a href="https://bsky.app/profile/radar.cloudflare.com"><u>radar.cloudflare.com</u></a> (Bluesky). If you have questions or comments, you can reach out to us on social media, or contact us via <a><u>email</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[Traffic]]></category>
            <guid isPermaLink="false">2aI8Y4m36DD0HQghRNFZ2n</guid>
            <dc:creator>David Belson</dc:creator>
            <dc:creator>Carlos Rodrigues</dc:creator>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Hannes Gerhart</dc:creator>
        </item>
        <item>
            <title><![CDATA[How we prevent conflicts in authoritative DNS configuration using formal verification]]></title>
            <link>https://blog.cloudflare.com/topaz-policy-engine-design/</link>
            <pubDate>Fri, 08 Nov 2024 14:00:00 GMT</pubDate>
            <description><![CDATA[ We describe how Cloudflare uses a custom Lisp-like programming language and formal verifier (written in Racket and Rosette) to prevent logical contradictions in our authoritative DNS nameserver’s behavior. ]]></description>
            <content:encoded><![CDATA[ <p>Over the last year, Cloudflare has begun formally verifying the correctness of our internal DNS addressing behavior — the logic that determines which IP address a DNS query receives when it hits our authoritative nameserver. This means that for every possible DNS query for a <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/"><u>proxied</u></a> domain we could receive, we try to mathematically prove properties about our DNS addressing behavior, even when different systems (owned by different teams) at Cloudflare have contradictory views on which IP addresses should be returned.</p><p>To achieve this, we formally verify the programs — written in a custom <a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)"><u>Lisp</u></a>-like programming language — that our nameserver executes when it receives a DNS query. These programs determine which IP addresses to return. Whenever an engineer changes one of these programs, we run all the programs through our custom model checker (written in <a href="https://racket-lang.org/"><u>Racket</u></a> + <a href="https://emina.github.io/rosette/"><u>Rosette</u></a>) to check for certain bugs (e.g., one program overshadowing another) before the programs are deployed.</p><p>Our formal verifier runs in production today, and is part of a larger addressing system called Topaz. In fact, it’s likely you’ve made a DNS query today that triggered a formally verified Topaz program.</p><p>This post is a technical description of how Topaz’s formal verification works. Besides being a valuable tool for Cloudflare engineers, Topaz is a real-world example of <a href="https://en.wikipedia.org/wiki/Formal_verification"><u>formal verification</u></a> applied to networked systems. We hope it inspires other network operators to incorporate formal methods, where appropriate, to help make the Internet more reliable for all.</p><p>Topaz’s full technical details have been peer-reviewed and published in <a href="https://conferences.sigcomm.org/sigcomm/2024/"><u>ACM SIGCOMM 2024</u></a>, with both a <a href="https://research.cloudflare.com/publications/Larisch2024/"><u>paper</u></a> and short <a href="https://www.youtube.com/watch?v=hW7RjXVx7_Q"><u>video</u></a> available online. </p>
    <div>
      <h2>Addressing: how IP addresses are chosen</h2>
      <a href="#addressing-how-ip-addresses-are-chosen">
        
      </a>
    </div>
    <p>When a DNS query for a customer’s proxied domain hits Cloudflare’s nameserver, the nameserver returns an IP address — but how does it decide which address to return?</p><p>Let’s make this more concrete. When a customer, say <code>example.com</code>, signs up for Cloudflare and <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/"><u>proxies</u></a> their traffic through Cloudflare, it makes Cloudflare’s nameserver <i>authoritative</i> for their domain, which means our nameserver has the <i>authority </i>to respond to DNS queries for <code>example.com</code>. Later, when a client makes a DNS query for <code>example.com</code>, the client’s recursive DNS resolver (for example, <a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"><u>1.1.1.1</u></a>) queries our nameserver for the authoritative response. Our nameserver returns <b><i>some</i></b><i> </i>Cloudflare IP address (of our choosing) to the resolver, which forwards that address to the client. The client then uses the IP address to connect to Cloudflare’s network, which is a global <a href="https://www.cloudflare.com/en-gb/learning/cdn/glossary/anycast-network/"><u>anycast</u></a> network — every data center advertises all of our addresses.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/72EmlVrMTMBMhxrhZ50YI9/54e08160ea98c55bc8e2703d7c85927b/image3.png" />
          </figure><p><sup>Clients query Cloudflare’s nameserver (via their resolver) for customer domains. The nameserver returns Cloudflare IP addresses, advertised by our entire global network, which the client uses to connect to the customer domain. Cloudflare may then connect to the origin server to fulfill the user’s HTTPS request.</sup></p><p>When the customer has <a href="https://developers.cloudflare.com/byoip/"><u>configured a static IP address</u></a> for their domain, our nameserver’s choice of IP address is simple: it simply returns that static address in response to queries made for that domain.</p><p>But for all other customer domains, our nameserver could respond with virtually any IP address that we own and operate. We may return the <i>same</i> address in response to queries for <i>different</i> domains, or <i>different</i> addresses in response to different queries for the <i>same</i> domain. We do this for resilience, but also because decoupling names and IP addresses <a href="https://blog.cloudflare.com/addressing-agility"><u>improves flexibility</u></a>.</p><p>With all that in mind, let’s return to our initial question: given a query for a proxied domain without a static IP, which IP address should be returned? The answer: <b>Cloudflare chooses IP addresses to meet various business objectives. </b>For instance, we may choose IPs to:</p><ul><li><p>Change the IP address of a domain that is under attack.</p></li><li><p>Direct fractions of traffic to specific IP addresses to test new features or services.</p></li><li><p><a href="https://blog.cloudflare.com/cloudflare-incident-on-september-17-2024/"><u>Remap or “renumber”</u></a> domain names to new IP address space.</p></li></ul>
    <div>
      <h2>Topaz executes DNS objectives</h2>
      <a href="#topaz-executes-dns-objectives">
        
      </a>
    </div>
    <p>To change authoritative nameserver behavior — how we choose IPs —  a Cloudflare engineer encodes their desired DNS business objective as a declarative Topaz program. Our nameserver stores the list of all such programs such that when it receives a DNS query for a proxied domain, it executes the list of programs in sequence until one returns an IP address. It then returns that IP to the resolver.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3gyUw7j0GlTXj0Vm637aCW/9aa353d512151d5878998e199a538973/image1.png" />
          </figure><p><sup>Topaz receives DNS queries (metadata included) for proxied domains from Cloudflare’s nameserver. It executes a list of policies in sequence until a match is found. It returns the resulting IP address to the nameserver, which forwards it to the resolver.</sup></p><p>What do these programs look like?</p><p>Each Topaz program has three primary components:</p><ol><li><p><b>Match function: </b>A program’s match function specifies under which circumstances the program should execute. It takes as input DNS query metadata (e.g., datacenter information, account information) and outputs a boolean. If, given a DNS query, the match function returns <i>true</i>, the program’s response function is executed.</p></li><li><p><b>Response function</b>: A program’s response function specifies <i>which</i> IP addresses should be chosen. It also takes as input all the DNS query metadata, but outputs a 3-tuple (IPv4 addresses, IPv6 addresses, and TTL). When a program’s match function returns true, its corresponding response function is executed. The resulting IP addresses and TTL are returned to the resolver that made the query. </p></li><li><p><b>Configuration</b>: A program’s configuration is a set of variables that parameterize that program’s match and response function. The match and response functions reference variables in the corresponding configuration, thereby separating the macro-level behavior of a program (match/response functions) from its nitty-gritty details (specific IP addresses, names, etc.). This separation makes it easier to understand how a Topaz program behaves at a glance, without getting bogged down by specific function parameters.</p></li></ol><p>Let’s walk through an example Topaz program. The goal of this program is to give all queried domains whose metadata field “tag1” is equal to “orange” a particular IP address. The program looks like this:</p>
            <pre><code>- name: orange
  config: |
    (config
      ([desired_tag1 "orange"]
       [ipv4 (ipv4_address “192.0.2.3”)]
       [ipv6 (ipv6_address “2001:DB8:1:3”)]
       [t (ttl 300]))
  match: |
    (= query_domain_tag1 desired_tag1) 
  response: |
    (response (list ipv4) (list ipv6) t)</code></pre>
            <p>Before we walk through the program, note that the program’s configuration, match, and response function are YAML strings, but more specifically they are topaz-lang expressions. Topaz-lang is the <a href="https://en.wikipedia.org/wiki/Domain-specific_language"><u>domain-specific language (DSL)</u></a> we created specifically for expressing Topaz programs. It is based on <a href="https://www.scheme.org/"><u>Scheme</u></a>, but is much simpler. It is dynamically typed, it is not <a href="https://en.wikipedia.org/wiki/Turing_completeness"><u>Turing complete</u></a>, and every expression evaluates to exactly one value (though functions can throw errors). Operators cannot define functions within topaz-lang, they can only add new DSL functions by writing functions in the host language (Go). The DSL provides basic types (numbers, lists, maps) but also Topaz-specific types, like IPv4/IPv6 addresses and TTLs.</p><p>Let’s now examine this program in detail. </p><ul><li><p>The <code>config</code> is a set of four <i>bindings</i> from name to value. The first binds the string <code>”orange”</code> to the name <code>desired_tag1</code>. The second binds the IPv4 address <code>192.0.2.3</code> to the name <code>ipv4</code>. The third binds the IPv6 address <code>2001:DB8:1:3</code> to the name <code>ipv6</code>. And the fourth binds the TTL (for which we added a topaz-lang type) <code>300</code> (seconds) to the name <code>t</code>.</p></li><li><p>The <code>match</code> function is an expression that <i>must</i> evaluate to a boolean. It can reference configuration values (e.g., <code>desired_tag1</code>), and can also reference DNS query fields. All DNS query fields use the prefix <code>query_</code> and are brought into scope at evaluation time. This program’s match function checks whether <code>desired_tag1</code> is equal to the tag attached to the queried domain, <code>query_domain_tag1</code>. </p></li><li><p>The <code>response</code> function is an expression that evaluates to the special <code>response</code> type, which is really just a 3-tuple consisting of: a list of IPv4 addresses, a list of IPv6 addresses, and a TTL. This program’s response function simply returns the configured IPv4 address, IPv6 address, and TTL (seconds).</p></li></ul><p>Critically, <i>all</i> Topaz programs are encoded as YAML and live in the same version-controlled file. Imagine this program file contained only the <code>orange</code> program above, but now, a new team wants to add a new program, which checks whether the queried domain’s “tag1” field is equal to “orange” AND that the domain’s “tag2” field is equal to true:</p>
            <pre><code>- name: orange_and_true
  config: |
    (config
      ([desired_tag1 "orange"]
       [ipv4 (ipv4_address “192.0.2.2”)]
       [ipv6 (ipv6_address “2001:DB8:1:2”)]
       [t (ttl 300)]))
  match: |
    (and (= query_domain_tag1 desired_tag1)
         query_domain_tag2)
  response: |
    (response (list ipv4) (list ipv6) t)</code></pre>
            <p>This new team must place their new <code>orange_and_true</code> program either below or above the <code>orange</code> program in the file containing the list of Topaz programs. For instance, they could place <code>orange_and_true</code> after <code>orange</code>, like so:</p>
            <pre><code>- name: orange
  config: …
  match: …
  response: …
- name: orange_and_true
  config: …
  match: …
  response: …</code></pre>
            <p>Now let’s add a third, more interesting Topaz program. Say a Cloudflare team wants to test a modified version of our CDN’s HTTP server on a small percentage of domains, and only in a subset of Cloudflare’s data centers. Furthermore, they want to distribute these queries across a specific IP prefix such that queries for the same domain get the same IP. They write the following:</p>
            <pre><code>- name: purple
  config: |
    (config
      ([purple_datacenters (fetch_datacenters “purple”)]
       [percentage 10]
       [ipv4_prefix (ipv4_prefix “203.0.113.0/24”)]
       [ipv6_prefix (ipv6_prefix “2001:DB8:3::/48”)]))
  match: |
    (let ([rand (rand_gen (hash query_domain))])
      (and (member? purple_datacenters query_datacenter)
           (&lt; (random_number (range 0 99) rand) percentage)))
  response: |
    (let ([hashed_domain (hash query_domain)]
          [ipv4_address (select_from ipv4_prefix hashed_domain)]
          [ipv6_address (select_from ipv6_prefix hashed_domain)])
      (response (list ipv4_address) (list ipv6_address) (ttl 1)))</code></pre>
            <p>This Topaz program is significantly more complicated, so let’s walk through it.</p><p>Starting with configuration: </p><ul><li><p>The first configuration value, <code>purple_datacenters</code>, is bound to the expression <code>(fetch_datacenters “purple”)</code>, which is a function that retrieves all Cloudflare data centers tagged “purple” via an internal HTTP API. The result of this function call is a list of data centers. </p></li><li><p>The second configuration value, <code>percentage</code>, is a number representing the fraction of traffic we would like our program to act upon.</p></li><li><p>The third and fourth names are bound to IP prefixes, v4 and v6 respectively (note the <code>built-in ipv4_prefix</code> and <code>ipv6_prefix</code> types).</p></li></ul><p>The match function is also more complicated. First, note the <code>let</code> form — this lets operators define local variables. We define one local variable, a random number generator called <code>rand</code> seeded with the hash of the queried domain name. The match expression itself is a conjunction that checks two things. </p><ul><li><p>First, it checks whether the query landed in a data center tagged “purple”. </p></li><li><p>Second, it checks whether a random number between 0 and 99 (produced by a generator seeded by the domain name) is less than the configured percentage. By seeding the random number generator with the domain, the program ensures that 10% of <i>domains</i> trigger a match. If we had seeded the RNG with, say, the query ID, then queries for the same domain would behave differently.</p></li></ul><p>Together, the conjuncts guarantee that the match expression evaluates to true for 10% of domains queried in “purple” data centers.</p><p>Now let’s look at the response function. We define three local variables. The first is a hash of the domain. The second is an IPv4 address selected from the configured IPv4 prefix. <code>select_from</code> always chooses the same IP address given the same prefix and hash — this ensures that queries for a given domain always receive the same IP address (which makes it easier to correlate queries for a single domain), but that queries for different domains can receive different IP addresses within the configured prefix. The third local variable is an IPv6 address selected similarly. The response function returns these IP addresses and a TTL of value 1 (second).</p>
    <div>
      <h2>Topaz programs are executed on the hot path</h2>
      <a href="#topaz-programs-are-executed-on-the-hot-path">
        
      </a>
    </div>
    <p>Topaz’s control plane validates the list of programs and distributes them to our global nameserver instances. As we’ve seen, the list of programs reside in a single, version-controlled YAML file. When an operator changes this file (i.e., adds a program, removes a program, or modifies an existing program), Topaz’s control plane does the following things in order:</p><ul><li><p>First, it validates the programs, making sure there are no syntax errors. </p></li><li><p>Second, it “finalizes” each program’s configuration by evaluating every configuration binding and storing the result. (For instance, to finalize the <code>purple</code> program, it evaluates <code>fetch_datacenters</code>, storing the resulting list. This way our authoritative nameservers never need to retrieve external data.) </p></li><li><p>Third, it <i>verifies</i> the finalized programs, which we will explain below. </p></li><li><p>Finally, it distributes the finalized programs across our network.</p></li></ul><p>Topaz’s control plane distributes the programs to all servers globally by writing the list of programs to <a href="https://blog.cloudflare.com/introducing-quicksilver-configuration-distribution-at-internet-scale/"><u>QuickSilver</u></a>, our edge key-value store. The Topaz service on each server detects changes in Quicksilver and updates its program list.</p><p>When our nameserver service receives a DNS query, it augments the query with additional metadata (e.g., tags) and then forwards the query to the Topaz service (both services run on every Cloudflare server) via Inter-Process Communication (IPC). Topaz, upon receiving a DNS query from the nameserver, walks through its program list, executing each program’s match function (using the topaz-lang interpreter) with the DNS query in scope (with values prefixed with <code>query_</code>). It walks the list until a match function returns <code>true</code>. It then executes that program’s response function, and returns the resulting IP addresses and TTL to our nameserver. The nameserver packages these addresses and TTL in valid DNS format, and then returns them to the resolver. </p>
    <div>
      <h2>Topaz programs are formally verified</h2>
      <a href="#topaz-programs-are-formally-verified">
        
      </a>
    </div>
    <p>Before programs are distributed to our global network, they are formally verified. Each program is passed through our formal verification tool which throws an error if a program has a bug, or if two programs (e.g., the <code>orange_and_true</code> and <code>orange</code> programs) conflict with one another.</p><p>The Topaz formal verifier (<a href="https://en.wikipedia.org/wiki/Model_checking"><u>model-checker</u></a>) checks three properties.</p><p>First, it checks that each program is <i>satisfiable </i>— that there exists <i>some</i> DNS query that causes each program’s match function to return <code>true</code>. This property is useful for detecting internally-inconsistent programs that will simply never match. For instance, if a program’s match expression was <code>(and true false)</code>, there exists no query that will cause this to evaluate to true, so the verifier throws an error.</p><p>Second, it checks that each program is <i>reachable </i>— that there exists some DNS query that causes each program’s match function to return <code>true</code> <i>given all preceding programs.</i> This property is useful for detecting “dead” programs that are completely overshadowed by higher-priority programs. For instance, recall the ordering of the <code>orange</code> and <code>orange_and_true</code> programs:</p>
            <pre><code>- name: orange
  config: …
  match: (= query_domain_tag1 "orange")  
  response: …
- name: orange_and_true
  config: …
  match: (and (= query_domain_tag1 "orange") query_domain_tag2)
  response: …</code></pre>
            <p>The verifier would throw an error because the <code>orange_and_true</code> program is unreachable. For all DNS queries for which <code>query_domain_tag1</code> is ”orange”, regardless of <code>metadata2</code>, the <code>orange</code> program will <i>always</i> match, which means the <code>orange_and_true</code> program will <i>never</i> match. To resolve this error, we’d need to swap these two programs like we did above.</p><p>Finally, and most importantly, the verifier checks for program <i>conflicts</i>: queries that cause any two programs to both match. If such a query exists, it throws an error (and prints the relevant query), and the operators are forced to resolve the conflict by changing their programs. However, it only checks whether specific programs conflict — those that are explicitly marked <i>exclusive. </i>Operators mark their program as exclusive if they want to be sure that no other exclusive program could match on the same queries.</p><p>To see what conflict detection looks like, consider the corrected ordering of the <code>orange_and_true</code> and <code>orange</code> programs, but note that the two programs have now been marked exclusive:</p>
            <pre><code>- name: orange_and_true
  exclusive: true
  config: ...
  match: (and (= query_domain_tag1 "orange") query_domain_tag2)
  response: ...
- name: orange
  exclusive: true
  config: ...
  match: (= query_domain_tag1 "orange") 
  response: ...</code></pre>
            <p>After marking these two programs exclusive, the verifier will throw an error. Not only will it say that these two programs can contradict one another, but it will provide a sample query as proof:</p>
            <pre><code>Checking: no exclusive programs match the same queries: check FAILED!
Intersecting programs found:
programs "orange_and_true" and "orange" both match any query...
  to any domain...
    with tag1: "orange"
    with tag2: true
</code></pre>
            <p>The teams behind the <code>orange</code> and <code>orange_and_true</code> programs respectively <i>must</i> resolve this conflict before these programs are deployed, and can use the above query to help them do so. To resolve the conflict, the teams have a few options. The simplest option is to remove the exclusive setting from one program, and acknowledge that it is simply not possible for these programs to be <code>exclusive</code>. In that case, the order of the two programs matters (one must have higher priority). This is fine! Topaz allows developers to write certain programs that <i>absolutely cannot </i>overlap with other programs (using <code>exclusive</code>), but sometimes that is just not possible. And when it’s not, at least program priority is <i>explicit.</i></p><p><i>Note: in practice, we place all exclusive programs at the top of the program file. This makes it easier to reason about interactions between exclusive and non-exclusive programs.</i></p><p>In short, verification is powerful not only because it catches bugs (e.g., satisfiability and reachability), but it also highlights the consequences of program changes. It helps operators understand the impact of their changes by providing immediate feedback. If two programs conflict, operators are forced to resolve it before deployment, rather than after an incident.</p><p><b>Bonus: verification-powered diffs. </b>One of the newest features we’ve added to the verifier is one we call <i>semantic diffs</i>. It’s in early stages, but the key insight is that operators often just want to <i>understand</i> the impact of changes, even if these changes are deemed safe. To help operators, the verifier compares the old and new versions of the program file. Specifically, it looks for any query that matched program <i>X</i> in the old version, but matches a different program <i>Y</i> in the new version (or vice versa). For instance, if we changed <code>orange_and_true</code> thus:</p>
            <pre><code>- name: orange_and_true
  config: …
  match: (and (= query_domain_tag1 "orange") (not query_domain_tag2))
  response: …</code></pre>
            <p>Our verifier would emit:</p>
            <pre><code>Generating a report to help you understand your changes...
NOTE: the queries below (if any) are just examples. Other such queries may exist.

* program "orange_and_true" now MATCHES any query...
  to any domain...
    with tag1: "orange"
    with tag2: false</code></pre>
            <p>While not exhaustive, this information helps operators understand whether their changes are doing what they intend or not, <i>before</i> deployment. We look forward to expanding our verifier’s diff capabilities going forward.</p>
    <div>
      <h2>How Topaz’s verifier works, and its tradeoffs</h2>
      <a href="#how-topazs-verifier-works-and-its-tradeoffs">
        
      </a>
    </div>
    <p>How does the verifier work? At a high-level, the verifier checks that, for all possible DNS queries, the three properties outlined above are satisfied. A Satisfiability Modulo Theories (SMT) solver — which we explain below — makes this seemingly impossible operation feasible. (It doesn't literally loop over all DNS queries, but it is equivalent to doing so — it provides exhaustive proof.)</p><p>We implemented our formal verifier in <a href="https://emina.github.io/rosette/"><u>Rosette</u></a>, a solver-enhanced domain-specific language written in the <a href="https://racket-lang.org/"><u>Racket</u></a> programming language. Rosette makes writing a verifier more of an engineering exercise, rather than a formal logic test: if you can express the interpreter for your language in Racket/Rosette, you get verification “for free”, in some sense. We wrote a topaz-lang interpreter in Racket, then crafted our three properties using the Rosette DSL.</p><p>How does Rosette work? Rosette translates our desired properties into formulae in <a href="https://en.wikipedia.org/wiki/First-order_logic"><u>first-order logic</u></a>. At a high level, these formulae are like equations from algebra class in school, with “unknowns” or variables. For instance, when checking whether the orange program is reachable (with the <code>orange_and_true</code> program ordered before it), Rosette produces the formula <code>((NOT orange_and_true.match) AND orange.match)</code>. The “unknowns” here are the DNS query parameters that these match functions operate over, e.g., <code>query_domain_tag1</code>. To solve this formula, Rosette interfaces with an <a href="https://en.wikipedia.org/wiki/Satisfiability_modulo_theories"><u>SMT solver</u></a> (like <a href="https://github.com/Z3Prover/z3"><u>Z3</u></a>), which is specifically designed to solve these types of formulae by efficiently finding values to assign to the DNS query parameters that make the formulae true. Once the SMT solver finds satisfying values, Rosette translates them into a Racket data structure: in our case, a sample DNS query. In this example, once it finds a satisfying DNS query, it would report that the <code>orange</code> program is indeed reachable.</p><p>However, verification is not free. The primary cost is maintenance. The model checker’s interpreter (Racket) must be kept in lockstep with the main interpreter (Go). If they fall out-of-sync, the verifier loses the ability to accurately detect bugs. Furthermore, functions added to topaz-lang must be compatible with formal verification.</p><p>Also, not all functions are easily verifiable, which means we must restrict the kinds of functions that program authors can write. Rosette can only verify functions that operate over integers and bit-vectors. This means we only permit functions whose operations can be converted into operations over integers and bit-vectors. While this seems restrictive, it actually gets us pretty far. The main challenge is strings: Topaz does not support programs that, for example, manipulate or work with substrings of the queried domain name. However, it does support simple operations on closed-set strings. For instance, it supports checking if two domain names are equal, because we can convert all strings to a small set of values representable using integers (which are easily verifiable).</p><p>Fortunately, thanks to our design of Topaz programs, the verifier need not be compatible with all Topaz program code. The verifier only ever examines Topaz <i>match</i> functions, so only the functions specified in match functions need to be verification-compatible. We encountered other challenges when working to make our model accurate, like modeling randomness — if you are interested in the details, we encourage you to read the <a href="https://research.cloudflare.com/publications/Larisch2024/"><u>paper</u></a>.</p><p>Another potential cost is verification speed. We find that the verifier can ensure our existing seven programs satisfy all three properties within about six seconds, which is acceptable because verification happens only at build time. We verify programs centrally, before programs are deployed, and only when programs change. </p><p>We also ran microbenchmarks to determine how fast the verifier can check more programs — we found that, for instance, it would take the verifier about 300 seconds to verify 50 programs. While 300 seconds is still acceptable, we are looking into verifier optimizations that will reduce the time further.</p>
    <div>
      <h2>Bringing formal verification from research to production</h2>
      <a href="#bringing-formal-verification-from-research-to-production">
        
      </a>
    </div>
    <p>Topaz’s verifier began as a <a href="https://research.cloudflare.com/"><u>research</u></a> project, and has since been deployed to production. It formally verifies all changes made to the authoritative DNS behavior specified in Topaz.</p><p>For more in-depth information on Topaz, see both our research <a href="https://research.cloudflare.com/publications/Larisch2024/"><u>paper</u></a> published at SIGCOMM 2024 and the <a href="https://www.youtube.com/watch?v=hW7RjXVx7_Q"><u>recording</u></a> of the talk.</p><p>We thank our former intern, Tim Alberdingk-Thijm, for his invaluable work on Topaz’s verifier.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Addressing]]></category>
            <category><![CDATA[Formal Methods]]></category>
            <guid isPermaLink="false">5LVsblxj2Git54IRxadpyg</guid>
            <dc:creator>James Larisch</dc:creator>
            <dc:creator>Suleman Ahmad</dc:creator>
            <dc:creator>Marwan Fayed</dc:creator>
        </item>
        <item>
            <title><![CDATA[Migrating billions of records: moving our active DNS database while it’s in use]]></title>
            <link>https://blog.cloudflare.com/migrating-billions-of-records-moving-our-active-dns-database-while-in-use/</link>
            <pubDate>Tue, 29 Oct 2024 14:00:00 GMT</pubDate>
            <description><![CDATA[ DNS records have moved to a new database, bringing improved performance and reliability to all customers. ]]></description>
            <content:encoded><![CDATA[ <p>According to a survey done by <a href="https://w3techs.com/technologies/overview/dns_server"><u>W3Techs</u></a>, as of October 2024, Cloudflare is used as an <a href="https://www.cloudflare.com/en-gb/learning/dns/dns-server-types/"><u>authoritative DNS</u></a> provider by 14.5% of all websites. As an authoritative DNS provider, we are responsible for managing and serving all the DNS records for our clients’ domains. This means we have an enormous responsibility to provide the best service possible, starting at the data plane. As such, we are constantly investing in our infrastructure to ensure the reliability and performance of our systems.</p><p><a href="https://www.cloudflare.com/learning/dns/what-is-dns/"><u>DNS</u></a> is often referred to as the phone book of the Internet, and is a key component of the Internet. If you have ever used a phone book, you know that they can become extremely large depending on the size of the physical area it covers. A <a href="https://www.cloudflare.com/en-gb/learning/dns/glossary/dns-zone/#:~:text=What%20is%20a%20DNS%20zone%20file%3F"><u>zone file</u></a> in DNS is no different from a phone book. It has a list of records that provide details about a domain, usually including critical information like what IP address(es) each hostname is associated with. For example:</p>
            <pre><code>example.com      59 IN A 198.51.100.0
blog.example.com 59 IN A 198.51.100.1
ask.example.com  59 IN A 198.51.100.2</code></pre>
            <p>It is not unusual for these zone files to reach millions of records in size, just for a single domain. The biggest single zone on Cloudflare holds roughly 4 million DNS records, but the vast majority of zones hold fewer than 100 DNS records. Given our scale according to W3Techs, you can imagine how much DNS data alone Cloudflare is responsible for. Given this volume of data, and all the complexities that come at that scale, there needs to be a very good reason to move it from one database cluster to another. </p>
    <div>
      <h2>Why migrate </h2>
      <a href="#why-migrate">
        
      </a>
    </div>
    <p>When initially measured in 2022, DNS data took up approximately 40% of the storage capacity in Cloudflare’s main database cluster (<b>cfdb</b>). This database cluster, consisting of a primary system and multiple replicas, is responsible for storing DNS zones, propagated to our <a href="https://www.cloudflare.com/network/"><u>data centers in over 330 cities</u></a> via our distributed KV store <a href="https://blog.cloudflare.com/introducing-quicksilver-configuration-distribution-at-internet-scale/"><u>Quicksilver</u></a>. <b>cfdb</b> is accessed by most of Cloudflare's APIs, including the <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/"><u>DNS Records API</u></a>. Today, the DNS Records API is the API most used by our customers, with each request resulting in a query to the database. As such, it’s always been important to optimize the DNS Records API and its surrounding infrastructure to ensure we can successfully serve every request that comes in.</p><p>As Cloudflare scaled, <b>cfdb</b> was becoming increasingly strained under the pressures of several services, many unrelated to DNS. During spikes of requests to our DNS systems, other Cloudflare services experienced degradation in the database performance. It was understood that in order to properly scale, we needed to optimize our database access and improve the systems that interact with it. However, it was evident that system level improvements could only be just so useful, and the growing pains were becoming unbearable. In late 2022, the DNS team decided, along with the help of 25 other teams, to detach itself from <b>cfdb</b> and move our DNS records data to another database cluster.</p>
    <div>
      <h2>Pre-migration</h2>
      <a href="#pre-migration">
        
      </a>
    </div>
    <p>From a DNS perspective, this migration to an improved database cluster was in the works for several years. Cloudflare initially relied on a single <a href="https://www.postgresql.org/"><u>Postgres</u></a> database cluster, <b>cfdb</b>. At Cloudflare's inception, <b>cfdb</b> was responsible for storing information about zones and accounts and the majority of services on the Cloudflare control plane depended on it. Since around 2017, as Cloudflare grew, many services moved their data out of <b>cfdb</b> to be served by a <a href="https://en.wikipedia.org/wiki/Microservices"><u>microservice</u></a>. Unfortunately, the difficulty of these migrations are directly proportional to the amount of services that depend on the data being migrated, and in this case, most services require knowledge of both zones and DNS records.</p><p>Although the term “zone” was born from the DNS point of view, it has since evolved into something more. Today, zones on Cloudflare store many different types of non-DNS related settings and help link several non-DNS related products to customers' websites. Therefore, it didn’t make sense to move both zone data and DNS record data together. This separation of two historically tightly coupled DNS concepts proved to be an incredibly challenging problem, involving many engineers and systems. In addition, it was clear that if we were going to dedicate the resources to solving this problem, we should also remove some of the legacy issues that came along with the original solution. </p><p>One of the main issues with the legacy database was that the DNS team had little control over which systems accessed exactly what data and at what rate. Moving to a new database gave us the opportunity to create a more tightly controlled interface to the DNS data. This was manifested as an internal DNS Records <a href="https://blog.cloudflare.com/moving-k8s-communication-to-grpc/"><u>gRPC API</u></a> which allows us to make sweeping changes to our data while only requiring a single change to the API, rather than coordinating with other systems.  For example, the DNS team can alter access logic and auditing procedures under the hood. In addition, it allows us to appropriately rate-limit and cache data depending on our needs. The move to this new API itself was no small feat, and with the help of several teams, we managed to migrate over 20 services, using 5 different programming languages, from direct database access to using our managed gRPC API. Many of these services touch very important areas such as <a href="https://developers.cloudflare.com/dns/dnssec/"><u>DNSSEC</u></a>, <a href="https://developers.cloudflare.com/ssl/"><u>TLS</u></a>, <a href="https://developers.cloudflare.com/email-routing/"><u>Email</u></a>, <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/"><u>Tunnels</u></a>, <a href="https://developers.cloudflare.com/workers/"><u>Workers</u></a>, <a href="https://developers.cloudflare.com/spectrum/"><u>Spectrum</u></a>, and <a href="https://developers.cloudflare.com/r2/"><u>R2 storage</u></a>. Therefore, it was important to get it right. </p><p>One of the last issues to tackle was the logical decoupling of common DNS database functions from zone data. Many of these functions expect to be able to access both DNS record data and DNS zone data at the same time. For example, at record creation time, our API needs to check that the zone is not over its maximum record allowance. Originally this check occurred at the SQL level by verifying that the record count was lower than the record limit for the zone. However, once you remove access to the zone itself, you are no longer able to confirm this. Our DNS Records API also made use of SQL functions to audit record changes, which requires access to both DNS record and zone data. Luckily, over the past several years, we have migrated this functionality out of our monolithic API and into separate microservices. This allowed us to move the auditing and zone setting logic to the application level rather than the database level. Ultimately, we are still taking advantage of SQL functions in the new database cluster, but they are fully independent of any other legacy systems, and are able to take advantage of the latest Postgres version.</p><p>Now that Cloudflare DNS was mostly decoupled from the zones database, it was time to proceed with the data migration. For this, we built what would become our <b>Change Data Capture and Transfer Service (CDCTS).</b></p>
    <div>
      <h2>Requirements for the Change Data Capture and Transfer Service</h2>
      <a href="#requirements-for-the-change-data-capture-and-transfer-service">
        
      </a>
    </div>
    <p>The Database team is responsible for all Postgres clusters within Cloudflare, and were tasked with executing the data migration of two tables that store DNS data: <i>cf_rec</i> and <i>cf_archived_rec</i>, from the original <b>cfdb </b>cluster to a new cluster we called <b>dnsdb</b>.  We had several key requirements that drove our design:</p><ul><li><p><b>Don’t lose data. </b>This is the number one priority when handling any sort of data. Losing data means losing trust, and it is incredibly difficult to regain that trust once it’s lost.  Important in this is the ability to prove no data had been lost.  The migration process would, ideally, be easily auditable.</p></li><li><p><b>Minimize downtime</b>.  We wanted a solution with less than a minute of downtime during the migration, and ideally with just a few seconds of delay.</p></li></ul><p>These two requirements meant that we had to be able to migrate data changes in near real-time, meaning we either needed to implement logical replication, or some custom method to capture changes, migrate them, and apply them in a table in a separate Postgres cluster.</p><p>We first looked at using Postgres logical replication using <a href="https://github.com/2ndQuadrant/pglogical"><u>pgLogical</u></a>, but had concerns about its performance and our ability to audit its correctness.  Then some additional requirements emerged that made a pgLogical implementation of logical replication impossible:</p><ul><li><p><b>The ability to move data must be bidirectional.</b> We had to have the ability to switch back to <b>cfdb</b> without significant downtime in case of unforeseen problems with the new implementation. </p></li><li><p><b>Partition the </b><b><i>cf_rec</i></b><b> table in the new database.</b> This was a long-desired improvement and since most access to <i>cf_rec</i> is by zone_id, it was decided that <b>mod(zone_id, num_partitions)</b> would be the partition key.</p></li><li><p><b>Transferred data accessible from original database.  </b>In case we had functionality that still needed access to data, a foreign table pointing to <b>dnsdb</b> would be available in <b>cfdb</b>. This could be used as emergency access to avoid needing to roll back the entire migration for a single missed process.</p></li><li><p><b>Only allow writes in one database. </b> Applications should know where the primary database is, and should be blocked from writing to both databases at the same time.</p></li></ul>
    <div>
      <h2>Details about the tables being migrated</h2>
      <a href="#details-about-the-tables-being-migrated">
        
      </a>
    </div>
    <p>The primary table, <i>cf_rec</i>, stores DNS record information, and its rows are regularly inserted, updated, and deleted. At the time of the migration, this table had 1.7 billion records, and with several indexes took up 1.5 TB of disk. Typical daily usage would observe 3-5 million inserts, 1 million updates, and 3-5 million deletes.</p><p>The second table, <i>cf_archived_rec</i>, stores copies of <i>cf_rec</i> that are obsolete — this table generally only has records inserted and is never updated or deleted.  As such, it would see roughly 3-5 million inserts per day, corresponding to the records deleted from <i>cf_rec</i>. At the time of the migration, this table had roughly 4.3 billion records.</p><p>Fortunately, neither table made use of database triggers or foreign keys, which meant that we could insert/update/delete records in this table without triggering changes or worrying about dependencies on other tables.</p><p>Ultimately, both of these tables are highly active and are the source of truth for many highly critical systems at Cloudflare.</p>
    <div>
      <h2>Designing the Change Data Capture and Transfer Service</h2>
      <a href="#designing-the-change-data-capture-and-transfer-service">
        
      </a>
    </div>
    <p>There were two main parts to this database migration:</p><ol><li><p><b>Initial copy:</b> Take all the data from <b>cfdb </b>and put it in <b>dnsdb.</b></p></li><li><p><b>Change copy:</b> Take all the changes in <b>cfdb </b>since the initial copy and update <b>dnsdb</b> to reflect them. This is the more involved part of the process.</p></li></ol><p>Normally, logical replication replays every insert, update, and delete on a copy of the data in the same transaction order, making a single-threaded pipeline.  We considered using a queue-based system but again, speed and auditability were both concerns as any queue would typically replay one change at a time.  We wanted to be able to apply large sets of changes, so that after an initial dump and restore, we could quickly catch up with the changed data. For the rest of the blog, we will only speak about <i>cf_rec</i> for simplicity, but the process for <i>cf_archived_rec</i> is the same.</p><p>What we decided on was a simple change capture table. Rows from this capture table would be loaded in real-time by a database trigger, with a transfer service that could migrate and apply thousands of changed records to <b>dnsdb</b> in each batch. Lastly, we added some auditing logic on top to ensure that we could easily verify that all data was safely transferred without downtime.</p>
    <div>
      <h3>Basic model of change data capture </h3>
      <a href="#basic-model-of-change-data-capture">
        
      </a>
    </div>
    <p>For <i>cf_rec</i> to be migrated, we would create a change logging table, along with a trigger function and a  table trigger to capture the new state of the record after any insert/update/delete.  </p><p>The change logging table named <i>log_cf_rec</i> had the same columns as <i>cf_rec</i>, as well as four new columns:</p><ul><li><p><b>change_id</b>:  a sequence generated unique identifier of the record</p></li><li><p><b>action</b>: a single character indicating whether this record represents an [i]nsert, [u]pdate, or [d]elete</p></li><li><p><b>change_timestamp</b>: the date/time when the change record was created</p></li><li><p><b>change_user:</b> the database user that made the change.  </p></li></ul><p>A trigger was placed on the <i>cf_rec</i> table so that each insert/update would copy the new values of the record into the change table, and for deletes, create a 'D' record with the primary key value. </p><p>Here is an example of the change logging where we delete, re-insert, update, and finally select from the <i>log_cf_rec</i><b> </b>table. Note that the actual <i>cf_rec</i> and <i>log_cf_rec</i> tables have many more columns, but have been edited for simplicity.</p>
            <pre><code>dns_records=# DELETE FROM  cf_rec WHERE rec_id = 13;

dns_records=# SELECT * from log_cf_rec;
Change_id | action | rec_id | zone_id | name
----------------------------------------------
1         | D      | 13     |         |   

dns_records=# INSERT INTO cf_rec VALUES(13,299,'cloudflare.example.com');  

dns_records=# UPDATE cf_rec SET name = 'test.example.com' WHERE rec_id = 13;

dns_records=# SELECT * from log_cf_rec;
Change_id | action | rec_id | zone_id | name
----------------------------------------------
1         | D      | 13     |         |  
2         | I      | 13     | 299     | cloudflare.example.com
3         | U      | 13     | 299     | test.example.com </code></pre>
            <p>In addition to <i>log_cf_rec</i>, we also introduced 2 more tables in <b>cfdb </b>and 3 more tables in <b>dnsdb:</b></p><p><b>cfdb</b></p><ol><li><p><i>transferred_log_cf_rec</i>: Responsible for auditing the batches transferred to <b>dnsdb</b>.</p></li><li><p><i>log_change_action</i>:<i> </i>Responsible for summarizing the transfer size in order to compare with the <i>log_change_action </i>in <b>dnsdb.</b></p></li></ol><p><b>dnsdb</b></p><ol><li><p><i>migrate_log_cf_rec</i>:<i> </i>Responsible for collecting batch changes in <b>dnsdb</b>, which would later be applied to <i>cf_rec </i>in <b>dnsdb</b><i>.</i></p></li><li><p><i>applied_migrate_log_cf_rec</i>:<i> </i>Responsible for auditing the batches that had been successfully applied to cf_rec in <b>dnsdb.</b></p></li><li><p><i>log_change_action</i>:<i> </i>Responsible for summarizing the transfer size in order to compare with the <i>log_change_action </i>in <b>cfdb.</b></p></li></ol>
    <div>
      <h3>Initial copy</h3>
      <a href="#initial-copy">
        
      </a>
    </div>
    <p>With change logging in place, we were now ready to do the initial copy of the tables from <b>cfdb</b> to <b>dnsdb</b>. Because we were changing the structure of the tables in the destination database and because of network timeouts, we wanted to bring the data over in small pieces and validate that it was brought over accurately, rather than doing a single multi-hour copy or <a href="https://www.postgresql.org/docs/current/app-pgdump.html"><u>pg_dump</u></a>.  We also wanted to ensure a long-running read could not impact production and that the process could be paused and resumed at any time.  The basic model to transfer data was done with a simple psql copy statement piped into another psql copy statement.  No intermediate files were used.</p><p><code>psql_cfdb -c "COPY (SELECT * FROM cf_rec WHERE id BETWEEN n and n+1000000 TO STDOUT)" | </code></p><p><code>psql_dnsdb -c "COPY cf_rec FROM STDIN"</code></p><p>Prior to a batch being moved, the count of records to be moved was recorded in <b>cfdb</b>, and after each batch was moved, a count was recorded in <b>dnsdb</b> and compared to the count in <b>cfdb</b> to ensure that a network interruption or other unforeseen error did not cause data to be lost. The bash script to copy data looked like this, where we included files that could be touched to pause or end the copy (if they cause load on production or there was an incident).  Once again, this code below has been heavily simplified.</p>
            <pre><code>#!/bin/bash
for i in "$@"; do
   # Allow user to control whether this is paused or not via pause_copy file
   while [ -f pause_copy ]; do
      sleep 1
   done
   # Allow user to end migration by creating end_copy file
   if [ ! -f end_copy ]; then
      # Copy a batch of records from cfdb to dnsdb
      # Get count of records from cfdb 
	# Get count of records from dnsdb
 	# Compare cfdb count with dnsdb count and alert if different 
   fi
done
</code></pre>
            <p><sup><i>Bash copy script</i></sup></p>
    <div>
      <h3>Change copy</h3>
      <a href="#change-copy">
        
      </a>
    </div>
    <p>Once the initial copy was completed, we needed to update <b>dnsdb</b> with any changes that had occurred in <b>cfdb</b> since the start of the initial copy. To implement this change copy, we created a function <i>fn_log_change_transfer_log_cf_rec </i>that could be passed a <i>batch_id</i> and <i>batch_size</i>, and did 5 things, all of which were executed in a single database <a href="https://www.postgresql.org/docs/current/tutorial-transactions.html"><u>transaction</u></a>:</p><ol><li><p>Select a <i>batch_size</i> of records from <i>log_cf_rec</i> in <b>cfdb</b>.</p></li><li><p>Copy the batch to <i>transferred_log_cf_rec</i> in <b>cfdb </b>to mark it as transferred.</p></li><li><p>Delete the batch from <i>log_cf_rec</i>.</p></li><li><p>Write a summary of the action to <i>log_change_action</i> table. This will later be used to compare transferred records with <b>cfdb</b>.</p></li><li><p>Return the batch of records.</p></li></ol><p>We then took the returned batch of records and copied them to <i>migrate_log_cf_rec </i>in <b>dnsdb</b>. We used the same bash script as above, except this time, the copy command looked like this:</p><p><code>psql_cfdb -c "COPY (SELECT * FROM </code><code><i>fn_log_change_transfer_log_cf_rec(&lt;batch_id&gt;,&lt;batch_size&gt;</i></code><code>) TO STDOUT" | </code></p><p><code>psql_dnsdb -c "COPY migrate_log_cf_rec FROM STDIN"</code></p>
    <div>
      <h3>Applying changes in the destination database</h3>
      <a href="#applying-changes-in-the-destination-database">
        
      </a>
    </div>
    <p>Now, with a batch of data in the <i>migrate_log_cf_rec </i>table, we called a newly created function <i>log_change_apply</i> to apply and audit the changes. Once again, this was all executed within a single database transaction. The function did the following:</p><ol><li><p>Move a batch from the <i>migrate_log_cf_rec</i> table to a new temporary table.</p></li><li><p>Write the counts for the batch_id to the <i>log_change_action</i> table.</p></li><li><p>Delete from the temporary table all but the latest record for a unique id (last action). For example, an insert followed by 30 updates would have a single record left, the final update. There is no need to apply all the intermediate updates.</p></li><li><p>Delete any record from <i>cf_rec</i> that has any corresponding changes.</p></li><li><p>Insert any [i]nsert or [u]pdate records in <i>cf_rec</i>.</p></li><li><p>Copy the batch to <i>applied_migrate_log_cf_rec</i> for a full audit trail.</p></li></ol>
    <div>
      <h3>Putting it all together</h3>
      <a href="#putting-it-all-together">
        
      </a>
    </div>
    <p>There were 4 distinct phases, each of which was part of a different database transaction:</p><ol><li><p>Call <i>fn_log_change_transfer_log_cf_rec </i>in <b>cfdb </b>to get a batch of records.</p></li><li><p>Copy the batch of records to <b>dnsdb.</b></p></li><li><p>Call <i>log_change_apply </i>in <b>dnsdb </b>to apply the batch of records.</p></li><li><p>Compare the <i>log_change_action</i> table in each respective database to ensure counts match.</p></li></ol>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2REIq71tc7M4jKPLZSJzS9/11f22f700300f2ad3a5ee5ca85a75480/Applying_changes_in_the_destination_database.png" />
          </figure><p>This process was run every 3 seconds for several weeks before the migration to ensure that we could keep <b>dnsdb</b> in sync with <b>cfdb</b>.</p>
    <div>
      <h2>Managing which database is live</h2>
      <a href="#managing-which-database-is-live">
        
      </a>
    </div>
    <p>The last major pre-migration task was the construction of the request locking system that would be used throughout the actual migration. The aim was to create a system that would allow the database to communicate with the DNS Records API, to allow the DNS Records API to handle HTTP connections more gracefully. If done correctly, this could reduce downtime for DNS Record API users to nearly zero.</p><p>In order to facilitate this, a new table called <i>cf_migration_manager</i> was created. The table would be periodically polled by the DNS Records API, communicating two critical pieces of information:</p><ol><li><p><b>Which database was active.</b> Here we just used a simple A or B naming convention.</p></li><li><p><b>If the database was locked for writing</b>. In the event the database was locked for writing, the DNS Records API would hold HTTP requests until the lock was released by the database.</p></li></ol><p>Both pieces of information would be controlled within a migration manager script.</p><p>The benefit of migrating the 20+ internal services from direct database access to using our internal DNS Records gRPC API is that we were able to control access to the database to ensure that no one else would be writing without going through the <i>cf_migration_manager</i>.</p>
    <div>
      <h2>During the migration </h2>
      <a href="#during-the-migration">
        
      </a>
    </div>
    <p>Although we aimed to complete this migration in a matter of seconds, we announced a DNS maintenance window that could last a couple of hours just to be safe. Now that everything was set up, and both <b>cfdb</b> and <b>dnsdb</b> were roughly in sync, it was time to proceed with the migration. The steps were as follows:</p><ol><li><p>Lower the time between copies from 3s to 0.5s.</p></li><li><p>Lock <b>cfdb</b> for writes via <i>cf_migration_manager</i>. This would tell the DNS Records API to hold write connections.</p></li><li><p>Make <b>cfdb</b> read-only and migrate the last logged changes to <b>dnsdb</b>. </p></li><li><p>Enable writes to <b>dnsdb</b>. </p></li><li><p>Tell DNS Records API that <b>dnsdb</b> is the new primary database and that write connections can proceed via the <i>cf_migration_manager</i>.</p></li></ol><p>Since we needed to ensure that the last changes were copied to <b>dnsdb</b> before enabling writing, this entire process took no more than 2 seconds. During the migration we saw a spike of API latency as a result of the migration manager locking writes, and then dealing with a backlog of queries. However, we recovered back to normal latencies after several minutes. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6agUpD8BQVxgDupBrwtTw3/38c96f91879c6539011866821ad6f11a/image3.png" />
          </figure><p><sup><i>DNS Records API Latency and Requests during migration</i></sup></p><p>Unfortunately, due to the far-reaching impact that DNS has at Cloudflare, this was not the end of the migration. There were 3 lesser-used services that had slipped by in our scan of services accessing DNS records via <b>cfdb</b>. Fortunately, the setup of the foreign table meant that we could very quickly fix any residual issues by simply changing the table name. </p>
    <div>
      <h2>Post-migration</h2>
      <a href="#post-migration">
        
      </a>
    </div>
    <p>Almost immediately, as expected, we saw a steep drop in usage across <b>cfdb</b>. This freed up a lot of resources for other services to take advantage of.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Xfnbc9MZLwJB91ypItWsi/1eb21362893b31a1e3c846d1076a9f5b/image6.jpg" />
          </figure><p><sup><i><b>cfdb</b></i></sup><sup><i> usage dropped significantly after the migration period.</i></sup></p><p>Since the migration, the average <b>requests</b> per second to the DNS Records API has more than <b>doubled</b>. At the same time, our CPU usage across both <b>cfdb</b> and <b>dnsdb</b> has settled at below 10% as seen below, giving us room for spikes and future growth. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/39su35dkb5Pl8uwYfYjHLg/0eb26ced30b44efb71abb73830e01f3a/image2.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5AdlLKXtD68QWCsMVLKnkt/9137beee9c941827eb57c53825ffe209/image4.png" />
          </figure><p><sup><i><b>cfdb</b></i></sup><sup><i> and </i></sup><sup><i><b>dnsdb</b></i></sup><sup><i> CPU usage now</i></sup></p><p>As a result of this improved capacity, our database-related incident rate dropped dramatically.</p><p>As for query latencies, our latency post-migration is slightly lower on average, with fewer sustained spikes above 500ms. However, the performance improvement is largely noticed during high load periods, when our database handles spikes without significant issues. Many of these spikes come as a result of clients making calls to collect a large amount of DNS records or making several changes to their zone in short bursts. Both of these actions are common use cases for large customers onboarding zones.</p><p>In addition to these improvements, the DNS team also has more granular control over <b>dnsdb</b> cluster-specific settings that can be tweaked for our needs rather than catering to all the other services. For example, we were able to make custom changes to replication lag limits to ensure that services using replicas were able to read with some amount of certainty that the data would exist in a consistent form. Measures like this reduce overall load on the primary because almost all read queries can now go to the replicas.</p><p>Although this migration was a resounding success, we are always working to improve our systems. As we grow, so do our customers, which means the need to scale never really ends. We have more exciting improvements on the roadmap, and we are looking forward to sharing more details in the future.</p><p>The DNS team at Cloudflare isn’t the only team solving challenging problems like the one above. If this sounds interesting to you, we have many more tech deep dives on our blog, and we are always looking for curious engineers to join our team — see open opportunities <a href="https://www.cloudflare.com/en-gb/careers/jobs/"><u>here</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[API]]></category>
            <category><![CDATA[Database]]></category>
            <category><![CDATA[Kafka]]></category>
            <category><![CDATA[Postgres]]></category>
            <category><![CDATA[Tracing]]></category>
            <category><![CDATA[Quicksilver]]></category>
            <guid isPermaLink="false">24rozMdbFQ7jmUgRNMF4RU</guid>
            <dc:creator>Alex Fattouche</dc:creator>
            <dc:creator>Corey Horton</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare partners with Internet Service Providers and network equipment providers to deliver a safer browsing experience to millions of homes]]></title>
            <link>https://blog.cloudflare.com/safer-resolver/</link>
            <pubDate>Tue, 24 Sep 2024 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare is extending the use of our public DNS resolver through partnering with ISPs and network providers to deliver a safer browsing experience directly to families. Join us in protecting every Internet user from unsafe content with the click of a button, powered by 1.1.1.1 for Families. ]]></description>
            <content:encoded><![CDATA[ 
    <div>
      <h3>A committed journey of privacy and security</h3>
      <a href="#a-committed-journey-of-privacy-and-security">
        
      </a>
    </div>
    <p>In 2018, Cloudflare <a href="https://blog.cloudflare.com/announcing-1111/"><u>announced 1.1.1.1</u></a>, one of the fastest, privacy-first consumer DNS services. 1.1.1.1 was the first consumer product Cloudflare ever launched, focused on reaching a wider audience. This service was designed to be fast and private, and <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>does not retain</u></a> information that would identify who is making a request.</p><p>In 2020, Cloudflare <a href="https://blog.cloudflare.com/introducing-1-1-1-1-for-families"><u>announced 1.1.1.1 for Families</u></a>, designed to add a layer of protection to our existing 1.1.1.1 public resolver. The intent behind this product was to provide consumers, namely families, the ability to add a security and adult content filter to block unsuspecting users from accessing specific sites when browsing the Internet.</p><p>Today, we are officially announcing that any ISP and equipment manufacturer can use our DNS resolvers for free. Internet service, network, and hardware equipment providers can sign up and join this program to partner with Cloudflare to deliver a safer browsing experience that is easy to use, industry leading, and <b>at no cost to anyone</b>.</p><p>Leading companies have already partnered with Cloudflare to deliver superior and customized offerings to protect their customers. By delivering this service in a place where the customer is familiar, you can help us make the Internet a safe place for all. </p>
    <div>
      <h2>A need to intentionally focus on families</h2>
      <a href="#a-need-to-intentionally-focus-on-families">
        
      </a>
    </div>
    <p>COVID-19 presented new challenges beginning in 2020 as kids' online activity increased and the reliance on home networks was more present than ever before. Research shows around <a href="https://www.pewresearch.org/internet/2020/07/28/childrens-engagement-with-digital-devices-screen-time/"><u>67% of adolescents</u></a> have access to a tablet, with ages as low as two years old accessing media content. While it is often impressive to watch the ease with which a young child can navigate a smartphone or tablet handed to them and pull up their favorite YouTube show, it becomes increasingly concerning that kids may unintentionally stumble onto harmful content in the process.</p><p>Our launch of 1.1.1.1 for Families in 2020 provided that peace of mind to users around the globe, and it continues to deliver those protections. Today, households can set up this service using our <a href="https://developers.cloudflare.com/1.1.1.1/setup/"><u>guide</u></a>. They can select the DNS resolver they want to use, focusing on just privacy, or include blocking security threats and adult content across their entire home network.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49EwOARWEuv8TfdzKdWpkc/bf53e440a69ae924ec09d806586ef567/image3.png" />
            
            </figure><p>Although this service is available and free for anyone to use, there are still many users who browse online daily without protections in place. Setting up protection like this can feel daunting, and many users are at a loss on where to begin and/or how to configure this on their devices or home network. Today we are announcing a partnership that will make setup and configuration much easier for users.</p>
    <div>
      <h2>Partnering to extend security even further </h2>
      <a href="#partnering-to-extend-security-even-further">
        
      </a>
    </div>
    <p>ISPs and network providers can use Cloudflare’s different resolver services to provide various offerings to their customers. Our existing partners have taken these offerings and built them into their platforms as an extension of the services that they are already providing to their customers. This built-in model allows for easy adoption and a consistent and comprehensive end customer journey. Each service is designed with a specific purpose in mind, outlined below:</p><p><b>Our core privacy resolver (1.1.1.1)</b> is designed for speed and privacy.  Additionally, DNS requests to our public resolver can be sent over a secure channel using <a href="https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/"><u>DNS over HTTPS (DoH)</u></a> or <a href="https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-tls/"><u>DNS over TLS (DoT)</u></a>, significantly decreasing the odds of any unwanted spying or monster-in-the-middle attacks.</p><p><b>Our security resolver (1.1.1.2)</b> has all the benefits of 1.1.1.1, with the additional benefit of protecting users from sites that contain malware, spam, botnet command and control attacks, or phishing threats.</p><p><b>Our family resolver (1.1.1.3)</b> provides all the benefits of 1.1.1.2, with the additional benefit of blocking unwanted adult content from both direct site navigation, as well as locking public search engines to Safe Search only. This prevents anyone from unknowingly searching for something that might return an unwanted result. </p>
    <div>
      <h3>Premium Safety &amp; Customizations </h3>
      <a href="#premium-safety-customizations">
        
      </a>
    </div>
    <p>If users want even more flexibility than what our public DNS resolvers provide, Cloudflare also offers a Gateway product that allows customized filtering, reporting, logging, analytics, and scheduling. This advanced <a href="https://www.cloudflare.com/lp/ppc/cloudflare-gateway-x/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=ao-fy-acq-namer_en_na-umbrella-ge-ge-prospecting-sch_g_brand_alpha&amp;utm_content=Alpha_Brand_ZeroTrust_Gateway&amp;utm_term=cloudflare+gateway&amp;campaignid=71700000110566648&amp;adgroupid=58700008395369395&amp;creativeid=669303241127&amp;&amp;_bt=669303241127&amp;_bk=cloudflare%20gateway&amp;_bm=p&amp;_bn=g&amp;_bg=152212903387&amp;_placement=&amp;_target=&amp;_loc=9194681&amp;_dv=c&amp;awsearchcpc=1&amp;gad_source=1&amp;gclid=CjwKCAjw5qC2BhB8EiwAvqa41kCNIRA_o0KDeWYAgS3YmHunP3DCtEEkHlHM-lzAe02tb5kOLvdhVxoCFAUQAvD_BwE&amp;gclsrc=aw.ds"><u>Gateway</u></a> offering includes over <a href="https://developers.cloudflare.com/cloudflare-one/policies/gateway/domain-categories/"><u>114 categories</u></a> ranging from social media, online messaging platforms, gaming, and <a href="https://developers.cloudflare.com/cloudflare-one/policies/gateway/dns-policies/#safe-search"><u>“safe search” results</u></a>, all the way to “home &amp; garden”.</p><p>The additional filters and scheduling functionality empowers users to exercise more nuanced and time-based controls, such as limiting social media during school hours or dinner time. </p><p>If you are an ISP or equipment manufacturer looking to provide easily customizable options for your customers, this is also an available option. We have a multi-tenant environment available for our Gateway offering that enables our customers to empower their individual subscribers to configure their own individual filters for their users and homes. If you are a device manufacturer or ISP looking to offer customizable protections for your individual subscribers, this may be a good option for you.</p>
    <div>
      <h2>Our continued commitment to privacy, security, and safety</h2>
      <a href="#our-continued-commitment-to-privacy-security-and-safety">
        
      </a>
    </div>
    
    <div>
      <h3>An easy choice </h3>
      <a href="#an-easy-choice">
        
      </a>
    </div>
    <p>Simply put, Cloudflare is an easy and obvious choice for protecting individuals and families. This is why leading companies have all chosen to partner with Cloudflare to help protect customers and their families. In 2020, after launching <a href="https://developers.cloudflare.com/1.1.1.1/setup/#1111-for-families"><u>1.1.1.1 for Families</u></a>, we were serving 200+ billion DNS queries per day for 1.1.1.1. Today, we serve 1.7 trillion queries per day for 1.1.1.1 and <a href="https://www.cloudflare.com/network/"><u>our network presence spans over 330 cities and interconnects with over 12,500+ other networks</u></a>. It is this network that puts us within a blink of an eye for 95% of the world's Internet-connected population (your customers), ensuring they receive lightning fast speed while browsing.</p><p>Beyond our speed, Cloudflare is used as a reverse proxy by <a href="https://w3techs.com/technologies/overview/proxy/all"><u>nearly ~ 20% of all websites</u></a> across the globe. <a href="https://radar.cloudflare.com/"><u>This gives us incredible insight to the latest Internet trends, threats, and research</u></a>. In partnering with us, you can leverage our strengths — powerful infrastructure, extensive data insights, and a dedicated threat intelligence team - while focusing on your core priorities.  There is no better partner to have than one who provides global reach, excellent performance, and <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>built-in privacy</u></a>.</p>
    <div>
      <h2>Join us in making a safe browsing experience easy for everyone</h2>
      <a href="#join-us-in-making-a-safe-browsing-experience-easy-for-everyone">
        
      </a>
    </div>
    <p>Cloudflare began with a singular goal of helping build a better Internet, and our annual Birthday Week is a catalyst for many developments that have shaped a better Internet for everyone.</p><p>We remain committed to helping to protect and build a better Internet for every user, and to do so, we need to meet them where they are. Our partnerships are critical in making this a reality, and we want you to be a part of the solution with us.</p><p>Whether you are interested in our public DNS resolvers or our more advanced Gateway options, Cloudflare has easy and scalable options for everyone. You can sign up to join this program as a partner today by <a href="https://docs.google.com/forms/d/1WpvFILegBZ7V4RMK4pygP7PCpTgkxG1h-XafI9WHCW4/edit"><u>submitting this form</u></a>, and we will be in touch to understand your needs and bring you on board.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4I2fgl2gyWQ7YVYVyL3xf1/ec25fbe8b8f0d86b7a6b184a5f0c08ac/image1.png" />
          </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Partners]]></category>
            <category><![CDATA[Network Services]]></category>
            <guid isPermaLink="false">6ZZuN3gorGpsi4nPVR284G</guid>
            <dc:creator>Kelly May Johnston</dc:creator>
            <dc:creator>Morgan Steffen</dc:creator>
        </item>
        <item>
            <title><![CDATA[Making zone management more efficient with batch DNS record updates]]></title>
            <link>https://blog.cloudflare.com/batched-dns-changes/</link>
            <pubDate>Mon, 23 Sep 2024 13:00:00 GMT</pubDate>
            <description><![CDATA[ In response to customer demand, we now support the ability to DELETE, PATCH, PUT and POST multiple DNS records in a single API call, enabling more efficient and reliable zone management.
 ]]></description>
            <content:encoded><![CDATA[ <p>Customers that use Cloudflare to manage their DNS often need to create a whole batch of records, enable <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/"><u>proxying</u></a> on many records, update many records to point to a new target at the same time, or even delete all of their records. Historically, customers had to resort to bespoke scripts to make these changes, which came with their own set of issues. In response to customer demand, we are excited to announce support for batched API calls to the <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/"><u>DNS records API</u></a> starting today. This lets customers make large changes to their zones much more efficiently than before. Whether sending a POST, PUT, PATCH or DELETE, users can now execute these four different <a href="https://en.wikipedia.org/wiki/HTTP#Request_methods"><u>HTTP methods</u></a>, and multiple HTTP requests all at the same time.</p>
    <div>
      <h2>Efficient zone management matters</h2>
      <a href="#efficient-zone-management-matters">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/en-gb/learning/dns/dns-records/"><u>DNS records</u></a> are an essential part of most web applications and websites, and they serve many different purposes. The most common use case for a DNS record is to have a hostname point to an <a href="https://en.wikipedia.org/wiki/IPv4"><u>IPv4</u></a> address, this is called an <a href="https://www.cloudflare.com/en-gb/learning/dns/dns-records/dns-a-record/"><u>A record</u></a>:</p><p><b>example.com</b> 59 IN A <b>198.51.100.0</b></p><p><b>blog.example.com</b> 59 IN A <b>198.51.100.1</b></p><p><b>ask.example.com</b> 59 IN A <b>198.51.100.2</b></p><p>In its most simple form, this enables Internet users to connect to websites without needing to memorize their IP address. </p><p>Often, our customers need to be able to do things like create a whole batch of records, or enable <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/"><u>proxying</u></a> on many records, or update many records to point to a new target at the same time, or even delete all of their records. Unfortunately, for most of these cases, we were asking customers to write their own custom scripts or programs to do these tasks for them, a number of which are open sourced and whose content has not been checked by us. These scripts are often used to avoid needing to repeatedly make the same API calls manually. This takes time, not only for the development of the scripts, but also to simply execute all the API calls, not to mention it can leave the zone in a bad state if some changes fail while others succeed.</p>
    <div>
      <h2>Introducing /batch</h2>
      <a href="#introducing-batch">
        
      </a>
    </div>
    <p>Starting today, everyone with a <a href="https://developers.cloudflare.com/dns/zone-setups/"><u>Cloudflare zone</u></a> will have access to this endpoint, with free tier customers getting access to 200 changes in one batch, and paid plans getting access to 3,500 changes in one batch. We have successfully tested up to 100,000 changes in one call. The API is simple, expecting a POST request to be made to the <a href="https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-batch-dns-records"><u>new API endpoint</u></a> /dns_records/batch, which passes in a JSON object in the body in the format:</p>
            <pre><code>{
    deletes:[]Record
    patches:[]Record
    puts:[]Record
    posts:[]Record
}
</code></pre>
            <p>Each list of records []Record will follow the same requirements as the regular API, except that the record ID on deletes, patches, and puts will be required within the Record object itself. Here is a simple example:</p>
            <pre><code>{
    "deletes": [
        {
            "id": "143004ef463b464a504bde5a5be9f94a"
        },
        {
            "id": "165e9ef6f325460c9ca0eca6170a7a23"
        }
    ],
    "patches": [
        {
            "id": "16ac0161141a4e62a79c50e0341de5c6",
            "content": "192.0.2.45"
        },
        {
            "id": "6c929ea329514731bcd8384dd05e3a55",
            "name": "update.example.com",
            "proxied": true
        }
    ],
    "puts": [
        {
            "id": "ee93eec55e9e45f4ae3cb6941ffd6064",
            "content": "192.0.2.50",
            "name": "no-change.example.com",
            "proxied": false,
            "ttl:": 1
        },
        {
            "id": "eab237b5a67e41319159660bc6cfd80b",
            "content": "192.0.2.45",
            "name": "no-change.example.com",
            "proxied": false,
            "ttl:": 3000
        }
    ],
    "posts": [
        {
            "name": "@",
            "type": "A",
            "content": "192.0.2.45",
            "proxied": false,
            "ttl": 3000
        },
        {
            "name": "a.example.com",
            "type": "A",
            "content": "192.0.2.45",
            "proxied": true
        }
    ]
}</code></pre>
            <p>Our API will then parse this and execute these calls in the following order: </p><ol><li><p>deletes</p></li><li><p>patches</p></li><li><p>puts</p></li><li><p>posts</p></li></ol><p>Each of these respective lists will be executed in the order given. This ordering system is important because it removes the need for our clients to worry about conflicts, such as if they need to create a CNAME on the same hostname as a to-be-deleted A record, which is not allowed in <a href="https://datatracker.ietf.org/doc/html/rfc1912#section-2.4"><u>RFC 1912</u></a>. In the event that any of these individual actions fail, the entire API call will fail and return the first error it sees. The batch request will also be executed inside a single database <a href="https://en.wikipedia.org/wiki/Database_transaction"><u>transaction</u></a>, which will roll back in the event of failure.</p><p>After the batch request has been successfully executed in our database, we then propagate the changes to our edge via <a href="https://blog.cloudflare.com/introducing-quicksilver-configuration-distribution-at-internet-scale"><u>Quicksilver</u></a>, our distributed KV store. Each of the individual record changes inside the batch request is treated as a single key-value pair, and database transactions are not supported. As such, <b>we cannot guarantee that the propagation to our edge servers will be atomic</b>. For example, if replacing a <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/subdomains-outside-cloudflare/"><u>delegation</u></a> with an A record, some resolvers may see the <a href="https://www.cloudflare.com/en-gb/learning/dns/dns-records/dns-ns-record/"><u>NS</u></a> record removed before the A record is added. </p><p>The response will follow the same format as the request. Patches and puts that result in no changes will be placed at the end of their respective lists.</p><p>We are also introducing some new changes to the Cloudflare dashboard, allowing users to select multiple records and subsequently:</p><ol><li><p>Delete all selected records</p></li><li><p>Change the proxy status of all selected records</p></li></ol>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ZU7nvMlcH2L51IqJrS1zC/db7ac600e503a72bb0c25679d63394e7/BLOG-2495_2.png" />
          </figure><p>We plan to continue improving the dashboard to support more batch actions based on your feedback.</p>
    <div>
      <h2>The journey</h2>
      <a href="#the-journey">
        
      </a>
    </div>
    <p>Although at the surface, this batch endpoint may seem like a fairly simple change, behind the scenes it is the culmination of a multi-year, multi-team effort. Over the past several years, we have been working hard to improve the DNS pipeline that takes our customers' records and pushes them to <a href="https://blog.cloudflare.com/introducing-quicksilver-configuration-distribution-at-internet-scale"><u>Quicksilver</u></a>, our distributed database. As part of this effort, we have been improving our <a href="https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records"><u>DNS Records API</u></a> to reduce the overall latency. The DNS Records API is Cloudflare's most used API externally, serving twice as many requests as any other API at peak. In addition, the DNS Records API supports over 20 internal services, many of which touch very important areas such as DNSSEC, TLS, Email, Tunnels, Workers, Spectrum, and R2 storage. Therefore, it was important to build something that scales. </p><p>To improve API performance, we first needed to understand the complexities of the entire stack. At Cloudflare, we use <a href="https://www.jaegertracing.io/"><u>Jaeger tracing</u></a> to debug our systems. It gives us granular insights into a sample of requests that are coming into our APIs. When looking at API request latency, the <a href="https://www.jaegertracing.io/docs/1.23/architecture/#span"><u>span</u></a> that stood out was the time spent on each individual database lookup. The latency here can vary anywhere from ~1ms to ~5ms. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/61f3sKGUs9oWMPT9P4au6R/a91d8291b626f4bab3ac1c69adf62a5d/BLOG-2495_3.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3L3OaTb9cTKKKcIjCm1RLq/86ffd63116988025fd52105e316c5b5a/BLOG-2495_4.png" />
          </figure><p><sub><i>Jaeger trace showing variable database latency</i></sub></p><p>Given this variability in database query latency, we wanted to understand exactly what was going on within each DNS Records API request. When we first started on this journey, the breakdown of database lookups for each action was as follows:</p><table><tr><th><p><b>Action</b></p></th><th><p><b>Database Queries</b></p></th><th><p><b>Reason</b></p></th></tr><tr><td><p>POST</p></td><td><p>2 </p></td><td><p>One to write and one to read the new record.</p></td></tr><tr><td><p>PUT</p></td><td><p>3</p></td><td><p>One to collect, one to write, and one to read back the new record.</p></td></tr><tr><td><p>PATCH</p></td><td><p>3</p></td><td><p>One to collect, one to write, and one to read back the new record.</p></td></tr><tr><td><p>DELETE</p></td><td><p>2</p></td><td><p>One to read and one to delete.</p></td></tr></table><p>The reason we needed to read the newly created records on POST, PUT, and PATCH was because the record contains information filled in by the database which we cannot infer in the API. </p><p>Let’s imagine that a customer needed to edit 1,000 records. If each database lookup took 3ms to complete, that was 3ms * 3 lookups * 1,000 records = 9 seconds spent on database queries alone, not taking into account the round trip time to and from our API or any other processing latency. It’s clear that we needed to reduce the number of overall queries and ideally minimize per query latency variation. Let’s tackle the variation in latency first.</p><p>Each of these calls is not a simple INSERT, UPDATE, or DELETE, because we have functions wrapping these database calls for sanitization purposes. In order to understand the variable latency, we enlisted the help of <a href="https://www.postgresql.org/docs/current/auto-explain.html"><u>PostgreSQL’s “auto_explain”</u></a>. This module gives a breakdown of execution times for each statement without needing to EXPLAIN each one by hand. We used the following settings:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2myvmIREh2Q9yl30HbRus/29f085d40ba7dde34e9a46c27e3c6ba2/BLOG-2495_5.png" />
          </figure><p>A handful of queries showed durations like the one below, which took an order of magnitude longer than other queries.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/557xg66x8OiHM6pcAG4svk/56157cd0e5b6d7fd47f0152798598729/BLOG-2495_6.png" />
          </figure><p>We noticed that in several locations we were doing queries like:</p><p><code>IF (EXISTS (SELECT id FROM table WHERE row_hash = __new_row_hash))</code></p><p>If you are trying to insert into very large zones, such queries could mean even longer database query times, potentially explaining the discrepancy between 1ms and 5ms in our tracing images above. Upon further investigation, we already had a unique index on that exact hash. <a href="https://www.postgresql.org/docs/current/indexes-unique.html"><u>Unique indexes</u></a> in PostgreSQL enforce the uniqueness of one or more column values, which means we can safely remove those existence checks without risk of inserting duplicate rows.</p><p>The next task was to introduce database batching into our DNS Records API. In any API, external calls such as SQL queries are going to add substantial latency to the request. Database batching allows the DNS Records API to execute multiple SQL queries within one single network call, subsequently lowering the number of database round trips our system needs to make. </p><p>According to the table above, each database write also corresponded to a read after it had completed the query. This was needed to collect information like creation/modification timestamps and new IDs. To improve this, we tweaked our database functions to now return the newly created DNS record itself, removing a full round trip to the database. Here is the updated table:</p><table><tr><th><p><b>Action</b></p></th><th><p><b>Database Queries</b></p></th><th><p><b>Reason</b></p></th></tr><tr><td><p>POST</p></td><td><p>1 </p></td><td><p>One to write</p></td></tr><tr><td><p>PUT</p></td><td><p>2</p></td><td><p>One to read, one to write.</p></td></tr><tr><td><p>PATCH</p></td><td><p>2</p></td><td><p>One to read, one to write.</p></td></tr><tr><td><p>DELETE</p></td><td><p>2</p></td><td><p>One to read, one to delete.</p></td></tr></table><p>We have room for improvement here, however we cannot easily reduce this further due to some restrictions around auditing and other sanitization logic.</p><p><b>Results:</b></p><table><tr><th><p><b>Action</b></p></th><th><p><b>Average database time before</b></p></th><th><p><b>Average database time after</b></p></th><th><p><b>Percentage Decrease</b></p></th></tr><tr><td><p>POST</p></td><td><p>3.38ms</p></td><td><p>0.967ms</p></td><td><p>71.4%</p></td></tr><tr><td><p>PUT</p></td><td><p>4.47ms</p></td><td><p>2.31ms</p></td><td><p>48.4%</p></td></tr><tr><td><p>PATCH</p></td><td><p>4.41ms</p></td><td><p>2.24ms</p></td><td><p>49.3%</p></td></tr><tr><td><p>DELETE</p></td><td><p>1.21ms</p></td><td><p>1.21ms</p></td><td><p>0%</p></td></tr></table><p>These are some pretty good improvements! Not only did we reduce the API latency, we also reduced the database query load, benefiting other systems as well.</p>
    <div>
      <h2>Weren’t we talking about batching?</h2>
      <a href="#werent-we-talking-about-batching">
        
      </a>
    </div>
    <p>I previously mentioned that the /batch endpoint is fully atomic, making use of a single database transaction. However, a single transaction may still require multiple database network calls, and from the table above, that can add up to a significant amount of time when dealing with large batches. To optimize this, we are making use of <a href="https://pkg.go.dev/github.com/jackc/pgx/v4#Batch"><u>pgx/batch</u></a>, a Golang object that allows us to write and subsequently read multiple queries in a single network call. Here is a high level of how the batch endpoint works:</p><ol><li><p>Collect all the records for the PUTs, PATCHes and DELETEs.</p></li><li><p>Apply any per record differences as requested by the PATCHes and PUTs.</p></li><li><p>Format the batch SQL query to include each of the actions.</p></li><li><p>Execute the batch SQL query in the database.</p></li><li><p>Parse each database response and return any errors if needed.</p></li><li><p>Audit each change.</p></li></ol><p>This takes at most only two database calls per batch. One to fetch, and one to write/delete. If the batch contains only POSTs, this will be further reduced to a single database call. Given all of this, we should expect to see a significant improvement in latency when making multiple changes, which we do when observing how these various endpoints perform: </p><p><i>Note: Each of these queries was run from multiple locations around the world and the median of the response times are shown here. The server responding to queries is located in Portland, Oregon, United States. Latencies are subject to change depending on geographical location.</i></p><p><b>Create only:</b></p><table><tr><th><p>
</p></th><th><p><b>10 Records</b></p></th><th><p><b>100 Records</b></p></th><th><p><b>1,000 Records</b></p></th><th><p><b>10,000 Records</b></p></th></tr><tr><td><p><b>Regular API</b></p></td><td><p>7.55s</p></td><td><p>74.23s</p></td><td><p>757.32s</p></td><td><p>7,877.14s</p></td></tr><tr><td><p><b>Batch API - Without database batching</b></p></td><td><p>0.85s</p></td><td><p>1.47s</p></td><td><p>4.32s</p></td><td><p>16.58s</p></td></tr><tr><td><p><b>Batch API - with database batching</b></p></td><td><p>0.67s</p></td><td><p>1.21s</p></td><td><p>3.09s</p></td><td><p>10.33s</p></td></tr></table><p><b>Delete only:</b></p><table><tr><th><p>
</p></th><th><p><b>10 Records</b></p></th><th><p><b>100 Records</b></p></th><th><p><b>1,000 Records</b></p></th><th><p><b>10,000 Records</b></p></th></tr><tr><td><p><b>Regular API</b></p></td><td><p>7.28s</p></td><td><p>67.35s</p></td><td><p>658.11s</p></td><td><p>7,471.30s</p></td></tr><tr><td><p><b>Batch API - without database batching</b></p></td><td><p>0.79s</p></td><td><p>1.32s</p></td><td><p>3.18s</p></td><td><p>17.49s</p></td></tr><tr><td><p><b>Batch API - with database batching</b></p></td><td><p>0.66s</p></td><td><p>0.78s</p></td><td><p>1.68s</p></td><td><p>7.73s</p></td></tr></table><p><b>Create/Update/Delete:</b></p><table><tr><th><p>
</p></th><th><p><b>10 Records</b></p></th><th><p><b>100 Records</b></p></th><th><p><b>1,000 Records</b></p></th><th><p><b>10,000 Records</b></p></th></tr><tr><td><p><b>Regular API</b></p></td><td><p>7.11s</p></td><td><p>72.41s</p></td><td><p>715.36s</p></td><td><p>7,298.17s</p></td></tr><tr><td><p><b>Batch API - without database batching</b></p></td><td><p>0.79s</p></td><td><p>1.36s</p></td><td><p>3.05s</p></td><td><p>18.27s</p></td></tr><tr><td><p><b>Batch API - with database batching</b></p></td><td><p>0.74s</p></td><td><p>1.06s</p></td><td><p>2.17s</p></td><td><p>8.48s</p></td></tr></table><p><b>Overall Average:</b></p><table><tr><th><p>
</p></th><th><p><b>10 Records</b></p></th><th><p><b>100 Records</b></p></th><th><p><b>1,000 Records</b></p></th><th><p><b>10,000 Records</b></p></th></tr><tr><td><p><b>Regular API</b></p></td><td><p>7.31s</p></td><td><p>71.33s</p></td><td><p>710.26s</p></td><td><p>7,548.87s</p></td></tr><tr><td><p><b>Batch API - without database batching</b></p></td><td><p>0.81s</p></td><td><p>1.38s</p></td><td><p>3.51s</p></td><td><p>17.44s</p></td></tr><tr><td><p><b>Batch API - with database batching</b></p></td><td><p>0.69s</p></td><td><p>1.02s</p></td><td><p>2.31s</p></td><td><p>8.85s</p></td></tr></table><p>We can see that on average, the new batching API is significantly faster than the regular API trying to do the same actions, and it’s also nearly twice as fast as the batching API without batched database calls. We can see that at 10,000 records, the batching API is a staggering 850x faster than the regular API. As mentioned above, these numbers are likely to change for a number of different reasons, but it’s clear that making several round trips to and from the API adds substantial latency, regardless of the region.</p>
    <div>
      <h2>Batch overload</h2>
      <a href="#batch-overload">
        
      </a>
    </div>
    <p>Making our API faster is awesome, but we don’t operate in an isolated environment. Each of these records needs to be processed and pushed to <a href="https://blog.cloudflare.com/introducing-quicksilver-configuration-distribution-at-internet-scale"><u>Quicksilver</u></a>, our distributed database. If we have customers creating tens of thousands of records every 10 seconds, we need to be able to handle this downstream so that we don’t overwhelm our system. In a May 2022 blog post titled <a href="https://blog.cloudflare.com/dns-build-improvement"><i><u>How we improved DNS record build speed by more than 4,000x</u></i></a>, I noted<i> </i>that:</p><blockquote><p><i>We plan to introduce a batching system that will collect record changes into groups to minimize the number of queries we make to our database and Quicksilver.</i></p></blockquote><p>This task has since been completed, and our propagation pipeline is now able to batch thousands of record changes into a single database query which can then be published to Quicksilver in order to be propagated to our global network. </p>
    <div>
      <h2>Next steps</h2>
      <a href="#next-steps">
        
      </a>
    </div>
    <p>We have a couple more improvements we may want to bring into the API. We also intend to improve the UI to bring more usability improvements to the dashboard to more easily manage zones. <a href="https://research.rallyuxr.com/cloudflare/lp/cm0zu2ma7017j1al98l1m8a7n?channel=share&amp;studyId=cm0zu2ma4017h1al9byak79iw"><u>We would love to hear your feedback</u></a>, so please let us know what you think and if you have any suggestions for improvements.</p><p>For more details on how to use the new /batch API endpoint, head over to our <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/"><u>developer documentation</u></a> and <a href="https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-batch-dns-records"><u>API reference</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[API]]></category>
            <category><![CDATA[Kafka]]></category>
            <category><![CDATA[Database]]></category>
            <guid isPermaLink="false">op0CI3wllMcGjptdRb2Ce</guid>
            <dc:creator>Alex Fattouche</dc:creator>
        </item>
        <item>
            <title><![CDATA[Improving authoritative DNS with the official release of Foundation DNS]]></title>
            <link>https://blog.cloudflare.com/foundation-dns-launch/</link>
            <pubDate>Fri, 12 Apr 2024 13:00:12 GMT</pubDate>
            <description><![CDATA[ We are launching Foundation DNS – our new enterprise-grade authoritative DNS offering.  ]]></description>
            <content:encoded><![CDATA[ <p><i>Update: as of April 2025, advanced nameservers now advertise IPs from three anycast groups instead of two, providing additional resiliency across our network. Cloudflare's developer documentation have been updated to reflect this change.</i></p><p>We are very excited to announce the official release of <a href="/foundation-dns">Foundation DNS</a>, with new advanced nameservers, even more resilience, and advanced analytics to meet the complex requirements of our enterprise customers. Foundation DNS is one of Cloudflare's largest leaps forward in our authoritative DNS offering since its launch in 2010, and we know our customers are interested in an enterprise-ready authoritative DNS service with the highest level of performance, reliability, security, flexibility, and advanced analytics.</p><p>Starting today, every new enterprise contract that includes authoritative DNS will have access to the Foundation DNS feature set and existing enterprise customers will have Foundation DNS features made available to them over the course of this year. If you are an existing enterprise customer already using our authoritative DNS services, and you’re interested in getting your hands on Foundation DNS earlier, just reach out to your account team, and they can enable it for you. Let’s get started…</p>
    <div>
      <h2>Why is DNS so important?</h2>
      <a href="#why-is-dns-so-important">
        
      </a>
    </div>
    <p>From an end user perspective, DNS makes the Internet usable. <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS</a> is the phone book of the Internet which translates hostnames like <code>www.cloudflare.com</code> into IP addresses that our browsers, applications, and devices use to connect to services. Without DNS, users would have to remember IP addresses like <code>108.162.193.147</code> or <code>2606:4700:58::adf5:3b93</code> every time they wanted to visit a website on their mobile device or desktop – imagine having to remember something like that instead of just <code>www.cloudflare.com</code>. DNS is used in every end user application on the Internet, from social media to banking to healthcare portals. People's usage of the Internet is entirely reliant on DNS.</p><p>From a business perspective, DNS is the very first step in reaching websites and connecting to applications. Devices need to know where to connect in order to reach services, authenticate users, and provide the information being requested. Resolving DNS queries quickly can be the difference between a website or application being perceived as responsive or not and can have a real impact on user experience.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2j8Eg82sdIpdztGDwGptGB/25ed0d0e10c497fc865248e13679a31e/image4-12.png" />
            
            </figure><p>When DNS outages occur, the impacts are obvious. Imagine your go-to ecommerce site not loading, just like what happened with the <a href="/how-the-dyn-outage-affected-cloudflare">outage Dyn experienced in 2016</a>, which took down multiple popular ecommerce sites among others. Or, if you are part of a company, and customers aren’t able to reach your website to purchase the goods or services you are selling, a DNS outage will literally lose you money. DNS is often taken for granted, but make no mistake, you’ll notice it when it’s not working properly. Thankfully, if you use Cloudflare authoritative DNS, these are problems you don’t worry about very much.</p>
    <div>
      <h2>There is always room for improvement</h2>
      <a href="#there-is-always-room-for-improvement">
        
      </a>
    </div>
    <p>Cloudflare has been providing authoritative DNS services for over a decade. Our authoritative DNS service hosts millions of domains across many different <a href="https://www.cloudflare.com/learning/dns/top-level-domain/">top level domains (TLDs)</a>. We have customers of all sizes, from single domains with just a few records to customers with tens of millions of records spread across multiple domains. Our enterprise customers, rightfully, demand the highest level of performance, reliability, security, and flexibility from our DNS service, along with detailed analytics. While our customers love our authoritative DNS, we recognize there is always room for improvement in some of those categories. To that end, we set off to make some major improvements to our DNS architecture, with new features as well as structural changes. We are proudly calling this improved offering Foundation DNS.</p>
    <div>
      <h2>Meet Foundation DNS</h2>
      <a href="#meet-foundation-dns">
        
      </a>
    </div>
    <p>As our new enterprise authoritative DNS offering, Foundation DNS was designed to enhance the reliability, security, flexibility, and analytics of our existing authoritative DNS service. Before we dive into all the specifics of Foundation DNS, here is a quick summary of what Foundation DNS brings to our authoritative DNS offering:</p><ul><li><p><b>Advanced nameservers</b> bring DNS reliability to the next level.</p></li><li><p><b>New zone-level DNS settings</b> provide more flexible configuration of DNS specific settings.</p></li><li><p><b>Unique DNSSEC keys per account and zone</b> provide additional security and flexibility for DNSSEC.</p></li><li><p><b>GraphQL-based DNS analytics</b> provide even more insights into your DNS queries.</p></li><li><p><b>A new release process</b> ensures enterprise customers have the utmost stability and reliability.</p></li><li><p><b>Simpler DNS pricing</b> with more generous quotas for DNS-only zones and DNS records.</p></li></ul><p>Now, let’s dive deeper into each of these new Foundation DNS features:</p>
    <div>
      <h3>Advanced nameservers</h3>
      <a href="#advanced-nameservers">
        
      </a>
    </div>
    <p>With Foundation DNS, we’re introducing advanced nameservers with a specific focus on enhancing reliability for your enterprise. You might be familiar with our standard authoritative nameservers which come as a pair per zone and use names within the cloudflare.com domain. Here’s an example:</p>
            <pre><code>$ dig mycoolwebpage.xyz ns +noall +answer 
mycoolwebpage.xyz.	86400	IN	NS	kelly.ns.cloudflare.com.
mycoolwebpage.xyz.	86400	IN	NS	christian.ns.cloudflare.com.</code></pre>
            <p>Now, let’s look at the same zone using Foundation DNS advanced nameservers:</p>
            <pre><code>$ dig mycoolwebpage.xyz ns +noall +answer 
mycoolwebpage.xyz.	86400	IN	NS	blue.foundationdns.com.
mycoolwebpage.xyz.	86400	IN	NS	blue.foundationdns.net.
mycoolwebpage.xyz.	86400	IN	NS	blue.foundationdns.org.</code></pre>
            <p>Advanced nameservers improve reliability in a few different ways. The first improvement comes from the Foundation DNS authoritative servers being spread across multiple TLDs. This provides protection from larger scale DNS outages and DDoS attacks that could potentially affect DNS infrastructure further up the tree, including TLD name servers. Foundation DNS authoritative nameservers are now located across multiple branches of the global DNS tree structure, further insulating our customers from these potential outages and attacks.</p><p>You might also have noticed that there is an additional nameserver listed with Foundation DNS. While this is an improvement, it's not for the reason you might think it is. If we resolve each one of these nameservers to their respective IP addresses, we can make this a little easier to understand. Let’s do that here starting with our standard nameservers:</p>
            <pre><code>$ dig kelly.ns.cloudflare.com. +noall +answer
kelly.ns.cloudflare.com. 86353  IN      A       108.162.194.91
kelly.ns.cloudflare.com. 86353  IN      A       162.159.38.91
kelly.ns.cloudflare.com. 86353  IN      A       172.64.34.91

$ dig christian.ns.cloudflare.com. +noall +answer
christian.ns.cloudflare.com. 86353 IN   A       108.162.195.247
christian.ns.cloudflare.com. 86353 IN   A       162.159.44.247
christian.ns.cloudflare.com. 86353 IN   A       172.64.35.247</code></pre>
            <p>There are six total IP addresses for the two nameservers. As it turns out, this is all DNS resolvers actually care about when querying authoritative nameservers. DNS resolvers usually don’t track the actual <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain names</a> of authoritative servers; they simply maintain an unordered list of IP addresses that they can use to resolve queries for a given domain. So with our standard authoritative nameservers, we give resolvers six IP addresses to use to resolve DNS queries. Now, let's look at the IP addresses for our Foundation DNS advanced nameservers:</p>
            <pre><code>$ dig blue.foundationdns.com. +noall +answer
blue.foundationdns.com. 300     IN      A       108.162.198.1
blue.foundationdns.com. 300     IN      A       162.159.60.1
blue.foundationdns.com. 300     IN      A       172.64.40.1

$ dig blue.foundationdns.net. +noall +answer
blue.foundationdns.net. 300     IN      A       108.162.198.1
blue.foundationdns.net. 300     IN      A       162.159.60.1
blue.foundationdns.net. 300     IN      A       172.64.40.1

$ dig blue.foundationdns.org. +noall +answer
blue.foundationdns.org. 300     IN      A       108.162.198.1
blue.foundationdns.org. 300     IN      A       162.159.60.1
blue.foundationdns.org. 300     IN      A       172.64.40.1</code></pre>
            <p>Would you look at that! Foundation DNS provides the same IP addresses for each of the authoritative nameservers that we provide to a zone. So in this case, we have only provided three IP addresses for resolvers to use to resolve DNS queries. And you might be wondering,“isn’t six better than three? Isn’t this a downgrade?” It turns out more isn’t always better. Let’s talk about why.</p><p>You are probably aware of Cloudflare’s use of <a href="https://www.cloudflare.com/learning/cdn/glossary/anycast-network/">Anycast</a> and, as you might assume, our DNS services leverage Anycast to ensure that our authoritative DNS servers are available globally and as close as possible to users and resolvers across the Internet. Our standard nameservers are all advertised out of every Cloudflare data center by a single Anycast group. If we zoom in on Europe, you can see that in a standard nameserver deployment, both nameservers are advertised from every data center.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4RXMhxG3gkV6QGdc9MLNn7/8821cb762aeccaf4ce51d82ff9d30711/DNS---Anycast---1-Group.png" />
            
            </figure><p>We can take those six IP addresses from our standard nameservers above and perform a lookup for their "hostname.bind" TXT record which will show us the airport code or physical location of the closest data center where our DNS queries are being resolved from. This output helps explain the reason why more isn’t always better.</p>
            <pre><code>$ dig @108.162.194.91 ch txt hostname.bind +short
"LHR"

$ dig @162.159.38.91 ch txt hostname.bind +short
"LHR"

$ dig @172.64.34.91 ch txt hostname.bind +short
"LHR"

$ dig @108.162.195.247 ch txt hostname.bind +short
"LHR"

$ dig @162.159.44.247 ch txt hostname.bind +short
"LHR"

$ dig @172.64.35.247 ch txt hostname.bind +short
"LHR"</code></pre>
            <p>As you can see, when queried from near London, all six of those IP addresses route to the same London (LHR) data center. Meaning that when a resolver in London is resolving DNS queries for a domain using Cloudflare’s standard authoritative DNS, no matter which nameserver IP address is being queried, they are always connecting to the same physical location.</p><p>You might be asking, “So what? What does that mean to me?” Let’s look at an example. If you wanted to resolve a domain using Cloudflare standard nameservers from London, and I am using a public resolver that is also located in London, the resolver will always connect to the Cloudflare LHR data center regardless of which nameserver it's trying to reach. It doesn’t have any other option, because of Anycast.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/10cqrujFMIilg6rEPpjoWK/8f7ad630f291949b272881e8a8b48182/Untitled.png" />
            
            </figure><p>Because of Anycast, should the LHR data center go offline completely, all the traffic intended for LHR would be routed to other nearby data centers and resolvers would continue to function normally. However, in the unlikely scenario where the LHR data center was online, but our DNS services aren’t able to respond to DNS queries, the resolver would have no way to resolve these DNS queries since they can’t reach out to any other data center. We could have 100 IP addresses, and it would not help us in this scenario. Eventually, cached responses will expire, and the domain will eventually stop being resolved.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6KzCMn3FGbmbfnv7tDJPND/af92cc20ed40e60a6611688c59da7416/Untitled--1-.png" />
            
            </figure><p>Foundation DNS advanced nameservers are changing the way we use Anycast by leveraging two Anycast groups, which breaks the previous paradigm of every authoritative nameserver IP being advertised from every data center. Using two Anycast groups means that Foundation DNS authoritative nameservers actually have different physical locations from one another, rather than all being advertised from each data center. Here is how that same region would look using two Anycast groups:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2RNThUjcDyqemyWpHTWXgo/4d8b7490278fe202b7ce4c22fe0bec74/DNS---Anycast---2-Groups.png" />
            
            </figure><p>Let’s go back and finish our comparison of six authoritative IP addresses for standard authoritative DNS vs three IP addresses for Foundation DNS now that it's understood that Foundation DNS is using two Anycast groups for advertising nameservers. Let’s see where Foundation DNS servers are being advertised from for our example:</p>
            <pre><code>$ dig @108.162.198.1 ch txt hostname.bind +short
"LHR"

$ dig @162.159.60.1 ch txt hostname.bind +short
"LHR"

$ dig @172.64.40.1 ch txt hostname.bind +short
"MAN"</code></pre>
            <p>Look at that! One of our three nameserver IP addresses is being advertised out of a different data center, Manchester (MAN), making Foundation DNS more reliable and resilient for the previously mentioned outage scenario. It's worth mentioning that in some cities, Cloudflare operates out of multiple data centers which will result in all three queries returning the same airport code. While we guarantee that at least one of those IP addresses is being advertised out of a different data center, we understand some customers may want to test for themselves. In those cases, an additional query can show that IP addresses are being advertised out of different data centers.</p>
            <pre><code>$ dig @108.162.198.1 +nsid | grep NSID:
; NSID: 39 34 6d 33 39 ("94m39")</code></pre>
            <p>In the "<b>94m30</b>" returned in the response, the number before the "<b>m</b>" represents the data center that answered the query. As long as that number is different in one of the three responses, you know that one of your Foundation DNS authoritative nameservers is being advertised out of a different physical location.</p><p>With Foundation DNS leveraging two Anycast groups, the previous outage scenario is handled seamlessly. DNS resolvers monitor requests to all the authoritative nameservers returned for a given domain, but primarily use the nameserver that is providing the fastest responses.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1u3SrmtgUejWSebbRXUPAt/227561599823e742c22b8de84f58a6e1/Untitled--3-.png" />
            
            </figure><p>With this configuration, DNS resolvers are able to send requests to two different Cloudflare data centers, so, should a failure happen at one physical location, queries are then automatically sent to the second data center where they can be properly resolved.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3keJQHl9r4G2MbPBfVM6z2/ea6df88b75f5509775e9606b346e1430/Untitled--4-.png" />
            
            </figure><p>Foundation DNS advanced nameservers are a big step forward in reliability for our enterprise customers. We welcome our enterprise customers to enable advanced nameservers for existing zones today. Migrating to Foundation DNS won’t involve any downtime either because even after Foundation DNS advanced nameservers are enabled for a zone, the previous standard authoritative DNS nameservers will continue to function and respond to queries for the zone. Customers don’t need to plan for a cutover or other service-impacting event to migrate to Foundation DNS advanced nameservers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Yb7o6mhNlOEOUzB49iaRj/7cdbb3feede33f2d5d32db89aff6a861/DNS-Enable-Foundation.png" />
            
            </figure>
    <div>
      <h3>New zone-level DNS settings</h3>
      <a href="#new-zone-level-dns-settings">
        
      </a>
    </div>
    <p>Historically, we have received regular requests from our enterprise customers to adjust specific DNS settings that were not exposed via our API or dashboard, such as enabling secondary DNS overrides. When customers wanted these settings adjusted, they had to reach out to their account teams, who would change the configurations. With Foundation DNS, we are exposing the most commonly requested settings via the <a href="https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-update-dns-settings">API</a> and dashboard to give our customers increased flexibility with their Cloudflare authoritative DNS solution.</p><p>Enterprise customers can now configure the following DNS settings on their zones:</p>
<table>
<thead>
  <tr>
    <th><span>Setting</span></th>
    <th><span>Zone Type</span></th>
    <th><span>Description</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="https://developers.cloudflare.com/dns/foundation-dns/advanced-nameservers/"><span>Foundation DNS advanced nameservers</span></a></td>
    <td><span>Primary and secondary zones</span></td>
    <td><span>Allows you to enable advanced nameservers on your zone.</span></td>
  </tr>
  <tr>
    <td><a href="https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/proxy-traffic/"><span>Secondary DNS override</span></a></td>
    <td><span>Secondary zones</span></td>
    <td><span>Allows you to enable </span><a href="https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/proxy-traffic/"><span>Secondary DNS Override</span></a><span> on your zone in order to proxy HTTP/S traffic through Cloudflare.</span></td>
  </tr>
  <tr>
    <td><a href="https://developers.cloudflare.com/dns/nameservers/nameserver-options/#multi-provider-dns"><span>Multi-provider DNS</span></a></td>
    <td><span>Primary and secondary zones</span></td>
    <td><span>Allows you to have multiple authoritative DNS providers while using Cloudflare as a primary nameserver.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Unique DNSSEC keys per account and zone</h3>
      <a href="#unique-dnssec-keys-per-account-and-zone">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a>, which stands for <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">Domain Name System Security Extensions</a>, adds security to a domain or zone by providing a way to check that the response you receive for a DNS query is authentic and hasn't been modified. DNSSEC prevents <a href="https://www.cloudflare.com/learning/dns/dns-cache-poisoning/">DNS cache poisoning (DNS spoofing)</a> which helps ensure that DNS resolvers are responding to DNS queries with the correct IP addresses.</p><p>Since we <a href="/introducing-universal-dnssec">launched Universal DNSSEC</a> in 2015, we’ve made quite a few improvements, like adding support for <a href="https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/dnssec-for-secondary/#set-up-pre-signed-dnssec">pre-signed DNSSEC for secondary zones</a> and <a href="https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/">multi-signer DNSSEC</a>. By default, Cloudflare signs DNS records on the fly (live signing) as we respond to DNS queries. This allows Cloudflare to host a DNSSEC-secured domain while dynamically allocating IP addresses for the proxied origins. It also enables certain load balancing use cases since the IP addresses served in the DNS response in these cases change based on steering.</p><p>Cloudflare uses the <a href="/dnssec-done-right">Elliptic Curve algorithm ECDSA P-256</a>, which is stronger than most RSA keys used today. It uses less CPU to generate signatures, making them more efficient to generate on the fly. Usually two keys are used as part of DNSSEC, the Zone Signing Key (ZSK) and the Key Signing Key (KSK). At the simplest level, the ZSK is used for signing the DNS records that are served in response to queries and the KSK is used to sign the <a href="https://www.cloudflare.com/learning/dns/dns-records/dnskey-ds-records/">DNSKEYs</a>, including the ZSK to ensure its authenticity.</p><p>Today, Cloudflare uses a shared ZSK and KSK globally for all DNSSEC signing, and since we use such a strong cryptographic algorithm, we know how secure this key set is and as such, do not believe there is a need to regularly rotate the ZSK or KSK – at least for security reasons. There are customers, however, that have policies that require the rotation of these keys at certain intervals. Because of this, we’ve added the ability for our new Foundation DNS advanced nameservers to rotate both their ZSK and KSK as needed per account or per zone. This will first be available via the API and subsequently through the Cloudflare dashboard. So now, customers with strict policy requirements around their DNSSEC key rotation can meet those requirements with Cloudflare Foundation DNS.</p>
    <div>
      <h3>GraphQL-based DNS analytics</h3>
      <a href="#graphql-based-dns-analytics">
        
      </a>
    </div>
    <p>For those who are not familiar with it, <a href="https://graphql.org/">GraphQL</a> is a query language for APIs and a runtime for executing those queries. It allows clients to request exactly what they need, no more, no less, enabling them to aggregate data from multiple sources through a single API call, and supports real-time updates through subscriptions.</p><p>As you might know, Cloudflare has had a <a href="https://developers.cloudflare.com/analytics/graphql-api/">GraphQL API</a> for a while now, but as part of Foundation DNS we are adding a new DNS dataset to that API that is only available with our new Foundation DNS advanced nameservers.</p><p>The new DNS dataset in our GraphQL API can be used to fetch information about the DNS queries a zone has received. This faster and more powerful alternative to our current <a href="https://developers.cloudflare.com/api/operations/dns-analytics-table">DNS Analytics API</a> allows you to query data from large time periods quickly and efficiently without running into limits or timeouts. The GraphQL API is more flexible with regard to which queries it accepts, and exposes more information than the DNS Analytics API.</p><p>For example, you can run this query to fetch the mean and 90th percentile processing time of your queries, grouped by source IP address, in 15 minute buckets. A query like this would be useful to see which IPs are querying your records most often for a given time range:</p>
            <pre><code>{
  "query": "{
    viewer {
      zones(filter: { zoneTag: $zoneTag }) {
        dnsAnalyticsAdaptiveGroups(
          filter: $filter
          limit: 10
          orderBy: [datetime_ASC]
        ) {
          avg {
            processingTimeUs
          }
          quantiles {
            processingTimeUsP90
          }
          dimensions {
            datetimeFifteenMinutes
            sourceIP
          }
        }
      }
    }
  }",
  "variables": {
    "zoneTag": "&lt;zone-tag&gt;",
    "filter": {
      "datetime_geq": "2024-05-01T00:00:00Z",
      "datetime_leq": "2024-06-01T00:00:00Z"
    }
  }
}</code></pre>
            <p>Previously, a query like this wouldn’t have been possible for several reasons. The first is that we have added new fields like <b>sourceIP</b>, which allows us to filter data based on which client IP addresses (usually resolvers) are making DNS queries. The second is that the GraphQL API query is able to process and return data from much larger time ranges. A DNS zone with sufficiently large amounts of queries was previously only able to query across a few days of traffic, while the new GraphQL API can provide data for a period of up to 31 days. We are planning further enhancements to that range, as well as how far back historical data can be stored and queried.</p><p>The GraphQL API also allows us to add a new DNS analytics section to the Cloudflare dashboard. Customers will be able to track the most queried records, see which data centers are answering those queries, see how many queries are being made, and much more.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2wxCCwWyZnmhd0orYUww9Y/c851eba998a7fbdaded3426e1aff19b4/DNS-Analytics.png" />
            
            </figure><p>The new DNS dataset in our GraphQL API and the new DNS analytics page work together to help our DNS customers to monitor, analyze, and troubleshoot their Foundation DNS deployments.</p>
    <div>
      <h3>New release process</h3>
      <a href="#new-release-process">
        
      </a>
    </div>
    <p>Cloudflare’s Authoritative DNS product receives software updates roughly once a week. Cloudflare has a sophisticated release process that helps prevent regressions from affecting production traffic. While uncommon, it's possible to have issues only surface once the new release is subject to the volume and uniqueness of production traffic.</p><p>Because our enterprise customers desire stability even more than new features, new releases will be subject to a two-week soak time with our standard nameservers before our Foundation DNS advanced nameservers are upgraded. After two weeks with no issues, the Foundation DNS advanced nameservers will be upgraded as well.</p><p>Zones using Foundation DNS advanced nameservers will see increased reliability as they are better protected against regressions in new software releases.</p>
    <div>
      <h3>Simpler DNS pricing</h3>
      <a href="#simpler-dns-pricing">
        
      </a>
    </div>
    <p>Historically, Cloudflare has charged for authoritative DNS based on monthly DNS queries and the number of domains in the account. Our enterprise DNS customers are often interested in DNS-only zones, which are DNS zones hosted in Cloudflare that do not use our reverse proxy (layer 7) services such as our CDN, WAF, or Bot Management. With Foundation DNS, we’re making pricing simpler for the vast majority of those customers by <b>including 10,000 DNS only domains</b> by default. This change means most customers will only pay for the number of DNS queries they consume.</p><p>We’re also <b>including 1 million DNS records</b> across all domains in an account. But that doesn’t mean we can’t support more. In fact, the biggest single zone on our platform has over 3.9 million records, while our largest DNS account is just shy of 30 million DNS records spread across multiple zones. With Cloudflare DNS, there is no trouble handling even the largest deployments.</p>
    <div>
      <h2>There is more to come</h2>
      <a href="#there-is-more-to-come">
        
      </a>
    </div>
    <p>We are just getting started. In the future, we will add more exclusive features to Foundation DNS. One example is a highly requested feature: <b>per-record scoped API tokens and user permissions</b>. This will allow you to configure permissions on an even more granular level. For example, you could specify that a particular member of your account is only allowed to create and manage records of the type TXT and MX, so they don’t accidentally delete or edit address records impacting web traffic to your domain. Another example would be to specify permissions based on subdomain to further restrict the scope of specific users.</p><p>If you’re an existing enterprise customer and want to use Foundation DNS, get in touch with your account team to provision Foundation DNS on your account.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Foundation DNS]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">61fYHTMclwlBGOBNMC5Ehj</guid>
            <dc:creator>Hannes Gerhart</dc:creator>
            <dc:creator>Chris Ward</dc:creator>
        </item>
        <item>
            <title><![CDATA[Advanced DNS Protection: mitigating sophisticated DNS DDoS attacks]]></title>
            <link>https://blog.cloudflare.com/advanced-dns-protection/</link>
            <pubDate>Thu, 07 Mar 2024 14:00:36 GMT</pubDate>
            <description><![CDATA[ We're proud to introduce the Advanced DNS Protection system, a robust defense mechanism designed to protect against the most sophisticated DNS-based DDoS attacks ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/45qkI4SFbrq6NaNxYF5TJ/93dce3635461f42d02cafdb034b82bcd/image10-5.png" />
            
            </figure><p>We're proud to introduce the <a href="https://developers.cloudflare.com/ddos-protection/dns-protection/">Advanced DNS Protection</a> system, a robust defense mechanism designed to protect against the most sophisticated <a href="https://www.cloudflare.com/learning/ddos/dns-amplification-ddos-attack/">DNS-based DDoS attacks</a>. This system is engineered to provide top-tier security, ensuring your digital infrastructure remains resilient in the face of evolving threats.</p><p>Our existing systems have been successfully detecting and mitigating ‘simpler’ DDoS attacks against DNS, but they’ve struggled with the more complex ones. The Advanced DNS Protection system is able to bridge that gap by leveraging new techniques that we will showcase in this blog post.</p><p>Advanced DNS Protection is currently in beta and available for all <a href="https://www.cloudflare.com/network-services/products/magic-transit/">Magic Transit</a> customers at no additional cost. Read on to learn more about DNS DDoS attacks, how the new system works, and what new functionality is expected down the road.</p><p><a href="https://www.cloudflare.com/lp/advanced-dns-protection/">Register your interest</a> to learn more about how we can help keep your DNS servers protected, available, and performant.</p>
    <div>
      <h2>A third of all DDoS attacks target DNS servers</h2>
      <a href="#a-third-of-all-ddos-attacks-target-dns-servers">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/">Distributed Denial of Service (DDoS) attacks</a> are a type of cyber attack that aim to disrupt and take down websites and other online services. When DDoS attacks succeed and websites are taken offline, it can lead to significant revenue loss and damage to reputation.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3RNb2mpBnPswRBx7ye9HYG/7b07417272b43a163aa57d69fad50f0c/image5-13.png" />
            
            </figure><p>Distribution of DDoS attack types for 2023</p><p>One common way to disrupt and take down a website is to flood its servers with more traffic than it can handle. This is known as an <a href="https://www.cloudflare.com/learning/ddos/http-flood-ddos-attack/">HTTP flood attack</a>. It is a type of DDoS attack that targets the website <i>directly</i> with a lot of <a href="https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/">HTTP requests</a>. According to our <a href="/ddos-threat-report-2023-q4">last DDoS trends report</a>, in 2023 our systems automatically mitigated 5.2 million HTTP DDoS attacks — accounting for 37% of all DDoS attacks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4WcaqGR3VhSaPbTOrbjIVJ/7d3ce83439c2b064b57436de14846a3c/image11-2.png" />
            
            </figure><p>Diagram of an HTTP flood attack</p><p>However, there is another way to take down websites: by targeting them <i>indirectly</i>. Instead of flooding the website servers, the threat actor floods the DNS servers. If the DNS servers are overwhelmed with more queries than their capacity, hostname to IP address translation fails and the website experiences an indirectly inflicted outage because the DNS server cannot respond to legitimate queries.</p><p>One notable example is the <a href="https://en.wikipedia.org/wiki/DDoS_attacks_on_Dyn">attack that targeted Dyn</a>, a DNS provider, in October 2016. It was a devastating DDoS attack launched by the infamous <a href="https://www.cloudflare.com/learning/ddos/glossary/mirai-botnet/">Mirai botnet</a>. It caused disruptions for major sites like Airbnb, Netflix, and Amazon, and it took Dyn an entire day to restore services. That’s a long time for service disruptions that can lead to significant reputation and revenue impact.</p><p>Over seven years later, Mirai attacks and DNS attacks are still incredibly common. In 2023, DNS attacks were the second most common attack type — with a 33% share of all DDoS attacks (4.6 million attacks). Attacks launched by Mirai-variant botnets were the fifth most common type of network-layer DDoS attack, accounting for 3% of all network-layer DDoS attacks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7kZe6dABMA0r3nX1lE8rzJ/24540fe5470cbf6757cd6b1f0459a844/image2-22.png" />
            
            </figure><p>Diagram of a DNS query flood attack</p>
    <div>
      <h2>What are sophisticated DNS-based DDoS attacks?</h2>
      <a href="#what-are-sophisticated-dns-based-ddos-attacks">
        
      </a>
    </div>
    <p>DNS-based DDoS attacks can be easier to mitigate when there is a recurring pattern in each query. This is what’s called the “attack fingerprint”. Fingerprint-based mitigation systems can identify those patterns and then deploy a mitigation rule that surgically filters the attack traffic without impacting legitimate traffic.</p><p>For example, let’s take a scenario where an attacker sends a flood of DNS queries to their target. In this example, the attacker only randomized the source IP address. All other query fields remained consistent. The mitigation system detected the pattern (source port is 1024 and the queried domain is <code>example.com</code>) and will generate an ephemeral mitigation rule to filter those queries.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7lAewEZWMPO4Du0g14y97V/e1c663aaecfdefbf92867d180d08c89e/pasted-image-0-3.png" />
            
            </figure><p>A simplified diagram of the attack fingerprinting concept</p><p>However, there are DNS-based DDoS attacks that are much more sophisticated and randomized, lacking an apparent attack pattern. Without a consistent pattern to lock on to, it becomes virtually impossible to mitigate the attack using a fingerprint-based mitigation system. Moreover, even if an attack pattern is detected in a highly randomized attack, the pattern would probably be so generic that it would mistakenly mitigate legitimate user traffic and/or not catch the entire attack.</p><p>In this example, the attacker also randomized the queried domain in their DNS query flood attack. Simultaneously, a legitimate client (or server) is also querying <code>example.com</code>. They were assigned a random port number which happened to be 1024. The mitigation system detected a pattern (source port is 1024 and the queried domain is <code>example.com</code>) that caught only the part of the attack that matched the fingerprint. The mitigation system missed the part of the attack that queried other hostnames. Lastly, the mitigation system mistakenly caught legitimate traffic that happened to appear similar to the attack traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/FK69kOH3wNkIxqZ9GolXV/0ca6c600de43c646efd46a17fa070a36/pasted-image-0--1-.png" />
            
            </figure><p>A simplified diagram of a randomized DNS flood attack</p><p>This is just one very simple example of how fingerprinting can fail in stopping randomized DDoS attacks. This challenge is amplified when attackers “launder” their attack traffic through reputable public DNS resolvers (a DNS resolver, also known as a recursive DNS server, is a <a href="https://www.cloudflare.com/learning/dns/dns-server-types/">type of DNS server</a> that is responsible for tracking down the IP address of a website from various other DNS servers). This is known as a DNS laundering attack.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7tWhCkfhKqdiT1Tp4oXX7c/161b1bfcaa7be90301de140ffc15a97a/DNS-Resolution.png" />
            
            </figure><p>Diagram of the DNS resolution process</p><p>During a DNS laundering attack, the attacker queries subdomains of a real domain that is managed by the victim’s authoritative DNS server. The prefix that defines the subdomain is randomized and is never used more than once. Due to the randomization element, recursive DNS servers will never have a cached response and will need to forward the query to the victim’s authoritative DNS server. The authoritative DNS server is then bombarded by so many queries until it cannot serve legitimate queries or even crashes altogether.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4qWoBkWf5pQ3vKwXd2VGdI/1abd687392cb0b0106a154b4fb5842d8/DNS-Laundering-attack.png" />
            
            </figure><p>Diagram of a DNS Laundering attack</p><p>The complexity of sophisticated DNS DDoS attacks lies in their paradoxical nature: while they are relatively easy to detect, effectively mitigating them is significantly more difficult. This difficulty stems from the fact that authoritative DNS servers cannot simply block queries from recursive DNS servers, as these servers also make legitimate requests. Moreover, the authoritative DNS server is unable to filter queries aimed at the targeted domain because it is a genuine domain that needs to remain accessible.</p>
    <div>
      <h2>Mitigating sophisticated DNS-based DDoS attacks with the Advanced DNS Protection system</h2>
      <a href="#mitigating-sophisticated-dns-based-ddos-attacks-with-the-advanced-dns-protection-system">
        
      </a>
    </div>
    <p>The rise in these types of sophisticated DNS-based DDoS attacks motivated us to develop a new solution — a solution that would better protect our customers and bridge the gap of more traditional fingerprinting approaches. This solution came to be the <a href="https://developers.cloudflare.com/ddos-protection/dns-protection/">Advanced DNS Protection</a> system. Similar to the <a href="https://developers.cloudflare.com/ddos-protection/tcp-protection/">Advanced TCP Protection</a> system, it is a software-defined system that we built, and it is powered by our stateful mitigation platform, <i>flowtrackd</i> (flow tracking daemon).</p><p>The Advanced DNS Protection system complements our <a href="https://developers.cloudflare.com/ddos-protection/#features">existing suite of DDoS defense systems</a>. Following the same approach as our other DDoS defense systems, the Advanced DNS Protection system is also a distributed system, and an instance of it runs on every Cloudflare server around the world. Once the system has been initiated, each instance can detect and mitigate attacks autonomously without requiring any centralized regulation. Detection and mitigation is instantaneous (zero seconds). Each instance also communicates with other instances on other servers in a data center. They <i>gossip</i> and share threat intelligence to deliver a comprehensive mitigation within each data center.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/73SgEYC7uAHd38YkYhOCV1/ee2c4024d83ac999f943703df1a6623b/pasted-image-0--2-.png" />
            
            </figure><p>Screenshots from the Cloudflare dashboard showcasing a DNS-based DDoS attack that was mitigated by the Advanced DNS Protection system </p><p>Together, our fingerprinting-based systems (the <a href="https://developers.cloudflare.com/ddos-protection/managed-rulesets/">DDoS protection managed rulesets</a>) and our stateful mitigation systems provide a robust multi-layered defense strategy to defend against the most sophisticated and randomized DNS-based DDoS attacks. The system is also customizable, allowing Cloudflare customers to tailor it for their needs. Review our <a href="https://developers.cloudflare.com/ddos-protection/dns-protection/">documentation</a> for more information on configuration options.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Rb1rVLujDQK61hPgDvNuP/1ad93b101600e061c2217ae870b8592e/Cloudflare-DDoS-Protection---system-overview.png" />
            
            </figure><p>Diagram of Cloudflare’s DDoS protection systems</p><p>We’ve also added new DNS-centric data points to help customers better understand their DNS traffic patterns and attacks. These new data points are available in a new “DNS Protection” tab within the <a href="https://developers.cloudflare.com/analytics/network-analytics/">Cloudflare Network Analytics dashboard</a>. The new tab provides insights about which DNS queries are passed and dropped, as well as the characteristics of those queries, including the queried domain name and the record type. The analytics can also be fetched by using the <a href="https://developers.cloudflare.com/analytics/graphql-api/">Cloudflare GraphQL API</a> and by exporting logs into your own monitoring dashboards via <a href="https://developers.cloudflare.com/logs/reference/log-fields/account/network_analytics_logs/">Logpush</a>.</p>
    <div>
      <h2>DNS queries: discerning good from bad</h2>
      <a href="#dns-queries-discerning-good-from-bad">
        
      </a>
    </div>
    <p>To protect against sophisticated and highly randomized DNS-based DDoS attacks, we needed to get better at deciding which DNS queries are likely to be legitimate for our customers. However, it’s not easy to infer what’s legitimate and what’s likely to be a part of an attack just based on the query name. We can’t rely solely on fingerprint-based detection mechanisms, since sometimes seemingly random queries, like abc123.example.com, can be legitimate. The opposite is true as well: a query for mailserver.example.com might look legitimate, but can end up not being a real subdomain for a customer.</p><p>To make matters worse, our Layer 3 packet routing-based mitigation service, <a href="https://developers.cloudflare.com/magic-transit/">Magic Transit</a>, uses direct server return (DSR), meaning we can not see the DNS origin server’s responses to give us feedback about which queries are ultimately legitimate.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5vjGjv8o2n6LJbU1dEmuqd/3333e3811d9af05d7705cd3e286edfaf/pasted-image-0--3-.png" />
            
            </figure><p>Diagram of Magic Transit with Direct Server Return (DSR)</p><p>We decided that the best way to combat these attacks is to build a data model of each customer’s expected DNS queries, based on a historical record that we build. With this model in hand, we can decide with higher confidence which queries are likely to be legitimate, and drop the ones that we think are not, shielding our customer’s DNS servers.</p><p>This is the basis of Advanced DNS Protection. It inspects every DNS query sent to our Magic Transit customers, and passes or drops them based on the data model and each customer’s individual settings.</p><p>To do so, each server at our global network continually sends certain DNS-related data such as query type (for example, A record) and the queried domains (but not the source of the query) to our core data centers, where we periodically compute DNS query traffic profiles for each customer. Those profiles are distributed across our global network, where they are consulted to help us more confidently and accurately decide which queries are good and which are bad. We drop the bad queries and pass on the good ones, taking into account a customer's tolerance for unexpected DNS queries based on their configurations.</p>
    <div>
      <h2>Solving the technical challenges that emerged when designing the Advanced DNS Protection system</h2>
      <a href="#solving-the-technical-challenges-that-emerged-when-designing-the-advanced-dns-protection-system">
        
      </a>
    </div>
    <p>In building this system, we faced several specific technical challenges:</p>
    <div>
      <h3>Data processing</h3>
      <a href="#data-processing">
        
      </a>
    </div>
    <p>We process tens of millions of DNS queries per day across our global network for our Magic Transit customers, not counting Cloudflare’s suite of other DNS products, and use the DNS-related data mentioned above to build custom query traffic profiles. Analyzing this type of data requires careful treatment of our data pipelines. When building these traffic profiles, we use sample-on-write and adaptive bitrate technologies when writing and reading the necessary data, respectively, to ensure that we capture the data with a fine granularity while protecting our data infrastructure, and we drop information that might impact the privacy of end users.</p>
    <div>
      <h3>Compact representation of query data</h3>
      <a href="#compact-representation-of-query-data">
        
      </a>
    </div>
    <p>Some of our customers see tens of millions of DNS queries per day alone. This amount of data would be prohibitively expensive to store and distribute in an uncompressed format. To solve this challenge, we decided to use a <a href="https://en.wikipedia.org/wiki/Counting_Bloom_filter"><i>counting Bloom filter</i></a> for each customer’s traffic profile. This is a probabilistic data structure that allows us to succinctly store and distribute each customer’s DNS profile, and then efficiently query it at packet processing time.</p>
    <div>
      <h3>Data distribution</h3>
      <a href="#data-distribution">
        
      </a>
    </div>
    <p>We periodically need to recompute and redistribute every customer’s DNS traffic profile between our data centers to each server in our fleet. We used our very own <a href="https://www.cloudflare.com/developer-platform/r2/">R2 storage service</a> to greatly simplify this task. With regional hints and custom domains enabled, we enabled caching and used only a handful of R2 buckets. Each time we need to update the global view of the customer data models across our edge fleet, 98% of the bits transferred are served from cache.</p>
    <div>
      <h3>Built-in tolerance</h3>
      <a href="#built-in-tolerance">
        
      </a>
    </div>
    <p>When new <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain names</a> are put into service, our data models will not immediately be aware of them because queries with these names have never been seen before. This and other reasons for potential false positives mandate that we need to build a certain amount of tolerance into the system to allow through potentially legitimate queries. We do so by leveraging <a href="https://en.wikipedia.org/wiki/Token_bucket">token bucket algorithms</a>. Customers can configure the size of the token buckets by changing the sensitivity levels of the Advanced DNS Protection system. The lower the sensitivity, the larger the token bucket — and vice versa. A larger token bucket provides more tolerance for unexpected DNS queries and expected DNS queries that deviate from the profile. A high sensitivity level translates to a smaller token bucket and a stricter approach.</p>
    <div>
      <h2>Leveraging Cloudflare’s global software-defined network</h2>
      <a href="#leveraging-cloudflares-global-software-defined-network">
        
      </a>
    </div>
    <p>At the end of the day, these are the types of challenges that Cloudflare is excellent at solving. Our customers trust us with handling their traffic, and ensuring their Internet properties are protected, available and performant. We take that trust extremely seriously.</p><p>The Advanced DNS Protection system leverages our global infrastructure and data processing capabilities alongside intelligent algorithms and data structures to protect our customers.</p><p>If you are not yet a Cloudflare customer, <a href="https://www.cloudflare.com/lp/advanced-dns-protection/">let us know</a> if you’d like to protect your DNS servers. Existing Cloudflare customers can enable the new systems by contacting their account team or Cloudflare Support.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Advanced DDoS]]></category>
            <category><![CDATA[Network Protection]]></category>
            <guid isPermaLink="false">5DVU39aBbXaRqqZUSSgy7q</guid>
            <dc:creator>Omer Yoachimik</dc:creator>
            <dc:creator>Cody Doucette</dc:creator>
        </item>
        <item>
            <title><![CDATA[Remediating new DNSSEC resource exhaustion vulnerabilities]]></title>
            <link>https://blog.cloudflare.com/remediating-new-dnssec-resource-exhaustion-vulnerabilities/</link>
            <pubDate>Thu, 29 Feb 2024 14:00:57 GMT</pubDate>
            <description><![CDATA[ Cloudflare recently fixed two critical DNSSEC vulnerabilities: CVE-2023-50387 and CVE-2023-50868. Both of these vulnerabilities can exhaust computational resources of validating DNS resolvers. These vulnerabilities do not affect our Authoritative DNS or DNS firewall products ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aQzvD1YJLHbGjaALKlC8e/23b4147ceed9f1d364101fe3fcbda244/image1-13.png" />
            
            </figure><p>Cloudflare has been part of a multivendor, industry-wide effort to mitigate two critical <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a> vulnerabilities. These vulnerabilities exposed significant risks to critical infrastructures that provide DNS resolution services. Cloudflare provides DNS resolution for anyone to use for free with our <a href="/dns-resolver-1-1-1-1">public resolver 1.1.1.1 service</a>. Mitigations for Cloudflare’s public resolver 1.1.1.1 service were applied before these vulnerabilities were disclosed publicly. Internal resolvers using <a href="https://nlnetlabs.nl/projects/unbound/about/">unbound</a> (open source software) were upgraded promptly after a new software version fixing these vulnerabilities was released.</p><p>All Cloudflare DNS infrastructure was protected from both of these vulnerabilities before they were <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">disclosed</a> and is safe today. These vulnerabilities do not affect our <a href="https://www.cloudflare.com/application-services/products/dns/">Authoritative DNS</a> or <a href="https://www.cloudflare.com/dns/dns-firewall/">DNS firewall</a> products.</p><p>All major DNS software vendors have released new versions of their software. All other major DNS resolver providers have also applied appropriate mitigations. Please update your DNS resolver software immediately, if you haven’t done so already.</p>
    <div>
      <h2>Background</h2>
      <a href="#background">
        
      </a>
    </div>
    <p>Domain name system (DNS) security extensions, commonly known as <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">DNSSEC</a>, are extensions to the DNS protocol that add authentication and integrity capabilities. DNSSEC uses cryptographic keys and signatures that allow DNS responses to be validated as authentic. DNSSEC protocol specifications have certain requirements that prioritize availability at the cost of increased complexity and computational cost for the validating DNS resolvers. The mitigations for the vulnerabilities discussed in this blog require local policies to be applied that relax these requirements in order to avoid exhausting the resources of validators.</p><p>The design of the DNS and DNSSEC protocols follows the <a href="https://datatracker.ietf.org/doc/html/rfc761#section-2.10">Robustness principle</a>: “be conservative in what you do, be liberal in what you accept from others”. There have been many vulnerabilities in the past that have taken advantage of protocol requirements following this principle. Malicious actors can exploit these vulnerabilities to attack DNS infrastructure, in this case by causing additional work for DNS resolvers by crafting DNSSEC responses with complex configurations. As is often the case, we find ourselves having to create a pragmatic balance between the flexibility that allows a protocol to adapt and evolve and the need to safeguard the stability and security of the services we operate.</p><p>Cloudflare’s public resolver 1.1.1.1 is a <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/">privacy-centric</a> public resolver service. We have been using stricter validations and limits aimed at protecting our own infrastructure in addition to shielding authoritative DNS servers operated outside our network. As a result, we often receive complaints about resolution failures. Experience shows us that strict validations and limits can impact availability in some edge cases, especially when DNS domains are improperly configured. However, these strict validations and limits are necessary to improve the overall reliability and resilience of the DNS infrastructure.</p><p>The vulnerabilities and how we mitigated them are described below.</p>
    <div>
      <h2>Keytrap vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387">CVE-2023-50387</a>)</h2>
      <a href="#keytrap-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p>A DNSSEC signed zone can contain multiple keys (DNSKEY) to sign the contents of a DNS zone and a Resource Record Set (RRSET) in a DNS response can have multiple signatures (RRSIG). Multiple keys and signatures are required to support things like key rollover, algorithm rollover, and <a href="https://datatracker.ietf.org/doc/html/rfc8901">multi-signer DNSSEC</a>. DNSSEC protocol specifications require a validating DNS resolver to <a href="https://datatracker.ietf.org/doc/html/rfc4035#section-5.3.3">try every possible combination of keys and signatures</a> when validating a DNS response.</p><p>During validation, a resolver looks at the key tag of every signature and tries to find the associated key that was used to sign it. A key tag is an unsigned 16-bit number <a href="https://datatracker.ietf.org/doc/html/rfc4034#appendix-B">calculated as a checksum</a> over the key’s resource data (RDATA). Key tags are intended to allow efficient pairing of a signature with the key which has supposedly created it.  However, key tags are not unique, and it is possible that multiple keys can have the same key tag. A malicious actor can easily craft a DNS response with multiple keys having the same key tag together with multiple signatures, none of which might validate. A validating resolver would have to try every combination (number of keys multiplied by number of signatures) when trying to validate this response. This increases the computational cost of the validating resolver many-fold, degrading performance for all its users. This is known as the Keytrap vulnerability.</p><p>Variations of this vulnerability include using multiple signatures with one key, using one signature with multiple keys having colliding key tags, and using multiple keys with corresponding hashes added to the parent delegation signer record.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>We have limited the maximum number of keys we will accept at a zone cut. A zone cut is where a parent zone delegates to a child zone, e.g. where the .com zone delegates cloudflare.com to Cloudflare nameservers. Even with this limit already in place and various other protections built for our platform, we realized that it would still be computationally costly to process a malicious DNS answer from an authoritative DNS server.</p><p>To address and further mitigate this vulnerability, we added a signature validations limit per RRSET and a total signature validations limit per resolution task. One resolution task might include multiple recursive queries to external authoritative DNS servers in order to answer a single DNS question. Clients queries exceeding these limits will fail to resolve and will receive a response with an Extended DNS Error (<a href="/unwrap-the-servfail/">EDE</a>) <a href="https://datatracker.ietf.org/doc/html/rfc8914#name-extended-dns-error-code-0-o">code 0</a>. Furthermore, we added metrics which will allow us to detect attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>NSEC3 iteration and closest encloser proof vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868">CVE-2023-50868</a>)</h2>
      <a href="#nsec3-iteration-and-closest-encloser-proof-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc5155">NSEC3</a> is an alternative approach for authenticated denial of existence. You can learn more about authenticated denial of existence <a href="/black-lies/">here</a>. NSEC3 uses a hash derived from DNS names instead of the DNS names directly in an attempt to prevent zone enumeration and the standard supports multiple iterations for hash calculations. However, because the full DNS name is used as input to the hash calculation, increasing hashing iterations beyond the initial doesn’t provide any additional value and is not recommended in <a href="https://datatracker.ietf.org/doc/html/rfc9276#name-iterations">RFC9276</a>. This complication is further inflated while finding the <a href="https://datatracker.ietf.org/doc/html/rfc5155#section-8.3">closest enclosure proof</a>. A malicious DNS response from an authoritative DNS server can set a high NSEC3 iteration count and long DNS names with multiple DNS labels to exhaust the computing resources of a validating resolver by making it do unnecessary hash computations.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>For this vulnerability, we applied a similar mitigation technique as we did for Keytrap. We added a limit for total hash calculations per resolution task to answer a single DNS question. Similarly, clients queries exceeding this limit will fail to resolve and will receive a response with an EDE <a href="https://datatracker.ietf.org/doc/html/rfc9276.html#section-6">code 27</a>. We also added metrics to track hash calculations allowing early detection of attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <table>
	<tbody>
		<tr>
			<td>
			<p><strong><span><span><span><span>Date and time in UTC</span></span></span></span></strong></p>
			</td>
			<td>
			<p><strong><span><span><span><span>Event</span></span></span></span></strong></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2023-11-03 16:05</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>John Todd from </span></span></span></span><a href="https://quad9.net/"><span><span><span><span><u>Quad9</u></span></span></span></span></a><span><span><span><span> invites Cloudflare to participate in a joint task force to discuss a new DNS vulnerability. </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-11-07 14:30</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>A group of DNS vendors and service providers meet to discuss the vulnerability during </span></span></span></span><a href="https://www.ietf.org/blog/ietf118-highlights/"><span><span><span><span><u>IETF 118</u></span></span></span></span></a><span><span><span><span>. Discussions and collaboration continues in a closed chat group hosted at </span></span></span></span><a href="https://dns-oarc.net/oarc/services/chat"><span><span><span><span><u>DNS-OARC</u></span></span></span></span></a></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-12-08 20:20</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate Keytrap vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2024-01-17 22:39</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate NSEC3 iteration count and closest encloser vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 13:04</span></span></span></p>
			</td>
			<td>
			<p><a href="https://nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/"><span><span><span><span><u>Unbound</u></span></span></span></span></a><span><span><span><span> package is released </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 23:00</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare internal CDN resolver is fully patched to mitigate both </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span> and </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a></p>
			</td>
		</tr>
	</tbody>
</table>
    <div>
      <h2>Credits</h2>
      <a href="#credits">
        
      </a>
    </div>
    <p>We would like to thank Elias Heftrig, Haya Schulmann, Niklas Vogel, Michael Waidner from the German National Research Center for Applied Cybersecurity <a href="https://www.athene-center.de/en/">ATHENE</a>, for discovering the <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">Keytrap vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank Petr Špaček from Internet Systems Consortium (<a href="https://www.isc.org/">ISC</a>) for discovering the <a href="https://www.isc.org/blogs/2024-bind-security-release/">NSEC3 iteration and closest encloser proof vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank John Todd from <a href="https://quad9.net/">Quad9</a>  and the DNS Operations Analysis and Research Center (<a href="https://dns-oarc.net/">DNS-OARC</a>) for facilitating coordination amongst various stakeholders.</p><p>And finally, we would like to thank the DNS-OARC community members, representing various DNS vendors and service providers, who all came together and worked tirelessly to fix these vulnerabilities, working towards a common goal of making the internet resilient and secure.</p> ]]></content:encoded>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[KeyTrap]]></category>
            <category><![CDATA[NSEC3]]></category>
            <category><![CDATA[CVE-2023-50387]]></category>
            <guid isPermaLink="false">5KGfAQ21FRucS2X625z4FX</guid>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Anbang Wen</dc:creator>
        </item>
        <item>
            <title><![CDATA[DDoS threat report for 2023 Q4]]></title>
            <link>https://blog.cloudflare.com/ddos-threat-report-2023-q4/</link>
            <pubDate>Tue, 09 Jan 2024 14:00:25 GMT</pubDate>
            <description><![CDATA[ Welcome to the sixteenth edition of Cloudflare’s DDoS Threat Report. This edition covers DDoS trends and key findings for the fourth and final quarter of the year 2023, complete with a review of major trends throughout the year ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1dLcyHxuJpOmtuilCdmlMv/226d5f6d0704e7ef443e924750799873/image14-1.png" />
            
            </figure><p>Welcome to the sixteenth edition of Cloudflare’s DDoS Threat Report. This edition covers DDoS trends and key findings for the fourth and final quarter of the year 2023, complete with a review of major trends throughout the year.</p>
    <div>
      <h2>What are DDoS attacks?</h2>
      <a href="#what-are-ddos-attacks">
        
      </a>
    </div>
    <p>DDoS attacks, or <a href="https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/">distributed denial-of-service attacks</a>, are a type of cyber attack that aims to disrupt websites and online services for users, making them unavailable by overwhelming them with more traffic than they can handle. They are similar to car gridlocks that jam roads, preventing drivers from getting to their destination.</p><p>There are three main types of DDoS attacks that we will cover in this report. The first is an <a href="https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/">HTTP request</a> intensive DDoS attack that aims to overwhelm HTTP servers with more requests than they can handle to cause a denial of service event. The second is an <a href="https://www.cloudflare.com/learning/network-layer/what-is-a-packet/">IP packet</a> intensive DDoS attack that aims to overwhelm in-line appliances such as routers, firewalls, and servers with more packets than they can handle. The third is a bit-intensive attack that aims to saturate and clog the Internet link causing that ‘gridlock’ that we discussed. In this report, we will highlight various techniques and insights on all three types of attacks.</p><p>Previous editions of the report can be found <a href="/tag/ddos-reports">here</a>, and are also available on our interactive hub, <a href="https://radar.cloudflare.com/reports?q=DDoS">Cloudflare Radar</a>. Cloudflare Radar showcases global Internet traffic, attacks, and technology trends and insights, with drill-down and filtering capabilities for zooming in on insights of specific countries, industries, and service providers. Cloudflare Radar also offers a <a href="https://developers.cloudflare.com/radar/">free API</a> allowing academics, data sleuths, and other web enthusiasts to investigate Internet usage across the globe.</p><p>To learn how we prepare this report, refer to our <a href="https://developers.cloudflare.com/radar/reference/quarterly-ddos-reports/">Methodologies</a>.</p>
    <div>
      <h2>Key findings</h2>
      <a href="#key-findings">
        
      </a>
    </div>
    <ol><li><p>In Q4, we observed a 117% year-over-year increase in network-layer DDoS attacks, and overall increased DDoS activity targeting retail, shipment and public relations websites during and around Black Friday and the holiday season.</p></li><li><p>In Q4, DDoS attack traffic targeting Taiwan registered a 3,370% growth, compared to the previous year, amidst the upcoming general election and reported tensions with China. The percentage of DDoS attack traffic targeting Israeli websites grew by 27% quarter-over-quarter, and the percentage of DDoS attack traffic targeting Palestinian websites grew by 1,126% quarter-over-quarter — as the military conflict between Israel and Hamas continues.</p></li><li><p>In Q4, there was a staggering 61,839% surge in DDoS attack traffic targeting Environmental Services websites compared to the previous year, coinciding with the 28th United Nations Climate Change Conference (COP 28).</p></li></ol><p>For an in-depth analysis of these key findings and additional insights that could redefine your understanding of current cybersecurity challenges, read on!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2UZbT93S5MJZLC4lm3oEFA/2beb24271129aabf3ca98b66f69f92cb/image1.png" />
            
            </figure><p>Illustration of a DDoS attack</p>
    <div>
      <h2>Hyper-volumetric HTTP DDoS attacks</h2>
      <a href="#hyper-volumetric-http-ddos-attacks">
        
      </a>
    </div>
    <p>2023 was the year of uncharted territories. DDoS attacks reached new heights — in size and sophistication. The wider Internet community, including Cloudflare, faced a persistent and deliberately engineered campaign of thousands of hyper-volumetric DDoS attacks at never before seen rates.</p><p>These attacks were highly complex and exploited an <a href="/technical-breakdown-http2-rapid-reset-ddos-attack">HTTP/2 vulnerability</a>. Cloudflare developed purpose-built technology to mitigate the vulnerability’s effect and worked with others in the industry to responsibly disclose it.</p><p>As part of this DDoS campaign, in Q3 our systems mitigated the largest attack we’ve ever seen — 201 million requests per second (rps). That’s almost 8 times larger than our previous 2022 record of 26 million rps.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49CXz2EGW8rzgjsaRcSFyT/f6f06108590316e1a3bdf0e0f69dbc89/pasted-image-0.png" />
            
            </figure><p>Largest HTTP DDoS attacks as seen by Cloudflare, by year</p>
    <div>
      <h2>Growth in network-layer DDoS attacks</h2>
      <a href="#growth-in-network-layer-ddos-attacks">
        
      </a>
    </div>
    <p>After the hyper-volumetric campaign subsided, we saw an unexpected drop in HTTP DDoS attacks. Overall in 2023, our automated defenses mitigated over 5.2 million HTTP DDoS attacks consisting of over 26 trillion requests. That averages at 594 HTTP DDoS attacks and 3 billion mitigated requests every hour.</p><p>Despite these astronomical figures, the amount of HTTP DDoS attack requests actually declined by 20% compared to 2022. This decline was not just annual but was also observed in 2023 Q4 where the number of HTTP DDoS attack requests decreased by 7% YoY and 18% QoQ.</p><p>On the network-layer, we saw a completely different trend. Our automated defenses mitigated 8.7 million network-layer DDoS attacks in 2023. This represents an 85% increase compared to 2022.</p><p>In 2023 Q4, Cloudflare’s automated defenses mitigated over 80 petabytes of network-layer attacks. On average, our systems auto-mitigated 996 network-layer DDoS attacks and 27 terabytes every hour. The number of network-layer DDoS attacks in 2023 Q4 increased by 175% YoY and 25% QoQ.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Da5bEJbgh9FT5UQb6qPWo/4cf631e2688ca806bcbe996a357e5d5f/HTTP-and-Network-layer-DDoS-attacks-by-quarter-1.png" />
            
            </figure><p>HTTP and Network-layer DDoS attacks by quarter</p>
    <div>
      <h3>DDoS attacks increase during and around COP 28</h3>
      <a href="#ddos-attacks-increase-during-and-around-cop-28">
        
      </a>
    </div>
    <p>In the final quarter of 2023, the landscape of cyber threats witnessed a significant shift. While the Cryptocurrency sector was initially leading in terms of the volume of HTTP DDoS attack requests, a new target emerged as a primary victim. The Environmental Services industry experienced an unprecedented surge in HTTP DDoS attacks, with these attacks constituting half of all its HTTP traffic. This marked a staggering 618-fold increase compared to the previous year, highlighting a disturbing trend in the cyber threat landscape.</p><p>This surge in cyber attacks coincided with COP 28, which ran from November 30th to December 12th, 2023. The conference was a pivotal event, signaling what many considered the <a href="https://unfccc.int/news/cop28-agreement-signals-beginning-of-the-end-of-the-fossil-fuel-era">'beginning of the end' for the fossil fuel era</a>. It was observed that in the period leading up to COP 28, there was a noticeable spike in HTTP attacks targeting Environmental Services websites. This pattern wasn't isolated to this event alone.</p><p>Looking back at historical data, particularly during COP 26 and COP 27, as well as other UN environment-related resolutions or announcements, a similar pattern emerges. Each of these events was accompanied by a corresponding increase in cyber attacks aimed at Environmental Services websites.</p><p>In February and March 2023, significant environmental events like the UN's resolution on <a href="https://www.unep.org/news-and-stories/story/un-resolution-billed-turning-point-climate-justice">climate justice</a> and the launch of United Nations Environment Programme’s <a href="https://www.unep.org/news-and-stories/press-release/largest-river-and-wetland-restoration-initiative-history-launched-un">Freshwater Challenge</a> potentially heightened the profile of environmental websites, possibly correlating with an increase in attacks on these sites​​​​.</p><p>This recurring pattern underscores the growing intersection between environmental issues and cyber security, a nexus that is increasingly becoming a focal point for attackers in the digital age.</p>
    <div>
      <h2>DDoS attacks and Iron Swords</h2>
      <a href="#ddos-attacks-and-iron-swords">
        
      </a>
    </div>
    <p>It’s not just UN resolutions that trigger DDoS attacks. Cyber attacks, and particularly DDoS attacks, have long been a tool of war and disruption. We witnessed an increase in DDoS attack activity in the Ukraine-Russia war, and now we’re also witnessing it in the Israel-Hamas war. We first reported the cyber activity in our report <a href="/cyber-attacks-in-the-israel-hamas-war/">Cyber attacks in the Israel-Hamas war</a>, and we continued to monitor the activity throughout Q4.</p><p>Operation “Iron Swords” is the <a href="https://en.wikipedia.org/wiki/2023_Israel%E2%80%93Hamas_war#Israeli_response">military offensive launched by Israel against Hamas</a> following the <a href="https://en.wikipedia.org/wiki/2023_Hamas-led_attack_on_Israel">Hamas-led 7 October attack</a>. During this ongoing armed conflict, we continue to see DDoS attacks targeting both sides.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/31johknCeQ8F1pbczj7Neq/2f91e03e355a539043c734e7c5140ff1/pasted-image-0--1-.png" />
            
            </figure><p>DDoS attacks targeting Israeli and Palestinian websites, by industry</p><p>Relative to each region's traffic, the Palestinian territories was the second most attacked region by HTTP DDoS attacks in Q4. Over 10% of all HTTP requests towards Palestinian websites were DDoS attacks, a total of 1.3 billion DDoS requests — representing a 1,126% increase in QoQ. 90% of these DDoS attacks targeted Palestinian Banking websites. Another 8% targeted Information Technology and Internet platforms.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6uYrGNHSPfp3nEmFkhTGpa/317d1cb4ead40504677565360d836641/pasted-image-0--2-.png" />
            
            </figure><p>Top attacked Palestinian industries</p><p>Similarly, our systems automatically mitigated over 2.2 billion HTTP DDoS requests targeting Israeli websites. While 2.2 billion represents a decrease compared to the previous quarter and year, it did amount to a larger percentage out of the total Israel-bound traffic. This normalized figure represents a 27% increase QoQ but a 92% decrease YoY. Notwithstanding the larger amount of attack traffic, Israel was the 77th most attacked region relative to its own traffic. It was also the 33rd most attacked by total volume of attacks, whereas the Palestinian territories was 42nd.</p><p>Of those Israeli websites attacked, Newspaper &amp; Media were the main target — receiving almost 40% of all Israel-bound HTTP DDoS attacks. The second most attacked industry was the Computer Software industry. The Banking, Financial Institutions, and Insurance (BFSI) industry came in third.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2N6E8K9fZJZUFID7t0liAB/c0e58eb814bd8f6ee51319c6fa9ac97d/pasted-image-0--3-.png" />
            
            </figure><p>Top attacked Israeli industries</p><p>On the network layer, we see the same trend. Palestinian networks were targeted by 470 terabytes of attack traffic — accounting for over 68% of all traffic towards Palestinian networks. Surpassed only by China, this figure placed the Palestinian territories as the second most attacked region in the world, by network-layer DDoS attack, relative to all Palestinian territories-bound traffic. By absolute volume of traffic, it came in third. Those 470 terabytes accounted for approximately 1% of all DDoS traffic that Cloudflare mitigated.</p><p>Israeli networks, though, were targeted by only 2.4 terabytes of attack traffic, placing it as the 8th most attacked country by network-layer DDoS attacks (normalized). Those 2.4 terabytes accounted for almost 10% of all traffic towards Israeli networks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Fk4fxxDf20Wt6BmMTDPNq/bf0d999fc9f6b4ca98eb3f4c5b819432/pasted-image-0--5-.png" />
            
            </figure><p>Top attacked countries</p><p>When we turned the picture around, we saw that 3% of all bytes that were ingested in our Israeli-based data centers were network-layer DDoS attacks. In our Palestinian-based data centers, that figure was significantly higher — approximately 17% of all bytes.</p><p>On the application layer, we saw that 4% of HTTP requests originating from Palestinian IP addresses were DDoS attacks, and almost 2% of HTTP requests originating from Israeli IP addresses were DDoS attacks as well.</p>
    <div>
      <h2>Main sources of DDoS attacks</h2>
      <a href="#main-sources-of-ddos-attacks">
        
      </a>
    </div>
    <p>In the third quarter of 2022, China was the largest source of HTTP DDoS attack traffic. However, since the fourth quarter of 2022, the US took the first place as the largest source of HTTP DDoS attacks and has maintained that undesirable position for five consecutive quarters. Similarly, our data centers in the US are the ones ingesting the most network-layer DDoS attack traffic — over 38% of all attack bytes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1LQRkEFpGgYH1o7Ld5m3LH/6e3452323058567ed6e244024644a379/imageLikeEmbed.png" />
            
            </figure><p>HTTP DDoS attacks originating from China and the US by quarter</p><p>Together, China and the US account for a little over a quarter of all HTTP DDoS attack traffic in the world. Brazil, Germany, Indonesia, and Argentina account for the next twenty-five percent.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4OJH3XgpVKTtd93Lhv9pQd/1a4d6d5fb7d6349609c62c9ed5524471/pasted-image-0--6-.png" />
            
            </figure><p>Top source of HTTP DDoS attacks</p><p>These large figures usually correspond to large markets. For this reason, we also normalize the attack traffic originating from each country by comparing their outbound traffic. When we do this, we often get small island nations or smaller market countries that a disproportionate amount of attack traffic originates from. In Q4, 40% of Saint Helena’s outbound traffic were HTTP DDoS attacks — placing it at the top. Following the ‘<a href="https://en.wikipedia.org/wiki/Saint_Helena">remote volcanic tropical island</a>’, Libya came in second, <a href="https://en.wikipedia.org/wiki/Eswatini">Swaziland</a> (also known as Eswatini) in third. Argentina and Egypt follow in fourth and fifth place.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4hyX9SLpTS3ncRB5QZnR9R/447df8e913314ab249c0d5a430efcdcc/pasted-image-0--7-.png" />
            
            </figure><p>Top source of HTTP DDoS attacks with respect to each country’s traffic</p><p>On the network layer, Zimbabwe came in first place. Almost 80% of all traffic we ingested in our Zimbabwe-based data center was malicious. In second place, Paraguay, and Madagascar in third.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7sln1Hbv1Wz7j4oCCL9XRA/56f1f5fa42ab7846b0a0dc33c796afd0/pasted-image-0--8-.png" />
            
            </figure><p>Top source of Network-layer DDoS attacks with respect to each country’s traffic</p>
    <div>
      <h2>Most attacked industries</h2>
      <a href="#most-attacked-industries">
        
      </a>
    </div>
    <p>By volume of attack traffic, Cryptocurrency was the most attacked industry in Q4. Over 330 billion HTTP requests targeted it. This figure accounts for over 4% of all HTTP DDoS traffic for the quarter. The second most attacked industry was Gaming &amp; Gambling. These industries are known for being coveted targets and attract a lot of traffic and attacks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5UoOV6PIx9DqJ0monxhfwu/20411132ba585c3314941bc2aec93e43/pasted-image-0--9-.png" />
            
            </figure><p>Top industries targeted by HTTP DDoS attacks</p><p>On the network layer, the Information Technology and Internet industry was the most attacked — over 45% of all network-layer DDoS attack traffic was aimed at it. Following far behind were the Banking, Financial Services and Insurance (BFSI), Gaming &amp; Gambling, and Telecommunications industries.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/tlGK3k5YutHhSEbvm1va0/5842c447cbb6c8dd18630bbb0c63db1f/pasted-image-0--10-.png" />
            
            </figure><p>Top industries targeted by Network-layer DDoS attacks</p><p>To change perspectives, here too, we normalized the attack traffic by the total traffic for a specific industry. When we do that, we get a different picture.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6DxEla6GwSvU7OBnjGmhJX/dc12c491f1444662e00636b63cf92637/Top-Attacked-Industry-by-Region-Q4-2023.png" />
            
            </figure><p>Top attacked industries by HTTP DDoS attacks, by region</p><p>We already mentioned in the beginning of this report that the Environmental Services industry was the most attacked relative to its own traffic. In second place was the Packaging and Freight Delivery industry, which is interesting because of its timely correlation with online shopping during Black Friday and the winter holiday season. Purchased gifts and goods need to get to their destination somehow, and it seems as though attackers tried to interfere with that. On a similar note, DDoS attacks on retail companies increased by 16% compared to the previous year.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/14CXtsmUxjRwOB1kmYHA6Q/9c8b079ac33d94f8494e53d1ef50c4a6/pasted-image-0--11-.png" />
            
            </figure><p>Top industries targeted by HTTP DDoS attacks with respect to each industry’s traffic</p><p>On the network layer, Public Relations and Communications was the most targeted industry — 36% of its traffic was malicious. This too is very interesting given its timing. Public Relations and Communications companies are usually linked to managing public perception and communication. Disrupting their operations can have immediate and widespread reputational impacts which becomes even more critical during the Q4 holiday season. This quarter often sees increased PR and communication activities due to holidays, end-of-year summaries, and preparation for the new year, making it a critical operational period — one that some may want to disrupt.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2NLJAkykpHhrRuFA2OVuKg/a6ca3bebb6f29c610292cd630a6746cc/pasted-image-0--12-.png" />
            
            </figure><p>Top industries targeted by Network-layer DDoS attacks with respect to each industry’s traffic</p>
    <div>
      <h2>Most attacked countries and regions</h2>
      <a href="#most-attacked-countries-and-regions">
        
      </a>
    </div>
    <p>Singapore was the main target of HTTP DDoS attacks in Q4. Over 317 billion HTTP requests, 4% of all global DDoS traffic, were aimed at Singaporean websites. The US followed closely in second and Canada in third. Taiwan came in as the fourth most attacked region — amidst the upcoming <a href="https://www.bbc.co.uk/news/world-asia-67770782">general elections and the tensions with China</a>. Taiwan-bound attacks in Q4 traffic increased by 847% compared to the previous year, and 2,858% compared to the previous quarter. This increase is not limited to the absolute values. When normalized, the percentage of HTTP DDoS attack traffic targeting Taiwan relative to all Taiwan-bound traffic also significantly increased. It increased by 624% quarter-over-quarter and 3,370% year-over-year.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/730lynQatPwtsRfi10TXOi/fc993988b6f38b8d00501f3451a16c18/pasted-image-0--13-.png" />
            
            </figure><p>Top targeted countries by HTTP DDoS attacks</p><p>While China came in as the ninth most attacked country by HTTP DDoS attacks, it's the number one most attacked country by network-layer attacks. 45% of all network-layer DDoS traffic that Cloudflare mitigated globally was China-bound. The rest of the countries were so far behind that it is almost negligible.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5MIf27g0zSIEZYQxUsFlTh/62c50ec1d0c25ae82045a71cd41c24c2/pasted-image-0--14-.png" />
            
            </figure><p>Top targeted countries by Network-layer DDoS attacks</p><p>When normalizing the data, Iraq, Palestinian territories, and Morocco take the lead as the most attacked regions with respect to their total inbound traffic. What’s interesting is that Singapore comes up as fourth. So not only did Singapore face the largest amount of HTTP DDoS attack traffic, but that traffic also made up a significant amount of the total Singapore-bound traffic. By contrast, the US was second most attacked by volume (per the application-layer graph above), but came in the fiftieth place with respect to the total US-bound traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4LX2zl13YVM9hZB60Ucedg/1b2ba78c2aeac99a3d9725ea4e418bd4/pasted-image-0--15-.png" />
            
            </figure><p>Top targeted countries by HTTP DDoS attacks with respect to each country’s traffic</p><p>Similar to Singapore, but arguably more dramatic, China is both the number one most attacked country by network-layer DDoS attack traffic, and also with respect to all China-bound traffic. Almost 86% of all China-bound traffic was mitigated by Cloudflare as network-layer DDoS attacks. The Palestinian territories, Brazil, Norway, and again Singapore followed with large percentages of attack traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2n9rHcScBY63Q4yX01yKu5/d19a7fc7ccd43c72911897245cc91dc3/pasted-image-0--16-.png" />
            
            </figure><p>Top targeted countries by Network-layer DDoS attacks with respect to each country’s traffic</p>
    <div>
      <h2>Attack vectors and attributes</h2>
      <a href="#attack-vectors-and-attributes">
        
      </a>
    </div>
    <p>The majority of DDoS attacks are short and small relative to Cloudflare’s scale. However, unprotected websites and networks can still suffer disruption from short and small attacks without proper inline automated protection — underscoring the need for organizations to be proactive in <a href="https://www.cloudflare.com/cybersecurity-risk-management/">adopting a robust security posture</a>.</p><p>In 2023 Q4, 91% of attacks ended within 10 minutes, 97% peaked below 500 megabits per second (mbps), and 88% never exceeded 50 thousand packets per second (pps).</p><p>Two out of every 100 network-layer DDoS attacks lasted more than an hour, and exceeded 1 gigabit per second (gbps). One out of every 100 attacks exceeded 1 million packets per second. Furthermore, the amount of network-layer DDoS attacks exceeding 100 million packets per second increased by 15% quarter-over-quarter.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/YPOZlyzEHc5u5DeFbQXqW/d8dc22556a3f9510ee075b507b699a42/DDoS-attacks-stats-2023-Q4_a.png" />
            
            </figure><p>DDoS attack stats you should know</p><p>One of those large attacks was a Mirai-botnet attack that peaked at 160 million packets per second. The packet per second rate was not the largest we’ve ever seen. The largest we’ve ever seen was <a href="/mitigating-a-754-million-pps-ddos-attack-automatically">754 million packets per second</a>. That attack occurred in 2020, and we have yet to see anything larger.</p><p>This more recent attack, though, was unique in its bits per second rate. This was the largest network-layer DDoS attack we’ve seen in Q4. It peaked at 1.9 terabits per second and originated from a <a href="https://www.cloudflare.com/learning/ddos/glossary/mirai-botnet/">Mirai botnet</a>. It was a multi-vector attack, meaning it combined multiple attack methods. Some of those methods included UDP fragments flood, UDP/Echo flood, SYN Flood, ACK Flood, and TCP malformed flags.</p><p>This attack targeted a known European Cloud Provider and originated from over 18 thousand unique IP addresses that are assumed to be <a href="https://www.cloudflare.com/learning/ddos/glossary/ip-spoofing/">spoofed</a>. It was automatically detected and mitigated by Cloudflare’s defenses.</p><p>This goes to show that even the largest attacks end very quickly. Previous large attacks we’ve seen ended within seconds — underlining the need for an in-line automated defense system. Though still rare, attacks in the terabit range are becoming more and more prominent.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/10QBHlFJPubkFIG1R2uPf1/06c522bfa3aca7713d823d44d9f6c002/pasted-image-0--17-.png" />
            
            </figure><p>1.9 Terabit per second Mirai DDoS attacks</p><p>The use of Mirai-variant botnets is still very common. In Q4, almost 3% of all attacks originate from Mirai. Though, of all attack methods, DNS-based attacks remain the attackers’ favorite. Together, DNS Floods and DNS Amplification attacks account for almost 53% of all attacks in Q4. <a href="https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/">SYN Flood</a> follows in second and <a href="https://www.cloudflare.com/learning/ddos/udp-flood-ddos-attack/">UDP floods</a> in third. We’ll cover the two DNS attack types here, and you can visit the hyperlinks to learn more about UDP and SYN floods in our Learning Center.</p>
    <div>
      <h3>DNS floods and amplification attacks</h3>
      <a href="#dns-floods-and-amplification-attacks">
        
      </a>
    </div>
    <p>DNS floods and DNS amplification attacks both exploit the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a>, but they operate differently. DNS is like a phone book for the Internet, translating human-friendly domain names like "<a href="http://www.cloudflare.com">www.cloudflare.com</a>" into numerical IP addresses that computers use to identify each other on the network.</p><p>Simply put, DNS-based DDoS attacks comprise the method computers and servers used to identify one another to cause an outage or disruption, without actually ‘taking down’ a server. For example, a server may be up and running, but the DNS server is down. So clients won't be able to connect to it and will experience it as an outage.</p><p>A <b>DNS flood</b> attack bombards a DNS server with an overwhelming number of DNS queries. This is usually done using a <a href="https://www.cloudflare.com/learning/ddos/what-is-a-ddos-botnet/">DDoS botnet</a>. The sheer volume of queries can overwhelm the DNS server, making it difficult or impossible for it to respond to legitimate queries. This can result in the aforementioned service disruptions, delays or even an outage for those trying to access the websites or services that rely on the targeted DNS server.</p><p>On the other hand, a <b>DNS amplification</b> attack involves sending a small query with a spoofed IP address (the address of the victim) to a DNS server. The trick here is that the DNS response is significantly larger than the request. The server then sends this large response to the victim's IP address. By exploiting open DNS resolvers, the attacker can amplify the volume of traffic sent to the victim, leading to a much more significant impact. This type of attack not only disrupts the victim but also can congest entire networks.</p><p>In both cases, the attacks exploit the critical role of DNS in network operations. Mitigation strategies typically include securing DNS servers against misuse, implementing rate limiting to manage traffic, and filtering DNS traffic to identify and block malicious requests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5UolIGOVG2jx7ST3CeoF0j/2b78eeb7eb633c49394390086a641dc5/pasted-image-0--18--1.png" />
            
            </figure><p>Top attack vectors</p><p>Amongst the emerging threats we track, we recorded a 1,161% increase in ACK-RST Floods as well as a 515% increase in CLDAP floods, and a 243% increase in SPSS floods, in each case as compared to last quarter. Let’s walk through some of these attacks and how they’re meant to cause disruption.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ac5D51H55vXbKPbWnSGEx/c4c12e4aadc06d6843f7d4c33b60679f/pasted-image-0--19-.png" />
            
            </figure><p>Top emerging attack vectors</p>
    <div>
      <h3>ACK-RST floods</h3>
      <a href="#ack-rst-floods">
        
      </a>
    </div>
    <p>An ACK-RST Flood exploits the <a href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/">Transmission Control Protocol (TCP)</a> by sending numerous ACK and RST packets to the victim. This overwhelms the victim's ability to process and respond to these packets, leading to service disruption. The attack is effective because each ACK or RST packet prompts a response from the victim’s system, consuming its resources. ACK-RST Floods are often difficult to filter since they mimic legitimate traffic, making detection and mitigation challenging.</p>
    <div>
      <h3>CLDAP floods</h3>
      <a href="#cldap-floods">
        
      </a>
    </div>
    <p>CLDAP (Connectionless Lightweight Directory Access Protocol) is a variant of LDAP (Lightweight Directory Access Protocol). It's used for querying and modifying directory services running over IP networks. CLDAP is connectionless, using UDP instead of TCP, making it faster but less reliable. Because it uses UDP, there’s no handshake requirement which allows attackers to spoof the IP address thus allowing attackers to exploit it as a reflection vector. In these attacks, small queries are sent with a spoofed source IP address (the victim's IP), causing servers to send large responses to the victim, overwhelming it. Mitigation involves filtering and monitoring unusual CLDAP traffic.</p>
    <div>
      <h3>SPSS floods</h3>
      <a href="#spss-floods">
        
      </a>
    </div>
    <p>Floods abusing the SPSS (Source Port Service Sweep) protocol is a network attack method that involves sending packets from numerous random or spoofed source ports to various destination ports on a targeted system or network. The aim of this attack is two-fold: first, to overwhelm the victim's processing capabilities, causing service disruptions or network outages, and second, it can be used to scan for open ports and identify vulnerable services. The flood is achieved by sending a large volume of packets, which can saturate the victim's network resources and exhaust the capacities of its firewalls and intrusion detection systems. To mitigate such attacks, it's essential to leverage in-line automated detection capabilities.</p>
    <div>
      <h2>Cloudflare is here to help - no matter the attack type, size, or duration</h2>
      <a href="#cloudflare-is-here-to-help-no-matter-the-attack-type-size-or-duration">
        
      </a>
    </div>
    <p>Cloudflare’s mission is to help build a better Internet, and we believe that a better Internet is one that is secure, performant, and available to all. No matter the attack type, the attack size, the attack duration or the motivation behind the attack, Cloudflare’s defenses stand strong. Since we pioneered <a href="/unmetered-mitigation">unmetered DDoS Protection in 2017</a>, we’ve made and kept our commitment to make enterprise-grade DDoS protection free for all organizations alike — and of course, without compromising performance. This is made possible by our <a href="/deep-dive-cloudflare-autonomous-edge-ddos-protection/">unique technology</a> and robust network architecture.</p><p>It’s important to remember that security is a process, not a single product or flip of a switch. Atop of our automated DDoS protection systems, we offer comprehensive bundled features such as <a href="https://developers.cloudflare.com/waf/">firewall</a>, <a href="https://developers.cloudflare.com/bots/">bot detection</a>, <a href="https://developers.cloudflare.com/api-shield/">API protection</a>, and <a href="https://developers.cloudflare.com/cache/">caching</a> to bolster your defenses. Our multi-layered approach optimizes your security posture and minimizes potential impact. We’ve also put together a <a href="https://developers.cloudflare.com/ddos-protection/best-practices/respond-to-ddos-attacks/">list of recommendations</a> to help you optimize your defenses against DDoS attacks, and you can follow our step-by-step wizards to <a href="https://developers.cloudflare.com/learning-paths/application-security/">secure your applications</a> and <a href="https://developers.cloudflare.com/learning-paths/prevent-ddos-attacks/">prevent DDoS attacks</a>. And, if you’d like to benefit from our easy to use, best-in-class protection against DDoS and other attacks on the Internet, you can sign up — for free! — at <a href="https://www.cloudflare.com/plans/">cloudflare.com</a>. If you’re under attack, register or call the <a href="https://www.cloudflare.com/under-attack-hotline/">cyber emergency hotline number</a> for a rapid response.</p> ]]></content:encoded>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[DDoS Reports]]></category>
            <category><![CDATA[Insights]]></category>
            <category><![CDATA[Trends]]></category>
            <category><![CDATA[Black Friday]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[China]]></category>
            <category><![CDATA[Israel]]></category>
            <guid isPermaLink="false">78R5sLaHmAgKy9ndDVHkN7</guid>
            <dc:creator>Omer Yoachimik</dc:creator>
            <dc:creator>Jorge Pacheco</dc:creator>
        </item>
        <item>
            <title><![CDATA[Using DNS to estimate the worldwide state of IPv6 adoption]]></title>
            <link>https://blog.cloudflare.com/ipv6-from-dns-pov/</link>
            <pubDate>Thu, 14 Dec 2023 15:05:52 GMT</pubDate>
            <description><![CDATA[ In the last decade, IPv6 adoption on the client side went from under 1% to somewhere in the high 30 to low 40 percent, depending on who’s reporting, but there’s also the other end of the equation: the server side ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7lHuJcdFLT7jwhT2jjmVcF/997e67f3e714f3019d109c7c97c85ea7/image2-3.png" />
            
            </figure><p>In order for one device to talk to other devices on the Internet using the aptly named <a href="https://en.wikipedia.org/wiki/Internet_Protocol">Internet Protocol</a> (IP), it must first be assigned a unique numerical address. What this address looks like depends on the version of IP being used: <a href="https://en.wikipedia.org/wiki/Internet_Protocol_version_4">IPv4</a> or <a href="https://en.wikipedia.org/wiki/IPv6">IPv6</a>.</p><p>IPv4 was first deployed in 1983. It’s the IP version that gave birth to the modern Internet and still remains dominant today. IPv6 can be traced back to as early as 1998, but only in the last decade did it start to gain significant traction — rising from less than 1% to somewhere between 30 and 40%, depending on who’s reporting and what and how they’re measuring.</p><p>With the growth in connected devices far exceeding the number of IPv4 addresses available, <a href="/amazon-2bn-ipv4-tax-how-avoid-paying/">and its costs rising</a>, the much larger address space provided by IPv6 should have made it the dominant protocol by now. However, as we’ll see, this is not the case.</p><p>Cloudflare has been a strong advocate of IPv6 <a href="https://www.cloudflare.com/press-releases/2011/cloudflare-announces-the-automatic-ipv6-gateway/">for many years</a> and, through <a href="https://radar.cloudflare.com/">Cloudflare Radar</a>, we’ve been closely following IPv6 adoption across the Internet. At three years old, Radar is still a relatively recent platform. To go further back in time, we can briefly turn to our friends at <a href="https://stats.labs.apnic.net/ipv6/XA">APNIC</a><sup>1</sup> — one of the five Regional Internet Registries (<a href="https://en.wikipedia.org/wiki/Regional_Internet_registry">RIRs</a>). Through their data, going back to 2012, we can see that IPv6 experienced a period of seemingly exponential growth until mid-2017, after which it entered a period of linear growth that’s still ongoing:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/37xEnfcqqKABkXWhnETnXK/30e3c5afa1d14896deb307d028785913/pasted-image-0--7--2.png" />
            
            </figure><p>IPv6 adoption is slowed down by the lack of compatibility between both protocols — devices must be assigned both an IPv4 <i>and</i> an IPv6 address — along with the fact that virtually all devices on the Internet still support IPv4. Nevertheless, IPv6 is critical for the future of the Internet, and continued effort is required to increase its deployment.</p><p>Cloudflare Radar, like APNIC and most other sources today, publishes numbers that primarily reflect the extent to which Internet Service Providers (ISPs) have deployed IPv6: the <i>client side</i>. It’s a very important angle, and one that directly impacts end users, but there’s also the other end of the equation: the <i>server side</i>.</p><p>With this in mind, we invite you to follow us on a quick experiment where we aim for a glimpse of server side IPv6 adoption, and how often clients are actually (or likely) able to talk to servers over IPv6. We’ll rely on DNS for this exploration and, as they say, the results may surprise you.</p>
    <div>
      <h3>IPv6 Adoption on the Client Side (from HTTP)</h3>
      <a href="#ipv6-adoption-on-the-client-side-from-http">
        
      </a>
    </div>
    <p>By the end of October 2023, from Cloudflare’s <a href="https://radar.cloudflare.com/adoption-and-usage?dateStart=2023-08-01&amp;dateEnd=2023-10-31">perspective</a>, IPv6 adoption across the Internet was at roughly <b>36%</b> of all traffic, with slight variations depending on the time of day and day of week. When excluding bots the estimate goes up to just over 46%, while excluding humans pushes it down close to 24%. These numbers refer to the share of HTTP requests served over IPv6 <a href="https://developers.cloudflare.com/radar/glossary/#ipv6-adoption">across all IPv6-enabled content</a> (the default setting).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/VZUSDQeWI7eZ8TQheZ6lP/7ef2aac52c4fd62912f8d83f45fa6f7f/pasted-image-0-2.png" />
            
            </figure><p>For this exercise, what matters most is the number for both humans <i>and</i> bots. There are many reasons for the adoption gap between both kinds of traffic — from varying levels of IPv6 support in the plethora of client software used, to varying levels of IPv6 deployment inside the many networks where traffic comes from, to the varying size of such networks, etc. — but that’s a rabbit hole for another day. If you’re curious about the numbers for a particular country or network, you can find them on <a href="https://radar.cloudflare.com/adoption-and-usage/">Cloudflare Radar</a> and in our <a href="https://radar.cloudflare.com/year-in-review/2023#ipv6-adoption">Year in Review</a> report for 2023.</p>
    <div>
      <h3>It Takes Two to Dance</h3>
      <a href="#it-takes-two-to-dance">
        
      </a>
    </div>
    <p>You, the reader, might point out that measuring the client side of the client-server equation only tells half the story: for an IPv6-capable client to establish a connection with a server via IPv6, the server must also be IPv6-capable.</p><p>This raises two questions:</p><ol><li><p>What’s the extent of IPv6 adoption on the server side?</p></li><li><p>How well does IPv6 adoption on the client side align with adoption on the server side?</p></li></ol><p>There are several possible answers, depending on whether we’re talking about users, devices, bytes transferred, and so on. We’ll focus on <i>connections</i> (it will become clear why in a moment), and the combined question we’re asking is:</p><blockquote><p><i>How often can an IPv6-capable client use IPv6 when connecting to servers on the Internet, under typical usage patterns?</i></p></blockquote><p>Typical usage patterns include people going about their day visiting some websites more often than others or automated clients calling APIs. We’ll turn to DNS to get this perspective.</p>
    <div>
      <h3>Enter DNS</h3>
      <a href="#enter-dns">
        
      </a>
    </div>
    <p>Before a client can attempt to establish a connection with a server by name, using either the classic IPv4 protocol or the more modern IPv6, it must look up the server’s IP address in the <a href="https://en.wikipedia.org/wiki/Telephone_directory">phonebook</a> of the Internet, the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a>.</p><p>Looking up a hostname in DNS <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">is a recursive process</a>. To find the IP address of a server, the domain hierarchy (the dot-separated components of a server’s name) must be followed across several DNS authoritative servers until one of them returns the desired response<sup>2</sup>. Most clients, however, don’t do this directly and instead ask an intermediary server called a <a href="https://www.cloudflare.com/learning/dns/what-is-recursive-dns/">recursive resolver</a> to do it for them. Cloudflare operates one such recursive resolver that anyone can use: <a href="https://one.one.one.one/dns/">1.1.1.1</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7osVQH3ASy6i4puJ0UBUJc/192ecf4472c1917ff7ed4273df0bd0c1/pasted-image-0--1--2.png" />
            
            </figure><p>As a simplified example, when a client asks 1.1.1.1 for the IP address where “<a href="http://www.example.com”">www.example.com”</a> lives, 1.1.1.1 will go out and ask the DNS root servers<sup>3</sup> about “.com”, then ask the .com DNS servers about “example.com”, and finally ask the example.com DNS servers about “www.example.com”, which has direct knowledge of it and answers with an IP address. To make things faster for the next client asking a similar question, 1.1.1.1 caches (remembers for a while) both the final answer and the steps in between.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4jugLCRvQVB2NUC0i3qMY/8b12ffa0a9eddb76ba40dbf7051c76c7/pasted-image-0--2--3.png" />
            
            </figure><p>This means 1.1.1.1 is in a very good position to count how often clients try to look up IPv4 addresses (A-type queries) <i>vs.</i> how often they try to look up IPv6 addresses (AAAA-type queries), covering most of the observable Internet.</p><p>But how does a client know when to ask for a server’s IPv4 address or its IPv6 address?</p><p>The short answer is that clients with IPv6 available to them just ask for both — doing separate <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/">A</a> and <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-aaaa-record/">AAAA</a> lookups for every server they wish to connect to. These IPv6-capable clients will prioritize connecting over IPv6 when they get a non-empty AAAA answer, whether they also get a non-empty A answer (which they almost always get, as we’ll see). The algorithm driving this preference for modernity is called <a href="https://en.wikipedia.org/wiki/Happy_Eyeballs">Happy Eyeballs</a>, if you’re interested in the details.</p><p>We’re now ready to start looking at some actual data…</p>
    <div>
      <h3>IPv6 Adoption on the Client Side (from DNS)</h3>
      <a href="#ipv6-adoption-on-the-client-side-from-dns">
        
      </a>
    </div>
    <p>The first step is establishing a baseline by measuring client IPv6 deployment from 1.1.1.1’s perspective and comparing it with the numbers from HTTP requests that we started with.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/MDeID398Kzy28RT52PMFH/a2553d58d669cbd46f284ca909620c4b/pasted-image-0--3--2.png" />
            
            </figure><p>It’s tempting to count how often clients connect to 1.1.1.1 using IPv6, but the results are misleading for a couple of reasons, the strongest one being hidden in plain sight: 1.1.1.1 is the most memorable <b>address</b> of the set of IPv4 and IPv6 addresses that clients can use to perform DNS lookups through the 1.1.1.1 <b>service</b>. Ideally, IPv6-capable clients using 1.1.1.1 as their recursive resolver should have all four of the following IP addresses configured, not just the first two:</p><ul><li><p><b>1.1.1.1</b> (IPv4)</p></li><li><p><b>1.0.0.1</b> (IPv4)</p></li><li><p><b>2606:4700:4700::1111</b> (IPv6)</p></li><li><p><b>2606:4700:4700::1001</b> (IPv6)</p></li></ul><p>But, when manual configuration is involved4, humans find IPv6 addresses less memorable than IPv4 addresses and are less likely to configure them, viewing the IPv4 addresses as enough.</p><p>A related, but less obvious, confounding factor is that many IPv6-capable clients will still perform DNS lookups over IPv4 even when they have 1.1.1.1’s IPv6 addresses configured, as spreading lookups over the available addresses is a popular default option.</p><p>A more sensible approach to assess IPv6 adoption from DNS client activity is calculating the percentage of AAAA-type queries over the total amount of A-type queries, assuming IPv6-clients always perform both<sup>5</sup>, as mentioned earlier.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ShMNUPncOEfKH8OCGoaKI/96c261719b4916f8fac67e7ce1015673/pasted-image-0--4--2.png" />
            
            </figure><p>Then, from 1.1.1.1’s perspective, IPv6 adoption on the <b>client side</b> is estimated at <b>30.5%</b> by query volume. This is a bit under what we observed from HTTP traffic over the same time period (35.9%) but such a difference between two different perspectives is not unexpected.</p>
    <div>
      <h3>A Note on TTLs</h3>
      <a href="#a-note-on-ttls">
        
      </a>
    </div>
    <p>It’s not only recursive resolvers that cache DNS responses, most DNS clients have their own local caches as well. Your web browser, operating system, and even your home router, keep answers around hoping to speed up subsequent queries.</p><p>How long each answer remains in cache depends on the <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/">time-to-live</a> (TTL) field sent back with DNS records. If you’re familiar with DNS, you might be wondering if A and AAAA records have similar TTLs. If they don’t, we may be getting fewer queries for just one of these two types (because it gets cached for longer at the client level), biasing the resulting adoption figures.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3qY93uvMa7SIV80OxTPBVS/db694e99691dfa04825897c69f6f3f14/pasted-image-0--5--2.png" />
            
            </figure><p>The pie charts here break down the minimum TTLs sent back by 1.1.1.1 in response to A and AAAA queries<sup>6</sup>. There is some difference between both types, but the difference is very small.</p>
    <div>
      <h3>IPv6 Adoption on the Server Side</h3>
      <a href="#ipv6-adoption-on-the-server-side">
        
      </a>
    </div>
    <p>The following graph shows how often A and AAAA-type queries get non-empty responses, shedding light on <b>server side</b> IPv6 adoption and getting us closer to the answer we’re after:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aYzrPLYLFqxH9ublQtOCm/045cf3e5a35bc208775fd531466234e6/pasted-image-0--6--2.png" />
            
            </figure><p>IPv6 adoption by servers is estimated at <b>43.3%</b> by query volume, noticeably higher than what was observed for clients.</p>
    <div>
      <h3>How Often Both Sides Swipe Right</h3>
      <a href="#how-often-both-sides-swipe-right">
        
      </a>
    </div>
    <p>If 30.5% of IP address lookups handled by 1.1.1.1 could make use of an IPv6 address to connect to their intended destinations, but only 43.3% of those lookups get a non-empty response, that can give us a pretty good basis for how often IPv6 connections are made between client and server — roughly <b>13.2%</b> of the time.</p>
    <div>
      <h3>The Potential Impact of Popular Domains</h3>
      <a href="#the-potential-impact-of-popular-domains">
        
      </a>
    </div>
    <p>IPv6 server side adoption measured by query volume for the domains in Radar’s <a href="https://radar.cloudflare.com/domains">Top 100</a> list is 60.8%. If we exclude these domains from our overall calculations, the previous 13.2% figure drops to 8%. This is a significant difference, but not unexpected, as the Top 100 domains make up over 55% of all A and AAAA queries to 1.1.1.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6cJtOVRwoLQluKLLd0QVzv/38e0caab4e079e60a9b41f4b8a80e78e/pasted-image-0--8--2.png" />
            
            </figure><p>If just a few more of these highly popular domains were to deploy IPv6 today, observed adoption would noticeably increase and, with it, the chance of IPv6-capable clients establishing connections using IPv6.</p>
    <div>
      <h3>Closing Thoughts</h3>
      <a href="#closing-thoughts">
        
      </a>
    </div>
    <p>Observing the extent of IPv6 adoption across the Internet can mean different things:</p><ul><li><p>Counting <b>users</b> with IPv6-capable Internet access;</p></li><li><p>Counting IPv6-capable <b>devices</b> or software on those devices (clients and/or servers);</p></li><li><p>Calculating the amount of <b>traffic</b> flowing through IPv6 connections, measured in bytes;</p></li><li><p>Counting the fraction of <b>connections</b> (or individual <b>requests</b>) over IPv6.</p></li></ul><p>In this exercise we chose to look at connections and requests. Keeping in mind that the underlying reality can only be truly understood by considering several different perspectives, we saw three different IPv6 adoption figures:</p><ul><li><p><b>35.9%</b> (client side) when counting HTTP requests served from Cloudflare's CDN;</p></li><li><p><b>30.5%</b> (client side) when counting A and AAAA-type DNS queries handled by <a href="https://one.one.one.one/dns/">1.1.1.1</a>;</p></li><li><p><b>43.3%</b> (server side) of positive responses to AAAA-type DNS queries, also from 1.1.1.1.</p></li></ul><p>We combined the <i>client side</i> and <i>server side</i> figures from the DNS perspective to estimate how often connections to third-party servers are likely to be established over IPv6 rather than IPv4: just <b>13.2%</b> of the time.</p><p>To improve on these numbers, ISPs, cloud and hosting providers, and corporations alike must increase the rate at which they make IPv6 available for devices in their networks. But large websites and content sources also have a critical role to play in enabling IPv6-capable clients to use IPv6 more often, as <b>39.2%</b> of queries for domains in the Radar <a href="https://radar.cloudflare.com/domains">Top 100</a> (representing over half of all A and AAAA queries to 1.1.1.1) are still limited to IPv4-only responses.</p><p>On the road to full IPv6 adoption, the Internet isn’t quite there yet. But continued effort from all those involved can help it to continue to move forward, and perhaps even accelerate progress.</p><p><i>On the server side, Cloudflare has been helping with this worldwide effort for many years by providing free </i><a href="https://developers.cloudflare.com/support/network/understanding-and-configuring-cloudflares-ipv6-support/"><i>IPv6 support</i></a><i> for all domains. On the client side, the </i><a href="https://1.1.1.1/"><i>1.1.1.1 app</i></a><i> automatically enables your device for IPv6 even if your ISP doesn’t provide any IPv6 support. And, if you happen to manage an IPv6-only network, 1.1.1.1’s </i><a href="https://developers.cloudflare.com/1.1.1.1/infrastructure/ipv6-networks/"><i>DNS64 support</i></a><i> also has you covered.</i></p><p>***</p><p><sup>1</sup>Cloudflare’s public DNS resolver (1.1.1.1) is operated in partnership with APNIC. You can read more about it in the original <a href="/dns-resolver-1-1-1-1/">announcement blog post</a> and in 1.1.1.1’s <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/">privacy policy</a>.</p><p><sup>2</sup>There’s more information on how DNS works in the “<a href="https://www.cloudflare.com/learning/dns/what-is-dns/">What is DNS?</a>” section of our website. If you’re a hands-on learner, we suggest you take a look at Julia Evans’ “<a href="https://messwithdns.net/">mess with dns</a>”.</p><p><sup>3</sup>Any recursive resolver will already know the IP addresses of the <a href="https://www.iana.org/domains/root/servers">13 root servers</a> beforehand. Cloudflare also participates at the topmost level of DNS by <a href="/f-root/">providing anycast service to the E and F-Root instances</a>, which means 1.1.1.1 doesn’t need to go far for that first lookup step.</p><p><sup>4</sup>When using the <a href="https://one.one.one.one/">1.1.1.1 app</a>, all four IP addresses are configured automatically.</p><p><sup>5</sup>For simplification, we assume the amount of IPv6-only clients is still negligibly small. It’s a reasonable assumption in general, and other datasets available to us confirm it.</p><p><sup>6</sup>1.1.1.1, like other recursive resolvers, returns adjusted TTLs: the record’s original TTL minus the number of seconds since the record was last cached. Empty A and AAAA answers get cached for the amount of time defined in the domain’s <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-soa-record/">Start of Authority</a> (SOA) record, as specified by RFC 2308.</p> ]]></content:encoded>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[IPv6]]></category>
            <category><![CDATA[DNS]]></category>
            <guid isPermaLink="false">59O01jCNT1TaLCjWJaDu5m</guid>
            <dc:creator>Carlos Rodrigues</dc:creator>
        </item>
        <item>
            <title><![CDATA[Latest copyright decision in Germany rejects blocking through global DNS resolvers]]></title>
            <link>https://blog.cloudflare.com/latest-copyright-decision-in-germany-rejects-blocking-through-global-dns-resolvers/</link>
            <pubDate>Tue, 05 Dec 2023 06:00:08 GMT</pubDate>
            <description><![CDATA[ A recent decision from the Higher Regional Court of Cologne in Germany marked important progress for Cloudflare and the Internet in pushing back against misguided attempts to address online copyright infringement through the DNS system ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49rzRfCpwzNllXNKH3M1aY/a0fed6ceaf6a67f21ba013bdfc3dfcaf/Untitled--2--1.png" />
            
            </figure><p>A recent decision from the Higher Regional Court of Cologne in Germany marked important progress for Cloudflare and the Internet in pushing back against misguided attempts to address online copyright infringement through the DNS system. In early November, the Court in Universal v. Cloudflare issued its decision rejecting a request to require public DNS resolvers like Cloudflare’s 1.1.1.1. to block websites based on allegations of online copyright infringement. That’s a position we’ve long advocated, because blocking through public resolvers is ineffective and disproportionate, and it does not allow for much-needed transparency as to what is blocked and why.</p>
    <div>
      <h2>What is a DNS resolver?</h2>
      <a href="#what-is-a-dns-resolver">
        
      </a>
    </div>
    <p>To see why the Universal decision matters, it’s important to understand what a public DNS resolver is, and why it’s not a good place to try to moderate content on the Internet.</p><p>The DNS system translates website names to IP addresses, so that Internet requests can be routed to the correct location. At a high-level, the DNS system consists of two parts. On one side sit a series of nameservers (Root, TLD, and Authoritative) that together store information mapping domain names to IP addresses; on the other side sit DNS resolvers (also called recursive resolvers), which query the nameservers to answer where a particular website is located. The nameservers are like the telephone book listing names and phone numbers, while recursive resolvers are like the phone operator looking up a number.</p><p>While authoritative nameservers are managed and used directly by website operators, recursive resolvers are selected and used by those browsing the Internet. If you’re reading this at work, you may have navigated to this webpage using a DNS resolver chosen by your employer. If you’re reading it on a personal device at home, it’s possible you used your ISP’s default resolver. Alternatively, with a little technical know-how, you might have built your own DNS resolver and run it yourself or you might have chosen to use one of many public DNS resolvers available on the Internet.</p><p>Cloudflare <a href="/announcing-1111/">launched its public DNS resolver, 1.1.1.1</a> in April 2018, because we wanted to provide a fast and private way to navigate the Internet. While Cloudflare’s resolver regularly <a href="https://www.dnsperf.com/#!dns-resolvers">scores as the fastest around</a>, it is one of a number of options. Other well known public resolvers include Google’s 8.8.8.8, Cisco’s OpenDNS, and Quad9. Users might choose a public DNS resolver for privacy reasons, for added safety or security, or simply because they want the best performing option available. Whatever their reason, individuals can switch their DNS resolver at any time.</p>
    <div>
      <h2>What does it mean to block through a DNS resolver?</h2>
      <a href="#what-does-it-mean-to-block-through-a-dns-resolver">
        
      </a>
    </div>
    <p>Like other links in the Internet connection chain, DNS resolvers have sometimes been used as a way to try to prevent access to content. Blocking at the resolver level is like removing a listing from a phone book. By refusing to return an IP address in response to requests for a particular website, a DNS resolver can make it appear like an entire website has effectively disappeared from the Internet to an individual using that resolver. Unlike removing the content at the hosting provider, however, the content is still accessible online, just a bit harder to find. Much as having an unlisted phone number didn’t prevent a phone number from being found through other channels and called, a block in a resolver doesn’t preclude an Internet user from navigating to a website in a myriad of other ways. A user can use an alternative resolver, build their own resolver, or simply type in the website’s IP address.</p><p>Because DNS returns IP addresses for entire domains, blocking through DNS resolvers can only be done at a domain-wide level; it is not possible to block specific pieces of content, individual webpages, or even subdomains without blocking the entire website. So a blocking order seeking to remove a copyrighted image through DNS blocking — especially for a website with many contributors or user-generated content — would result in blocking all content on the entire domain. That means that unless the <i>entire</i> website is a problem, applying a block through DNS is likely to block access to content that has not been identified by a court as infringing or otherwise problematic.</p><p>The way DNS blocking works — declining to return an IP address — also means there is no explanation provided to an individual as to why they were unable to access the website at issue. There is no notice or transparency.  Although there have been proposals for protocols that would allow an error code to be returned in such cases, nothing has yet been implemented.</p>
    <div>
      <h2>Distinguishing public and private resolvers</h2>
      <a href="#distinguishing-public-and-private-resolvers">
        
      </a>
    </div>
    <p>Internet Service Providers (ISPs) located in particular jurisdictions have sometimes instituted blocks through their DNS resolvers as one way to try to comply with orders that apply in that jurisdiction directing them to make certain websites inaccessible to their users. For example, a German ISP that serves only German users might have its DNS resolver refuse to return an IP address for a website when provided an order by a German court to block that entire site.</p><p>Rightsholders have recently sought to extend such blocking to public DNS resolvers. But public DNS resolvers aren’t the same as DNS resolvers operated by a local ISP. Public DNS resolvers typically operate the same way around the globe. That means that if a public resolver applied the block the way an ISP does, it would apply everywhere. So the German court ordering the block would be dictating what information is available to the resolver’s users in India, the United States, Argentina and every other country the resolver is used. Attempting to apply blocks in a more geographically targeted way based on the location of individual resolver users raises serious technical hurdles not faced by local ISPs, and it also raises privacy issues worth taking seriously.</p><p>Cloudflare built 1.1.1.1 to allow Internet users an option for DNS resolution that would be fast and wouldn’t collect their personal information.  Many DNS operators have historically sold information about users based on the websites they have queried – 1.1.1.1 is designed to prevent such information from ever being collected. Blocking orders directed at public resolvers would require the collection of information about where the requests are coming from in order to limit these negative impacts while demonstrating compliance. That would be bad for personal privacy and bad for the Internet.</p><p>These core features of public resolvers present fundamental obstacles to using such resolvers to block content.</p>
    <div>
      <h2>Why blocking through public resolvers is not the solution to online abuse</h2>
      <a href="#why-blocking-through-public-resolvers-is-not-the-solution-to-online-abuse">
        
      </a>
    </div>
    <p>Consider what you would expect if a website you were trying to visit had been blocked due to legal order. First, you would expect that the blocked content is genuinely prohibited by law. You would not expect an entire website to be unavailable merely because some portion of the website violated copyright, and you also would not expect a website to be blocked to a visitor in one country by virtue of an order issued in an entirely different country on the other side of the world.</p><p>Second, you would expect to be told why the website is unavailable. Rather than a blank screen or no response, you would want a message explaining that the website has been ordered blocked, and identifying the legal authority for that action.</p><p>Finally, you would expect that whatever blocking mechanism was instituted is actually effective. We should not be changing fundamental ways about how the Internet operates if it will not even have the intended effect.</p><p>Blocking through public resolvers fails all of these requirements. As discussed above, it cannot be applied narrowly to particular content or particular geographies. Unlike ISP blocking that is necessarily limited to the geographic region in which the ISP operates, blocking through global public resolvers can only be implemented in a way that extends across borders to jurisdictions that might never have sought to block the same content. That is, unless we collect more personal information than we need to about the user.  </p><p>It’s also not transparent. A user does not know that they have been blocked from seeing content by a court order. They only know that they cannot access the website.That makes it hard for the public to hold government officials accountable for errors or overblocking.  </p><p>And it’s not even effective. Traditionally, website operators or hosting providers are ordered to remove infringing or illegal content, which is an effective way to make sure that information is no longer available. A DNS block works only as long as the individual continues to use the resolver, and the content remains available and will become accessible again as soon as they switch to another resolver, or build their own.</p>
    <div>
      <h2>The court in Universal rejects DNS blocking</h2>
      <a href="#the-court-in-universal-rejects-dns-blocking">
        
      </a>
    </div>
    <p>Despite these problems, some rightsholders have insisted that public resolvers can be ordered to block websites based on online infringement. Cloudflare, along with others like Quad9 and Google, have pushed back. While there have been a limited number of preliminary rulings on this issue, the Higher Regional Court’s decision in Universal marks the first time that an appellate court in Europe has ruled on public resolver blocking in the main proceedings.</p><p>Originally filed in 2019, the Universal case was one of the first attempts by a rightsholder to obtain an order requiring blocking through a public DNS resolver. The case concerns an allegedly copyright infringing music album posted on a website that, at the time the case was filed, was using Cloudflare’s pass-through security and CDN services. The Cologne Regional Court issued a preliminary ruling directing Cloudflare to block the website through both our CDN service and our public resolver. Cloudflare has no mechanism for blocking websites through 1.1.1.1., and we have never blocked a website through our public resolver. But Cloudflare did take steps to block access to the website in Germany through our CDN and pass-through security service. The website subsequently went offline and is no longer available on the Internet. Recognizing the importance of the underlying legal principles at stake, we nonetheless continued to litigate the case.</p><p>The Higher Regional Court’s recent decision makes clear that public DNS resolvers are not an appropriate tool for seeking to address online infringement, or moderate content more generally. The court explained that “with the DNS resolver, the defendant provides a tool that is accessible to everyone free of charge, is in the public interest and is approved, and which participates purely passively, automatically and neutrally in the connection of Internet domains.” It further noted that blocking through a public resolver is not effective, because individuals can easily change resolvers.</p><p>Importantly, the court held that DNS services are protected by the EU’s Digital Services Act (DSA), which was enacted last year. Like the e-Commerce Directive before it, the DSA recognizes that different types of services have different abilities to address content issues, and it distinguishes “mere conduit” and “caching” services from “hosting” services in their roles in addressing infringing content. Helpfully, the DSA expressly lists DNS and CDN services as non-hosting services subject to different obligations than hosting services. The Higher Regional Court recognized that DNS resolvers are entitled to the same protections from liability as other “mere conduits,”  and it rejected the plaintiff's request for DNS blocking in this case.</p>
    <div>
      <h2>The battle continues</h2>
      <a href="#the-battle-continues">
        
      </a>
    </div>
    <p>While the Higher Regional Court’s decision represents important progress on the DNS issue, the fight over how best to address online infringement continues. Rightsholders have filed lawsuits against other DNS providers and in other jurisdictions seeking similar blocking orders. We will continue to advocate against that outcome, because we think it is bad for the Internet. We hope that the Higher Regional Court’s reasoning on the DNS issue will help persuade other courts.</p><p>At the same time, while the Universal decision on DNS is the headline, there were other parts of the opinion that raise concerns. The court affirmed the lower court judgment requiring Cloudflare to block access to the website at issue through our CDN and pass-through security service. That decision has no immediate practical effect, because the website at issue is no longer available online and Cloudflare was already in compliance with the judgment. But to the extent the decision can be read to imply a broader obligation by pass-through security and CDN services to address online content, that is inconsistent with the nature of our services and with the DSA, which expressly identifies CDN services as among the caching services entitled to a liability privilege. Cloudflare therefore plans to appeal that aspect of the decision.</p><p>We appreciate the efforts of thoughtful judges to learn about how the Internet works and make sure their decisions are consistent with the larger public benefits of a well-functioning Internet, including security, reliability, and privacy. This decision marks further progress in Cloudflare’s fight to ensure that efforts to address online infringement are compatible with the technical nature of various Internet services, and with important legal and human rights principles around due process, transparency, and proportionality. We will continue that battle both through public advocacy and, as necessary, through litigation, as one more part of helping build a better Internet.</p> ]]></content:encoded>
            <category><![CDATA[Policy & Legal]]></category>
            <category><![CDATA[Germany]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <guid isPermaLink="false">64pT9XB6L1h5fl9tJUSABd</guid>
            <dc:creator>Patrick Nemeroff</dc:creator>
        </item>
        <item>
            <title><![CDATA[Connection coalescing with ORIGIN Frames: fewer DNS queries, fewer connections]]></title>
            <link>https://blog.cloudflare.com/connection-coalescing-with-origin-frames-fewer-dns-queries-fewer-connections/</link>
            <pubDate>Mon, 04 Sep 2023 13:00:51 GMT</pubDate>
            <description><![CDATA[ In this blog we’re going to take a closer look at “connection coalescing”, with specific focus on manage it at a large scale ]]></description>
            <content:encoded><![CDATA[ <p><i>This blog reports and summarizes the contents of a Cloudflare </i><a href="https://research.cloudflare.com/publications/Singanamalla2022/"><i>research paper</i></a><i> which appeared at the ACM </i><a href="https://conferences.sigcomm.org/imc/2022/program/"><i>Internet Measurement Conference</i></a><i>, that measures and prototypes connection coalescing with ORIGIN Frames.</i></p><p>Some readers might be surprised to hear that a single visit to a web page can cause a browser to make tens, sometimes even hundreds, of web connections. Take this very blog as an example. If it is your first visit to the Cloudflare blog, or it has been a while since your last visit, your browser will make multiple connections to render the page. The browser will make DNS queries to find IP addresses corresponding to blog.cloudflare.com and then subsequent requests to retrieve any necessary subresources on the web page needed to successfully render the complete page. How many? Looking below, at the time of writing, there are 32 different hostnames used to load the Cloudflare Blog. That means 32 DNS queries and <i>at least</i> 32 TCP (or QUIC) connections, unless the client is able to reuse (or coalesce) some of those connections.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5iVEUq8ZQ8HsPbg1FAP5jq/de5899ea338a7628e732558caf2f8710/Screenshot-2023-09-03-at-18.34.41.png" />
            
            </figure><p>Each new web connection not only introduces additional load on a server's processing capabilities – potentially leading to scalability challenges during peak usage hours – but also exposes client metadata to the network, such as the plaintext hostnames being accessed by an individual. Such meta information can potentially reveal a user’s online activities and browsing behaviors to on-path network adversaries and eavesdroppers!</p><p>In this blog we’re going to take a closer look at “connection coalescing”. Since our initial look at <a href="/connection-coalescing-experiments/">IP-based coalescing in 2021</a>, we have done further large-scale measurements and modeling across the Internet, to understand and predict if and where coalescing would work best. Since IP coalescing is difficult to manage at large scale, last year we implemented and experimented with a promising standard called the <a href="https://datatracker.ietf.org/doc/rfc8336/">HTTP/2 ORIGIN Frame extension</a> that we leveraged to coalesce connections to our edge without worrying about managing IP addresses.</p><p>All told, there are opportunities being missed by many large providers. We hope that this blog (and our <a href="https://research.cloudflare.com/publications/Singanamalla2022/">publication</a> at ACM IMC 2022 with full details) offers a first step that helps servers and clients take advantage of the ORIGIN Frame standard.</p>
    <div>
      <h3>Setting the stage</h3>
      <a href="#setting-the-stage">
        
      </a>
    </div>
    <p>At a high level, as a user navigates the web, the browser renders web pages by retrieving dependent subresources to construct the complete web page. This process bears a striking resemblance to the way physical products are assembled in a factory. In this sense, a modern web page can be considered like an assembly plant. It relies on a ‘supply chain’ of resources that are needed to produce the final product.</p><p>An assembly plant in the physical world can place a single order for different parts and get a single shipment from the supplier (similar to the <a href="https://www.sciencedirect.com/science/article/abs/pii/092552739290109K">kitting process</a> for maximizing value and minimizing response time); no matter the manufacturer of those parts or where they are made -- one ‘connection’ to the supplier is all that is needed. Any single truck from a supplier to an assembly plant can be filled with parts from multiple manufacturers.</p><p>The design of the web causes browsers to typically do the opposite in nature. To retrieve the images, JavaScript, and other resources on a web page (the parts), web clients (assembly plants) have to make <i>at least</i> one connection to every hostname (the manufacturers) defined in the HTML that is returned by the server (the supplier). It makes no difference if the connections to those hostnames go to the same server or not, for example they could go to a <a href="https://www.cloudflare.com/learning/cdn/glossary/reverse-proxy/">reverse proxy</a> like Cloudflare. For each manufacturer a ‘new’ truck would be needed to transfer the materials to the assembly plant from the same supplier, or more formally, a new connection would need to be made to request a subresource from a hostname on the same web page.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3jdJ2PTbkKJKMFxbWD6RgD/40b366c9315d9c55e2409e1654bc0a3d/pasted-image-0--4-.png" />
            
            </figure><p>Without connection coalescing</p><p>The number of connections used to load a web page can be surprisingly high. It is also common for the subresources to need yet other sub-subresources, and so new connections emerge as a result of earlier ones. Remember, too, that HTTP connections to hostnames are often preceded by DNS queries! Connection coalescing allows us to use fewer connections_, or ‘reuse’ the same set of trucks to carry parts from multiple manufacturers from a single supplier._</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/jJx6aGfQCngN6w6D4jpeE/1dcfe2b5e3f8128d8837512ec1a959c9/pasted-image-0--5-.png" />
            
            </figure><p>With connection coalescing </p>
    <div>
      <h3>Connection coalescing in principle</h3>
      <a href="#connection-coalescing-in-principle">
        
      </a>
    </div>
    <p>Connection coalescing was <a href="https://datatracker.ietf.org/doc/html/rfc7540">introduced in HTTP/2</a>, and carried over into <a href="https://www.rfc-editor.org/rfc/rfc9114.html#name-connection-reuse">HTTP/3</a>. We’ve blogged about connection coalescing <a href="/connection-coalescing-experiments/">previously</a> (for a detailed primer we encourage going over that blog). While the idea is simple, implementing it can present a number of engineering challenges. For example, recall from above that there are 32 hostnames (at the time of writing) to load the web page you are reading right now. Among the 32 hostnames are 16 unique domains (defined as “Effective <a href="https://www.cloudflare.com/learning/dns/top-level-domain/">TLD+1</a>”). Can we create fewer connections or ‘coalesce’ existing connections for each unique domain? The answer is ‘<i>Yes, but it depends</i>’.</p><p>The exact number of connections to load the blog page is not at all obvious, and hard to know. There may be 32 hostnames attached to 16 domains but, counter-intuitively, this does not mean the answer to “how many unique connections?” is 16. The true answer could be as few as <i>one</i> connection if all the hostnames are reachable at a single server; or as many as 32 independent connections if a different and distinct server is needed to access each individual hostname.</p><p>Connection reuse comes in many forms, so it’s important to define “connection coalescing” in the HTTP space. For example, the reuse of an existing <a href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/">TCP</a> or TLS connection to a hostname to make multiple requests for subresources from that <b><i>same</i></b> hostname is connection reuse, but not coalescing.</p><p>Coalescing occurs when an existing TLS channel for some hostname can be repurposed or used for connecting to a <b><i>different</i></b> hostname. For example, upon visiting blog.cloudflare.com, the HTML points to subresources at cdnjs.cloudflare.com. To reuse the same TLS connection for the subresources, it is necessary for both hostnames to appear together in the TLS certificate's <a href="https://en.wikipedia.org/wiki/Subject_Alternative_Name">“Server Alternative Name (SAN)</a>” list, but this step alone is not sufficient to convince browsers to coalesce. After all, the cdnjs.cloudflare.com service may or may not be reachable at the same server as blog.cloudflare.com, despite being on the same certificate. So how can the browser know? Coalescing only works if servers set up the right conditions, but clients have to decide whether to coalesce or not – thus, browsers require a signal to coalesce beyond the SANs list on the certificate. Revisiting our analogy, the assembly plant may order a part from a manufacturer directly, not knowing that the supplier already has the same part in its warehouse.</p><p>There are two explicit signals a browser can use to decide whether connections can be coalesced: one is IP-based, the other ORIGIN Frame-based. The former requires the server operators to tightly bind DNS records to the HTTP resources available on the server. This is difficult to manage and deploy, and actually creates a risky dependency, because you have to place all the resources behind a specific set or a single IP address. The way IP addresses influence coalescing decisions <a href="https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing/">varies among browsers</a>, with some choosing to be more conservative and others more permissive. Alternatively, the HTTP ORIGIN Frame is an easier signal for the servers to orchestrate; it’s also flexible and has graceful failure with no interruption to service (for a specification compliant implementation).</p><p>A foundational difference between both these coalescing signals is: IP-based coalescing signals are implicit, even accidental, and force clients to infer coalescing possibilities that may exist, or not. None of this is surprising since IP addresses are designed to <a href="/addressing-agility/">have no real relationship with names!</a> In contrast, ORIGIN Frame is an explicit signal from servers to clients that coalescing is available no matter what DNS says for any particular hostname.</p><p>We have experimented with <a href="/connection-coalescing-experiments/">IP-based coalescing previously</a>; for the purpose of this blog we will take a deeper look at ORIGIN Frame-based coalescing.</p>
    <div>
      <h3>What is the ORIGIN Frame standard?</h3>
      <a href="#what-is-the-origin-frame-standard">
        
      </a>
    </div>
    <p>The ORIGIN Frame is an extension to the <a href="https://www.rfc-editor.org/rfc/rfc8336">HTTP/2</a> and <a href="https://www.rfc-editor.org/rfc/rfc9412">HTTP/3</a> specification, a special Frame sent on stream 0 or the control stream of the connection respectively. The Frame allows the servers to send an ‘origin-set’ to the clients on an <i>existing</i> established TLS connection, which includes hostnames that it is authorized for and will not incur any <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/421">HTTP 421 errors</a>. Hostnames in the origin-set MUST also appear in the certificate SAN list for the server, even if those hostnames are announced on different IP addresses via DNS.</p><p>Specifically, two different steps are required:</p><ol><li><p>Web servers must send a list enumerating the Origin Set (the hostnames that a given connection might be used for) in the ORIGIN Frame extension.</p></li><li><p>The TLS certificate returned by the web server must cover the additional hostnames being returned in the ORIGIN Frame in the DNS names SAN entries.</p></li></ol><p>At a high-level ORIGIN Frames are a supplement to the TLS certificate that operators can attach to say, “Psst! Hey, client, here are the names in the SANs that are available on this connection -- you can coalesce!” Since the ORIGIN Frame is not part of the certificate itself, its contents can be made to change independently. No new certificate is required. There is also no dependency on IP addresses. For a coalesceable hostname, existing TCP/QUIC+TLS connections can be reused without requiring new connections or DNS queries.</p><p><a href="https://w3techs.com/technologies/overview/proxy">Many websites today</a> rely on content which is served by CDNs, like Cloudflare CDN service. The practice of using external CDN services offers websites the advantages of speed, reliability, and reduces the load of content served by their <a href="https://www.cloudflare.com/learning/cdn/glossary/origin-server/">origin servers</a>. When both the website, and the resources are served by the same CDN, despite being different hostnames, owned by different entities, it opens up some very interesting opportunities for CDN operators to allow connections to be reused and coalesced since they can control both the certificate management and connection requests for sending ORIGIN frames on behalf of the real origin server.</p><p>Unfortunately, there has been no way to turn the possibilities enabled by ORIGIN Frame into practice. To the best of our knowledge, until today, there has been no server implementation that supports ORIGIN Frames. Among browsers, only Firefox supports ORIGIN Frames. Since IP coalescing is challenging and ORIGIN Frame has no deployed support, is the engineering time and energy to better support coalescing worth the investment? We decided to find out with a large-scale Internet-wide measurement to understand the opportunities and predict the possibilities, and then implemented the ORIGIN Frame to experiment on production traffic.</p>
    <div>
      <h3>Experiment #1: What is the scale of required changes?</h3>
      <a href="#experiment-1-what-is-the-scale-of-required-changes">
        
      </a>
    </div>
    <p>In February 2021, <a href="/connection-coalescing-experiments/">we collected data</a> for 500K of the <a href="https://radar.cloudflare.com/domains">most popular websites</a> on the Internet, using a modified <a href="https://github.com/WPO-Foundation/webpagetest">Web Page Test</a> on 100 virtual machines. An automated Chrome (v88) browser instance was launched for every visit to a web page to eliminate caching effects (because we wanted to understand coalescing, not caching). On successful completion of each session, Chrome developer tools were used to retrieve and write the page load data as an HTTP Archive format (HAR) file with a full timeline of events, as well as additional information about certificates and their validation. Additionally, we parsed the certificate chains for the root web page and new TLS connections triggered by subresource requests to (i) identify certificate issuers for the hostnames, (ii) inspect the presence of the Subject Alternative Name (SAN) extension, and (iii) validate that DNS names resolve to the IP address used. Further details about our methodology and results can be found in the technical <a href="https://research.cloudflare.com/publications/Singanamalla2022/">paper</a>.</p><p>The first step was to understand what resources are requested by web pages to successfully render the page contents, and where these resources were present on the Internet. Connection coalescing becomes possible when subresource domains are ideally co-located. We approximated the location of a domain by finding its corresponding autonomous system (AS). For example, the domain attached to <a href="https://cdnjs.cloudflare.com/https://cdnjs.cloudflare.com/">cdnjs</a> is reachable via AS 13335 in the BGP routing table, and that AS number belongs to Cloudflare. The figure below describes the percentage of web pages and the number of unique ASes needed to fully load a web page.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3H188I6GyYxiqZEYxBPMPp/4bde6b40a523d0e66207c87cee40755c/Screenshot-2023-08-31-at-1.39.16-PM.png" />
            
            </figure><p>Around 14% of the web pages need two ASes to fully load i.e. pages that have a dependency on one additional AS for subresources. More than 50% of the web pages need to contact no more than six ASes to obtain all the necessary subresources. This finding as shown in the plot above implies that a relatively small number of operators serve the sub-resource content necessary for a majority (~50%) of the websites, and any usage of ORIGIN Frames would need only a few changes to have its intended impact. The potential for connection coalescing can therefore be optimistically approximated to the number of unique ASes needed to retrieve all subresources in a web page. In practice however, this may be superseded by operational factors such as SLAs or helped by flexible mappings between sockets, names, and IP addresses which we worked on <a href="https://research.cloudflare.com/publications/Fayed2021/">previously at Cloudflare</a>.</p><p>We then tried to understand the impact of coalescing on connection metrics. The measured and ideal number of DNS queries and TLS connections needed to load a web page are summarized by their CDFs in the figure below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7aCaLsYdjNqeuQAuVSfQ6c/beae2aeaf3e96830f9562c09aeb0a2cd/Screenshot-2023-08-31-at-1.39.02-PM.png" />
            
            </figure><p>Through modeling and extensive analysis, we identify that connection coalescing through ORIGIN Frames could reduce the number of DNS and TLS connections made by browsers by over 60% at the median. We performed this modeling by identifying the number of times the clients requested DNS records, and combined them with the ideal ORIGIN Frames to serve.</p><p>Many multi-origin servers such as those operated by <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDNs</a> tend to reuse certificates and serve the same certificate with multiple DNS SAN entries. This allows the operators to manage fewer certificates through their creation and renewal cycles. While theoretically one can have millions of names in the certificate, creating such certificates is unreasonable and a challenge to manage effectively. By continuing to rely on existing certificates, our modeling measurements bring to light the volume of changes required to enable perfect coalescing, while presenting information about the scale of changes needed, as highlighted in the figure below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5rIcRVeD6UEGNCW9dj3MYM/187f0bc53e9afedf3baca072410eb4db/Screenshot-2023-08-31-at-1.38.35-PM.png" />
            
            </figure><p>We identify that over 60% of the certificates served by websites do not need any modifications and could benefit from ORIGIN Frames, while with no more than 10 additions to the DNS SAN names in certificates we’re able to successfully coalesce connections to over 92% of the websites in our measurement. The most effective changes could be made by CDN providers by adding three or four of their most popular requested hostnames into each certificate.</p>
    <div>
      <h3>Experiment #2: ORIGIN Frames in action</h3>
      <a href="#experiment-2-origin-frames-in-action">
        
      </a>
    </div>
    <p>In order to validate our modeling expectations, we then took a more active approach in early 2022. Our next experiment focused on 5,000 websites that make extensive use of <i>cdnjs.cloudflare.com</i> as a subresource. By modifying our experimental TLS termination endpoint we deployed HTTP/2 ORIGIN Frame support as defined in the <a href="https://datatracker.ietf.org/doc/rfc8336/">RFC standard</a>. This involved changing the internal fork of <i>net</i> and <i>http</i> dependency modules of Golang which we have open sourced (<a href="https://github.com/cloudflare/go-originframe">see here</a>, and <a href="https://github.com/cloudflare/net-originframe">here</a>).</p><p>During the experiments, connecting to a website in the experiment set would return <i>cdnjs.cloudflare.com</i> in the ORIGIN frame, while the control set returned an arbitrary (unused) hostname. All existing edge certificates for the 5000 websites were also modified. For the experimental group, the corresponding certificates were renewed with <i>cdnjs.cloudflare.com</i> added to the SAN. To ensure integrity between control and experimental sets, control group domains certificates were also renewed with a valid and identical size third party domain used by none of the control domains. This is done to ensure that the relative size changes to the certificates is kept constant avoiding potential biases due to different certificate sizes. Our results were striking!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2jGJXHliykd9CGh3lNujpq/bc1b9faf871d7d4c6ecf7041966078cb/Screenshot-2023-08-31-at-1.38.47-PM.png" />
            
            </figure><p>Sampling 1% of the requests we received from Firefox to the websites in the experiment, we identified over <b>50% reduction in new TLS connections per second</b> indicating a lesser number of cryptographic verification operations done by both the client and reduced server compute overheads. As expected there were no differences in the control set indicating the effectiveness of connection re-use as seen by the CDN or server operators.</p>
    <div>
      <h3>Discussion and insights</h3>
      <a href="#discussion-and-insights">
        
      </a>
    </div>
    <p>While our modeling measurements indicated that we could anticipate some performance improvements, in practice it was not significantly better suggesting that ‘no-worse’ is the appropriate mental model regarding performance. The subtle interplay between resource object sizes, competing connections, and congestion control is subject to network conditions. Bottleneck-share capacity, for example, diminishes as fewer connections compete for bottleneck resources on network links. It would be interesting to revisit these measurements as more operators deploy support on their servers for ORIGIN Frames.</p><p>Apart from performance, one major benefit of ORIGIN frames is in terms of privacy. How? Well, each coalesced connection hides client metadata that is otherwise leaked from non-coalesced connections. Certain resources on a web page are loaded depending on how one is interacting with the website. This means for every new connection for retrieving some resource from the server, TLS plaintext metadata like <a href="https://www.cloudflare.com/learning/ssl/what-is-sni/">SNI</a> (in the absence of <a href="/encrypted-client-hello/">Encrypted Client Hello</a>) and at least one plaintext DNS query, if transmitted over UDP or TCP on port 53, is exposed to the network. Coalescing connections helps remove the need for browsers to open new TLS connections, and the need to do extra DNS queries. This prevents metadata leakage from anyone listening on the network. ORIGIN Frames help minimize those signals from the network path, improving privacy by reducing the amount of cleartext information leaked on path to network eavesdroppers.</p><p>While the browsers benefit from reduced cryptographic computations needed to verify multiple certificates, a major advantage comes from the fact that it opens up very interesting future opportunities for resource scheduling at the endpoints (the browsers, and the origin servers) such as <a href="/better-http-3-prioritization-for-a-faster-web/">prioritization</a>, or recent proposals like <a href="/early-hints/">HTTP early hints</a> to provide clients experiences where connections are not overloaded or competing for those resources. When coupled with <a href="https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-http2-secondary-certs-06#section-3.4">CERTIFICATE Frames</a> IETF draft, we can further eliminate the need for manual certificate modifications as a server can prove its authority of hostnames after connection establishment without any additional SAN entries on the website’s TLS certificate.</p>
    <div>
      <h3>Conclusion and call to action</h3>
      <a href="#conclusion-and-call-to-action">
        
      </a>
    </div>
    <p>In summary, the current Internet ecosystem has a lot of opportunities for connection coalescing with only a few changes to certificates and their server infrastructure. Servers can significantly reduce the number of TLS handshakes by roughly 50%, while reducing the number of render blocking DNS queries by over 60%. Clients additionally reap these benefits in privacy by reducing cleartext DNS exposure to network on-lookers.</p><p>To help make this a reality we are currently planning to add support for both HTTP/2 and HTTP/3 ORIGIN Frames for our customers. We also encourage other operators that manage third party resources to adopt support of ORIGIN Frame to improve the Internet ecosystem.Our paper submission was accepted to the ACM Internet Measurement Conference 2022 and is <a href="https://research.cloudflare.com/publications/Singanamalla2022/">available for download</a>. If you’d like to work on projects like this, where you get to see the rubber meet the road for new standards, visit our <a href="https://www.cloudflare.com/careers/">careers page</a>!</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Internship Experience]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">QjYiQB1Bf6uRL71yURBMi</guid>
            <dc:creator>Suleman Ahmad</dc:creator>
            <dc:creator>Jonathan Hoyland</dc:creator>
            <dc:creator>Sudheesh Singanamalla</dc:creator>
        </item>
        <item>
            <title><![CDATA[Connection errors in Asia Pacific region on July 9, 2023]]></title>
            <link>https://blog.cloudflare.com/connection-errors-in-asia-pacific-region-on-july-9-2023/</link>
            <pubDate>Tue, 11 Jul 2023 08:48:13 GMT</pubDate>
            <description><![CDATA[ On July 9, 2023, users in the Asia Pacific region experienced connection errors due to origin DNS resolution failures to .com and .net TLD nameservers ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4XSclbffVsXyJvs6H28PzZ/8ca3e3e580eecf4e762af00eb94eb8d4/image2-5.png" />
            
            </figure><p>On Sunday, July 9, 2023, early morning UTC time, we observed a high number of DNS resolution failures — up to 7% of all DNS queries across the Asia Pacific region — caused by invalid DNSSEC signatures from Verisign .com and .net Top Level Domain (TLD) nameservers. This resulted in connection errors for visitors of Internet properties on Cloudflare in the region.</p><p>The local instances of Verisign’s nameservers started to respond with expired DNSSEC signatures in the Asia Pacific region. In order to remediate the impact, we have rerouted upstream DNS queries towards Verisign to locations on the US west coast which are returning valid signatures.</p><p>We have already reached out to Verisign to get more information on the root cause. Until their issues have been resolved, we will keep our DNS traffic to .com and .net TLD nameservers rerouted, which might cause slightly increased latency for the first visitor to domains under .com and .net in the region.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>In order to proxy a domain’s traffic through Cloudflare’s network, there are two components involved with respect to the Domain Name System (DNS) from the perspective of a Cloudflare data center: external DNS resolution, and upstream or origin DNS resolution.</p><p>To understand this, let’s look at the domain name <code>blog.cloudflare.com</code> — which is proxied through Cloudflare’s network — and let’s assume it is configured to use <code>origin.example</code> as the origin server:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5nnwNUFQmflIHHioGDISlg/250c388a2d796d0dc8139b4eddda6c05/image5-1.png" />
            
            </figure><p>Here, the external DNS resolution is the part where DNS queries to <code>blog.cloudflare.com</code> sent by public resolvers like <code>1.1.1.1</code> or <code>8.8.8.8</code> on behalf of a visitor return a set of Cloudflare Anycast IP addresses. This ensures that the visitor’s browser knows where to send an HTTPS request to load the website. Under the hood your browser performs a DNS query that looks something like this (the trailing dot indicates the <a href="https://en.wikipedia.org/wiki/DNS_root_zone">DNS root zone</a>):</p>
            <pre><code>$ dig blog.cloudflare.com. +short
104.18.28.7
104.18.29.7</code></pre>
            <p>(Your computer doesn’t actually use the dig command internally; we’ve used it to illustrate the process) Then when the next closest Cloudflare data center receives the HTTPS request for blog.cloudflare.com, it needs to fetch the content from the origin server (assuming it is not cached).</p><p>There are two ways Cloudflare can reach the origin server. If the DNS settings in Cloudflare contain IP addresses then we can connect directly to the origin. In some cases, our customers use a CNAME which means Cloudflare has to perform another DNS query to get the IP addresses associated with the CNAME. In the example above, <code>blog.cloudflare.com</code> has a CNAME record instructing us to look at <code>origin.example</code> for IP addresses. During the incident, only customers with CNAME records like this going to .com and .net domain names may have been affected.</p><p>The domain <code>origin.example</code> needs to be resolved by Cloudflare as part of the upstream or origin DNS resolution. This time, the Cloudflare data center needs to perform an outbound DNS query that looks like this:</p>
            <pre><code>$ dig origin.example. +short
192.0.2.1</code></pre>
            <p>DNS is a hierarchical protocol, so the recursive DNS resolver, which usually handles DNS resolution for whoever wants to resolve a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a>, needs to talk to several involved nameservers until it finally gets an answer from the authoritative nameservers of the domain (assuming no DNS responses are cached). This is the same process during the external DNS resolution and the origin DNS resolution. Here is an example for the origin DNS resolution:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7E1GLN7i8qGi3oB6Zentug/8b55136d3c67a79d0d9c711c428911b4/image6-1.png" />
            
            </figure><p>Inherently, DNS is a public system that was initially published without any means to validate the integrity of the DNS traffic. So in order to prevent someone from spoofing DNS responses, <a href="/dnssec-an-introduction/">DNS Security Extensions (DNSSEC)</a> were introduced as a means to authenticate that DNS responses really come from who they claim to come from. This is achieved by generating cryptographic signatures alongside existing DNS records like A, AAAA, MX, CNAME, etc. By validating a DNS record’s associated signature, it is possible to verify that a requested DNS record really comes from its authoritative nameserver and wasn’t altered en-route. If a signature cannot be validated successfully, recursive resolvers usually return an error indicating the invalid signature. This is exactly what happened on Sunday.</p>
    <div>
      <h3>Incident timeline and impact</h3>
      <a href="#incident-timeline-and-impact">
        
      </a>
    </div>
    <p>On Saturday, July 8, 2023, at 21:10 UTC our logs show the first instances of DNSSEC validation errors that happened during upstream DNS resolution from multiple Cloudflare data centers in the Asia Pacific region. It appeared DNS responses from the TLD nameservers of .com and .net of the type NSEC3 (a DNSSEC mechanism to <a href="/black-lies/">prove non-existing DNS records</a>) included invalid signatures. About an hour later at 22:16 UTC, the first internal alerts went off (since it required issues to be consistent over a certain period of time), but error rates were still at a level at around 0.5% of all upstream DNS queries.</p><p>After several hours, the error rate had increased to a point in which ~13% of our upstream DNS queries in affected locations were failing. This percentage continued to fluctuate over the duration of the incident between the ranges of 10-15% of upstream DNS queries, and roughly 5-7% of all DNS queries (external &amp; upstream resolution) to affected Cloudflare data centers in the Asia Pacific region.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/acWvj718KdxYfGx33fBZT/7ee25b63cf83ee9ff18e6734aeb1cc3e/image1-6.png" />
            
            </figure><p>Initially it appeared as though only a single upstream nameserver was having issues with DNS resolution, however upon further investigation it was discovered that the issue was more widespread. Ultimately, we were able to verify that the Verisign nameservers for .com and .net were returning expired DNSSEC signatures on a portion of DNS queries in the Asia Pacific region. Based on our tests, other nameserver locations were correctly returning valid DNSSEC signatures.</p><p>In response, we rerouted our DNS traffic to the .com and .net TLD nameserver IP addresses to Verisign’s US west locations. After this change was propagated, the issue very quickly subsided and origin resolution error rates returned to normal levels.</p><p>All times are in UTC:</p><p><b>2023-07-08 21:10</b> First instances of DNSSEC validation errors appear in our logs for origin DNS resolution.</p><p><b>2023-07-08 22:16</b> First internal alerts for Asia Pacific data centers go off indicating origin DNS resolution error on our test domain. Very few errors for other domains at this point.</p><p><b>2023-07-09 02:58</b> Error rates have increased substantially since the first instance. An incident is declared.</p><p><b>2023-07-09 03:28</b> DNSSEC validation issues seem to be isolated to a single upstream provider. It is not abnormal that a single upstream has issues that propagate back to us, and in this case our logs were predominantly showing errors from domains that resolve to this specific upstream.</p><p><b>2023-07-09 04:52</b> We realize that DNSSEC validation issues are more widespread and affect multiple .com and .net domains. Validation issues continue to be isolated to the Asia Pacific region only, and appear to be intermittent.</p><p><b>2023-07-09 05:15</b> DNS queries via popular recursive resolvers like 8.8.8.8 and 1.1.1.1 do not return invalid DNSSEC signatures at this point. DNS queries using the local stub resolver continue to return DNSSEC errors.</p><p><b>2023-07-09 06:24</b> Responses from .com and .net Verisign nameservers in Singapore contain expired DNSSEC signatures, but responses from Verisign TLD nameservers in other locations are fine.</p><p><b>2023-07-09 06:41</b> We contact Verisign and notify them about expired DNSSEC signatures.</p><p><b>2023-07-09 06:50</b> In order to remediate the impact, we reroute DNS traffic via IPv4 for the .com and .net Verisign nameserver IPs to US west IPs instead. This immediately leads to a substantial drop in the error rate.</p><p><b>2023-07-09 07:06</b> We also reroute DNS traffic via IPv6 for the .com and .net Verisign nameserver IPs to US west IPs. This leads to the error rate going down to zero.</p><p><b>2023-07-10 09:23</b> The rerouting is still in place, but the underlying issue with expired signatures in the Asia Pacific region has still not been resolved.</p><p><b>2023-07-10 18:23</b> Verisign gets back to us confirming that they “were serving stale data” at their local site and have resolved the issues.</p>
    <div>
      <h3>Technical description of the error and how it happened</h3>
      <a href="#technical-description-of-the-error-and-how-it-happened">
        
      </a>
    </div>
    <p>As mentioned in the introduction, the underlying cause for this incident was expired DNSSEC signatures for .net and .com zones. Expired DNSSEC signatures will cause a DNS response to be interpreted as invalid. There are two main scenarios in which this error was observed by a user:</p><ol><li><p><a href="https://developers.cloudflare.com/dns/cname-flattening/">CNAME flattening</a> for external DNS resolution. This is when our authoritative nameservers attempt to return the IP address(es) that a CNAME record target resolves to rather than the CNAME record itself.</p></li><li><p>CNAME target lookup for origin DNS resolution. This is most commonly used when an HTTPS request is sent to a Cloudflare anycast IP address, and we need to determine what IP address to forward the request to. See <a href="https://developers.cloudflare.com/fundamentals/get-started/concepts/how-cloudflare-works/">How Cloudflare works</a> for more details.</p></li></ol><p>In both cases, behind the scenes the DNS query goes through an in-house recursive DNS resolver in order to lookup what a hostname resolves to. The purpose of this resolver is to cache queries, optimize future queries and provide DNSSEC validation. If the query from this resolver fails for whatever reason, our authoritative DNS system will not be able to perform the two scenarios outlined above.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5qE0JFXaLHPwt3orOsNBm5/37d2d34d396d4cc4c2a22b7241e4120f/image3-1.png" />
            
            </figure><p>During the incident, the recursive resolver was failing to validate the DNSSEC signatures in DNS responses for domains ending in .com and .net. These signatures are sent in the form of an RRSIG record alongside the other DNS records they cover. Together they form a Resource Record set (RRset). Each RRSIG has the corresponding fields:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aZjsnpM6WSE70sPrnkHbr/6af366bd2accafc3f06296e241ceaba5/image4.png" />
            
            </figure><p>As you can see, the main part of the payload is associated with the signature and its corresponding metadata. Each recursive resolver is responsible for not only checking the signature but also the expiration time of the signature. It is important to obey the expiration time in order to avoid returning responses for RRsets that have been signed by old keys, which could have potentially been compromised by that time.</p><p>During this incident, Verisign, the authoritative operator for the .com and .net TLD zones, was occasionally returning expired signatures in its DNS responses in the Asia Pacific region. As a result our recursive resolver was not able to validate the corresponding RRset. Ultimately this meant that a percentage of DNS queries would return SERVFAIL as response code to our authoritative nameserver. This in turn caused connection issues for users trying to connect to a domain on Cloudflare, because we weren't able to resolve the upstream target of affected domain names and thus didn’t know where to send proxied HTTPS requests to upstream servers.</p>
    <div>
      <h3>Remediation and follow-up steps</h3>
      <a href="#remediation-and-follow-up-steps">
        
      </a>
    </div>
    <p>Once we had identified the root cause we started to look at different ways to remedy the issue. We came to the conclusion that the fastest way to work around this very regionalized issue was to stop using the local route to Verisign's nameservers. This means that, at the time of writing this, our outgoing DNS traffic towards Verisign's nameservers in the Asia Pacific region now traverses the Pacific and ends up at the US west coast, rather than being served by closer nameservers. Due to the nature of DNS and the important role of DNS caching, this has less impact than you might initially expect. Frequently looked up names will be cached after the first request, and this only needs to happen once per data center, as we share and pool the local DNS recursor caches to maximize their efficiency.</p><p>Ideally, we would have been able to fix the issue right away as it potentially affected others in the region too, not just our customers. We will therefore work diligently to improve our incident communications channels with other providers in order to ensure that the DNS ecosystem remains robust against issues such as this. Being able to quickly get hold of other providers that can take action is vital when urgent issues like these arise.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>This incident <a href="/october-2021-facebook-outage/">once again</a> shows how impactful DNS failures are and how crucial this technology is for the Internet. We will investigate how we can improve our systems to detect and resolve issues like this more efficiently and quickly if they occur again in the future.</p><p>While Cloudflare was not the cause of this issue, and we are certain that we were not the only ones affected by this, we are still sorry for the disruption to our customers and to all the users who were unable to access Internet properties during this incident.</p><p><b>Update</b>: On Tue Jul 11 22:24:21 UTC 2023_,_ Verisign posted an <a href="https://lists.dns-oarc.net/pipermail/dns-operations/2023-July/022174.html">announcement</a>, providing more details:</p><blockquote><p><i>Last week, during a migration of one of our DNS resolution sites in Singapore, from one provider to another, we unexpectedly lost management access and the ability to deliver changes and DNS updates to the site. Following our standard procedure, we disabled all transit links to the affected site. Unfortunately, a peering router remained active, which was not immediately obvious to our teams due to the lack of connectivity there.</i></p></blockquote><blockquote><p><i>Over the weekend, this caused an issue that may have affected the ability of some internet users in the region to reach some .com and .net domains, as DNSSEC signatures on the site began expiring. The issue was resolved by powering off the site’s peering router, causing the anycast route announcement to be withdrawn and traffic to be directed to other sites.</i></p></blockquote><blockquote><p><i>We are updating our processes and procedures and will work to prevent such issues from recurring in the future.</i></p></blockquote><blockquote><p><i>The Singapore site is part of a highly redundant constellation of more than 200 sites that make up our global network. This issue had no effect on the core resolution of .com and .net resolution globally. We apologize to those who may have been affected.</i></p></blockquote><p></p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[Outage]]></category>
            <category><![CDATA[Post Mortem]]></category>
            <guid isPermaLink="false">3ZlvMILKrfS2Z4IQ0qumTD</guid>
            <dc:creator>Christian Elmerot</dc:creator>
            <dc:creator>Alex Fattouche</dc:creator>
            <dc:creator>Hannes Gerhart</dc:creator>
        </item>
        <item>
            <title><![CDATA[How we scaled and protected Eurovision 2023 voting with Pages and Turnstile]]></title>
            <link>https://blog.cloudflare.com/how-cloudflare-scaled-and-protected-eurovision-2023-voting/</link>
            <pubDate>Fri, 23 Jun 2023 13:00:55 GMT</pubDate>
            <description><![CDATA[ More than 162 million fans tuned in to the 2023 Eurovision Song Contest, the first year that non-participating countries could also vote. Cloudflare helped scale and protect the voting application based.io, built by once.net using our rapid DNS infrastructure, CDN, Cloudflare Pages and Turnstile ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3EL1K1PkflEKz4BN5RvvVl/9caa639fcc20faba71edc840a70a6ad6/image3-27.png" />
            
            </figure><p>2023 was the first year that non-participating countries could vote for their favorites during the Eurovision Song Contest, adding millions of additional viewers and voters to an already impressive 162 million tuning in from the participating countries. It became a truly global event with a potential for disruption from multiple sources. To prepare for anything, Cloudflare helped scale and protect the voting application, used by millions of dedicated fans around the world to choose the winner.</p><p>In this blog we will cover how <a href="https://once.net">once.net</a> built their platform <a href="https://www.based.io/">based.io</a> to monitor, manage and scale the Eurovision voting application to handle all traffic using many Cloudflare services. The speed with which DNS changes made through the Cloudflare API propagate globally allowed them to scale their backend within seconds. At the same time, Cloudflare Pages was ready to serve any amount of traffic to the voting landing page so fans didn’t miss a beat. And to cap it off, by combining Cloudflare CDN, <a href="https://www.cloudflare.com/ddos/">DDoS protection</a>, WAF, and Turnstile, they made sure that attackers didn’t steal any of the limelight.</p>
    <div>
      <h3>The unsung heroes</h3>
      <a href="#the-unsung-heroes">
        
      </a>
    </div>
    <p>Based.io is a resilient live data platform built by the <a href="https://once.net">once.net</a> team, with the capability to scale up to 400 million concurrent connected users. It’s built from the ground up for speed and performance, consisting of an observable real time graph database, <a href="https://www.cloudflare.com/learning/network-layer/what-is-the-network-layer/">networking layer</a>, cloud functions, analytics and infrastructure orchestration. Since all system information, traffic analysis and disruptions are monitored in real time, it makes the platform instantly responsive to variable demand, which enables real time scaling of your infrastructure during spikes, outages and attacks.</p><p>Although the based.io platform on its own is currently in closed beta, it is already serving a few flagship customers in production assisted by the software and services of the once.net team. One such customer is Tally, a platform used by multiple broadcasters in Europe to add live interaction to traditional television. Over 100 live shows have been performed using the platform. Another is Airhub, a startup that handles and logs automatic drone flights. And of course the star of this blog post, the Eurovision Song Contest.</p>
    <div>
      <h3>Setting the stage</h3>
      <a href="#setting-the-stage">
        
      </a>
    </div>
    <p>The Eurovision Song Contest is one of the world’s most popular broadcasted contests, and this year it reached 162 million people across 38 broadcasting countries. In addition, on TikTok the three live shows were viewed 4.8 million times, while 7.6 million people watched the Grand Final live on YouTube. With such an audience, it is no surprise that Cloudflare sees the impact of it on the Internet. Last year, we wrote <a href="/eurovision-2022-internet-trends/">a blog post</a> where we showed lower than average traffic during, and higher than average traffic after the grand final. This year, the traffic from participating countries showed an even more remarkable surge:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3gO2U4Z3Qg4GOcNKZ6MIwe/d4fbd14cabdefb4e3764d7f4bc70c893/image1-39.png" />
            
            </figure><p>HTTP Requests per Second from Norway, with a similar pattern visible in countries such as the UK, Sweden and France. Internet traffic spiked at 21:20 UTC, when voting started.</p><p>Such large amounts of traffic are nothing new to the Eurovision Song Contest. Eurovision has relied on Cloudflare’s services for over a decade now and Cloudflare has helped to protect Eurovision.tv and improve its performance through noticeable faster load time to visitors from all corners of the world. Year after year, the team of Eurovision continued to use our services more, discovering additional features to improve performance and reliability further, with increasingly fine-grained control over their traffic flows. Eurovision.tv uses Page Rules to cache additional content on Cloudflare’s edge, speeding up delivery without sacrificing up-to-the-minute updates during the global event. Finally, to protect their backend and content management system, the team has placed their admin portals behind Cloudflare Zero Trust to delegate responsibilities down to individual levels.</p><p>Since then the contest itself has also evolved – sometimes by choice, sometimes by force. During the COVID-19 pandemic in-person cheering became impossible for many people due to a reduced live audience, resulting in the Eurovision Song Contest asking once.net to build a new iOS and Android application in which fans could cheer virtually. The feature was an instant hit, and it was clear that it would become part of this year’s contest as well.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3r33qBRnXFsgoKlqwH8Hly/5a087ff5295ac331344e548f2f7bd0ee/Screenshot-2023-06-23-at-12.05.08.png" />
            
            </figure><p>A screenshot of the official Eurovision Song Contest application showing the real-time number of connected fans (1) and allowing them to cheer (2) for their favorites.</p><p>In 2023, once.net was also asked to handle the paid voting from the regions where phone and SMS voting was not possible. It was the first time that Eurovision allowed voting online. The challenge that had to be overcome was the extreme peak demand on the platform when the show was live, and especially when the voting window started.</p><p>Complicating it further, was the fact that during last year’s show, there had been a large number of targeted and coordinated attacks.</p><p>To prepare for these spikes in demand and determined adversaries, once.net needed a platform that isn’t only resilient and highly scalable, but could also act as a mitigation layer in front of it. once.net selected Cloudflare for this functionality and integrated Cloudflare deeply with its <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">real-time monitoring</a> and management platform. To understand how and why, it’s essential to understand based.io underlying architecture.</p>
    <div>
      <h3>The based.io platform</h3>
      <a href="#the-based-io-platform">
        
      </a>
    </div>
    <p>Instead of relying on network or HTTP load balancers, based.io uses a client-side service discovery pattern, selecting the most suitable server to connect to and leveraging Cloudflare's fast cache propagation infrastructure to handle spikes in traffic (both malicious and benign).</p><p>First, each server continuously registers a unique access key that has an expiration of 15 seconds, which must be used when a client connects to the server. In addition, the backend servers register their health (such as active connections, CPU, memory usage, requests per second, etc.) to the service registry every 300 milliseconds. Clients then request the optimal server URL and associated access key from a central discovery registry and proceed to establish a long lived connection with that server. When a server gets overloaded it will disconnect a certain amount of clients and those clients will go through the discovery process again.</p><p>The central discovery registry would normally be a huge bottleneck and attack target. based.io resolves this by putting the registry behind Cloudflare's global network with a cache time of three seconds. Since the system relies on real-time stats to distribute load and uses short lived access keys, it is crucial that the cache updates fast and reliably. This is where Cloudflare’s infrastructure proved its worth, both due to the fast updating cache and reducing load with <a href="/introducing-regional-tiered-cache/">Tiered Caching</a>.</p><p>Not using <a href="https://www.cloudflare.com/learning/performance/what-is-load-balancing/">load balancers</a> means the based.io system allows clients to connect to the backend servers through Cloudflare, resulting in  better performance and a more resilient infrastructure by eliminating the load balancers as potential attack surface. It also results in a better distribution of connections, using the real-time information of server health, amount of active connections, active subscriptions.</p><p>Scaling up the platform happens automatically under load by deploying additional machines that can each handle 40,000 connected users. These are spun up in batches of a couple of hundred and as each machine spins up, it reaches out directly to the Cloudflare API to configure its own <a href="https://www.cloudflare.com/learning/dns/dns-records/">DNS record</a> and proxy status. Thanks to <a href="/dns-build-improvement/">Cloudflare’s high speed DNS system</a>, these changes are then propagated globally within seconds, resulting in a total machine turn-up time of around three seconds. This means faster discovery of new servers and faster dynamic rebalancing from the clients. And since the voting window of the Eurovision Song Contest is only 45 minutes, with the main peak within minutes after the window opens, every second counts!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Q8phs7FFGD11xvymotWjf/d911f35b6d8521dbad6f0e5fb27b6adb/image4-22.png" />
            
            </figure><p>High level architecture of the based.io platform used for the 2023 Eurovision Song Contest‌ ‌</p><p>To vote, users of the mobile app and viewers globally were pointed to the voting landing page, <a href="https://www.esc.vote">esc.vote</a>. Building a frontend web application able to handle this kind of an audience is a challenge in itself. Although hosting it yourself and putting a <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> in front seems straightforward, this still requires you to own, configure and manage your origin infrastructure. once.net decided to leverage Cloudflare’s infrastructure directly by hosting the voting landing page on Cloudflare Pages. Deploying was as quick as a commit to their Git repository, and they never had to worry about reachability or scaling of the webpage.</p><p>once.net also used <a href="/turnstile-private-captcha-alternative/">Cloudflare Turnstile</a> to protect their payment <a href="https://www.cloudflare.com/learning/security/api/what-is-api-endpoint/">API endpoints</a> that were used to validate online votes. They used the invisible Turnstile widget to make sure the request was not coming from emulated browsers (e.g. Selenium). And best of all, using the invisible Turnstile widget the user did not have to go through extra steps, which allowed for a better user experience and better conversion.</p>
    <div>
      <h3>Cloudflare Pages stealing the show!</h3>
      <a href="#cloudflare-pages-stealing-the-show">
        
      </a>
    </div>
    <p>After the two semi-finals went according to plan with approximately 200,000 concurrent users during each,May 13 brought the Grand Final. The once.net team made sure that there were enough machines ready to take the initial load, jumped on a call with Cloudflare to monitor and started looking at the number of concurrent users slowly increasing. During the event, there were a few attempts to <a href="https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/">DDoS</a> the site, which were automatically and instantaneously mitigated without any noticeable impact to any visitors.</p><p>The based.io discovery registry server also got some attention. Since the cache TTL was set quite low at five seconds, a high rate of distributed traffic to it could still result in a significant load. Luckily, on its own, the highly optimized based.io server can already handle around 300,000 requests per second. Still, it was great to see that during the event the cache hit ratio for normal traffic was 20%, and during one significant attack the <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cache-hit-ratio/">cache hit ratio</a> peaked towards 80%. This showed how easy it is to leverage a combination of Cloudflare CDN and DDoS protection to mitigate such attacks, while still being able to serve dynamic and real time content.</p><p>When the curtains finally closed, 1.3 million concurrent users connected to the based.io platform at peak. The based.io platform handled a total of 350 million events and served seven million unique users in three hours. The voting landing page hosted by Cloudflare Pages served 2.3 million requests per second at peak, and made sure that the voting payments were by real human fans using Turnstile. Although the Cloudflare platform didn’t blink for such a flood of traffic, it is no surprise that it shows up as a short crescendo in our traffic statistics:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5huk3IzNOj2l5bBB9gyPJK/adbabc5972b3d2e713de82b42ab26803/image5-15.png" />
            
            </figure>
    <div>
      <h3>Get in touch with us</h3>
      <a href="#get-in-touch-with-us">
        
      </a>
    </div>
    <p>If you’re also working on or with an application that would benefit from Cloudflare’s speed and security, but don’t know where to start, reach <a href="https://www.cloudflare.com/plans/enterprise/contact/">out</a> and we’ll work together.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Turnstile]]></category>
            <category><![CDATA[Customers]]></category>
            <category><![CDATA[Customer Success]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">7jlSeSTqS7MOjIXIa5Bwy6</guid>
            <dc:creator>Dirk-Jan van Helmond</dc:creator>
            <dc:creator>Michiel Appelman</dc:creator>
            <dc:creator>Jim de Beer (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[How Rust and Wasm power Cloudflare's 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/big-pineapple-intro/</link>
            <pubDate>Tue, 28 Feb 2023 14:00:00 GMT</pubDate>
            <description><![CDATA[ Introducing a new DNS platform that powers 1.1.1.1 and various other products. ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tun8W7xGXu4HnA6zxJK7b/07afefd11804c7b7b441a4b102650465/image1-11.png" />
            
            </figure><p>On April 1, 2018, Cloudflare <a href="/dns-resolver-1-1-1-1/">announced</a> the 1.1.1.1 public DNS resolver. Over the years, we added the <a href="https://1.1.1.1/help">debug page</a> for troubleshooting, global <a href="https://1.1.1.1/purge-cache/">cache purge</a>, 0 TTL for zones on Cloudflare, <a href="/encrypting-dns-end-to-end/">Upstream TLS</a>, and <a href="/introducing-1-1-1-1-for-families/">1.1.1.1 for families</a> to the platform. In this post, we would like to share some behind the scenes details and changes.</p><p>When the project started, <a href="https://www.knot-resolver.cz/">Knot Resolver</a> was chosen as the DNS resolver. We started building a whole system on top of it, so that it could fit Cloudflare's use case. Having a battle tested DNS recursive resolver, as well as a DNSSEC validator, was fantastic because we could spend our energy elsewhere, instead of worrying about the DNS protocol implementation.</p><p>Knot Resolver is quite flexible in terms of its Lua-based plugin system. It allowed us to quickly extend the core functionality to support various product features, like DoH/DoT, logging, BPF-based attack mitigation, cache sharing, and iteration logic override. As the <a href="https://mobile.twitter.com/eastdakota/status/1103800276102729729">traffic grew</a>, we reached certain limitations.</p>
    <div>
      <h2>Lessons we learned</h2>
      <a href="#lessons-we-learned">
        
      </a>
    </div>
    <p>Before going any deeper, let’s first have a bird’s-eye view of a simplified Cloudflare data center setup, which could help us understand what we are going to talk about later. At Cloudflare, every server is identical: the software stack running on one server is exactly the same as on another server, only the configuration may be different. This setup greatly reduces the complexity of fleet maintenance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/346cYMKrtotPKZx6GcoDMX/e9ab5a9834ace47e28faee2c198dca50/colo_kresd.png" />
            
            </figure><p>Figure 1 Data center layout</p><p>The resolver runs as a daemon process, kresd, and it doesn’t work alone. Requests, specifically DNS requests, are load-balanced to the servers inside a data center by <a href="/unimog-cloudflares-edge-load-balancer/">Unimog</a>. DoH requests are terminated at our TLS terminator. Configs and other small pieces of data can be delivered worldwide by <a href="/introducing-quicksilver-configuration-distribution-at-internet-scale/">Quicksilver</a> in seconds. With all the help, the resolver can concentrate on its own goal - resolving DNS queries, and not worrying about transport protocol details. Now let’s talk about 3 key areas we wanted to improve here - blocking I/O in plugins, a more efficient use of cache space, and plugin isolation.</p>
    <div>
      <h3>Callbacks blocking the event loop</h3>
      <a href="#callbacks-blocking-the-event-loop">
        
      </a>
    </div>
    <p>Knot Resolver has a very flexible plugin system for extending its core functionality. The plugins are called modules, and they are based on callbacks. At certain points during request processing, these callbacks will be invoked with current query context. This gives a module the ability to inspect, modify, and even produce requests / responses. By design, these callbacks are supposed to be simple, in order to avoid blocking the underlying event loop. This matters because the service is single threaded, and the event loop is in charge of serving many requests at the same time. So even just one request being held up in a callback means that no other concurrent requests can be progressed until the callback finishes.</p><p>The setup worked well enough for us until we needed to do blocking operations, for example, to pull data from Quicksilver before responding to the client.</p>
    <div>
      <h3>Cache efficiency</h3>
      <a href="#cache-efficiency">
        
      </a>
    </div>
    <p>As requests for a domain could land on any node inside a data center, it would be wasteful to repetitively resolve a query when another node already has the answer. By intuition, the latency could be improved if the cache could be shared among the servers, and so we created a cache module which multicasted the newly added cache entries. Nodes inside the same data center could then subscribe to the events and update their local cache.</p><p>The default cache implementation in Knot Resolver is <a href="https://www.symas.com/lmdb">LMDB</a>. It is fast and reliable for small to medium deployments. But in our case, cache eviction shortly became a problem. The cache itself doesn’t track for any TTL, popularity, etc. When it’s full, it just clears all the entries and starts over. Scenarios like zone enumeration could fill the cache with data that is unlikely to be retrieved later.</p><p>Furthermore, our multicast cache module made it worse by amplifying the less useful data to all the nodes, and led them to the cache high watermark at the same time. Then we saw a latency spike because all the nodes dropped the cache and started over around the same time.</p>
    <div>
      <h3>Module isolation</h3>
      <a href="#module-isolation">
        
      </a>
    </div>
    <p>With the list of Lua modules increasing, debugging issues became increasingly difficult. This is because a single Lua state is shared among all the modules, so one misbehaving module could affect another. For example, when something went wrong inside the Lua state, like having too many coroutines, or being out of memory, we got lucky if the program just crashed, but the resulting stack traces were hard to read. It is also difficult to forcibly tear down, or upgrade, a running module as it not only has state in the Lua runtime, but also FFI, so memory safety is not guaranteed.</p>
    <div>
      <h2>Hello BigPineapple</h2>
      <a href="#hello-bigpineapple">
        
      </a>
    </div>
    <p>We didn’t find any existing software that would meet our somewhat niche requirements, so eventually we started building something ourselves. The first attempt was to <a href="https://github.com/vavrusa/rust-kres">wrap Knot Resolver's core</a> with a thin service written in Rust (modified <a href="https://github.com/jedisct1/edgedns">edgedns</a>).</p><p>This proved to be difficult due to having to constantly convert between the storage, and C/FFI types, and some other quirks (for example, the ABI for looking up records from cache expects the returned records to be immutable until the next call, or the end of the read transaction). But we learned a lot from trying to implement this sort of split functionality where the host (the service) provides some resources to the guest (resolver core library), and how we would make that interface better.</p><p>In the later iterations, we replaced the entire recursive library with a new one based around an async runtime; and a redesigned module system was added to it, sneakily rewriting the service into Rust over time as we swapped out more and more components. That async runtime was <a href="https://tokio.rs/">tokio</a>, which offered a neat thread pool interface for running both non-blocking and blocking tasks, as well as a good ecosystem for working with other crates (Rust libraries).</p><p>After that, as the futures combinators became tedious, we started converting everything to async/await. This was before the async/await feature that landed in Rust 1.39, which led us to use nightly (Rust beta) for a while and had <a href="https://areweasyncyet.rs/">some hiccups</a>. When the async/await stabilized, it enabled us to write our request processing routine ergonomically, similar to Go.</p><p>All the tasks can be run concurrently, and certain I/O heavy ones can be broken down into smaller pieces, to benefit from a more granular scheduling. As the runtime executes tasks on a threadpool, instead of a single thread, it also benefits from work stealing. This avoids a problem we previously had, where a single request taking a lot of time to process, that blocks all the other requests on the event loop.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/72roTqirnpOZTjQpp36q4t/ec16e695ef22b93f475df0eed9e21f9e/blog_server.png" />
            
            </figure><p>Figure 2 Components overview</p><p>Finally, we forged a platform that we are happy with, and we call it <b>BigPineapple</b>. The figure above shows an overview of its main components and the data flow between them. Inside BigPineapple, the server module gets inbound requests from the client, validates and transforms them into unified frame streams, which can then be processed by the worker module. The worker module has a set of workers, whose task is to figure out the answer to the question in the request. Each worker interacts with the cache module to check if the answer is there and still valid, otherwise it drives the recursor module to recursively iterate the query. The recursor doesn’t do any I/O, when it needs anything, it delegates the sub-task to the conductor module. The conductor then uses outbound queries to get the information from upstream nameservers. Through the whole process, some modules can interact with the Sandbox module, to extend its functionality by running the plugins inside.</p><p>Let’s look at some of them in more detail, and see how they helped us overcome the problems we had before.</p>
    <div>
      <h3>Updated I/O architecture</h3>
      <a href="#updated-i-o-architecture">
        
      </a>
    </div>
    <p>A DNS resolver can be seen as an agent between a client and several authoritative nameservers: it receives requests from the client, recursively fetches data from the upstream nameservers, then composes the responses and sends them back to the client. So it has both inbound and outbound traffic, which are handled by the server and the conductor component respectively.</p><p>The server listens on a list of interfaces using different transport protocols. These are later abstracted into streams of “frames”. Each frame is a high level representation of a DNS message, with some extra metadata. Underneath, it can be a UDP packet, a segment of TCP stream, or the payload of a HTTP request, but they are all processed the same way. The frame is then converted into an asynchronous task, which in turn is picked up by a set of workers in charge of resolving these tasks. The finished tasks are converted back into responses, and sent back to the client.</p><p>This “frame” abstraction over the protocols and their encodings simplified the logic used to regulate the frame sources, such as enforcing fairness to prevent starving and controlling pacing to protect the server from being overwhelmed. One of the things we’ve learned with the previous implementations is that, for a service open to the public, a peak performance of the I/O matters less than the ability to pace clients fairly. This is mainly because the time and computational cost of each recursive request is vastly different (for example a cache hit from a cache miss), and it’s difficult to guess it beforehand. The cache misses in recursive service not only consume Cloudflare’s resources, but also the resources of the authoritative nameservers being queried, so we need to be mindful of that.</p><p>On the other side of the server is the conductor, which manages all the outbound connections. It helps to answer some questions before reaching out to the upstream: Which is the fastest nameserver to connect to in terms of latency? What to do if all the nameservers are not reachable? What protocol to use for the connection, and are there any <a href="https://engineering.fb.com/2018/12/21/security/dns-over-tls/">better options</a>? The conductor is able to make these decisions by tracking the upstream server’s metrics, such as <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">RTT</a>, QoS, etc. With that knowledge, it can also guess for things like upstream capacity, UDP packet loss, and take necessary actions, e.g. retry when it thinks the previous UDP packet didn’t reach the upstream.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3oLCVKn5GkZd5SmRnuYSmL/fd8c90e52308efd01698c40d09c724d6/conductor-1-.png" />
            
            </figure><p>Figure 3 I/O conductor</p><p>Figure 3 shows a simplified data flow about the conductor. It is called by the exchanger mentioned above, with upstream requests as input. The requests will be deduplicated first: meaning in a small window, if a lot of requests come to the conductor and ask for the same question, only one of them will pass, the others are put into a waiting queue. This is common when a cache entry expires, and can reduce unnecessary network traffic. Then based on the request and upstream metrics, the connection instructor either picks an open connection if available, or generates a set of parameters. With these parameters, the I/O executor is able to connect to the upstream directly, or even take a route via another Cloudflare data center using our <a href="/argo/">Argo Smart Routing technology</a>!</p>
    <div>
      <h3>The cache</h3>
      <a href="#the-cache">
        
      </a>
    </div>
    <p>Caching in a recursive service is critical as a server can return a cached response in under one millisecond, while it will be hundreds of milliseconds to respond on a cache miss. As the memory is a finite resource (and also a shared resource in Cloudflare’s architecture), more efficient use of space for cache was one of the key areas we wanted to improve. The new cache is implemented with a cache replacement data structure (<a href="https://en.wikipedia.org/wiki/Adaptive_replacement_cache">ARC</a>), instead of a KV store. This makes good use of the space on a single node, as less popular entries are progressively evicted, and the data structure is resistant to scans.</p><p>Moreover, instead of duplicating the cache across the whole data center with multicast, as we did before, BigPineapple is aware of its peer nodes in the same data center, and relays queries from one node to another if it cannot find an entry in its own cache. This is done by consistent hashing the queries onto the healthy nodes in each data center. So, for example, queries for the same registered domain go through the same subset of nodes, which not only increases the cache hit ratio, but also helps the infrastructure cache, which stores information about performance and features of nameservers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Ddu8jHnfdToCysh4urr1V/d7634e09dfb853c862f75af3b7c33cca/colo_3_bp.png" />
            
            </figure><p>Figure 4 Updated data center layout</p>
    <div>
      <h3>Async recursive library</h3>
      <a href="#async-recursive-library">
        
      </a>
    </div>
    <p>The recursive library is the DNS brain of BigPineapple, as it knows how to find the answer to the question in the query. Starting from the root, it breaks down the client query into subqueries, and uses them to collect knowledge recursively from various authoritative nameservers on the internet. The product of this process is the answer. Thanks to the async/await it can be abstracted as a function like such:</p>
            <pre><code>async fn resolve(Request, Exchanger) → Result&lt;Response&gt;;</code></pre>
            <p>The function contains all the logic necessary to generate a response to a given request, but it doesn’t do any I/O on its own. Instead, we pass an Exchanger trait (Rust interface) that knows how to exchange DNS messages with upstream authoritative nameservers asynchronously. The exchanger is usually called at various await points - for example, when a recursion starts, one of the first things it does is that it looks up the closest cached delegation for the domain. If it doesn’t have the final delegation in cache, it needs to ask what nameservers are responsible for this domain and wait for the response, before it can proceed any further.</p><p>Thanks to this design, which decouples the “waiting for some responses” part from the recursive DNS logic, it is much easier to test by providing a mock implementation of the exchanger. In addition, it makes the recursive iteration code (and DNSSEC validation logic in particular) much more readable, as it’s written sequentially instead of being scattered across many callbacks.</p><p>Fun fact: writing a DNS recursive resolver from scratch is not fun at all!</p><p>Not only because of the complexity of DNSSEC validation, but also because of the necessary “workarounds” needed for various RFC incompatible servers, forwarders, firewalls, etc. So we ported <a href="https://github.com/CZ-NIC/deckard">deckard</a> into Rust to help test it. Additionally, when we started migrating over to this new async recursive library, we first ran it in “shadow” mode: processing real world query samples from the production service, and comparing differences. We’ve done this in the past on Cloudflare’s authoritative DNS service as well. It is slightly more difficult for a recursive service due to the fact that a recursive service has to look up all the data over the Internet, and authoritative nameservers often give different answers for the same query due to localization, load balancing and such, leading to many false positives.</p><p>In December 2019, we finally enabled the new service on a public test endpoint (see the <a href="https://community.cloudflare.com/t/help-us-test-a-new-version-of-1-1-1-1-public-dns-resolver/137078">announcement</a>) to iron out remaining issues before slowly migrating the production endpoints to the new service. Even after all that, we continued to find edge cases with the DNS recursion (and DNSSEC validation in particular), but fixing and reproducing these issues has become much easier due to the new architecture of the library.</p>
    <div>
      <h3>Sandboxed plugins</h3>
      <a href="#sandboxed-plugins">
        
      </a>
    </div>
    <p>Having the ability to extend the core DNS functionality on the fly is important for us, thus BigPineapple has its redesigned plugin system. Before, the Lua plugins run in the same memory space as the service itself, and are generally free to do what they want. This is convenient, as we can freely pass memory references between the service and modules using C/FFI. For example, to read a response directly from cache without having to copy to a buffer first. But it is also dangerous, as the module can read uninitialized memory, call a host ABI using a wrong function signature, block on a local socket, or do other undesirable things, in addition the service doesn’t have a way to restrict these behaviors.</p><p>So we looked at replacing the embedded Lua runtime with JavaScript, or native modules, but around the same time, embedded runtimes for WebAssembly (Wasm for short) started to appear. Two nice properties of WebAssembly programs are that it allows us to write them in the same language as the rest of the service, and that they run in an isolated memory space. So we started modeling the guest/host interface around the limitations of WebAssembly modules, to see how that would work.</p><p>BigPineapple’s Wasm runtime is currently powered by <a href="https://wasmer.io/">Wasmer</a>. We tried several runtimes over time like <a href="https://wasmtime.dev/">Wasmtime</a>, <a href="https://wavm.github.io/">WAVM</a> in the beginning, and found Wasmer was simpler to use in our case. The runtime allows each module to run in its own instance, with an isolated memory and a signal trap, which naturally solved the module isolation problem we described before. In addition to this, we can have multiple instances of the same module running at the same time. Being controlled carefully, the apps can be hot swapped from one instance to another without missing a single request! This is great because the apps can be upgraded on the fly without a server restart. Given that the Wasm programs are distributed via Quicksilver, BigPineapple’s functionality can be safely changed worldwide within a few seconds!</p><p>To better understand the WebAssembly sandbox, several terms need to be introduced first:</p><ul><li><p>Host: the program which runs the Wasm runtime. Similar to a kernel, it has full control through the runtime over the guest applications.</p></li><li><p>Guest application: the Wasm program inside the sandbox. Within a restricted environment, it can only access its own memory space, which is provided by the runtime, and call the imported Host calls. We call it an app for short.</p></li><li><p>Host call: the functions defined in the host that can be imported by the guest. Comparable to syscall, it’s the only way guest apps can access the resources outside the sandbox.</p></li><li><p>Guest runtime: a library for guest applications to easily interact with the host. It implements some common interfaces, so an app can just use async, socket, log and tracing without knowing the underlying details.</p></li></ul><p>Now it’s time to dive into the sandbox, so stay awhile and listen. First let’s start from the guest side, and see what a common app lifespan looks like. With the help of the guest runtime, guest apps can be written similar to regular programs. So like other executables, an app begins with a start function as an entrypoint, which is called by the host upon loading. It is also provided with arguments as from the command line. At this point, the instance normally does some initialization, and more importantly, registers callback functions for different query phases. This is because in a recursive resolver, a query has to go through several phases before it gathers enough information to produce a response, for example a cache lookup, or making subrequests to resolve a delegation chain for the domain, so being able to tie into these phases is necessary for the apps to be useful for different use cases. The start function can also run some background tasks to supplement the phase callbacks, and store global state. For example - report metrics, or pre-fetch shared data from external sources, etc. Again, just like how we write a normal program.</p><p>But where do the program arguments come from? How could a guest app send log and metrics? The answer is, external functions.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2rMKxgaKCweGenTEf3kQ9U/07adc8e464df9662c2633fe5f36dd315/sandbox-1-.png" />
            
            </figure><p>Figure 5 Wasm based Sandbox</p><p>In figure 5, we can see a barrier in the middle, which is the sandbox boundary, that separates the guest from the host. The only way one side can reach out to the other, is via a set of functions exported by the peer beforehand. As in the picture, the “hostcalls” are exported by the host, imported and called by the guest; while the “trampoline” are guest functions that the host has knowledge of.</p><p>It is called <a href="https://en.wikipedia.org/wiki/Trampoline_(computing)">trampoline</a> because it is used to invoke a function or a closure inside a guest instance that’s not exported. The phase callbacks are one example of why we need a trampoline function: each callback returns a closure, and therefore can’t be exported on instantiation. So a guest app wants to register a callback, it calls a host call with the callback address “<code>hostcall_register_callback(pre_cache, #30987)</code>”, when the callback needs to be invoked, the host cannot just call that pointer as it’s pointing to the guest’s memory space. What it can do instead is, to leverage one of the aforementioned trampolines, and give it the address of the callback closure: “<code>trampoline_call(#30987)</code>”.</p>
    <div>
      <h4>Isolation overhead</h4>
      <a href="#isolation-overhead">
        
      </a>
    </div>
    <p>Like a coin that has two sides, the new sandbox does come with some additional overhead. The portability and isolation that WebAssembly offers bring extra cost. Here, we'll list two examples.</p><p>Firstly, guest apps are not allowed to read host memory. The way it works is the guest provides a memory region via a host call, then the host writes the data into the guest memory space. This introduces a memory copy that would not be needed if we were outside the sandbox. The bad news is, in our use case, the guest apps are supposed to do something on the query and/or the response, so they almost always need to read data from the host on every single request. The good news, on the other hand, is that during a request life cycle, the data won’t change. So we pre-allocate a bulk of memory in the guest memory space right after the guest app instantiates. The allocated memory is not going to be used, but instead serves to occupy a hole in the address space. Once the host gets the address details, it maps a shared memory region with the common data needed by the guest into the guest’s space. When the guest code starts to execute, it can just access the data in the shared memory overlay, and no copy is needed.</p><p>Another issue we ran into was when we wanted to add support for a modern protocol, <a href="/oblivious-dns/">oDoH</a>, into BigPineapple. The main job of it is to decrypt the client query, resolve it, then encrypt the answers before sending it back. By design, this doesn’t belong to core DNS, and should instead be extended with a Wasm app. However, the WebAssembly instruction set doesn’t provide some crypto primitives, such as AES and SHA-2, which prevents it from getting the benefit of host hardware. There is ongoing work to bring this functionality to Wasm with <a href="https://github.com/WebAssembly/wasi-crypto">WASI-crypto</a>. Until then, our solution for this is to simply delegate the <a href="/hybrid-public-key-encryption/">HPKE</a> to the host via host calls, and we already saw 4x performance improvements, compared to doing it inside Wasm.</p>
    <div>
      <h4>Async in Wasm</h4>
      <a href="#async-in-wasm">
        
      </a>
    </div>
    <p>Remember the problem we talked about before that the callbacks could block the event loop? Essentially, the problem is how to run the sandboxed code asynchronously. Because no matter how complex the request processing callback is, if it can yield, we can put an upper bound on how long it is allowed to block. Luckily, Rust’s async framework is both elegant and lightweight. It gives us the opportunity to use a set of guest calls to implement the “Future”s.</p><p>In Rust, a Future is a building block for asynchronous computations. From the user’s perspective, in order to make an asynchronous program, one has to take care of two things: implement a pollable function that drives the state transition, and place a waker as a callback to wake itself up, when the pollable function should be called again due to some external event (e.g. time passes, socket becomes readable, and so on). The former is to be able to progress the program gradually, e.g. read buffered data from I/O and return a new state indicating the status of the task: either finished, or yielded. The latter is useful in case of task yielding, as it will trigger the Future to be polled when the conditions that the task was waiting for are fulfilled, instead of busy looping until it’s complete.</p><p>Let’s see how this is implemented in our sandbox. For a scenario when the guest needs to do some I/O, it has to do so via the host calls, as it is inside a restricted environment. Assuming the host provides a set of simplified host calls which mirror the basic socket operations: open, read, write, and close, the guest can have its pseudo poller defined as below:</p>
            <pre><code>fn poll(&amp;mut self, wake: fn()) -&gt; Poll {
	match hostcall_socket_read(self.sock, self.buffer) {
    	    HostOk  =&gt; Poll::Ready,
    	    HostEof =&gt; Poll::Pending,
	}
}</code></pre>
            <p>Here the host call reads data from a socket into a buffer, depending on its return value, the function can move itself to one of the states we mentioned above: finished(Ready), or yielded(Pending). The magic happens inside the host call. Remember in figure 5, that it is the only way to access resources? The guest app doesn’t own the socket, but it can acquire a “<code>handle” via “hostcall_socket_open</code>”, which will in turn create a socket on the host side, and return a handle. The handle can be anything in theory, but in practice using integer socket handles map well to file descriptors on the host side, or indices in a <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector</a> or slab. By referencing the returned handle, the guest app is able to remotely control the real socket. As the host side is fully asynchronous, it can simply relay the socket state to the guest. If you noticed that the waker function isn’t used above, well done! That’s because when the host call is called, it not only starts opening a socket, but also registers the current waker to be called then the socket is opened (or fails to do so). So when the socket becomes ready, the host task will be woken up, it will find the corresponding guest task from its context, and wakes it up using the trampoline function as shown in figure 5. There are other cases where a guest task needs to wait for another guest task, an async mutex for example. The mechanism here is similar: using host calls to register wakers.</p><p>All of these complicated things are encapsulated in our guest async runtime, with easy to use API, so the guest apps get access to regular async functions without having to worry about the underlying details.</p>
    <div>
      <h2>(Not) The End</h2>
      <a href="#not-the-end">
        
      </a>
    </div>
    <p>Hopefully, this blog post gave you a general idea of the innovative platform that powers 1.1.1.1. It is still evolving. As of today, several of our products, such as <a href="/introducing-1-1-1-1-for-families/">1.1.1.1 for Families</a>, <a href="/the-as112-project/">AS112</a>, and <a href="https://www.cloudflare.com/products/zero-trust/gateway/">Gateway DNS</a>, are supported by guest apps running on BigPineapple. We are looking forward to bringing new technologies into it. If you have any ideas, please let us know in the <a href="https://community.cloudflare.com/c/zero-trust/dns-1111/47">community</a> or via <a>email</a>.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <guid isPermaLink="false">5DFx3mQoYWDfRP0BgOJ7fV</guid>
            <dc:creator>Anbang Wen</dc:creator>
            <dc:creator>Marek Vavruša</dc:creator>
        </item>
    </channel>
</rss>