← All stories
● Covered by 1 source · 1 reportMedium impact1 positive

Cloudflare Reduces Memory Footprint by 100 TB with Consistent Hashing Optimization

🔄 Updated 14d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Cloudflare reduced memory usage by over 100 TB.
  • Optimization focused on consistent hashing in pingora-ketama.
  • Number of hashes per backend decreased by 90%.
  • Memory reduction maintained load-balancing accuracy.

Memory Optimization in Load Balancing

Cloudflare announced a significant reduction in the memory footprint of its internal load-balancing service. By optimizing the Rust implementation of consistent hashing within pingora-ketama, the company reclaimed more than 100 TB of RAM. This optimization targeted the data structures used for distributing cacheable requests across servers.

Addressing Excessive Memory Usage

Cloudflare's Pingora Backend Router relies on consistent hashing, but supporting weighted servers and various feature combinations led to a proliferation of hash rings, increasing memory consumption. The team identified that the pingora-ketama consistent-hashing data structures were consuming excessive memory, prompting an investigation into their design.

Statistical Analysis and Hash Reduction

Engineers applied probability theory to determine the minimum number of hash points required for accurate distribution. This analysis allowed them to reduce the number of hashes per server by approximately 90% without compromising load-balancing accuracy. The team found that adding more hashes yielded diminishing improvements in load distribution, with the final 90,000 hashes improving error by only 0.7%.

Data Structure Compaction

Further memory savings came from optimizing the Rust data structures that stored the remaining hashes. The original representation used an 8-byte 'Point' structure, but the hash and server index could be compactly represented in just 6 bytes. This compaction contributed to the overall memory reduction.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Cloudflare optimized its Rust implementation of consistent hashing in pingora-ketama, reducing the memory footprint of its internal load-balancing service by over 100 TB. This was achieved by compacting hash-ring entries and statistically analyzing hash distribution to decrease the number of hashes per backend by approximately 90% while maintaining load-balancing accuracy.