Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Cloudflare

How Cloudflare Reclaimed 100 TB of RAM With Math You Can Apply to Your Own Stack

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cloudflare says it reclaimed 100 TB of RAM across its network by optimizing the consistent-hashing structures in its Pingora Backend Router. The savings came from storing each hash point more compactly and using fewer points per server—not from adding or replacing hardware. The reusable lesson is to measure a data structure’s memory cost against the quality it delivers, then validate the change with a staged rollout and a way back.

Where the memory was going

Cloudflare’s September 18, 2026 engineering article describes work on Pingora Backend Router (PBR), its internal load-balancing service. PBR uses consistent hashing to route cacheable requests according to URL, helping keep a file’s stored copy in a stable location within a data center.

As an Amazon Associate I earn from qualifying purchases.

Consistent hashing places server identities and request keys in a shared hash space. A request is directed to a nearby server point; when the server set changes, consistent hashing can limit how many assignments move compared with a naive mapping. Multiple points per server improve expected load balance, while server weights can allocate more points to servers with more storage capacity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Memory use grew because points had to represent server weights and because restrictions—such as compliance rules or cache features—could require separate rings for different server subsets. At fleet scale, the structures became expensive: Cloudflare reported about 6 GB of excessive memory use in some cases. Its reported 100 TB recovery is a Cloudflare-published figure, not an independently audited measurement.

#1 Best Overall
Sale
CORSAIR Vengeance LPX DDR4 RAM 32GB (2x16GB) Up to 3200MHz CL16-20-20-38 1.35V Intel XMP AMD EXPO Computer Memory – Black (CMK32GX4M2E3200C16)
  • Disclaimer: Maximum Speed requires overclocking/PC BIOS adjustments. Maximum speed and performance depend on system components, including motherboard and CPU
  • Hand-sorted memory chips ensure high performance with generous overclocking headroom
  • VENGEANCE LPX is optimized for wide compatibility with the latest Intel and AMD DDR4 motherboards
  • A low-profile height of just 34mm ensures that VENGEANCE LPX even fits in most small-form-factor builds
  • A solid aluminum heatspreader efficiently dissipates heat from each module so that they consistently run at high clock speeds

First change: store each point in six bytes instead of eight

Cloudflare’s first optimization changed the in-memory representation of a hash point. It used a 32-bit hash and a 16-bit server index, stored together in a six-byte byte array with accessors. The team selected a 16-bit index because it considered more than 65,000 coordinated servers unlikely in this use case; that limit would not suit systems needing a larger index space.

A conventional Rust structure for those fields could still occupy eight bytes because of alignment and padding. Packing the values into a six-byte array avoided that padding. Cloudflare says this reduced memory used by its consistent-hashing storage by 25%. This is a representation-specific saving, not a 25% reduction in total process memory.

Rank #2
Timetec 16GB KIT(2x8GB) DDR3L / DDR3 1600MHz (DDR3L-1600) PC3L-12800 / PC3-12800 Non-ECC Unbuffered 1.35V/1.5V CL11 2Rx8 Dual Rank 240 Pin UDIMM Desktop PC Computer Memory RAM(SDRAM) Module Upgrade
  • [Color] PCB color may vary (black or green) depending on production batch. Quality and performance remain consistent across all Timetec products.
  • DDR3L / DDR3 1600MHz PC3L-12800 / PC3-12800 240-Pin Unbuffered Non-ECC 1.35V / 1.5V CL11 Dual Rank 2Rx8 based 512x8
  • Module Size: 16GB KIT(2x8GB Modules) Package: 2x8GB ; JEDEC standard 1.35V, this is a dual voltage piece and can operate at 1.35V or 1.5V
  • For DDR3 Desktop Compatible with Intel and AMD CPU, Not for Laptop
  • Guaranteed Lifetime warranty from Purchase Date and Free technical support based on United States

Second change: use fewer hash points where extra precision had little value

Reducing the number of points can save memory, but too few points can make traffic distribution less even. Cloudflare modeled the trade-off for k hashes per server, examining expected value, standard deviation and coefficient of variation. In the article’s example, the final 90,000 points in a 100,000-point setting reduced modeled error by only 0.7%. That diminishing return led the team to reduce points per server by 90% in its revised configuration, without appreciable error in its system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Those figures describe Cloudflare’s example and production configuration; they are not a universal threshold for other services. The model assumes a continuous hash ring, while the implementation uses 32-bit hashes. In a finite hash space, collisions can add error, particularly when point counts are high. A different workload, server population, weighting scheme or tolerance for imbalance may produce a different memory-versus-distribution trade-off.

