Definition · Request hit rate and byte hit rateFor a cache holding the top C of N ranked objects, the request hit rate is the share of requests served from it and the byte hit rate is the share of bytes served from it. With Zipf popularity p_i ∝ 1/iˢ and sizes size_i ∝ i^b, the second is Σ i^(b−s) over the cached ranks divided by the same sum over all ranks.
b is a size exponent, positive when popular objects are small. Setting b = 0 recovers the request hit rate exactly, which is how you can tell the two formulas are one formula.
Everything that follows is that one ratio evaluated at three exponents, and each case arrives as arithmetic rather than as an assertion.
- b = 0 — every object the same size. Byte hit rate equals request hit rate. The control.
- b = s — size grows exactly as fast as popularity falls, so every rank carries the same bytes and the byte hit rate is exactly C/N, the uniform answer.
- b > 0 in general — popular objects are smaller, so the byte hit rate is below the request hit rate, and the gap widens with b.
Example · Twenty objects, classic Zipf, size proportional to rankN = 20, s = 1, C = 4, b = 1. The top four objects are 57.91% of the requests and exactly 20.00% of the bytes — which is C/N = 4/20, because b = s here. A gap of 37.91 points between two numbers people use interchangeably.
Push the size profile harder and the gap widens. At b = 2 on the same catalogue the byte hit rate falls to 4.76% while the request hit rate is unchanged at 57.91%: the edge is still serving more than half of the requests and is now serving one twentieth of the bytes, because the objects it is not holding are enormous.
The invoice follows the byte rate
Origin egress is (1 − byte hit rate) × total bytes, and the bill is that times the price per gigabyte times the days. At 50 000 GB/day of edge egress with a 20.00% byte hit rate, 40 000 GB/day still leaves the origin, and at two cents a gigabyte over thirty days that is $24 000.
total edge egress 50 000 GB/day
byte hit rate 20.00%
origin = (1 − 0.20) × 50 000 = 40 000 GB/day
bill = 40 000 × 30 × $0.02 = $24 000.00
billing from the REQUEST hit rate instead (57.91%):
origin = (1 − 0.5791) × 50 000 ≈ 21 047 GB/day
bill ≈ $12 627.98 barely half the real invoice
Nearly twice the bill, from using the number that was on the dashboard. And the error is one-sided: because b > 0 is the normal shape of an edge workload, substituting the request hit rate always under-estimates origin egress. A capacity plan made this way is optimistic exactly where being wrong is expensive.
The same gap applies to the origin’s capacity, not only its bill. The origin must actually serve 40 000 GB a day; the request hit rate predicted 21 047 GB, and a link, an origin fleet and an autoscaling policy sized against the second number meet the first one on the day the video catalogue gets popular.
What to do about it
Two moves change the byte rate rather than the request rate. Caching by bytes served rather than by request count — admitting large popular objects even though they cost more slots — moves the byte hit rate directly. And splitting large objects into range-cacheable pieces turns one big miss into many small hits, which is why video is served in segments.
One caution on the model. size_i ∝ i^b is a smooth profile, and real catalogues are lumpy: a handful of very large objects can dominate the byte totals without being anywhere near a clean curve. Use this to understand the direction and the rough size of the gap, and measure the byte hit rate itself before writing a number into a budget.