What it is
Object storage keeps objects — a blob of bytes plus metadata such as content type and custom key-value pairs — in buckets. Every object is identified by a key, an arbitrary string like users/42/avatar.jpg, and accessed over an HTTP API: PUT writes a whole object, GET reads it (optionally a byte range), HEAD reads its metadata, DELETE removes it, and LIST returns keys that start with a given prefix. Amazon S3 popularised the model; Google Cloud Storage, Azure Blob Storage and many S3-compatible systems (including self-hosted ones) follow it.
Why it exists
Disks and file systems are bounded by one machine or one cluster, need capacity planning and fail with their hardware. Applications increasingly store large, unstructured data (uploads, media, backups, logs, analytics files) that is written once and read many times. Object storage gives practically unlimited capacity with no provisioning, very high durability, pay-per-use pricing and an API any client can reach, by dropping the parts of file-system semantics that are hard to scale: in-place edits, locks, renames and hierarchical directories.
How it works
Flat namespace. Keys are strings. The slash is just a character; consoles show "folders" by grouping common prefixes in listings. Renaming a prefix means copying and deleting each object.
Whole-object writes. You cannot append to or modify part of an object; you write a new version of the whole object. Large uploads use multipart upload: the object is sent in parts, possibly in parallel, each part retried on its own, and assembled when the upload is completed.
Consistency. The major providers now offer strong read-after-write consistency for single objects: after a successful PUT or DELETE, subsequent reads and listings reflect it. Documentation describing eventual consistency for S3 is from before late 2020. There are still no transactions across objects.
Durability. Objects are stored redundantly across devices and, for standard storage classes, across availability zones before the write is acknowledged. Two techniques: full replication (several complete copies) and erasure coding, which splits an object into k data fragments, computes m parity fragments and can rebuild the object from any k of the k + m. With 6 + 3 fragments spread over three zones, losing a whole zone still leaves 6 fragments, at 1.5× the raw size instead of 3× for three copies. Background processes verify checksums and repair lost fragments. Providers publish durability design targets for their storage classes; treat them as design goals, and remember they do not protect against your own deletes.
Access control. Requests are authenticated with credentials and authorised by identity policies and bucket policies. Presigned URLs are URLs that carry a signature made with valid credentials over the method, bucket, key, expiry and optionally headers; whoever holds the URL can perform exactly that operation until it expires. A POST policy (presigned POST) can add conditions such as a maximum size.
Storage classes and lifecycle. Classes trade storage price against retrieval price and latency: frequent access, infrequent access, archive. Lifecycle rules move objects between classes or delete them after a given age.
When to use it
- User uploads: photos, documents, video.
- Static website assets and media served through a CDN.
- Backups, database snapshots and log archives.
- Data lakes: analytics files (Parquet and similar) queried in place by engines that read object storage.
- Artefacts: build outputs, container layers, ML datasets and model weights.
When not to
- As a database: there are no queries over contents, no secondary indexes and no multi-object transactions. Keep metadata (owner, status, references) in a database and the bytes in object storage.
- For workloads that need POSIX file semantics: in-place updates, appends, locks, atomic renames. Use block storage or a network file system.
- For many tiny, latency-critical reads and writes: per-request latency (tens of milliseconds) and per-request pricing add up.
Trade-offs
| Choice | You gain | You pay |
|---|---|---|
| Presigned direct uploads | Servers stay out of the data path; scales with the store | Signing logic, post-upload validation, URLs usable by whoever holds them |
| Proxying uploads through the app | Full control and inspection in-line | App connections and bandwidth tied up by transfers |
| Erasure coding vs replication | Lower storage overhead for the same loss tolerance | More work to read degraded data and to repair |
| Colder storage class | Much cheaper storage | Retrieval fees, minimum durations, slower or delayed access |
| Versioning / object lock | Protection against deletes, overwrites and ransomware | Storage for old versions; deletion rules to manage |
Alternatives
- Block storage (virtual disks): attached to one machine, low latency, needs a file system and capacity planning.
- Network file systems: shared POSIX-like access for applications that need it, at higher cost per gigabyte.
- Databases with blob columns: transactional with metadata, but large blobs bloat backups and replication.
- CDN storage or edge key-value stores: for small objects needed at the edge.
Failure modes
- Public buckets by mistake: a misconfigured policy exposes everything. Block public access by default and serve public content through a CDN.
- Leaked or long-lived presigned URLs: anyone can use them until expiry.
- Accidental or malicious deletion: durability does not protect against
DELETE. Use versioning, object lock and backups in a separate account. - Hot prefixes and request throttling: very high request rates concentrated on one key prefix can be throttled; spread keys or ramp traffic gradually.
- Egress bills: serving popular objects straight from the bucket can cost more than storing them.
- Orphans: objects whose database records were deleted (or uploads never completed) accumulate silently; lifecycle rules and reconciliation jobs clean them up.
In production
Block public access and grant least privilege per application. Upload directly with short-lived presigned URLs (server-generated keys, fixed content type, size limits), then validate content asynchronously from a storage event before marking it usable. Serve through a CDN with the bucket readable only by the CDN. Enable versioning on buckets that matter, add lifecycle rules for old versions, incomplete multipart uploads and cold data, and replicate critical buckets to another region if you need regional disaster recovery. Monitor request errors, 4xx from expired signatures, egress and storage growth.
Common misconceptions
- "Folders exist." Only prefixes exist.
- "Very high durability means I cannot lose data." Durability covers hardware loss, not your own deletes, bugs or a compromised account.
- "Object storage is eventually consistent." No longer true for single-object reads on the major providers.
- "Presigned URLs are secure because they are secret." They are bearer credentials: keep them short-lived and narrow.
Interview angle
In designs with user uploads or media, put the bytes in object storage and the metadata in a database, upload with presigned URLs, process with events (thumbnails, virus scans, transcoding), and serve through a CDN. Be ready to explain durability (replication or erasure coding across zones), the consistency model, multipart uploads for large files, lifecycle and storage classes for cost, and how you protect against public exposure and accidental deletion.
Model assumptions
Steps 1–4 are scripted illustrations, not simulations: packets are placed by hand to show request order, the zone storage nodes have no simulation model, and the 6 + 3 erasure-coding scheme is an example (providers do not publish their exact layouts). Steps 5–7 use the engine. The object store is modelled as a server with 2,000 concurrent transfers and a 400 ms mean time per multi-megabyte transfer (lognormal, cv 0.3). The app servers have 4 workers and room for 8 waiting requests; when they proxy an upload they hold a worker until the store answers. In the presigned step the engine carries only the uploads to the store; the signing request and the storage event are scripted packets. The CDN edge is a fast proxy with a fixed 90% hit ratio. Arrivals are random (Poisson). One-way latencies are fixed: users to app or store 20 ms, app to store 2 ms, viewers to edge 8 ms, edge to store 30 ms. Numbers show behaviour and orders of magnitude only.