ELSEIF
Your brief EB
452 stories from 138 feeds 667 clusters Refreshed 7 minutes ago next pull 19:24

INFRA Signal 678 2 feeds carried it

How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache

Five Rust-level memory optimizations to Big Pineapple's DNS cache layout cut per-entry memory by 56%, freeing approximately 100 TB of memory across Cloudflare's fleet.

WHY IT MATTERS

For systems operating at massive scale, minor per-entry memory overhead translates to massive fleet-wide waste. These optimizations not only reclaimed 100 TB of RAM but also improved cache insert throughput by 43% and reduced lookup latency by 19%. The approach demonstrates that immutable data structures can leverage more compact memory representations without sacrificing performance.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

Cloudflare's Big Pineapple platform stores over 250 billion DNS cache entries, making single-byte inefficiencies costly at scale.

02

Replacing mutable Rust types like Vec and String with immutable Box types saved 64 bytes per entry and eliminated excess heap allocations.

03

Consolidating separate DNS record sections into a single list with offsets saved an additional 28 bytes per entry.

THE CLUSTER

Same story, 2 feeds.

ORDERED BY FIRST SEEN
Cloudflare How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache Open ↗
Cloudflare via Hacker News Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache Open ↗