TLDR Tech / DevOps
How we saved 100 terabytes of memory by optimizing 1.1.1.1's DNS cache
Cloudflare cut memory usage across its Big Pineapple DNS platform by roughly 100 terabytes after five successive changes to how cache entries are stored. The optimizations reduced the per-entry memory footprint from 953 bytes to 420 bytes, a 56% reduction across more than 250 billion cache entries. At p99, per-instance resident memory fell from 9.3 GB to 5.3 GB. Cache insert throughput also rose 43% and lookup latency dropped 19%, as the changes reduced allocations and improved memory locality.
Read the full story