The platform behind 1.1.1.1 holds over 250 billion cache entries at any moment. Five successive changes to how they are laid out cut each entry by more than half. The memory freed is roughly the entire RAM of 130 of their servers.
- At 250 billion entries, a single wasted byte per entry costs more than 250 gigabytes across the fleet.
- The result: entries more than 50 per cent smaller, roughly 100 terabytes of memory freed, inserts 43 per cent faster.
- The usual memory-for-speed trade never happened here - they saved on both.
One byte. Waste it per entry and, at their scale, that is 250 gigabytes.
Big Pineapple is the platform running 1.1.1.1, Gateway DNS, DNS Firewall and several other Cloudflare services. At any given moment more than 250 billion cached answers sit in its memory. At that size optimisation is not a sport - it is an invoice, paid in servers.
Why this is rare
Usually a rewrite like this comes with a trade. Shrink the memory and you pay in speed, because you add a layer of unpacking. Chase speed and you pay in memory, because everything stays unfolded and ready. Anyone who has touched a cache has felt it.
Here the trade did not happen. Fewer allocations and tighter packing do both at once, because the processor reads neighbouring bytes instead of jumping around memory. That is an old engineering fact - it is simply visible to the naked eye at this scale.
What I take from it
We do not hold 250 billion entries and never will. But the same arithmetic applies in the small: one redundant structure in the hot path of our admin panel multiplies by every request, every day, quietly. The only difference is that nobody sends us an invoice, so nobody looks.
And one more thing I like about their write-up: there is not a single sentence about artificial intelligence in it. Just people who went and looked at where the memory was going.