Cloudflare Saved 100 TB of Memory in 1.1.1.1

What shipped? Cloudflare detailed five Rust-level memory optimizations to its "Big Pineapple" DNS cache that cut per-entry memory by 56%, freeing approximately 100 terabytes of RAM across its global fleet.

What changed? The optimizations targeted the in-memory representation of DNS records — tighter struct packing, eliminating redundant fields, custom allocators for hot paths, smarter TTL encoding, and removing heap fragmentation in the eviction logic. Each DNS entry went from ~180 bytes to ~79 bytes. Across thousands of servers each holding hundreds of millions of entries, the savings compound to triple-digit terabytes.

Why a builder cares: This is the kind of infrastructure engineering most of us never see — and never need to. But it's why 1.1.1.1 stays fast without requiring constant hardware upgrades. The post itself is a masterclass in low-level Rust optimization worth reading whether you touch DNS or not.