Part 2 of 8 · 3 min read
Block, file and object storage
Three ways a computer can offer disk space, and the jobs each one fits.
Think of three kinds of storage building. A parking garage gives each car a numbered bay and does not care what is inside. An office filing room has cabinets, drawers and folders, and a clerk who follows rules for renaming and locking. A left-luggage office takes a bag, hands back a ticket, and gives the same bag back for that ticket. Each building suits a different job.
Block storage
Block storage offers a raw disk, divided into fixed-size blocks that are read and written by number. A program or a file system on top decides what the blocks mean.
Example: a database server mounts a virtual disk from a cloud provider and formats it. The database writes pages (module 4) to it.
File storage
File storage offers a tree of folders and files with names, sizes and permissions. Files can be opened, changed in the middle, appended to, renamed and locked.
Example: a shared network drive where several office computers open the same spreadsheet.
Object storage
Object storage keeps whole objects in a flat space, each found by a key. An object is a chunk of bytes with metadata. Objects are written and read as a whole through an HTTP API, and are not changed in place.
Example: Amazon S3 and Azure Blob Storage. The key photos/2026/11/12/img_204.jpg returns the bytes of one photo.
The book "System Design Interview" describes Amazon S3 as an object storage service known for scale, availability, security and performance. It also notes that a bucket works like a folder: a named container for objects.
| Block | File | Object | |
|---|---|---|---|
| Unit | Block, found by number | File in a folder | Object, found by key |
| Change in place | Yes | Yes | No, an object is replaced whole |
| Layout | Raw disk | Tree of folders | Flat keys (slashes are only part of the name) |
| Access | Attached to one machine | Shared by mount | HTTP from anywhere |
| Scale | One disk | Limited by the server or cluster | Very large, spread over many machines |
| Typical use | Databases, boot disks | Shared documents, logs on a server | Photos, videos, backups, data lake files |
A worked example of why object storage scales so well. A file server with one tree of folders must keep the whole tree consistent: renaming a folder with a million files means changing a million paths, or a clever structure. An object store has no real folders. The key reports/2026/q3.pdf is one string. Listing "everything that starts with reports/2026/" is a prefix search over sorted keys. Renaming means copy and delete. There is nothing to keep consistent across the tree, so the store can spread keys over thousands of machines.
The same property is the weakness. There is no append, no change of 10 bytes in the middle of an object and no cheap rename. A log file that grows by a line every second is a poor fit.
Read it as
Block is "a disk". File is "a shared folder". Object is "a bucket of whole things, found by name, and read over the web".
Check yourself:
- Which kind of storage can change 10 bytes in the middle of a stored item?
- Why is renaming a folder cheap in a file system and awkward in an object store?