How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache
Blog post from Cloudflare
Cloudflare’s Big Pineapple DNS platform, which supports services including 1.1.1.1 and DNS Firewall, holds more than 250 billion cache entries and reduced its cache memory footprint through five Rust-focused storage optimizations. The changes replaced mutable vectors and strings with fixed-size boxed storage, consolidated DNS response sections, omitted record owner names when they match the queried domain, avoided oversized enum representations, and stored record data as compact contiguous wire-format bytes. Benchmarks using representative DNS traffic showed that these modifications cut per-entry memory use from 953 bytes to 420 bytes and allocations from 1.1 KB to 461 bytes, while improving insert throughput by 43% and reducing lookup latency by 19%. During a May-to-July 2026 production rollout, p99 process memory usage declined from 9.3 GB to 5.3 GB per instance, contributing to an estimated 100 TB reduction in fleet-wide working memory; Cloudflare plans to use the reclaimed capacity to expand caches and improve hit rates.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.