Rank #3
G.SKILL RipjawsV Series DDR4 RAM (XMP) 16GB (2x8GB) Up to 3200MT/s* CL16-18-18-38 1.35V Intel AMD Desktop Computer Memory U-DIMM - Black (F4-3200C16D-16GVKB)
  • Requires overclocking/BIOS adjustments. Maximum speed and performance depends on system components, including motherboard and CPU.
  • G.SKILL RipjawsV Series DDR4 U-DIMM Memory Kit, Model: F4-3200C16D-16GVKB
  • Non-ECC, DDR4 U-DIMM, 288-pin, for Desktop PC & Gaming
  • Includes JEDEC default profile, and Intel XMP memory overclock profile
  • Do not mix memory kits. Memory kits are sold in matched kits that are designed to run together as a set. Mixing memory kits will result in stability issues or system failure.

How to apply the method to another system

  1. Find the expensive structure. Measure memory at the component and process level, and identify which data structures account for the cost. Distinguish memory that is genuinely necessary from representation overhead or duplicated structures.
  2. Define the quality constraint. For a routing ring, quantify distribution error and the effect of server weights or restricted server pools. For another structure, choose the behavior that must not degrade and define how it will be measured.
  3. Model alternatives before changing production. Estimate how changes in representation or item count affect memory and quality. Check whether assumptions in the model—such as a continuous hash space—match the implementation closely enough, and account for finite-width effects such as collisions.
  4. Measure the implementation, not just the theory. Compare memory use and service behavior under representative conditions. A smaller logical representation does not guarantee the same percentage reduction in total process memory.
  5. Make the rollout reversible. Keep a known-good version available, compare the old and new behavior, expand deployment in stages, and define the signals that would trigger a rollback.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why the rollout mattered as much as the math

Changing a consistent-hash ring can remap cacheable requests. When requests land on different storage servers, caches may miss and send more traffic to origin. Cloudflare therefore did not switch its entire network at once.

The team temporarily retained both ring versions, routed requests through a migration framework that enabled request-level selection, and moved from small validation locations to larger data-center groups. During the rollout, it monitored backend-selection traces, ring-version counters, connection errors, process memory, startup time, cache behavior and origin traffic. After completing the migration, it removed the old path.

Rank #4
Crucial 32GB DDR5 RAM Kit (2x16GB), 5600MHz (or 5200MHz or 4800MHz) Laptop Memory 262-Pin SODIMM, Compatible with Intel Core and AMD Ryzen 7000, Black - CT2K16G56C46S5
  • Boosts System Performance: 32GB DDR5 RAM laptop memory kit (2x16GB) that operates at 5600MHz, 5200MHz, or 4800MHz to improve multitasking and system responsiveness for smoother performance
  • Accelerated gaming performance: Every millisecond gained in fast-paced gameplay counts—power through heavy workloads and benefit from versatile downclocking and higher frame rates
  • Optimized DDR5 compatibility: Best for 12th Gen Intel Core and AMD Ryzen 7000 Series processors — Intel XMP 3.0 and AMD EXPO also supported on the same RAM module
  • Trusted Micron Quality: Backed by 42 years of memory expertise, this DDR5 RAM is rigorously tested at both component and module levels, ensuring top performance and reliability
  • ECC Type = Non-ECC, Form Factor = SODIMM, Pin Count = 262-Pin, PC Speed = PC5-44800, Voltage = 1.1V, Rank And Configuration = 1Rx8

This approach treats deployment risk as part of the optimization. A memory win is not useful if a sudden shift in cache locality causes unacceptable origin load or service errors; parallel versions and staged expansion provide opportunities to detect those effects and reverse course.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the result does—and does not—show

Cloudflare’s case shows how modeling and measurement can expose diminishing returns in a costly production structure. The authors also say the modified implementation is available in the open-source pingora-ketama crate as an unadvertised Cargo feature. The article’s broader point is to examine the assumptions and trade-offs in your own system; it does not establish that Rust, a six-byte point, a 32-bit hash or Cloudflare’s point-count reduction is right for every stack.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Cloudflareconsistent hashingPingoraRAM optimizationsoftware engineeringsystems design

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.