Block vs File vs Object Storage Lab (Interactive)
Pair a workload access pattern with a storage abstraction and score protocol fit against a live monthly bill. Match databases, shared CMS mounts and media archives to EBS, EFS or S3, pricing latency, durability and cost per GB.
Block vs File vs Object: Fit & Cost Selector
Pair a workload access pattern with a storage abstraction; the lab scores protocol fit and prices the month.
Monthly bill
$160
$160 GB + $0 req
Effective op latency
0.9 ms
Durability
99.999% single-AZ
Verdict
✅ Correct fit
requires random in-place byte writes (fsync, B-tree pages)
requires concurrent POSIX mount across many servers
requires HTTP/REST + CDN origin access
requires cold tier OK for access pattern
mounted RWO to one instance
Databases need random byte reads/writes, sub-ms latency and fsync — raw NVMe/iSCSI blocks with ext4 on top. Trade-off: ReadWriteOnce, single-AZ, and you manage snapshots yourself.
How It Works Under the Hood
Cloud offers three storage abstractions with incompatible physics. Block (EBS) exposes raw NVMe/iSCSI sectors the OS formats, giving sub-millisecond random reads, writes and fsync that databases require, but attaches to a single instance in one zone. File (EFS) presents a shared POSIX directory tree over NFS that thousands of nodes mount concurrently, at higher latency and cost. Object (S3) stores immutable blobs in a flat namespace accessed over HTTP with eleven-nines durability at roughly a tenth the price, yet one modified byte means re-uploading the whole object, so no transactional engine can run on it.
Core Architectural Principles
- Block storage gives sub-ms random in-place writes for databases but locks to one instance (ReadWriteOnce).
- Object storage is immutable over HTTP with 11 nines durability and the lowest per-GB cost.
- File storage offers ReadWriteMany POSIX mounts so shared apps need no S3 SDK rewrite.
Always state the rule: put relational databases and write-ahead logs on block storage, and media, static assets and backups on object storage. Justify it mechanically, since objects are immutable and cannot serve a B-tree page write in place, while block gives sub-millisecond fsync. Quote S3 eleven-nines durability from multi-AZ replication and mention lifecycle tiering to Glacier for cost. Reaching for EFS only when many nodes need a shared POSIX tree shows precise judgment.
Object storage scales infinitely and is ten times cheaper but is immutable; block is blazing-fast and random-accessible but single-attach and zone-bound.