Lesson 2 of 16
11. Object / Blob Storage

11.1 What's the difference between block, file and object storage?

3 min read+10 XP

At the cloakroom: There are three ways to keep things. A locker you rent that's yours alone, where you can rearrange things inside however you like. A shared office cupboard with labelled shelves and folders that a team uses together. And the cloakroom: hand over a whole item, get a token, collect it whole.

In the system:

block, file and object storage compared.

Figure: block storage is a raw disk, file storage is a shared folder tree, object storage is key to whole object.

  • Block storage is a raw disk made of numbered blocks, attached to one server at a time (a cloud volume like AWS EBS, or the SSD in your laptop). A filesystem or a database sits on top. Fast for small, random reads and writes, which is why databases live on it.
  • File storage is a shared filesystem: folders, files, rename, append, shared by several servers over the network (NFS, AWS EFS). Familiar, but hard to grow to billions of files and huge traffic.
  • Object storage stores whole objects under a key in a bucket, with metadata, accessed over HTTP. There are no real folders: the namespace is flat, and covers/42/large.jpg is just a key that happens to contain slashes. Objects are written and replaced whole. It scales to practically unlimited objects and size, cheaply, and any server or client can reach it. Examples: Amazon S3, Google Cloud Storage, Azure Blob Storage, Cloudflare R2, and self-hosted MinIO. Many of these speak S3's API.

Memory code: "Locker, cupboard, cloakroom." Block for databases, file for shared folders, object for everything big and whole.