Object Storage vs Block Storage
You'll learn: How to choose between S3-style object storage and block storage for media files, balancing scalability, cost, and access patterns.
Understanding the Storage Models
Block storage works like a traditional hard drive attached to a server. Data is split into fixed-size blocks, each with a unique address. You mount it as a volume and use a filesystem (ext4, NTFS). It's low-latency and supports frequent random read/write operations—great for databases or operating systems.
Object storage (like AWS S3) treats each file as an immutable object with metadata and a unique identifier. Instead of mounting a drive, you access files via HTTP APIs (PUT, GET, DELETE). Objects are stored in flat namespaces (buckets), not hierarchical folders.
For Image and Video Hosting
Object storage wins for media hosting because:
- Unlimited scalability: No capacity planning needed; add petabytes without provisioning volumes
- Cost efficiency: ~0.10+ for block storage SSD
- Built-in redundancy: 99.999999999% durability across multiple data centers
- HTTP-native: Direct CDN integration and pre-signed URL support
- Metadata-rich: Store content-type, encoding, resolution tags with each file
Block storage use cases (rare for media):
- Editing video on an EC2 instance (needs filesystem-level operations)
- Very low-latency access (<1ms) for thumbnails in high-frequency apps
- Transactional consistency requirements
The Tradeoff
Object storage sacrifices millisecond latency for massive scalability and 80-90% cost savings. Since video streaming and image delivery already require CDN caching (hundreds of milliseconds acceptable), the slight API overhead is negligible.
Key Takeaway: Use object storage (S3) for image/video hosting—it's purpose-built for immutable media at scale, costing a fraction of block storage while handling unlimited growth through simple HTTP APIs.