Quick revision
The short answer
Block storage gives one machine a raw disk, file storage gives many machines a shared file system, and object storage gives an HTTP API over whole, immutable objects in a flat key space, with very high durability and cheap capacity. Amazon S3 has given strong read-after-write consistency for writes, overwrites, deletes and listings since December 2020, but other S3-compatible stores differ. A service keeps metadata such as owner, size, checksum, status and object key in its database, keeps the bytes in the object store, and hands out signed URLs instead of streaming files through its own pods.
What to remember
In this answer, we compared block storage (a raw disk for one machine), file storage (a shared POSIX file system) and object storage (an HTTP API over whole, immutable objects in a flat key space). We saw that objects cannot be edited or appended, that folders are only key prefixes, and that S3 has given strong read-after-write consistency since December 2020 while other stores may differ. Finally, we split the work: metadata in the database, bytes in the object store, presigned URLs instead of streaming through pods, random keys, and private buckets.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Block storage gives one machine a raw disk, file storage gives many machines a shared file system, and object storage gives an HTTP API over whole, immutable objects in a flat key space, with very high durability and cheap capacity. Amazon S3 has given strong read-after-write consistency for writes, overwrites, deletes and listings since December 2020, but other S3-compatible stores differ. A service keeps metadata such as owner, size, checksum, status and object key in its database, keeps the bytes in the object store, and hands out signed URLs instead of streaming files through its own pods.
Why this question is asked
Almost every backend system stores files of some kind: profile pictures, invoices as PDFs, exports, backups. Where those bytes live, and how the service keeps track of them, decides how well it scales and how safe it is. Interviewers ask this question early in system design rounds to check that we know the three storage types, that we know the current consistency model instead of an outdated one, and that we split responsibilities between the database and the object store sensibly. In this answer, we will compare block, file and object storage, look at what objects can and cannot do, cover the consistency model, design the split between database and object store, and finish with keys and access control.
1Three Kinds of Storage
Block storage, such as an EBS volume or a local SSD, is a raw disk attached to one machine. The operating system puts a file system on it, and databases run on it because they need fast, small, random reads and writes, updates in place, and fsync. It is usually attached to one machine at a time and is priced per provisioned GB.
File storage, such as NFS or Amazon EFS, is a shared POSIX file system that many machines mount at once. Programs open, seek, append and lock files exactly as on a local disk. It is convenient for legacy applications and shared working directories, but more expensive per GB and harder to scale to very high request rates.
Object storage, such as S3, Google Cloud Storage, Azure Blob Storage or an S3-compatible store like MinIO or Ceph, is not a disk at all. It is an HTTP service: we PUT a whole object under a key in a bucket, GET it back, or DELETE it. Behind the API, the data is spread over many machines and often several data centres, giving durability designed for eleven nines and practically unlimited capacity at a low price per GB, with charges per request and for data transferred out.
| Block | File | Object | |
|---|---|---|---|
| Interface | raw disk to one machine | shared POSIX file system | HTTP API: PUT, GET, DELETE |
| Edit in place | yes | yes, including append | no, rewrite the whole object |
| Typical use | databases, boot disks | shared folders, legacy apps | uploads, media, backups, data lake |
| Scale and cost | per volume, provisioned | higher cost per GB | near unlimited, cheapest per GB |
2What Objects Can and Cannot Do
An object is written whole and is immutable. We cannot change byte 500 of a 2 GB video or append a line to a log object; to change it, we write a new object, or a new version of the same key if versioning is on. Large uploads are split into parts with multipart upload, but the object only appears when all parts are complete.
The key space is flat. A key such as invoices/2026/11/inv-123.pdf looks like a path, but there are no folders; the slashes are just characters. Listing works by prefix: list all keys that start with invoices/2026/11/. Consoles draw folders by grouping keys at the slash, which is only a naming convention. Renaming a folder is therefore not one operation but a copy and a delete for every object under that prefix.
3Which Consistency It Gives Today
For years, S3 offered only eventual consistency for overwrites, deletes and listings, and many older articles still say so. Since December 2020, Amazon S3 gives strong read-after-write consistency for all PUT, overwrite and DELETE operations, and listings reflect them immediately. So after a successful PUT, any GET of that key returns the new object, and a LIST shows it.
Two points still need care. Strong consistency is per key; there are no transactions across several objects, and two concurrent writers to one key simply race, with the last one winning, unless we use conditional writes where the store supports them. And S3-compatible stores are not all the same: some self-hosted or other cloud stores have different guarantees, so we check the store we actually use rather than assuming S3's behaviour.
4Splitting Data Between the Database and the Object Store
The database holds the metadata: who owns the file, its size, content type, checksum, status (PENDING, READY, DELETED), the object key, and the business links, such as which invoice it belongs to. These are small fields that we query, join, constrain and update in transactions, which is what databases are good at. The object store holds the bytes, which are large, immutable and read whole, which is what it is good at.
The service never streams large files through its own pods if it can avoid it. For an upload, it creates the metadata row and returns a presigned URL, a time-limited URL signed with the service's credentials that allows exactly one operation on one key. The client uploads straight to the object store. For a download, the service checks permissions and returns a presigned GET URL, or serves the file through a CDN. Pods stay small, and the object store does the heavy lifting.
7 messages in order. Play them, or step through them one at a time.
5Keys and Access Control
We use random or content-addressed keys, such as a UUID or a SHA-256 of the content, never the file name the user typed. User names collide, can contain path tricks or odd characters, and leak information in URLs. The original name goes into the metadata row and into the Content-Disposition header on download.
Buckets stay private, with public access blocked at the account level. Services reach them through IAM roles with the narrowest permissions, and users only ever get short-lived signed URLs or CDN-signed cookies. A misconfigured public bucket remains one of the most common causes of data leaks, so this is worth saying explicitly in an interview.
6Follow-up questions
When would you store small blobs directly in the database instead?
When they are small, a few kilobytes, read together with the row, and need to change in the same transaction, such as a thumbnail-sized avatar or a signed JSON document. Keeping them in a bytea or BLOB column avoids a second system and keeps backups consistent. Once files reach hundreds of kilobytes or more, or there are millions of them, they bloat the database, its backups and its replicas, and the object store wins.
Can I use object storage as a file system with a FUSE driver?
It works for reading and for occasional whole-file writes, but small edits and appends become full object rewrites, and listing large prefixes is slow. Treat it as a convenience for tools, not as a database or a shared working disk.
How do you guard against a corrupted or truncated upload?
Ask the client to send a checksum with the upload, which S3 verifies, store the expected checksum in the metadata row, and compare it after upload before marking the row READY.
7Conclusion
In this answer, we compared block storage (a raw disk for one machine), file storage (a shared POSIX file system) and object storage (an HTTP API over whole, immutable objects in a flat key space). We saw that objects cannot be edited or appended, that folders are only key prefixes, and that S3 has given strong read-after-write consistency since December 2020 while other stores may differ. Finally, we split the work: metadata in the database, bytes in the object store, presigned URLs instead of streaming through pods, random keys, and private buckets.
Open with
Block storage is a raw disk for one machine, which is what databases run on. File storage is a shared POSIX file system that many machines mount. Object storage like S3 is an HTTP API: you put and get whole objects by key in a flat namespace, with very high durability and the lowest cost per gigabyte.
Then, if they want more
Objects are immutable, so you cannot edit or append; you write a new object or version. Folders are just key prefixes, and listing is by prefix.
On consistency, S3 has been strongly read-after-write consistent for puts, overwrites, deletes and listings since December 2020, but that is per key with no multi-object transactions, and other S3-compatible stores may differ, so I would check the one we use. For a service, I keep the metadata in the database: owner, size, content type, checksum, status and the object key.
The bytes go to the object store, and the service hands out presigned URLs so clients upload and download directly rather than streaming large files through our pods. Keys are random or content hashes, never the user's file name, and buckets stay private with access through IAM roles and short-lived signed URLs.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "How does object storage differ from block and file storage, which consistency does it...": https://scrivio-interview-library.netlify.app/architecture/storage-and-pipelines/4d3c13e7e5/