Cache, CDN, replica or shard: which solves what?
Understand the concept
Caches, CDNs, replicas and shards address different kinds of repeated work or load. A cache reuses a result, a CDN brings cacheable content closer to users, a replica copies data, and a shard owns a subset of data. Combining them requires freshness, routing and recovery rules rather than simply adding more boxes.
Important ideas
-
Cache avoids repeated work; CDN serves cacheable content near users.
-
Read replicas spread reads but may lag behind writes.
-
Shards split data across nodes; choosing the shard key adds design complexity.
-
A read replica may serve stale data, while a shard changes where authoritative data is stored and which node a query must reach.
Can you explain it without the notes?
Cache, CDN, replica or shard: which solves what?
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Caches, CDNs, replicas and shards address different kinds of repeated work or load. A cache reuses a result, a CDN brings cacheable content closer to users, a replica copies data, and a shard owns a subset of data. Combining them requires freshness, routing and recovery rules rather than simply adding more boxes.
Turn this concept into a clear answer.
- Connect each component to a measured bottleneck and describe its failure behavior.
Adapted from 07_SYSTEM_DESIGN_ARCHITECTURE.md · “Cache, CDN, replica or shard: which solves what?”. Examples are study fragments; framework behavior can depend on your version.