Scenario / Heavy files
Guided System Design Lesson: CDN and Object Storage
A media-heavy app wastes server capacity on files that belong at the edge.
Run this scenarioBriefing
Edge delivery
Put large static files in object storage and serve them from the edge; servers should spend time on logic, not bytes.
Put large static files in object storage and serve them from the edge; servers should spend time on logic, not bytes.
Put large static files in object storage and serve them from the edge; servers should spend time on logic, not bytes.
- Watch cdn in the simulator.
- Watch object storage in the simulator.
- Watch edge offload in the simulator.
Contract
95%
260ms
$760/mo
Traffic shape
Live event traffic with long-lived sessions and bursts. Baseline 240 users; peak around 3,600 users over 28 hours.
Available components
Server
HTTP request handler Every web app needs at least one server. More servers let you handle more simultaneous requests before latency starts climbing.
Postgres
Primary data store Without a database, your app has no memory. Most dynamic requests eventually depend on it.
LB
Load balancer If you run more than one server, something needs to decide where each request goes. That is the load balancer.
Redis
In-memory cache layer Popular pages, profiles, and product data often get requested again and again. Serving those from memory is much faster and cheaper.
Replica
Read-only DB copy Many applications read far more often than they write. Replicas let you spread those reads across more machines.
Queue
Async job buffer Moving background work out of the request path keeps the app responsive even when extra processing is needed.
Worker
Background job processor Separating background work keeps checkout, page loads, and other user actions from competing with batch processing.
CDN
Static asset edge cache Images, scripts, stylesheets, and some API responses do not need to travel all the way back to origin every time.
Object Store
Media and blob storage Binary media does not belong in your primary relational database if you want scale and predictable cost.
Common mistakes
- Adding capacity after the bottleneck has already saturated.
Interview adjacency
- Design image hosting
- Explain edge delivery
- Serve static assets at scale