Object storage is the piece of infrastructure people use most and understand least, because it presents an interface — buckets, folders, files — that is a deliberate lie. There are no folders. There is a flat key-value map from a string to a blob of bytes, and the slashes in your keys are ordinary characters that a listing API pretends are a hierarchy.
Almost every surprise in using object storage comes from that gap. And almost every interesting property of building one comes from a single question: how do you make bytes survive hardware that is guaranteed to fail?
Where eleven nines comes from
Disks fail constantly. At any real scale, several are failing right now. Durability is therefore not about preventing loss, it is about arranging that any individual loss does not matter.
Storing one petabyte, two ways
—
The obvious approach is replication: keep three copies on three machines in three failure domains, tolerate two losses, and pay three times the disk. Simple, and expensive enough that at petabyte scale it is the whole conversation.
Erasure coding does better on both numbers at once, which sounds impossible until you look at it. Split the object into 10 data fragments, compute 4 parity fragments using Reed-Solomon, and scatter all 14. Any 10 of the 14 reconstruct the original, so you survive four simultaneous losses — two more than triple replication — while storing 1.4× the data rather than 3×. Try it in the figure: kill four fragments under 10+4 and the object is still readable; kill three under 3× replication and it is gone.
Nothing is free, and here the cost moved rather than disappeared. A replicated object is one disk read from any one machine. An erasure-coded object requires ten fragments from ten machines and a reconstruction step, so every GET is a small fan-out with the tail-latency problem that implies. This is why real systems do both: replicate small, hot objects where read latency dominates; erasure-code large, cold ones where storage cost dominates.
The other cost is rebuild traffic. When a disk dies, every object with a fragment on it must be repaired, and repairing one erasure-coded object means reading ten fragments to regenerate one. That is a large, sustained, background read load that competes with your customers, which is why rebuild rate is a throttled, planned capacity number rather than something that happens as fast as possible.
And the eleven nines figure is arithmetic on top of this: fragment count, failure domains, independent failure probability, and mean time to repair. The time to repair is the term people forget — durability is not a property of the encoding alone, it is a property of the encoding and how quickly you replace what you lost.
Getting bytes in and out
The write path has one rule: large uploads must be resumable, and that is not an optimisation.
A 4 GB upload that dies at 87%
—
A 4 GB upload over a single request that dies at 87% has discarded twenty minutes of someone’s day and starts again from zero — on the connection that just demonstrated it drops. On a mobile network, that upload may never complete at all.
Multipart splits it into independently uploaded, independently retried chunks. Completed parts are durable at the server, so a failure costs the part in flight rather than everything. Choosing the part size is the usual trade: smaller parts mean less rework and more requests, each with overhead and its own chance to fail, and most people land between 8 and 128 MB. Parts can also upload in parallel, which is often the larger practical win.
The other half of the write path is that your servers should not be in it. A presigned URL is a time-limited, signed grant that lets the client talk to the storage service directly. The bytes never traverse your application, which means your API does not need bandwidth proportional to your users’ upload volume — the difference between a service that handles large files and one that falls over on them.
For reads the same idea runs backwards: a presigned GET, or a CDN in front of the bucket. Never proxy object bytes through your application if you can hand out a URL instead.
The consistency model is the sharp edge
Object storage looks like a filesystem and behaves like a distributed key-value store, and the differences show up in exactly the places where you were being clever.
Objects are immutable. There is no partial update. “Modifying” a 5 GB object means uploading a new 5 GB object. Anything you plan to append to does not belong here.
Listing is not free and not a directory read. LIST scans a lexicographic key range and
returns pages. Listing a prefix with ten million keys is a paginated crawl, not a lookup,
and using it in a request path is the most common performance mistake people make with
object storage. Keep your own index in a database if you need to enumerate.
Read-after-write is strong for a single object; listings lag. Modern S3 gives you
read-after-write consistency for a PUT, which removed a decade of workarounds. Listings
and cross-region replication are still eventually consistent, so a PUT followed by a
LIST may not show the object you just wrote.
Key naming is a performance decision. Keys are sorted, and partitions are ranges of that sort order, so keys with a common prefix land in the same partition. A timestamp-first naming scheme concentrates every write on one hot partition. Put the high-entropy component first.
There is no rename. Renaming is copy-then-delete, which for a large object is a full data movement. Directory-style reorganisation of a bucket is not a metadata operation; it is a migration.
The parts nobody mentions
Lifecycle rules are most of the savings. Objects have a temperature that falls predictably with age, and a rule that moves data to infrequent-access after 30 days and archive after 90 will typically cut a storage bill by more than any application change. The trap is retrieval: archive tiers charge for reads and can take hours, so archiving something your product reads occasionally converts a small storage bill into a large retrieval bill and a support problem.
Deletes need to be recoverable. Versioning plus a lifecycle rule that expires old versions is the difference between “someone ran the wrong script” being an afternoon and being a company event. Object lock, where a deletion cannot be performed even with credentials, is what makes a backup actually a backup against ransomware.
Egress is the bill that surprises people. Storage is cheap and getting data out is not. Design the read path — CDN in front, same-region compute — before the volume exists, because the architecture that makes egress expensive is hard to change later.
Small objects are inefficient everywhere. Per-object metadata, per-request cost and erasure-coding overhead all dominate for tiny files. Millions of 2 KB objects is a workload object storage handles badly; pack them.
Integrity is checked continuously, not on read. Bit rot is real at scale, so a background scrubber reads and verifies checksums constantly and repairs from parity. Data that is never read is data whose corruption you would otherwise discover at the worst possible moment.
The short version
There are no folders. It is a flat key-value store with a listing API that fakes a hierarchy, so listings are range scans rather than lookups, renames are full copies, and key naming is a partitioning decision.
Durability comes from erasure coding: a 10+4 code survives four simultaneous fragment losses for 1.4× the storage, beating triple replication on both cost and fault tolerance. The price is on the read path and in rebuild traffic, which is why hot small objects stay replicated. Eleven nines is arithmetic over fragments, failure domains and — the term everyone forgets — how fast you repair.
Use presigned URLs so bytes never touch your servers, and multipart so a dropped connection at 87% costs one part instead of the whole file. Then set lifecycle rules early, turn on versioning before you need it, and look at your egress path before your volume makes it the biggest line on the bill.