Resolver field notes

Cloudflare Optimizes 1.1.1.1 Cache and Cuts Internal Latency 19%

Quick Answer

Cloudflare reduced internal 1.1.1.1 cache lookup latency from 828 to 670 nanoseconds, a 19% drop, while freeing about 100 TB of fleet memory. That does not mean every user query becomes 19% faster: network delay, cache misses, DNSSEC, and authoritative lookups usually contribute much more to end-to-end time.

Scattered DNS memory blocks compacting into a fast cyan cache with clean response paths

On August 27, 2026, Cloudflare published an unusual optimization at the scale of its 1.1.1.1 resolver: five changes to its cache-entry representation freed about 100 terabytes of memory and reduced internal lookup latency by 19%.

The result matters because cache is the fast path through a resolver. While an answer remains valid, the service does not need to repeat the full journey to authoritative servers. It finds the data locally, adjusts the required fields, and sends it to the user.

The 19% figure needs careful interpretation. The measurement fell from 828 to 670 nanoseconds inside the cache process. Cloudflare is not claiming that every phone-to-1.1.1.1 query became 19% faster on every network.

The scale of the 1.1.1.1 cache

Cloudflare’s Big Pineapple resolution platform supports 1.1.1.1, Gateway DNS, DNS Firewall, AS112, and other services. The company says it holds more than 250 billion cache entries at any moment.

At that scale, wasting one byte per entry costs more than 250 GB across the fleet. Cloudflare optimized the Rust structures that store the query key, response records, TTL, creation time, counters, and extended errors.

Its development benchmark approximated the production traffic mix:

  • 56% A records;
  • 25% AAAA records;
  • 19% TXT records standing in for variable-length types;
  • one to four records per entry.

The team also measured resident memory on production instances during a rollout that began May 18 and completed July 6, 2026.

What changed in the numbers

Metric Before After Change
Net footprint per entry 953 bytes 420 bytes -56%
Allocations per entry 1.1 KB 461 bytes -58%
Cache insert throughput 625,000/s 893,000/s +43%
Cache lookup latency 828 ns 670 ns -19%

Production process memory fell by less than 56% because it includes code and data outside the cache. Even so, p99 memory per instance dropped from 9.3 GB to 5.3 GB. The aggregate working-set reduction was about 100 TB—equal, Cloudflare says, to the RAM in 130 of its Generation 13 servers.

How less memory also made the cache faster

Saving memory can sometimes add processing. Here, several changes reduced both.

A general-purpose structure may reserve enough inline space for its largest record variant even when holding a small A or AAAA. Alternative designs create many separate heap allocations. Both patterns waste bytes and scatter data, forcing the CPU to follow pointers into different memory regions.

The final design stores DNS record data in a compact, contiguous wire-format buffer. Common types can be copied almost directly into the response. Only records containing names—such as CNAME, NS, MX, and SOA—still need parsing for DNS name compression.

Fewer allocations and better memory locality explain why insertion throughput rose and lookup time fell even as RAM usage declined.

Does this make the user’s Internet faster?

It can help, but not by a direct 19%. A query observed on a phone normally takes milliseconds, not nanoseconds. End-to-end time includes:

  1. Wi-Fi or mobile access to the router;
  2. the ISP route to an anycast point of presence;
  3. resolver processing;
  4. on a cache miss, root, TLD, and authoritative lookups;
  5. DNSSEC validation and possible retries.

Saving 158 nanoseconds is small next to a 10 or 30 millisecond network trip. The more interesting effect may come next: Cloudflare plans to reinvest freed memory in greater cache capacity. More entries can improve hit rates and avoid upstream trips, which cost far more time.

The benefit will not be uniform. Short TTLs, rare names, and EDNS Client Subnet variants reduce reuse. Popular domains with suitable TTLs are more likely to benefit.

How to look for a difference in a benchmark

Do not compare one query made before the announcement with one made afterward. Routing, congestion, and cache state create larger variations than this internal optimization.

Use a repeatable method:

  • run multiple rounds on the same device and connection;
  • compare Cloudflare, Google, Quad9, and the ISP resolver in the same time window;
  • separate warm, repeated queries from randomized names that create cache misses;
  • record median, P95, jitter, and success rate;
  • repeat at different times and confirm the resolver endpoint actually reached.

A consistent P95 or stability improvement matters more than a tiny average difference. See how to compare Cloudflare and Google DNS and how to find the fastest DNS for a structured test.

What the news actually demonstrates

The optimization does not make 1.1.1.1 the universal benchmark winner. The fastest resolver still depends on ISP, location, anycast route, time, and query type.

It demonstrates that memory efficiency and speed are connected in a global resolver. Compacting hundreds of billions of objects leaves room for a larger cache, reduces allocator pressure, and saves CPU work. The per-query effect reaching a user may be subtle, but it multiplies across the service and can improve capacity and consistency.

Technical sources

FAQ

Did 1.1.1.1 become 19% faster for everyone?

Not necessarily. The 19% figure measures an internal cache lookup falling from 828 to 670 nanoseconds. User-visible latency also includes the route to the resolver and, on a cache miss, authoritative DNS queries.

What did Cloudflare save?

Five optimizations reduced net per-entry memory by 56% in the benchmark and lowered the fleet's aggregate working-set memory by roughly 100 TB after deployment.

Can a larger cache improve DNS performance?

Yes. A larger cache can retain more valid answers until their TTL expires, improving hit rate and avoiding upstream queries. The actual gain depends on traffic and hostname distribution.

Do I need to change my 1.1.1.1 settings?

No. This was an infrastructure change across Cloudflare services using Big Pineapple. The public resolver addresses did not change.

Test your DNS now

Download DNS Benchmark for free and find the fastest server for your network.

Download DNS Benchmark on Google PlayDownload DNS Benchmark on the App Store