CONCEPT SHEET · Concepts

Blob / Object Storage

One-liner: Flat key→bytes store (S3-style) with HTTP access, massive durability, and cheap capacity; the default home for files, media, and backups.

ArticleConcepts© Arthur Bernier Jr537 words1 code block

Say this#

How it works#

TEXT
client --(1) POST /upload-intent--> API --(2) presigned PUT URL--> clientclient --(3) PUT bytes directly------------------------------> S3client --(4) POST /complete {key}--> API --(5) store key in DB--> Postgresviewer --GET cdn.example.com/key--> CDN --miss--> S3
  1. App stores only the object key/URL and metadata in the database.
  2. Uploads go client→S3 via presigned URL (or multipart for >100 MB).
  3. S3 event or client callback confirms; app marks record complete.
  4. Reads served via CDN with the bucket as origin; private content via signed CDN URLs.

Why not the DB: blobs bloat the DB, slow backups/replication, and waste expensive IOPS. Why not a file system: POSIX semantics don't scale across nodes; NFS/EFS is for shared-access needs, not internet-scale serving.

Trade-offs#

ChoiceProCon
Object storeCheap, durable, infinitely scalable, HTTP-nativeNo partial updates, higher per-request latency, no POSIX
DB blobs (bytea/BLOB)Transactional with metadataBloats DB, hurts replication/backups; fine only for <~1 MB rare cases
Network file system (EFS/NFS)POSIX, shared mountsCost, scaling limits, not for public serving
Presigned direct uploadOffloads bandwidth from app serversMust validate after upload (size, type); orphan cleanup
Content-hash keysDedupe, cache foreverNeed a mapping table for human names

Numbers#

  • S3: 11 nines durability, 99.99% availability design; max object 5 TB; single PUT max 5 GB; multipart parts 5 MB–5 GB, up to 10,000 parts.
  • S3 request rates: 3,500 PUT/s and 5,500 GET/s per prefix (scales by adding prefixes).
  • Presigned URL max lifetime: 7 days (SigV4).
  • First-byte latency from S3: order of tens of ms; CDN edge hit: single-digit ms.

In the interview#

See also