Blob & Object Storage
Store petabytes of images, videos, backups, and artifacts cheaply and durably.
In plain words
Object storage is a huge, cheap warehouse for files like photos, videos, and backups. You put a file in with a name and get it back later by that name.
Think of it like…
Checking your heavy suitcase at a warehouse and only carrying the small paper claim ticket (URL/object ID) in your pocket.
Where you’ve seen it
When you upload a profile picture, the app stores the image in Amazon S3 and saves only its URL in the database.
Words you’ll hear
- Object / blob
- A file plus its metadata, stored as one unit.
- Bucket
- A top-level container for objects.
- Pre-signed URL
- A temporary link that lets a user upload or download directly.
- Durability
- How unlikely data loss is (S3 advertises 11 nines).
Visual diagram
Theory & deep dive
Never proxy big files through your web servers or store them in SQL
Relational databases are built for small structured rows, not 2 GB videos. Putting large binaries in SQL bloats backups, slows queries, and costs 10× more.
Likewise, streaming uploads through your API servers ties up worker threads and doubles bandwidth costs. Instead, your API issues a pre-signed URL (cryptographically signed for one key, size limit, and 5-minute window), and the client uploads directly to S3/GCS.
How it works, step by step
Step 1 of 41. Store metadata in DB, bytes in Object Storage
Keep file ownership, MIME type, size, and object key in PostgreSQL/DynamoDB; keep actual binary payloads in S3/GCS.
- DB Row Size
- ~500 bytes
- Blob Durability
- 11 nines (99.999999999%)
When to use it & trade-offs
What it is
Object storage (like Amazon S3 or GCS) stores immutable binary blobs under flat keys inside buckets, separated from lightweight relational metadata.
Why it matters: Storing megabyte-to-gigabyte files inside a SQL database bloats backups, exhausts RAM caches, and limits scaling.
When to reach for it
- User avatars, photos, PDFs, backups, ML datasets, and video segments
- Dropbox/Google Drive sync using chunk hashes + delta metadata
- Data lakes storing Parquet/JSON snapshots cleanly outside OLTP DBs
When to avoid or be careful
- Storing large binary blobs in SQL
BYTEA/BLOBcolumns - Proxying multi-gigabyte uploads through Node/Python API pods
Storage Tier & Upload Patterns
Strengths: Zero proxy bandwidth on app servers; scales to millions of uploads.
Watch out: Requires S3 event webhooks or client confirmation call to finalize DB state.
Strengths: Parallel uploads, pause/resume, delta sync, cross-user deduplication.
Watch out: Higher client complexity and garbage collection needed for orphaned chunks.
Strengths: Lifecycle rules move old backups/logs from Standard ($0.023/GB) to Glacier ($0.004/GB).
Watch out: Cold archive tiers incur retrieval fees and minutes-to-hours restore times.
Interview signals & numbers to know
When this topic comes up
- upload photos/videos
- cloud drive
- backups
- resumable upload
- petabytes of media
Benchmarks & rules of thumb
- S3 durability
- 99.999999999% (11 nines)
- Multipart chunk size
- 4–16 MB
- Standard S3 cost
- ~$0.023 / GB-month
- Pre-signed URL TTL
- 5–15 minutes
Common mistakes & follow-ups
Common interview mistakes
- Proxying file bytes through application servers instead of issuing pre-signed URLs
- Marking a file “ready” before virus scanning or transcoding completes
- Forgetting garbage collection for aborted multipart uploads or deleted references
Likely interviewer follow-ups
- How do you prevent a user from uploading a 50 GB file when their pre-signed URL only allowed 10 MB?
- How does Dropbox sync only the changed 4 MB block of a 1 GB file?
- How do you delete or deduplicate shared blobs safely using reference counting?
Knowledge check
Put it into practice
Design full architectures with AI feedback
Apply Blob & Object Storage inside real High-Level Design prompts or review Q&A flashcards.