Concepts
Short reference pieces on the primitives system design questions keep reaching for — caching, connections, APIs, storage.
Articles
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.
Reference: Unique ID Generation
A reference on generating unique IDs without coordination — auto-increment, hashing, UUIDs, Snowflake, and range allocation — and which to pick for each job.
Reference: API Design Patterns
A short reference on REST vs gRPC, versioning, pagination, idempotency, and the small decisions that separate a designed API from an improvised one.
Reference: Database Indexing
A reference on B-Tree vs LSM-Tree storage engines, composite index column ordering, covering indexes, and where secondary indexes create hot shards.
Reference: Common System Design Decisions
A fast-lookup catalog of recurring system design choices — storage, performance, architecture, reliability — each with a default and when to switch away from it.
Reference: Capacity Estimation
A short reference on interview capacity math — QPS, storage, and bandwidth estimates, the numbers worth memorizing, and turning arithmetic into design conclusions.
Reference: Consistency Models
A short reference on consistency guarantees from linearizable to eventual — what each promises, what it costs, and how CAP and PACELC frame the choice.
Reference: Queue Delivery Semantics
A short reference on at-most-once, at-least-once, and exactly-once delivery — where each guarantee actually comes from, and what replay and idempotency add.
Reference: Partitioning Strategies
A short reference on hash, range, and consistent-hash partitioning — how each distributes data, what breaks with each, and how to pick a partition key.
Reference: Replication Strategies
A short reference on leader-follower, multi-leader, and leaderless replication — failure behavior, lag anomalies, and quorum arithmetic for each.
Reference: NoSQL Hot Key Mitigation Patterns
A short reference on hot key patterns in distributed NoSQL systems — what causes them, and the static and dynamic strategies for mitigating them.
Reference: Consecutive Activity & Retention Aggregation
A reference on computing streaks and retention over massive event streams — pre-aggregation, state slimming, and the bitmap, gaps-and-islands, and streaming techniques per time grain.
Reference: Distributed Transaction Patterns
A deep reference on distributed transaction patterns — 2PC, 3PC, and saga — their sequences, failure modes, and when to reach for each.
Reference: Cache Access and Invalidation Patterns
A reference on read/write caching patterns, invalidation strategies, and the classic failure modes — penetration, breakdown, avalanche — and how to avoid each.
Reference: Rate Limiting Algorithms
A short reference on the four canonical rate limiting algorithms — token bucket, leaking bucket, fixed window, and sliding window — with when to pick each.
Reference: Real-Time Connection Patterns
A short reference on HTTP polling, long-polling, SSE, WebSocket, WebRTC, and push notifications — which to reach for and why.
Reference: SQL vs NoSQL Schema Design
A short reference on when to pick SQL vs NoSQL, how to model schemas in each, and how to avoid hot keys.