The Chonkerton

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

tech

Cloudflare Blog reports that its 1.1.1.1 DNS service stores over 250 billion cache entries at any given time. By making five successive changes to how those entries are stored in memory, the company cut the per-entry footprint by more than half, freeing up roughly 100 terabytes of RAM across its fleet — equivalent to the memory in 130 of its Gen 13 servers. The optimizations also made the cache faster, with insert throughput up 43 percent and lookup latency down 19 percent, as fewer allocations and better memory locality meant no trade-off between speed and space.

Source: https://blog.cloudflare.com/dns-cache-memory-optimization-1111/

Listen to this story

Hear this and more stories in a personalized audio briefing.

Open The Chonkerton