System Design
Capacity sizing math, layer-by-layer architectural trade-offs, failure scenario evaluations, and architecture trade-off notes.
- • 100M DAU · ~50 req/user/day · 3x peak (~175K peak QPS)
- • 95% reads / 5% writes · ~1 KB average value · 2B working-set keys
- • Target 95%+ hit rate · Ephemeral cache (DB is source of truth)
- • Nodes: ~100 GB usable RAM and ~100K ops/sec each
Back-of-Envelope Sizing Gate
With 2B keys × 1 KB × RF=2 (4 TB) and ~175K peak QPS, what sizes the cache fleet?
Hint: Compare RAM nodes (4,000 GB / 100 GB) vs QPS nodes (175K / 100K).
At 175K peak QPS (95% reads) and 95% cache hit rate, roughly how many read QPS hit the Primary DB?
Hint: Reads ≈ 166K/s. Misses = 5% of reads.
Commit Your Architecture Decisions
Architecture Follow-Ups & Signal Cards
Jot your design notes before clicking Reveal to compare against Strong vs Weak vs Red-Flag architectural trade-offs.
Why delete the cache key on a DB write instead of updating the cache with the new value?
How do you even know a hot key is happening before a shard falls over?
OpenAI twist: How does this architecture change for an LLM inference KV-cache?