Skip to main content

System Design

5 Interactive Guides

End-to-end distributed and ML system architecture guides with capacity math, trade-off decisions, and deterministic step-by-step simulators.

System DesignhardOpenAINetflixMeta18 min

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.

graph traversalscatter-gatherquantizationhybrid search
Open Simulator
System DesignmediumOpenAIStripeCloudflare12 min

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.

token bucketsliding window logatomic lualocal quota lease
Open Simulator
System DesignhardNetflixTikTokYouTube20 min

Design a Real-Time Recommendation Pipeline

Two-stage candidate generation and ranking, online/offline feature store skew prevention, and freshness caches at Netflix scale.

candidate generationfeature storestreaming ingestionmulti-tier cache
Open Simulator
System DesignhardOpenAIAnthropicNVIDIA20 min

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.

continuous batchingpaged memoryprefix cachingload shedding
Open Simulator
System DesignhardOpenAINetflixMeta15 min

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.

consistent hashingcache-asidesingle-flightreplicationhot-key mitigation
Open Simulator