News › performance
By Zayden R., August 29, 2026
Cloudflare has optimized the DNS cache for its 1.1.1.1 service, reducing memory usage by 100 terabytes. Engineers will see improved performance with a 43% increase in insert throughput and a 19% reduction in lookup latency.
In a significant engineering feat, Cloudflare has managed to save 100 terabytes of memory by optimizing the DNS cache for its 1.1.1.1 service. This optimization is crucial for engineers using Cloudflare's DNS services, as it not only reduces memory usage dramatically but also enhances performance, with a 43% bump in insert throughput and a 19% drop in lookup latency.
The optimization was achieved by making five successive changes to how cache entries are stored in memory, cutting the per-entry footprint by over 50%. This is a big deal when you consider that Big Pineapple, the platform behind 1.1.1.1 and other Cloudflare DNS services, manages over 250 billion DNS cache entries at any given time. Wasting even a single byte per entry could result in over 250 gigabytes of wasted memory across their fleet.
Technical details reveal that each cache entry is a key-value pair, with the key identifying the DNS query and the value storing the DNS response and metadata. The optimization focused on reducing the overhead of data types used in these cache entries. By benchmarking memory usage with randomly generated entries that mimic production traffic, Cloudflare was able to measure the impact of each change effectively.
For engineers, this means a more efficient use of resources and faster DNS resolution times, particularly in ECS-heavy locations where multiple versions of the same query are cached. The practical impact is clear: systems running on Cloudflare's DNS services will now operate more smoothly, with less memory overhead and faster response times. This kind of optimization is exactly what sysadmins have been waiting for, offering a better balance between speed and resource utilization.
The Linux Camp teaches these topics as hands-on labs on real virtual machines, verified as you type.