System design
Fundamentals, case studies, capacity math, and a 45-minute interview framework
Practice system design interview questions with structured approaches to designing scalable, reliable distributed systems. Topics include URL shorteners, chat applications, news feeds, rate limiters, and other classic problems with detailed architecture diagrams and trade-off analysis.
Fundamentals 18 topics
CAP Theorem and PACELC
The CAP theorem says a distributed data store can guarantee at most two of Consistency, Availability, and Partition tolerance.
Load Balancing: L4 vs L7, Algorithms, Health Checks
A load balancer spreads incoming traffic across a fleet of backend servers so no single one is overwhelmed, failures are bypassed, and th…
Caching Strategies: Cache-aside, Write-through, Write-back
A cache trades correctness guarantees for speed by keeping a hot subset of data in fast storage close to the consumer.
SQL vs NoSQL: When to Pick Which
The SQL/NoSQL choice is really an *access-pattern* choice dressed up as a technology debate.
Sharding Strategies: Range, Hash, Directory, Geo
Sharding splits a dataset across multiple physical nodes so the system can hold more data, handle more writes, and stay within per-node c…
Consistent Hashing
Consistent hashing is a partitioning technique that minimizes how many keys move when nodes join or leave a cluster.
Message Queues: Kafka vs RabbitMQ vs SQS
Message queues decouple producers and consumers so work can be done asynchronously, retried on failure, distributed across workers, and a…
Rate Limiting: Token Bucket, Leaky Bucket, Sliding Window
Rate limiting protects services from being overwhelmed by enforcing a maximum request rate per identity.
Database Replication and Failover
Replication keeps multiple copies of data on different nodes for high availability, read scaling, and disaster recovery.
CDN and Edge Caching
A CDN is a globally distributed cache that serves content from the PoP nearest each user.
Database Indexing: B-Tree vs LSM, Composite, Covering
An index is a separate data structure that lets the database find rows matching a query without scanning the whole table.
Consensus: Raft and Paxos in Plain English
Consensus is the problem of getting distributed nodes to agree on a value (or sequence of values) despite some failing or being temporari…
Design WhatsApp / Chat System
A real-time chat system serves 1:1 and group messaging with persistence, presence, delivery receipts, push for offline users, and (often)…
Design Netflix / Video Streaming
Video streaming delivers tens of millions of concurrent streams globally with sub-second startup and smooth playback.
Design a Web Crawler
A web crawler discovers and downloads web pages so a search engine or archive can index them.
Design a Notification System
A notification platform delivers transactional and marketing messages to users across push, email, SMS, in-app, and chat.
Design a Distributed Cache
A distributed cache pools the memory of many machines into one logical cache, fronted by clients that route via consistent hashing.
Design a Payment System
A payment system processes charges, refunds, transfers, and the bookkeeping that records them.
Case studies 18 topics
Message Queues: Kafka vs RabbitMQ vs SQS
Message queues decouple producers and consumers so work can be done asynchronously, retried on failure, distributed across workers, and a…
Design a URL Shortener (TinyURL / bit.ly)
A URL shortener takes a long URL and returns a short alias; visits to the alias HTTP-redirect to the original.
Design Twitter / News Feed
A social feed system serves a per-user, recent-first list of posts from accounts the user follows.
Design WhatsApp / Chat System
A real-time chat system serves 1:1 and group messaging with persistence, presence, delivery receipts, push for offline users, and (often)…
Design Uber / Ride-Hailing
Ride-hailing matches riders with nearby drivers in real time, tracks the trip state machine through to payment, and handles pricing surge.
Design Netflix / Video Streaming
Video streaming delivers tens of millions of concurrent streams globally with sub-second startup and smooth playback.
Design Dropbox / Google Drive
A file sync service like Dropbox, Google Drive, OneDrive, iCloud lets users save once and have files appear everywhere, share with collab…
Design a Web Crawler
A web crawler discovers and downloads web pages so a search engine or archive can index them.
Design Typeahead / Search Autocomplete
Search autocomplete (typeahead) returns top query completions as the user types, in under 100 ms.
Design a Notification System
A notification platform delivers transactional and marketing messages to users across push, email, SMS, in-app, and chat.
Design a Distributed Key-Value Store (Dynamo-style)
A Dynamo-style distributed KV store provides scale-out and high availability for simple put/get.
Design a Distributed Cache
A distributed cache pools the memory of many machines into one logical cache, fronted by clients that route via consistent hashing.
Design a News Feed Ranking Pipeline
Feed ranking decides what each user sees in their home feed.
Design a Payment System
A payment system processes charges, refunds, transfers, and the bookkeeping that records them.
Design Ad Click Aggregation / Real-time Analytics
Ad click aggregation ingests billions of click events per day, computes per-ad per-minute counts in near real time, emits to dashboards a…
Design a Collaborative Editor (Google Docs)
A collaborative editor like Google Docs, Figma, Notion, Office 365 lets multiple users edit one document simultaneously, with each user's…
Back-of-Envelope: Twitter Timeline Capacity
Capacity estimation turns vague requirements ('design Twitter') into concrete numbers that constrain the rest of the design.
Back-of-Envelope: Video Streaming Bandwidth
Estimating bandwidth and storage for video streaming is a different muscle from tweets.
Back-of-envelope math 3 topics
Numbers Every Engineer Should Know
Jeff Dean's *Latency Numbers Every Programmer Should Know* is the canonical reference for back-of-envelope reasoning.
Back-of-Envelope: Twitter Timeline Capacity
Capacity estimation turns vague requirements ('design Twitter') into concrete numbers that constrain the rest of the design.
Back-of-Envelope: Video Streaming Bandwidth
Estimating bandwidth and storage for video streaming is a different muscle from tweets.
Framework & approach 3 topics
How to Structure a 45-Minute System Design Interview
A 45-minute system design interview is tight.
System Design Trade-offs Cheat Sheet
Trade-offs are the substance of system design.
Functional vs Non-Functional Requirements
Requirements gathering is the most consequential 5 minutes of a system design interview — and the most consequential first hour of any re…