Cloudflare's square-root sampling stores 4x more rows for 100x more data
Cloudflare's data team cut about 70 GB/s from its backbone in 2026, but growth erased half of one saving within two months.
OddBrief EditorialAI-assisted, human-reviewed
TechKey facts
- Who
- Cloudflare's data team
- What
- about 70 GB/s removed from the backbone between spring and fall 2026
- Method
- keep the square root of each key's records, so 100x more data means about 4x more rows
- Catch
- one dataset regained about half its savings within two months of organic growth
Cloudflare says it removed about 70 GB per second of internal analytics traffic from its backbone between spring and fall 2026, mostly by shrinking data before it crosses the network, according to a post from its data team published October 13. One of the tricks is a sampling rule based on the square root, which keeps rare events visible while storing far fewer rows for the busiest ones.
The pressure is simple: traffic grows exponentially and hardware grows linearly. In May 2026 the pipeline handled roughly 2 billion events per second, the company says.
The square-root rule
For each key, Cloudflare now shuffles the records and keeps a sample equal to the square root of their count, then scales estimates back up by the sample rate. Keep 10 of 100 records and each counts as 10, so the estimate is still 100.
The effect is lopsided on purpose. A key with 100 times more data now stores about 4 times more rows, not 10. Across one example, 11.6 million events fit into 18,000 rows instead of 79,000. The three largest datasets were each cut by at least half, a combined 25 GB/s, or more than 2 petabytes a day.
Cloudflare also moved sampling earlier, into Logfwdr, the service that forwards logs from its edge, instead of only at the central receivers.
Sending each event once
The biggest single saving came from load balancing. Every non-regional event used to be sent to two regions. Now each goes once to a shared ingest pool and is copied to the second region late in the pipeline, after sampling.
That removed about 43 GB/s of compressed transit while adding about 7 GB/s of replication between data centers, a net cut of 36 GB/s. Because the copying happens after sampling and batching compresses better, some datasets shrank by more than half.
Growth eats the headroom
The post is candid about how fast savings disappear. After load balancing in mid-May, one product, Ready-Analytics, dropped from about 26 GB/s to about 13 GB/s. Two months later it was back near 20 GB/s. Sampling then pushed it to roughly 8 GB/s; without both changes, the company estimates, it would have passed 60 GB/s by September.
On the compute side, halving the load on the Ready-Analytics receivers released roughly 750 CPUs and 3.5 tebibytes of memory. Over five years, Cloudflare puts its efficiency work at the equivalent of deferring 2.5 years of hardware growth, and says it has halved the data volume it expects to be processing by 2031.
Sources
- Rewinding the exponential: How we keep hardware usage downCloudflareprimary source
- SamplingCloudflare Docs