SYSTEMS & BACKEND

Distributed Systems

Consistency, consensus, replication and coordination — the CAP-theorem-shaped trade-offs at the heart of every large-scale system, with handbooks, system designs and interactive tools.

21 pieces · 3 formats

Handbooks 4

System Designs 14

System Design

Design Uber

Build a planet-scale ride-hailing system step by step. Learn how to handle real-time location tracking, matching algorithms, scalability, and payments through an interactive diagram that grows with each concept.

Distributed SystemsReal-timeScalability
System Design

Design a URL Shortener

Build a URL shortener (think Bitly or TinyURL) step by step. Learn how to mint unique short codes with base62, make the read-heavy redirect path sub-millisecond with caching, shard billions of mappings, and track clicks asynchronously through an interactive diagram that grows with each concept.

CachingShardingScalability
System Design

Design a Rate Limiter

Build a distributed rate limiter step by step. Learn where to put the check, how to key and tier limits, the token-bucket and sliding-window algorithms, why shared atomic counters in Redis avoid race conditions, and the fail-open vs fail-closed trade-off — through an interactive diagram that grows with each concept.

Distributed SystemsCachingReliability
System Design

Design Ticketmaster

Build an event-booking system step by step. Tackle the double-booking problem head-on: seat inventory, short-lived holds with TTLs, exactly-once purchases via ACID transactions, payment sagas with idempotency, and a virtual waiting room that tames the on-sale stampede — through an interactive diagram that grows with each concept.

ConcurrencyConsistencyTransactions
System Design

Design a Message Queue

Build a distributed message queue like Kafka step by step. See how an append-only commit log, partitions keyed for order, consumer groups with server-side offsets, leader/follower replication, controller-driven leader election, retention and compaction, and exactly-once guarantees fit together — through an interactive diagram that grows with each concept.

Distributed SystemsStreamingReplication
System Design

Design a Key-Value Store

Build a distributed key-value store like DynamoDB step by step. See how consistent hashing places keys, how replication and tunable quorums (R + W > N) trade consistency for availability, how vector clocks resolve conflicts, and how gossip membership, hinted handoff and read repair keep it alive through failure — through an interactive diagram that grows with each concept.

Distributed SystemsConsistencyReplication
System Design

Design a Distributed Cache

Build a distributed cache like Redis or Memcached step by step. See how cache-aside shields the database, how consistent hashing shards across nodes, how TTL and LRU/LFU eviction bound memory, how replication and invalidation keep it correct, and how to survive cache stampedes and hot keys — through an interactive diagram that grows with each concept.

CachingShardingReliability
System Design

Design a Web Crawler

Build a distributed web crawler step by step. See how a URL frontier drives the fetch–parse–enqueue loop, how a bloom-filter seen-set stops infinite re-crawling, how politeness and robots.txt keep you a good citizen, how DNS caching and content dedup remove bottlenecks, and how to shard the frontier by host and dodge traps — through an interactive diagram that grows with each concept.

Distributed SystemsScalabilityStorage
System Design

Design Google Docs

Build a real-time collaborative editor step by step. See how edits become tiny operations, how OT and CRDTs resolve concurrent edits so every copy converges, how ops broadcast over WebSockets, how an op log plus snapshots give history and recovery, and how presence, offline sync and per-document sharding fit together — through an interactive diagram that grows with each concept.

Real-timeConsistencyCollaboration
System Design

Design a Job Scheduler

Build a distributed job scheduler (cron at scale) step by step. See how a durable job store indexed by run time, a due scanner, a ready queue feeding a worker pool, idempotent at-least-once execution, leader election to avoid double-fires, retries with backoff and a DLQ, and time-wheel sharding fit together — through an interactive diagram that grows with each concept.

Distributed SystemsReliabilityConcurrency
System Design

Design an ID Generator

Build a distributed unique ID generator like Twitter Snowflake step by step. See why auto-increment and UUIDs fall short, how a 64-bit ID packs a timestamp, machine id and sequence to stay collision-free and time-sortable without per-ID coordination, how machine ids are assigned, and how clock skew is handled — through an interactive diagram that grows with each concept.

Distributed SystemsScalabilityConcurrency
System Design

Design Airbnb

Build a lodging marketplace step by step. See how listings and geo search with filters, per-listing availability calendars, atomic booking that never double-books, payment hold-and-capture with idempotency, event-driven reviews and reindexing, and read replicas fit together — through an interactive diagram that grows with each concept.

SearchConcurrencyTransactions
System Design

Design a Stock Exchange

Build a stock exchange matching engine step by step. See how an in-memory order book with price-time priority matches orders, how pre-trade risk checks guard the core, how a single sequencer and single-threaded engine give deterministic low-latency matching, and how market-data feeds, journaling/replay, clearing and symbol partitioning fit together — through an interactive diagram that grows with each concept.

Low-latencyConcurrencyDeterminism
System Design

Design a Payment System

Build a payment system like Stripe step by step. See how a payment is modeled as a state machine of authorize and capture, how idempotency keys prevent double-charges, how a double-entry ledger keeps every cent auditable, how tokenization shrinks PCI scope, and how async webhooks, reconciliation and a durable retryable worker handle slow banks and failure — through an interactive diagram that grows with each concept.

ConsistencyLedgerReliability

Interactive Tools 3

More in Systems & Backend

← Browse all topics