A full library for the system design interview — concepts, walkthroughs, and the reasoning framework that ties them together. Built for backend and distributed-systems engineers targeting mid-to-senior big-tech roles.
Orientation
Start here before the walkthroughs. The framework is the core: it decomposes any question into path patterns and argues each decision with the same four tradeoff steps. The plan gives you a week-by-week order; the decisions reference and checklist are the fast-lookup tools you return to throughout prep.
- Framework: Patterns and Tradeoffs in System Design — the core framework: decompose any question into ten path patterns, then argue seven recurring decisions with axes → context → cost → commit.
- Plan: 9-Week System Design Interview Prep — the week-by-week roadmap into the full library.
- Reference: Common System Design Decisions — a fast-lookup catalog of the recurring choices, each with a default and when to switch.
- Guide: Last-Minute System Design Review Checklist — a condensed pre-interview reference covering concepts, walkthroughs, and common mistakes.
Concept references
Short cheatsheets — one concept per page. Read these before, or alongside, the walkthroughs that use them. Each walkthrough links back to the relevant concept when it first reaches for it.
Reference: Anti-Entropy and Failure Detection
A reference on how leaderless clusters find failures and repair drift — gossip, hinted handoff, read repair, Merkle trees, tombstones, and hedged reads.
Reference: Approximate Counting and Membership
A reference on probabilistic data structures — Count-Min Sketch, Space-Saving, HyperLogLog, and Bloom filters — with memory math and the question each answers.
Reference: Approximate Nearest Neighbor Indexes
A reference on approximate nearest neighbor indexes — HNSW, IVF, and product quantization — with the memory arithmetic, filtering, and sharding tradeoffs.
Reference: Authentication and Authorization for Applications
A reference on application auth — sessions vs JWTs, revocation, OAuth 2.0 with PKCE, where to enforce what, and RBAC, ABAC, and relationship-based models.
Reference: CDN and Edge Delivery
A reference on CDN design — anycast vs GeoDNS routing, PoP and shield caching with request coalescing, versioned URLs vs tagged purge, and video segments.
Reference: Consensus and Leader Election
A reference on consensus and leader election — Raft's election and log replication, majority arithmetic, odd cluster sizes, and when not to use consensus.
Reference: Distributed Locks and Fencing Tokens
A reference on distributed locks — single Redis, Redlock, and consensus sessions — and why only a fencing token stops a paused holder from corrupting data.
Reference: Geospatial Indexing — Geohash, Quad-Tree, S2, and H3
A reference on geospatial indexing — geohash, quad-tree, S2, and H3 — covering the 9-cell boundary fix, update-bound location load, and sharding by region.
Reference: Idempotency and the Outbox Pattern
A reference on idempotency keys end to end and the transactional outbox — making retries harmless and publishing events without the dual-write problem.
Reference: Inverted Index and Segment-Based Indexing
A reference on inverted indexes and segment-based indexing — posting lists, BM25, near-real-time refresh, document sharding, and visibility at retrieval.
Reference: Isolation Levels, MVCC, and Clocks
A reference on isolation levels, MVCC, and clocks — write skew under snapshot isolation, cross-shard commits on consensus, TrueTime, and hybrid clocks.
Reference: Load Balancing and Service Discovery
A reference on load balancing and service discovery — L4 vs L7, balancing algorithms, health checks, N+1 headroom, and the classic gRPC long-connection trap.
Reference: Queue Versus Log
A reference on work queues vs partitioned logs vs a database table — throughput, replay, fan-out, ordering, consumer lag, and when each is the right call.
Reference: Quorums, Versioning, and Conflict Resolution
A reference on quorums, versioning, and conflict resolution — R + W > N, sloppy quorums, why last-write-wins silently loses data, vector clocks, and CRDTs.
Reference: Resilience Patterns
A reference on resilience patterns — timeouts and deadlines, retries with jitter and budgets, circuit breakers, bulkheads, load shedding, and degradation.
Reference: Scheduling — Timing Wheels, Delay Queues, and Cron at Scale
A reference on finding due tasks at scale — database polling, sorted sets, and hierarchical timing wheels — plus pull-based dispatch, leases, and cron.
Reference: Storage Engines — B-Tree, LSM-Tree, and Bitcask
A reference on single-node storage engines — B-tree, LSM-tree, and Bitcask — covering the write-ahead log, compaction, bloom filters, and how to choose.
Reference: Stream Processing — Windows, Event Time, Watermarks, and Exactly-Once
A reference on stream processing — tumbling, sliding, and session windows, event time and watermarks, exactly-once as a system property, and hot keys.
Reference: Time-Series Storage and Cardinality
A reference on time-series storage — per-series compressed chunks, head blocks and the WAL, downsampling, and label cardinality as the real capacity limit.
Reference: Two-Stage Ranking and the Retrieval Funnel
A reference on the retrieval funnel — multi-source recall, light and heavy rankers, a policy layer, logging features at serving time, and handling cold start.
Infrastructure walkthroughs
Foundational systems — KV stores, databases, caches, locks, queues, and CDNs — that appear as building blocks inside larger designs. The KV store, database, and cache form a natural triad: they are the two branches of the AP/CP CAP fork (KV store = leaderless/AP, database = consensus/CP) plus the cache that sits in front of both. Read them together.
- Walkthrough: Designing a Distributed Key-Value Store
- Walkthrough: Designing a Distributed Cache
- Walkthrough: Designing a Distributed Database
- Walkthrough: Designing a Distributed Lock
- Walkthrough: Designing a Distributed Queue
- Walkthrough: Designing a CDN
Classic product walkthroughs
The questions most commonly asked at FAANG-style interviews.
- Walkthrough: Designing a URL Shortener
- Walkthrough: Designing a News Feed
- Walkthrough: Designing a Chat System
- Walkthrough: Designing a Video Streaming Platform
- Walkthrough: Designing a Notification System
- Walkthrough: Designing a File Storage & Sync Service
- Walkthrough: Designing a Collaborative Editor
Search, ranking & recommendations
- Walkthrough: Designing a Post Search System
- Walkthrough: Designing a Recommendation System
- Walkthrough: Designing a Full Ranking System
- Walkthrough: Designing a Geospatial Matching System
Data & analytics walkthroughs
- Walkthrough: Designing an Ad Click Aggregation System
- Walkthrough: Designing a Metrics & Monitoring System
- Walkthrough: Designing a Top-K System
Transactional & commerce walkthroughs
- Walkthrough: Designing a Rate Limiter
- Walkthrough: Designing a Distributed Job Scheduler
- Walkthrough: Designing a Flash Deal System
- Walkthrough: Designing an Auction System
- Walkthrough: Designing an Order Processing System