Request cache-hit rate vs byte cache-hit rate
Request hit rate weights each request equally; byte hit rate weights the response-body bytes. If 99 small 1 KB responses hit cache and one 1,000 KB response misses, request hit rate is 99% but byte hit rate is only 9.01%.
Request cache-hit rate vs byte cache-hit rate
| Scenario | Cached requests / total | Cached body KB / total | Request hit rate | Byte hit rate |
|---|---|---|---|---|
| Small responses hit; large response misses | 99 / 100 | 99 / 1,099 | 99.00% | 9.01% |
| Large response hits; small responses miss | 1 / 100 | 1,000 / 1,099 | 1.00% | 90.99% |
| Equal 10 KB response sizes; 80 hit | 80 / 100 | 800 / 1,000 | 80.00% | 80.00% |
Formula & method
Request hit% = cached responses ÷ total responses × 100
Byte hit% = cached response-body bytes ÷ total response-body bytes × 100Choose a consistent classification of cached and uncached responses before counting. The table is a deliberately simplified model in which a hit avoids an origin body transfer and a miss transfers the whole body. This exposes the difference between request weighting and byte weighting.
Real CDN reports may use sampled data and provider-specific groups. Revalidation, tiered caches, compressed representations, partial responses and edge-generated content can make origin-egress savings differ from this model. Inspect both request and transfer views when diagnosing performance or cost.
Worked example
Caching a frequently requested favicon can raise the request hit rate substantially. If uncached downloads account for almost all transferred bytes, origin bandwidth can remain high despite that improvement.
What can change the answer
Body KB in the example is decimal and excludes headers and connection overhead. A provider’s served-by-edge metric is not automatically identical to the simplified HIT category.
Sources & definitions
- Cloudflare: requests versus data transfer in cache analytics
- RFC 9111: Cache-Control response directives
Method checked:
Continue with a related task
Cache Origin Savings Calculator
Expected origin requests equal total requests multiplied by one minus the cache-hit fraction. At 80% hits, 100,000 requests leave 20,000 expected origin fetches.
Data Storage Converter
Convert a decimal GB amount into bytes and decimal or binary storage units. One GB is 1,000,000,000 bytes; one GiB is 1,073,741,824 bytes.
Page View Revenue Calculator
Page views equal visits multiplied by pages per visit. Estimated revenue equals those page views divided by 1,000, multiplied by page RPM.
Uptime Downtime Budget Calculator
Allowed downtime equals the monitoring window multiplied by one minus the uptime target. A 99.9% target over 30 days allows 43.2 minutes in this time-based model.