Web & development / CLEARBYTE

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

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%.
ScenarioCached requests / totalCached body KB / totalRequest hit rateByte hit rate
Small responses hit; large response misses99 / 10099 / 1,09999.00%9.01%
Large response hits; small responses miss1 / 1001,000 / 1,0991.00%90.99%
Equal 10 KB response sizes; 80 hit80 / 100800 / 1,00080.00%80.00%
Download this reference as CSV ↓

Formula & method

Request hit% = cached responses ÷ total responses × 100
Byte hit% = cached response-body bytes ÷ total response-body bytes × 100

Choose 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

Method checked:

Continue with a related task