Open-ended design scenarios plus the classic interview question set.
Learn the reason behind each component
42 independent guides. Each includes local concept explanations, a correctness contract, a worked failure trace, and a runnable Python learning model.
Read in this order: requirements → concepts → data flow → concurrency and failure behavior → sizing → worked example. Explain what can fail before choosing a technology.
Suggested first route: consistent hashing → rate limiting → safe retries → leases and fencing → consensus. Then choose a product design.
42 guides
Spread a key-value store across changing servers without moving nearly every key, then reason separately about replication and read correctness.
Consistent hashing · Virtual nodes · Quorum · Linearizability · Vector clocks · Merkle trees · TombstonesTurn a quota into an explicit admission rule, choosing whether it limits bursts, trailing-window traffic, or a long-run rate.
Token bucket · Time windows · Atomic Redis scripts · Wall and monotonic clocks · Backpressure and load shedding · LeasesEncode distributed IDs while separating uniqueness, approximate timestamp order, and safe restart behavior.
Snowflake IDs · Wall and monotonic clocks · Leases · Fencing tokens · Optimistic concurrency and compare-and-setBuild an atomic short-code mapping and a correct redirect path, including expiry, caching, and guessability.
Base62 encoding · Idempotency keys · Cache-aside and invalidation · Optimistic concurrency and compare-and-set · ReplicationSchedule a bounded web crawl without overwhelming websites, losing queued URLs, or assuming every duplicate test is exact.
Crawl frontier and politeness · Bloom filters · Deduplication · Transactional outbox · Leases · Backpressure and load sheddingCount impressions and clicks from a replayable event stream, while distinguishing provisional dashboard numbers from auditable billing.
Deduplication · Bloom filters · Offsets and checkpoints · Event time and watermarks · Rollups and weighted aggregation · Transactional outboxEstimate distinct active users cheaply and understand why merging sketches is different from adding daily counts.
HyperLogLog · Cardinality · Event time and watermarks · Offsets and checkpoints · DeduplicationMove structured events from applications to independent searchable, analytical, and archival sinks with a bounded loss/replay policy.
Pub/sub and durable queues · Offsets and checkpoints · Write-ahead log and fsync · Backpressure and load shedding · Deduplication · Transactional outboxStore timestamped metric series while preserving the meaning of counters, gauges, and aggregated distributions.
Cardinality · Rollups and weighted aggregation · Write-ahead log and fsync · Inverted indexes and columnar storage · Event time and watermarks · Offsets and checkpointsFind frequent items while separating approximate frequency error from missing candidate identities.
Count-Min Sketch · Top-k candidate discovery · Time windows · Offsets and checkpoints · CardinalityDeliver and synchronize messages across intermittent devices without confusing message identity with committed delivery order.
Sequence numbers and replay cursors · Idempotency keys · Fanout on write and read · Presence and failure detection · Transactional outbox · Pub/sub and durable queuesBroadcast a bounded live comment stream while keeping durable acceptance distinct from the subset shown to viewers.
Fanout on write and read · Pub/sub and durable queues · Sequence numbers and replay cursors · Presence and failure detection · Backpressure and load shedding · Token bucketChoose push, pull, or hybrid feeds from measured amplification, then serve stable pages with current privacy rules.
Fanout on write and read · Cache-aside and invalidation · Sequence numbers and replay cursors · Transactional outbox · Backpressure and load shedding · Top-k candidate discoveryAccept notification intent reliably and distinguish provider acceptance, device delivery, and a user's observation.
Transactional outbox · Idempotency keys · Sagas and compensation · Backpressure and load shedding · Leases · Pub/sub and durable queuesMaintain directed edges and reverse indexes without losing unfollow ordering or using stale edges for authorization.
Transactional outbox · Optimistic concurrency and compare-and-set · Replication · Fanout on write and read · Cache-aside and invalidation · CardinalityAllocate ads under specified pricing, deadlines, and spend/exposure accounting.
First-price, second-price, and GSP · Budget reservations and pacing · Token bucket · Deduplication · Backpressure and load shedding · Wall and monotonic clocksCoordinate work without letting expired, paused holders corrupt protected resources.
Leases · Fencing tokens · Quorum · Raft terms and commit rules · Optimistic concurrency and compare-and-set · Wall and monotonic clocksMake repeated API attempts produce one logical effect despite concurrent retries and uncertain remote outcomes.
Idempotency keys · Optimistic concurrency and compare-and-set · Transactional outbox · Sagas and compensation · Leases · Offsets and checkpointsRepresent money as auditable postings and enforce balances, currency, and retries transactionally.
Double-entry ledger · Optimistic concurrency and compare-and-set · Idempotency keys · Sagas and compensation · Transactional outbox · CAP and consistency modelsHold scarce seats during checkout and reject stale payment or expiry callbacks.
Optimistic concurrency and compare-and-set · Leases · Idempotency keys · Sagas and compensation · Fencing tokens · Backpressure and load sheddingTurn messy carrier scans into a trustworthy shipment history and a reproducible current-state projection.
State machines and projections · Event time and watermarks · Deduplication · Optimistic concurrency and compare-and-set · Transactional outbox · ETA and uncertaintyFind nearby points by a conservative spatial covering, then refine and rank without missing boundary neighbors.
Geohash · Quadtree and adaptive spatial indexing · ETA and uncertainty · Inverted indexes and columnar storage · Cache-aside and invalidationUse approximate location candidates but one authoritative state transition for exclusive trip assignment.
Geohash · ETA and uncertainty · Optimistic concurrency and compare-and-set · Leases · State machines and projections · Transactional outboxServe ranked prefix completions from a normalized, versioned snapshot without traversing a huge subtree on each keystroke.
Trie and cached prefix top-k · Top-k candidate discovery · Cardinality · Cache-aside and invalidation · DAG schedulingExplain how concurrent edits converge while separating a two-operation demo from a complete collaboration protocol.
Operational Transformation · Conflict-free Replicated Data Types · Sequence numbers and replay cursors · Idempotency keys · Presence and failure detection · TombstonesSynchronize immutable file versions while keeping metadata publication, blob lifetime, and conflicts correct.
Resumable and multipart uploads · Content-defined chunking · Content addressing and garbage collection · Optimistic concurrency and compare-and-set · Cache-aside and invalidation · Transactional outboxTurn a validated upload into compatible streaming renditions through a recoverable dependency graph.
Resumable and multipart uploads · DAG scheduling · Adaptive bitrate streaming · Content addressing and garbage collection · Transactional outbox · Backpressure and load sheddingChoose reusable design mechanisms from requirements and explain their correctness costs before choosing products.
Cache-aside and invalidation · Optimistic concurrency and compare-and-set · Fencing tokens · Transactional outbox · Sagas and compensation · Geohash · Backpressure and load shedding · Idempotency keysForecast unconstrained demand and purchase enough surviving capacity before lead time runs out.
Forecast percentiles and headroom · Failure domains and redundant capacity · SLIs, SLOs, and error budgets · Cardinality · Backpressure and load sheddingUnderstand the state and protocol rules that let crash-recovering nodes preserve one committed history.
Raft terms and commit rules · Quorum · Write-ahead log and fsync · Linearizability · CAP and consistency models · Fencing tokensConnect distributed operations through propagated identities and interpret incomplete, sampled traces honestly.
Spans and trace context · Head and tail sampling · Transactional outbox · Cardinality · SLIs, SLOs, and error budgetsBuild a searchable retained log with explicit visibility, durability, query completeness, and authorization boundaries.
Inverted indexes and columnar storage · Partition pruning and predicate pushdown · Write-ahead log and fsync · Offsets and checkpoints · CardinalityExtract stable metrics from events and alert on user-relevant budget consumption without hiding missing data.
Event time and watermarks · Rollups and weighted aggregation · Cardinality · Burn-rate alerting · SLIs, SLOs, and error budgets · Offsets and checkpointsRecover from a lost or isolated region without promoting a stale or unauthorized writer.
RPO and RTO · Failure domains and redundant capacity · Quorum · Fencing tokens · Replication · CAP and consistency modelsUnify metrics, logs, and traces through shared context while budgeting storage, coverage, and query isolation.
Spans and trace context · Head and tail sampling · Cardinality · Inverted indexes and columnar storage · Rollups and weighted aggregation · Backpressure and load shedding · SLIs, SLOs, and error budgetsPreserve acknowledged critical commits under network partitions while separating ordering, durability, and availability.
CAP and consistency models · Quorum · Raft terms and commit rules · Write-ahead log and fsync · Linearizability · Failure domains and redundant capacity · Fencing tokensReduce analytical bytes scanned and publish reproducible dataset versions despite task retries and late data.
Partition pruning and predicate pushdown · Inverted indexes and columnar storage · Offsets and checkpoints · Event time and watermarks · DAG scheduling · Transactional outboxDefine reliability through user-visible outcomes, independent capacity, and bounded request-path behavior.
SLIs, SLOs, and error budgets · Burn-rate alerting · Failure domains and redundant capacity · Backpressure and load shedding · Idempotency keys · Wall and monotonic clocksScale the measured bottleneck while preserving data and failure semantics as traffic grows.
Cache-aside and invalidation · Consistent hashing · Replication · Backpressure and load shedding · Failure domains and redundant capacity · Transactional outboxAccept heterogeneous signals into bounded durable pipelines with clear per-signal delivery and privacy policies.
Offsets and checkpoints · Backpressure and load shedding · Pub/sub and durable queues · Cardinality · Transactional outbox · Spans and trace contextMake distributed logic reproducible in fast tests while recognizing what mocks and toy stores cannot prove.
Dependency injection and test doubles · Optimistic concurrency and compare-and-set · Wall and monotonic clocks · Canaries, shadow traffic, and rollout gates · SLIs, SLOs, and error budgets · Idempotency keysChange code and data in compatible stages while preserving a real rollback horizon and measuring user impact.
Expand-contract migrations · Canaries, shadow traffic, and rollout gates · Optimistic concurrency and compare-and-set · Transactional outbox · SLIs, SLOs, and error budgets · Failure domains and redundant capacityNo guide matches. Try a broader concept such as replication or retries.
Download the Python concept models · Python 3.10+, no packages required.
Student clarity and correctness review · 19 October 2026