Block vs Object vs File Storage: Core Abstraction Differences
Block Storage: Raw Disk Sectors
Block storage presents raw storage divided into fixed size sectors, typically 512 bytes or 4KB. The application sees a flat sequence of numbered blocks with no structure imposed. Writing block 1000 means exactly that: overwrite bytes at position 1000 times block size. The storage system provides no organization, no naming, no metadata beyond block addresses.
This raw access enables databases and filesystems to implement their own structures. A database writes its B tree pages directly to specific block offsets. There is no intermediary interpreting or transforming the data. Latency is minimal because there is nothing between the application and the disk sectors.
File Storage: Hierarchical Paths with Semantics
File storage adds structure on top of blocks. Data lives at paths like /home/user/document.txt. The storage system maintains a tree of directories, tracks file sizes, permissions, modification times. POSIX semantics mean specific behaviors: reads see the latest write, partial updates are possible, file locks coordinate concurrent access.
This structure costs performance. Every file operation requires metadata lookups. Opening /a/b/c/file means reading directory entries for a, then b, then c, then the file inode. The benefit is familiarity: applications use standard read, write, seek operations unchanged since the 1970s.
Object Storage: Flat Namespace with Immutable Semantics
Object storage eliminates hierarchy. Every object has a unique key in a flat namespace. You PUT an object with key images/photo.jpg and GET it back by that key. The slash is just a character, not a directory. There are no partial updates: you replace the entire object or nothing.
This simplicity enables massive scale. Without metadata dependencies between objects, the system can distribute them across thousands of servers. Writing object A does not require coordinating with object B. The trade off is flexibility: no appends, no in place edits, no file locking. Each object is an atomic, immutable blob.
The Fundamental Trade off
Block gives maximum control but requires building everything yourself. File provides familiar semantics but limits scalability. Object sacrifices random access for horizontal scale. A video streaming platform stores media in object storage (immutable, read heavy) but keeps user session data in block backed databases (random access, updates). Choosing wrong means either building unnecessary complexity or hitting scalability walls.