Byte Range Requests: Why They Matter for Large Files

A byte range request is an HTTP request that asks a server for only part of a file, identified by byte positions, instead of the whole thing. The server answers with just those bytes, and that single behavior is why a video player can jump to minute 40 without downloading the first 39, and why a 200 GB file can be inspected before it is fully transferred.

For teams that handle large media, 3D and AEC files, this is not a protocol footnote. It decides whether opening a file means waiting for a download or reading a few megabytes. This post goes through the mechanism using the primary sources: the HTTP semantics spec, the MDN reference and the S3 GetObject docs. It also covers where ranges stop working, because they do, and the failures are easy to misdiagnose.

What byte range requests are (and what a range of bytes means)

A byte range request asks the server for a contiguous slice of a resource, counted in bytes from the start of the representation. Bytes are numbered from zero, so bytes=0-3 is the first four bytes, which answers the common question "what is the range of 4 bytes?": positions 0, 1, 2 and 3, because both ends of the range are inclusive.

The range can take three shapes. bytes=500-999 is an explicit slice. bytes=9500- means from byte 9500 to the end. bytes=-500 means the last 500 bytes, which is how a client reads a trailer or footer without knowing exactly where it starts. The syntax and semantics are defined in the HTTP spec, and MDN describes the practical use: a Range request asks the server to send parts of a resource back to the client.

The unit is almost always bytes. The spec allows other range units, but a server that does not recognize the unit you ask for can refuse, which comes up again below.

How a range request works: Range, Accept-Ranges, 206 and Content-Range

The exchange takes three headers and one status code. The server advertises support with Accept-Ranges: bytes in a normal response. MDN states the rule directly: if a response includes Accept-Ranges with any value other than none, the server supports range requests.

The client then sends a Range header on a GET:

GET /footage/reel.mov HTTP/1.1
Range: bytes=0-1023

If the range is supported and satisfiable, the server replies 206 Partial Content with a Content-Range header, for example Content-Range: bytes 0-1023/58000000000. The number after the slash is the full size of the file, so the client learns the total length from a 1 KB read.

You can ask for several ranges in one request, and the server may return them as a multipart body. Many servers handle that poorly or refuse it, so read the response rather than assuming.

Test it yourself. curl -I shows whether Accept-Ranges is present, and curl -r 0-1023 -o /dev/null -D - URL shows the 206 and Content-Range. Two minutes with curl tells you more than the vendor documentation will.

When ranges fail: 200 fallbacks, 416, If-Range and files that change mid-read

Range requests fail in three distinct ways, and each looks different on the wire.

The server ignores the Range header. It returns 200 OK with the entire body. Nothing breaks, but a client expecting 1 KB receives the whole file. This is the most expensive failure on large files, and it is silent. Always check the status code, not just that bytes arrived.

The range is unsatisfiable. Ask for bytes=900-1000 on a 500-byte file and the server should return 416 Range Not Satisfiable. It can include Content-Range: bytes */500 to tell you the current length. A 416 during a resume often means the file got shorter or was replaced.

The file changed between reads. If you fetch the first half, the file is overwritten, and you fetch the second half, you have stitched together two different files. If-Range prevents this. You send the validator you saw earlier (an ETag or a Last-Modified date) alongside the Range header. A matching validator gets a 206. A non-matching one means the server ignores the Range and sends the full current representation with 200, not 412. The ETag must match exactly under strong comparison, so a weak ETag does not qualify.

The practical rule: any client that resumes or reads in pieces should send If-Range and treat an unexpected 200 as "start over".

Why ranges matter for large files: seeking in video, reading headers in big containers, and resuming transfers

Ranges matter for large files because they make cost proportional to what you read, not to the size of the file. Three patterns show it.

Seeking in video. A player scrubbing to the middle of a long ProRes or H.264 file issues a range request for the bytes it needs and nothing before them. Without ranges, scrubbing means downloading from the start.

Reading headers and indexes in big containers. Formats like MP4 and MOV keep an index (the moov atom) that describes where every frame lives. Other containers put metadata in a footer. A client reads the index with one small range read, often using the suffix form bytes=-N for a footer, then fetches only the frames it needs. The same idea applies to any large container with a table of contents, from archives to model files.

