Cloudflare has introduced Origin Range Requests, a feature designed to make caching partial requests for large files more efficient. Available on all plans, it can be enabled through a Cache Rule and does not require customers to choose a range size or contact support.
HTTP range requests let a client retrieve selected bytes rather than download an entire file. They are used by video players seeking to a particular point, download managers resuming interrupted transfers, and software repositories serving parts of large packages. Cloudflare says its previous approach could fetch far more data than a client requested: a small read could trigger a 128 MiB origin transfer under one of its former configurations.
The new system uses fixed-size chunks already used by Pingora, Cloudflare’s caching server. It checks which requested bytes are cached, fetches missing data from the origin in ranges aligned to chunk boundaries, and returns only the bytes requested by the client. When another request needs bytes covered by a download already in progress, it can share that work instead of starting a separate origin fetch.
Cloudflare says this coordination also combines cached data with data arriving from the origin in a single response. The system checks that the pieces belong to the same version of a file before combining them, including matching the entity tag and confirming the total file size. If a range cannot be served safely, Cloudflare returns the complete representation instead.
The company says the change roughly halved p99 time to first byte for R2, its object storage service, across storage regions on both cache hits and misses. A further improvement reduced tiered-cache traffic for R2 and similar workloads by about 6% week over week.
Customers can enable the feature by creating a Cache Rule for traffic involving large files and setting Origin Range Requests to On. It is intended for cacheable objects that clients request in parts, including seekable video, resumable downloads, software distributions, archives, disk images, and large model files. The feature does not make responses that are otherwise ineligible for caching cacheable, and the origin must support byte ranges for partial origin fetches to be useful.
Sources: Cloudflare Blog.