# Cloudflare Reclaims 100 TB of RAM by Optimizing Consistent Hashing

DevFeed: [Cloudflare Reclaims 100 TB of RAM by Optimizing Consistent Hashing](<https://devfeed.tech/articles/cloudflare-reclaims-100-tb-of-ram-by-optimizing-consistent-hashing-98701.md>)

Original publisher: [Read original article](<https://www.infoq.com/news/2026/10/cloudflare-hashing-optimization/>)

Author: Renato Losio

Published: 2026-10-24T08:10:00Z

Content type: news

Language: en

Sources: [InfoQ](<https://devfeed.tech/sources/infoq.md>)

Topics: [hashing](<https://devfeed.tech/topics/hashing.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [architecture-design](<https://devfeed.tech/tags/architecture-design.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [cloudflare-hashing-optimization](<https://devfeed.tech/tags/cloudflare-hashing-optimization.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [development](<https://devfeed.tech/tags/development.md>), [devops](<https://devfeed.tech/tags/devops.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [hashing](<https://devfeed.tech/tags/hashing.md>), [infrastructure-optimisation](<https://devfeed.tech/tags/infrastructure-optimisation.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-optimization](<https://devfeed.tech/tags/memory-optimization.md>), [news](<https://devfeed.tech/tags/news.md>), [performance-tuning](<https://devfeed.tech/tags/performance-tuning.md>), [pingora](<https://devfeed.tech/tags/pingora.md>), [rust](<https://devfeed.tech/tags/rust.md>)

## AI overview

Cloudflare reduced its load-balancing service's memory footprint by more than 100 TB by optimizing consistent hashing in pingora-ketama while preserving the required load distribution. Probability analysis showed that many hash points yielded diminishing accuracy gains and that collisions among 32-bit points added distribution error; this let the team cut hashes per server by about 90%. It also compacted each stored `Point` from 8 bytes to 6 by representing the hash and server index more tightly. Because changing the ring could redirect cacheable requests and invalidate cached content, Cloudflare rolled out the new implementation gradually alongside the existing ring to limit cache churn and origin traffic spikes.

## Source excerpt

Cloudflare recently documented how it reduced the memory footprint of its internal load-balancing service by more than 100 TB by optimizing the Rust implementation of consistent hashing in pingora-ketama. The changes compacted hash-ring entries and used statistical analysis of hash distribution and collision rates to reduce the number of hashes per backend by about 90%. By Renato Losio