Resuming transfers. An interrupted download of a 90 GB file restarts from the last received byte with Range: bytes=N- plus If-Range, instead of from zero.

This is the same reasoning behind proxies and careful storage planning for footage. If you are sizing a video library, the video archive storage capacity guide covers how much you need, and the remote video editing storage checklist covers how remote editors reach it. Ranges are the mechanism underneath both questions.

Range reads on object storage: S3 GetObject ranges, multipart uploads and the limits of single requests

Object storage is where range requests earn their keep, because the storage is built around whole objects addressed by key. The S3 GetObject API accepts a Range header on the request and returns an accept-ranges header in its response. A reader can pull the first megabyte, the last megabyte, or a slice in the middle of a multi-terabyte object without touching the rest.

Uploads are the other half. Large objects are written as multipart uploads: split the file into parts, upload them independently (and in parallel), then complete the upload. A single PUT is the wrong tool for large files. Many S3-compatible services cap single requests well below what a camera original needs. Many S3-compatible APIs support multipart uploads for handling large files in parts.

The limit of a single range request is the mirror image: one request returns one contiguous slice (or a handful of slices). Reading a big file end to end still takes many sequential or parallel range reads. The win is that you choose which ones.

Header size limits and 431/400 errors: why a Range header with many ranges can trigger them

Yes, HTTP headers have size limits, and a Range header with hundreds of ranges can hit them. The HTTP spec sets no single maximum. Each server, proxy and CDN picks its own, commonly in the range of several kilobytes to a few tens of kilobytes for the whole header block. Exceed it and you get 431 Request Header Fields Too Large, or on some servers a generic 400 Bad Request with a message like "the size of the request headers is too long."

A 431 means one header, or all request headers combined, went over the configured limit. A Range header listing many sub-ranges can contribute, but there is no specific "too many ranges" rule behind it. It is a header-size problem like any other.

How to fix 431 and 400 header-size errors:

  1. Split one request with many ranges into several requests with a few ranges each, or merge adjacent ranges into one.

  2. Check the total header size, not just Range. Oversized cookies are the usual culprit, and clearing them often resolves the error in a browser.

  3. If you administer the server, read its logs to see which limit tripped before raising anything. Raising header limits blindly widens your exposure to abusive requests.

How a streaming cloud drive uses byte ranges: streaming on demand, local caching, and offline access

A streaming cloud drive turns the ranges an app asks for into byte range reads against remote storage, so the file never has to be fully downloaded before it opens. Orbit is a cloud drive that streams large files on demand, works offline, and offers file history and an S3-compatible API.

That design is the mechanism from the sections above applied to a folder on your Mac. When an editor opens a large video, the app reads headers and the frames it needs, and those become range reads rather than a full copy. Contrast that with a download-first drive, which must pull the whole file before the app sees it. The cloud storage for large video files post workflow walks through how that plays out on a real edit.

Ranges cover the case where you are online. Orbit also works offline.

Orbit's Mac release is in preparation. Check the download page for current status.

Quick FAQ: HTTP range requests in plain answers

What are HTTP range requests? Requests that include a Range header so the server returns only part of a resource, normally with a 206 status.

How do I know a server supports them? Look for Accept-Ranges: bytes in a response. none or a missing header means do not count on it.

What does 416 mean? The range you asked for falls outside the file. Check the current length in Content-Range: bytes */length.

Why did I get the whole file back? The server ignored Range and returned 200, or your If-Range validator did not match because the file changed.

The structured answers below cover the questions people ask most.

Check for 206 on your own files before you trust any workflow

Byte range requests are the reason large files can be opened, seeked and resumed without a full download, and they fail quietly when a server answers 200 instead of 206. Test your own storage with curl today: confirm Accept-Ranges, request a slice, and look for the 206. If your team loses hours waiting for heavy files to download before anyone can open them, Orbit is built on exactly this mechanism. Its Mac release is in preparation, so check the download page for status.