1.1.1.1 DNS cache optimisation frees 100 terabytes of memory
Cloudflare Inc said on Wednesday the Big Pineapple DNS platform behind its 1.1.1.1 resolver freed 100 terabytes of RAM across its fleet by shrinking the memory footprint of each cache entry by more than half.
Source: Cloudflare Blog · August 27, 2026 at 8:30 PM · AI-assisted report
Single-sourceKUALA LUMPUR, 28 AUGUST 2026 —
Cloudflare Inc said on Wednesday the Big Pineapple DNS platform behind its 1.1.1.1 resolver freed 100 terabytes of RAM across its fleet by shrinking the memory footprint of each cache entry by more than half.
Market Impact
The change cut the per-entry overhead from 64 bytes to below 30 bytes, the company said in a technical blog post. At the platform’s scale—storing over 250 billion entries simultaneously—that released roughly 100 terabytes, or the RAM in 130 first-generation Cloudflare servers.
Insert throughput rose 43% and average lookup latency fell 19%, the company said, as fewer memory allocations and tighter cache locality removed the usual trade-off between speed and space.
“Every byte we save at scale is a byte we do not have to buy or run,” said John Graham-Cumming, Cloudflare’s chief technology officer. “The optimisations let us serve the same traffic with fewer machines and lower power draw.”
The optimisations targeted three areas: vector and string storage, DNS section layout, and the storage of repeated domain names.
Cloudflare replaced Rust’s Vec<T> and String with Box<[T]> and Box<str> for fields that never change after creation. Each cache entry normally holds eight such containers, saving 64 bytes per entry and eliminating over-allocated heap space that Vec would otherwise reserve for future growth.
A second change merged the answer, authority and additional sections of each DNS response into a single list, replacing two eight-byte pointers and lengths with two two-byte offsets. That saved 28 bytes per entry.
Third, the platform stopped storing full domain names for records whose owner matches the queried domain. Cloudflare said 80% of its traffic uses A or AAAA records whose owner is identical to the query, so dropping the redundant name removed 144-byte enums in favour of a single pointer. The change eliminated most heap allocations for the owner field while keeping lookup speed intact.
The Big Pineapple platform underpins 1.1.1.1, Gateway DNS, DNS Firewall and AS121, and handles hundreds of billions of queries daily. The optimisations were rolled out across production instances and measured with a Rust allocator that tracks allocation size and count, plus synthetic benchmarks that mimic production traffic mix—56% A records, 25% AAAA and 19% TXT.
For Malaysian businesses that rely on low-latency DNS resolution for cloud services, the update signals a drop in infrastructure overhead and faster response times from a critical layer of the internet stack.
Related: Cloudflare · John Graham-Cumming · Kuala Lumpur