Case Studies
Each design links to its chapter and to an editable starter architecture. Scale figures come from the cited page where the guide gives them; everything else is illustrative.
Classic designs (Part III)
- URL shortenerOpen in Labs
Read-heavy redirects served cache-first; key generation on the write path; clicks streamed to analytics, off the redirect path.
Ch. 13 · p. 49 · PDF p. 49: ~200 writes/s (peak ~600), ~20,000 reads/s (peak ~60,000), read:write 100:1, p99 < 100 ms.
- Distributed key-value storeOpen in Labs
Dynamo-style: a coordinator routes by consistent hashing to replicas; quorum reads/writes.
Ch. 14 · pp. 50–51 · Illustrative; see PDF pp. 50–51 for quorum and storage-engine detail.
- News feedOpen in Labs
Post service writes; fan-out workers push to followers' feed caches; feed reads are cache-first.
Ch. 15 · p. 52 · Illustrative; PDF p. 52 discusses fan-out on write vs read and the celebrity problem.
- Chat systemOpen in Labs
Persistent connections to chat servers; messages persisted and delivered via a message queue.
Ch. 16 · p. 53 · Illustrative; PDF p. 53.
- Notification systemOpen in Labs
API validates and enqueues; per-channel workers call external providers with retries.
Ch. 17 · p. 54 · Illustrative; PDF p. 54.
- Video streamingOpen in Labs
Uploads go to blob storage and an async transcoding pipeline; playback is served from the CDN.
Ch. 18 · p. 55 · Illustrative; PDF p. 55.
- Ride-hailing / proximityOpen in Labs
Driver location updates stream into a geo-index; riders' match requests query nearby drivers.
Ch. 19 · pp. 56–57 · Illustrative; PDF pp. 56–57.
- Search autocompleteOpen in Labs
Prefix queries served from an in-memory trie cache; the trie is rebuilt offline from query logs.
Ch. 20 · p. 58 · PDF p. 58: sub-100 ms prefix suggestions at massive query volume.
- Web crawlerOpen in Labs
URL frontier queue feeds polite fetchers; parsed links are deduplicated and re-enqueued (modelled as a pipeline).
Ch. 21 · p. 59 · Illustrative; PDF p. 59.
- Cloud file storage & syncOpen in Labs
Chunked uploads to blob storage; metadata service is the consistency point; sync notifications fan out.
Ch. 22 · p. 60 · Illustrative; PDF p. 60.
- Ticket booking & paymentsOpen in Labs
Flash-sale front door with a waiting room queue; seat holds in the DB; payment provider with idempotent retries.
Ch. 23 · p. 61 · Illustrative; PDF p. 61 covers double-booking, flash-sale spikes and money movement.
- Real-time ad-click aggregationOpen in Labs
Clicks ingested into a stream, aggregated in windows by stream processors, written to an OLAP store.
Ch. 24 · pp. 62–63 · Illustrative; PDF pp. 62–63.
AI system designs (Part IV)
- ML training & serving pipelineOpen in Labs
Online predictions read real-time features; predictions are logged for monitoring and retraining.
Ch. 27 · pp. 71–73 · Illustrative; PDF pp. 71–73.
- Recommendation / rankingOpen in Labs
Multi-stage funnel: candidate retrieval (ANN) → ranking model → re-ranking/business rules.
Ch. 28 · pp. 74–76 · Illustrative; PDF pp. 74–76.
- LLM inference systemOpen in Labs
LLM gateway routes to GPU replicas; latency = TTFT + output tokens / decode speed.
Ch. 29 · pp. 77–79 · Illustrative token and GPU numbers; PDF pp. 77–79 explain TTFT, decode, batching and KV cache.
- Embeddings & RAG platformOpen in Labs
Query → embed → vector search (ACL filtered) → rerank → context builder → LLM; ingestion runs async.
Ch. 30 · pp. 80–82 · Illustrative; PDF pp. 80–82.
- Agent with tools (MCP)Open in Labs
Orchestrator loops LLM → tool calls via MCP servers → LLM, with a step budget and guardrails.
Ch. 31 · pp. 83–85 · Illustrative; PDF pp. 83–85.
- LLM application & LLMOpsOpen in Labs
Gateway with routing between a small and large model, semantic cache, tracing and evals.
Ch. 32 · pp. 86–87 · Illustrative; PDF pp. 86–87.
- Assistant / enterprise RAG / coding assistantOpen in Labs
Chat assistant platform: conversation store, retrieval over enterprise docs, LLM streaming.
Ch. 34 · pp. 91–93 · Illustrative; PDF pp. 91–93.
- Support agent, fraud, voice & image genOpen in Labs
Real-time fraud scoring path: payment API → feature store + model with a strict timeout and fallback.
Ch. 35 · pp. 94–97 · Illustrative; PDF pp. 94–97.