https://whatsapp.com/channel/0029Va6V6G7EgGfE5apiyj0N/142🇺🇸 CLOUDFLARE FREES 100 TB OF RAM AFTER REDESIGNING THE DNS CACHE FROM
1.1.1.1Cloudflare managed to reclaim about 100TB of RAM on its global network by nearly halving the size of its public resolver's DNS entries, a software change that also improved push speed and reduced lookup latency.
The company detailed in a technical publication that cache entries went from 953 to 420 bytes, thanks to five modifications in Rust that eliminated wasted space and optimized processor memory. The change had a massive impact: Big Pineapple, the platform that manages the DNS cache, maintains 250 billion entries constantly, so a single unnecessary byte per entry represents 250 GB of memory consumed.
The results were overwhelming. Insertion throughput rose from 625,000 to 893,000 entries per second (a 43% increase), while seek latency fell from 828 to 670 nanoseconds (a 19% reduction). During the deployment, which ran from mid-May to early July, resident memory per instance dropped from 9.3 GB to 5.3 GB.
Cloudflare has no plans to reduce its server hardware. Instead, it will reinvest the reclaimed memory into larger DNS caches, increasing hit rates and reducing pressure on external authoritative servers.
The project is the company's second major optimization effort in the last year. Last September, Cloudflare rewrote its request handling layer, FL2, in Rust as part of a broader software efficiency strategy.
The case leaves a clear lesson: on platforms that process massive amounts of data, seemingly minor decisions can multiply into hundreds of gigabytes of savings. 🚀💾🌐