System Design
5 Interactive GuidesEnd-to-end distributed and ML system architecture guides with capacity math, trade-off decisions, and deterministic step-by-step simulators.
Design a Billion-Scale Vector Search Index (HNSW + Sharding)
Approximate nearest neighbors with HNSW graph layers, quantization, scatter-gather sharding, and recall vs latency budgets.
Design a Distributed Token-Bucket Rate Limiter
Enforce per-tenant RPM and TPM quotas for an AI API gateway without adding a synchronous bottleneck on every request.
Design a Real-Time Recommendation Pipeline
Two-stage candidate generation and ranking, online/offline feature store skew prevention, and freshness caches at Netflix scale.
Design an LLM Inference Serving Engine
Continuous batching, PagedAttention KV-cache memory blocks, prefix caching, and TTFT vs TPOT latency trade-offs at OpenAI scale.
Design a Distributed KV Cache at Massive Scale
Whiteboard a 100M-DAU distributed cache from clarifying questions to consistent hashing, single-flight stampede defense, replication, and chaos testing.