Cloudflare saved 100 TB of RAM with math and Rust 🔥
Cloudflare reclaimed more than 100 TB of RAM globally in a Pingora-based consistent-hashing service. No new hardware. The win came from changing data representation and the algorithms around it.
✅ Lessons:
• Measure retained memory, not only allocation rate.
• Check collection shape: duplicated keys, oversized buckets, and pointer-heavy graphs add up fast.
• Fix the model first: a smaller or more compact structure usually beats micro-optimizing a hot loop.
For high-cardinality caches, routing tables, or tenant maps, take a heap dump before reaching for another cache node. A few bytes per entry becomes expensive at fleet scale.
[ Blog ] :
https://blog.cloudflare.com/saving-100-tb-of-ram-with-math
〰️〰️〰️〰️〰️〰️
#Performance #Memory #Rust
@ProgrammingTip
Post #769
2.62K