Delivery2 min read
The mid-film seek is the whole cache design
Everything interesting about a video cache follows from one interaction: a viewer dragging the scrubber into the middle of an object never requested before.
- caching
- range-requests
- origin
Ask what a cache should do and you get an answer about hit ratios. Ask what a video cache should do and the answer is: survive somebody skipping the first ninety minutes.
Why that one interaction dominates
A seek produces a range request into the middle of a large object. Three things follow immediately.
- The bytes requested may never have been fetched before, so this is a miss on an object the cache is otherwise holding.
- The bytes before them are irrelevant, so fetching the object from the start is wasted work at the one moment latency is visible.
- The viewer is waiting. A seek is the one moment where a stall is blamed on the service and not on the network.
Slice-based storage
Objects are stored as fixed slices, addressed by content hash. A range maps onto the slices it overlaps; only those are fetched.
# Slice arithmetic for a 2 MB slice size.
# seek to 01:30:00 in a 4.1 GB rendition
# byte offset ≈ 2,415,919,104
# slice index = offset / 2 MB = 1152
# fetch slices 1152..1157 (six), serve, cache
#
# The next viewer who seeks anywhere in that ten-second
# neighbourhood is served from disk.
Slice size is the one tunable that matters, and it is a trade between two bad extremes. Too small and the index dominates. Too large and a seek fetches material that goes unwatched, which is the whole-object problem with extra steps.
Content classes behave differently
A blended hit ratio hides the case that hurts. Splitting by class is what makes the number actionable.
| Class | Access shape | What the cache should do |
|---|---|---|
| Live | Everyone at the same offset, once | Hold the trailing window, evict fast |
| New release | Concentrated, front-loaded | Hold whole, evict slowly |
| Long tail | Sparse, scattered offsets | Hold slices, never whole objects |
Sharing one policy across all three lets the live surge evict the long tail's working set at every event. The archive's hit ratio then collapses in a way the overall average never shows.
Related pages
Write-ups that touch the same part of the platform.
Security · 14 July 2026 · 2 min read
Authorise the segment, not the session
Practice · 30 June 2026 · 2 min read
The console change that was never written down
Encoding · 12 June 2026 · 2 min read
The transcoding cost that multiplies
If this write-up describes your setup, send us your numbers and we will read them against it.
Book a call