System Design & Scaling
Advanced · 13 missions · about 5 hours
Learn to think like the engineers who keep big products fast: percentiles, caches, CDNs, queues, idempotency, rate limits, sharding and consistency, with real numbers instead of buzzwords. You build each building block yourself, then run a design review on an AI-written service that would fall over at scale.
Missions
- Think in requests per second and percentiles: Averages hide pain. Compute p50, p95 and p99 the way monitoring systems do.
- Caching 101: build an LRU cache: Keep hot data close, evict the cold, and measure your hit rate.
- HTTP caching and CDNs: pick the right Cache-Control: One function decides what browsers and CDNs may keep, and for how long.
- Fix the AI’s cache invalidation: Stale prices, a key typo, a forgotten list cache and a race in the update path.
- Queues and background jobs: retries and a dead-letter list: Move slow work out of the request, retry with backoff, and park poison jobs for a human.
- Idempotency keys: safe retries for POST: Charge the card once even when the client retries, and replay the original answer.
- Rate limiting: fixed vs sliding windows: Why the simple counter lets double bursts through, and how a sliding window fixes it.
- Scaling the database: indexes, replicas, sharding: The order professionals reach for each tool, and what each one costs you.
- Consistent hashing: add a shard without moving everything: Route keys to nodes on a hash ring, so scaling out moves only a small slice of the data.
- Consistency, CAP and eventual consistency, plainly: When copies of your data disagree, decide what each feature’s users should see.
- Back-of-the-envelope capacity and cost: From daily users to servers, bandwidth, storage and a monthly bill, with prices you pass in.
- Write a design doc with AI: Get a reviewable design with numbers, trade-offs and risks, not a pile of buzzwords.
- Boss: design review of the AI’s product page service: An unbounded list, N+1 queries, serial calls, a dependency that can take you down, and a stampede.
Part of: Backend & Cloud Engineer career path