Object Storage and CDN Delivery
Object storage keeps large immutable or versioned bytes outside the transactional API tier; a CDN caches eligible representations near users.
Object Storage and CDN Delivery
Object storage keeps large immutable or versioned bytes outside the transactional API tier; a CDN caches eligible representations near users. Store metadata and authorization state in a database, while object bytes live under immutable/versioned keys. Multipart uploads split large files into independently retriable parts and complete only after verification. A CDN cache key selects the representation; TTL, purge, origin shielding and stale serving control freshness. Signed URLs grant scoped, time-limited access but do not replace current authorization policy.
Mechanism and worked example
A client uploads chunks to a scoped object-storage URL. The application verifies size, checksum and expected object version before marking the file ready. A CDN serves a public thumbnail by versioned path; a private document uses a short-lived capability and policy checks at issuance.
| Layer | Owns | Correctness rule |
|---|---|---|
| Object store | Bytes and immutable versions | Verify checksum and completion |
| Metadata DB | Ownership, state and permissions | Commit ready only after object verified |
| CDN | Edge cache and origin protection | Cache key includes safe representation scope |
| Signed URL | Scoped temporary capability | Expiry/revocation boundary is explicit |
Failure modes and operations
An object can upload successfully while metadata commit fails, leaving an orphan. Metadata can point to an incomplete object if completion is not verified. CDN invalidation can lag. A signed URL may remain usable until expiry after permission revocation unless the serving design includes a revocation boundary.
Trade-offs and design boundary
Object storage is cost-effective for large durable bytes but not a relational query engine. CDN caching reduces origin load but introduces stale copies and authorization risks. Immutable versioned paths reduce invalidation pressure; private content needs tenant-safe cache keys and short capability lifetimes.
Interview transfer exercise
Design resumable upload with checksum verification, orphan cleanup, tenant isolation and CDN delivery. Explain what happens if object completion succeeds but the metadata transaction fails.
Read the diagram
Client uploads multipart bytes → Object store verifies completed immutable version → Metadata transaction marks object ready → CDN serves eligible version under cache policy
Design resumable upload with checksum verification, orphan cleanup, tenant isolation and CDN delivery. Explain what happens if object completion succeeds but the metadata transaction fails.
Your design draft
Clarify assumptions, explain your approach, and test the difficult cases. Save your draft, then compare it with the study notes.
Self-review checklist
Self-guided practice. Automated AI feedback and code execution are not connected.