When a client downloads a file from an S3 bucket, standard HTTP fetches everything from byte zero to the end. But if the connection drops after 650 MB of a 1 GB download, restarting from scratch wastes time, server CPU, and network bandwidth.
HTTP range requests (Range: bytes=start-end) allow clients to request exact byte slices of an object. S3-compatible endpoints answer with HTTP 206 Partial Content. We look at what happens on the wire during download resumption and media seeking, comparing total bytes moved and request overhead.
Resuming an interrupted 1 GB download: worked example
Consider a 1,024 MB ISO download where the network connection drops after 650 MB is written to disk. Here is how standard recovery strategies compare:
| Resumption Strategy | First Attempt Bytes | Second Attempt Bytes | Total Bytes Moved | Wasted Bandwidth | Total Requests |
|---|---|---|---|---|---|
| Full re-download (no Range) | 650 MB | 1,024 MB | 1,674 MB | 650 MB (38.8%) | 2 GETs |
Range resume (curl -C -) | 650 MB | 374 MB | 1,024 MB | 0 MB (0.0%) | 2 GETs |
| Chunked worker (16 MB parts) | 650 MB (40 parts) | 384 MB (24 parts) | 1,034 MB | 10 MB (0.9%) | 65 GETs |
In this worked example, resuming with HTTP Range headers is mathematically lossless: the second request begins at byte offset 681,574,400 (650 MB) and fetches only the remaining 374 MB.
What HTTP 206 looks like on the wire
To request an exact slice, the client includes the <code>Range</code> header. When resuming, it also sends <code>If-Range</code> with the object's ETag. If the file was modified on the server while the client was disconnected, the server safely falls back to a 200 OK full download instead of corrupting the output.
Seeking in video files: how browsers use Range
Video streaming over standard object storage relies entirely on range requests. An HTML5 <code><video></code> element never downloads an entire 2 GB MP4 file just to play it:
- 1. Initial metadata probe: The browser requests bytes 0 to 1,024, reads the MP4 header, and finds the location of the index (the
moovatom). - 2. Index fetch: The browser requests only the range containing the
moovatom (typically 1 MB to 3 MB), learning the exact byte offset for every timestamp. - 3. User seeks to 45:00: Instead of buffering 45 minutes of video (approx. 900 MB), the browser sends a range request directly for the GOP (Group of Pictures) starting at minute 45 (approx. 8 MB).
- Total bandwidth used to play 30 seconds at minute 45: ~12 MB instead of 912 MB.
Copy-paste commands for your toolbox
Test your bucket's range support directly from the terminal with curl (on public bucket addresses or presigned URLs) or the AWS CLI (for private buckets):
On storage providers that charge for data transfer, repeated full downloads during network flakiness quickly inflate bills. For a broader look at network costs and traffic management, read our breakdown of egress fees across object storage services, or see how cache headers save bytes on public bucket assets.