Systems Design
Theory and open questions, arranged where each idea sits on a request’s path. Write an answer, get coaching, then revise.
23 lessons. Systems progress is tracked separately from coding.
Fundamentals
Latency, throughput, availability, APIs, and how to talk about scale before drawing boxes.
- Capacity & Latency BasicsBeginnerEstimate QPS, storage, and latency budgets with back-of-the-envelope numbers.
- Availability & ReplicationIntermediateSay what “up” means, how replicas help, and what you give up when you prefer availability over consistency.
- API Design & IdempotencyIntermediateDesign external APIs that are paginated, versioned, and safe under retries.
- Consensus & Leader ElectionAdvancedAgree on a single leader or value across nodes when failure and partitions happen.
Caching & Scale
Caches, CDNs, load balancers, rate limits, and hashing for distribution.
- CachingBeginnerPut a cache in the read path: what to store, where, and how it goes stale.
- Rate LimitingIntermediateProtect APIs and downstreams by limiting how fast a client can call you.
- Load BalancingBeginnerSpread traffic across healthy instances and remove single servers from the critical path.
- Consistent HashingIntermediateMap keys to nodes so adding or removing a node moves only a small fraction of keys.
- CDN & EdgeBeginnerPush public content to the edge for latency and origin offload, and know what must not live there.
Data & Storage
Stores, sharding, search indexes, and distributed transaction patterns.
- Choosing Data StoresIntermediateMatch access patterns to SQL, document, KV, or blob stores, and say what each is bad at.
- Sharding & PartitioningIntermediateSplit data across shards so storage and write load scale beyond one primary.
- Distributed Transactions & SagasAdvancedCoordinate multi-step or multi-service updates without pretending 2PC is free.
- Search & IndexingIntermediateServe text or filter-heavy queries from a search index beside the system of record.
- Media Uploads & DeliveryIntermediateAccept large files safely (direct-to-object-store, resumable upload) and serve them via CDN.
Messaging & Async
Queues, pub/sub, notifications, workflows, and stream or batch processing.
- Messaging & QueuesIntermediateMove slow or fan-out work off the request path with queues or pub/sub.
- Stream & Batch ProcessingAdvancedProcess continuous event streams or large batch jobs for analytics, ETL, and derived views.
- Notifications Fan-outIntermediateDeliver email, push, SMS, or in-app alerts reliably without blocking the write path.
- Scheduling & WorkflowsIntermediateRun delayed, recurring, or multi-step jobs reliably (cron, workflows, state machines).
Network & Geo
DNS, geo routing, realtime connections, and how users reach the right region.
Security & Operations
Auth, abuse, multi-tenancy, observability, and running what you designed.
- Auth, Abuse & Security BasicsIntermediateAuthenticate callers, authorize actions, protect secrets, and blunt common abuse.
- Observability & SLOsIntermediateKnow if the system is healthy: metrics, logs, traces, and error budgets.
- Multi-tenancy & IsolationAdvancedServe many customers from one platform without noisy-neighbor and data leaks.