Use object storage instead of block storage when your data is mostly files, such as backups, media, logs or analytics data, that applications reach over a network, and you need very large scale and per-object metadata. Use block storage when one server needs a disk with low latency and in-place writes, such as an operating system or a transactional database. Many systems use both.
Block vs object at a glance
| Feature | Block storage | Object storage |
|---|---|---|
| What it stores | Fixed-size blocks presented as a disk | Objects, each with data, metadata and a unique key |
| How it’s accessed | Attached to a server and formatted with a file system | Over HTTP APIs |
| Latency | Lowest; typically sub-millisecond to low milliseconds | Higher; S3 Standard first-byte latency is typically tens of milliseconds |
| Updates | Changes in place, block by block | Whole-object rewrites; changes create new versions |
| Scale | Each volume has a size limit | Effectively unlimited capacity and object count |
| Metadata | Minimal; the file system handles names and permissions | Custom metadata on every object |
| Sharing | Usually one server at a time | Many clients at once |
| Billing | Provisioned capacity, used or not | Bytes stored, plus requests and data transfer |
| Durability | A standard volume lives in one AZ | S3 Standard is designed for 11 nines across at least three AZs |
| Typical examples | Amazon EBS, Azure Managed Disks, Google Persistent Disk | Amazon S3, Azure Blob Storage, Google Cloud Storage |
When object storage is the better choice
- Backups, archives and exports. Objects are easy to copy, version and move between tiers.
- Media files. Images, audio and video are written once and read many times.
- Logs and analytics. Data lakes hold large volumes of mostly unstructured data.
- Static website assets and content delivered through a CDN.
- Data shared by many applications or read from several Regions.
- Unpredictable growth. You don’t need to size a volume in advance.
When block storage is the better choice
- Database data and log files that need low latency and frequent small writes.
- Operating system (boot) disks for virtual machines.
- Legacy applications that expect a normal disk and file system.
- Workloads that change small parts of large files many times a second.
Object storage is generally a poor fit for a transactional database’s main storage. Its latency is higher, and changing even a small part of an object means rewriting the whole object.
If several servers need to share the same folders, the third option is file storage. See types of cloud storage services for the full picture.
Using both together
Most real systems use both. A common pattern keeps the database on a block volume and exports backups or snapshots to object storage. The database gets low-latency disks, and the backups get cheap, durable storage with versioning and lifecycle rules. You can see the overlap in AWS: Amazon EBS snapshots are stored in AWS-managed storage backed by S3, even though you manage them as block volume copies.
For backup strategy in particular, see what is cloud backup and how does it work?
Cost: cheaper per GB is not the whole story
- Object storage bills for the bytes you store. You aren’t paying for empty capacity.
- Block storage bills for what you provision. A 1 TB volume holding 100 GB still costs as a 1 TB volume.
- Object storage bills for requests and data transfer. A request-heavy workload can cost more on object storage than the per-GB price suggests.
- Cold object tiers are cheap to keep, but retrieving data from them costs more and can take longer.
Compare the total cost for your access pattern, not just the storage price.
Common misconceptions
- Object storage is not always slower. Many parallel requests can reach high aggregate throughput, more than a single block volume.
- Block storage is not more durable by default. A single-AZ volume is less durable than S3 Standard, which spans AZs.
- Object storage cannot replace a database disk for transactional workloads.
- Cheaper per GB does not mean cheaper overall when requests or data transfer dominate the bill.
A quick decision checklist
Ask these questions in order:
- Does one server need to read and write this data in place? If yes, use block storage.
- Do many clients need to reach the data over the network? If yes, use object storage, or file storage when they need shared folders.
- Is the data mostly written once and read later? If yes, object storage is usually the better fit.
- Does the workload depend on sub-millisecond response times? If yes, block storage.
- Do you want data spread across several availability zones without managing replication yourself? If yes, object storage.
For a deeper look at how applications connect to object storage, see Is S3 a protocol or API?.