Three kinds of storage
| Block | File | Object | |
|---|---|---|---|
| Interface | Raw disk volumes | Hierarchical paths, POSIX | HTTP API: PUT/GET by key |
| Scale | One machine (mostly) | Shared cluster | Practically unlimited |
| Use for | Databases, VM disks | Shared filesystems, legacy apps | Media, backups, logs, data lakes |
| Examples | EBS, Persistent Disk | EFS, NFS | S3, GCS, Azure Blob, Cloudflare R2, MinIO |
Object stores offer extreme durability (S3 is designed for 11 nines) by spreading data across devices and zones, often with erasure coding: split data into k pieces plus m parity pieces, so any k pieces can rebuild it at far less overhead than 3 full copies.
Upload without touching your servers
Streaming gigabytes through your app servers wastes bandwidth and threads. Instead, issue a pre-signed URL:
The pre-signed URL embeds the bucket, key, allowed content type, size limit and expiry, signed with your credentials. The client can do exactly one thing with it.
Large files: multipart and resumable
- Multipart upload: split a file into parts (e.g. 8–64 MB), upload parts in parallel, then "complete" to assemble. A failed part is retried alone.
- Resumable uploads: the client records which parts succeeded; after a network drop it continues where it stopped. Essential on mobile.
- Checksums per part (and for the whole file) detect corruption.
- Content-addressed chunks (key = hash of content) enable deduplication (Case Study C14 of the book).