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.

easy Consistency dictates per-…
FundamentalsDistributed SystemsConsistency

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…

easy 100K-1M conn/s per LB
FundamentalsLoad BalancingNetworking

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.

easy Redis ~100K-1M ops/s/node
FundamentalsCachingPerformance

SQL vs NoSQL: When to Pick Which

The SQL/NoSQL choice is really an *access-pattern* choice dressed up as a technology debate.

easy Postgres: 5-50K QPS/node
FundamentalsDatabasesData Modeling

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…

medium Linear scale with shard c…
FundamentalsDatabasesSharding

Consistent Hashing

Consistent hashing is a partitioning technique that minimizes how many keys move when nodes join or leave a cluster.

medium O(log V) lookup with sort…
FundamentalsHashingDistributed Systems

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…

medium Kafka: 1M+ msg/s/cluster
FundamentalsMessagingAsync

Rate Limiting: Token Bucket, Leaky Bucket, Sliding Window

Rate limiting protects services from being overwhelmed by enforcing a maximum request rate per identity.

medium O(1) per check (Redis Lua)
FundamentalsAPI DesignReliability

Database Replication and Failover

Replication keeps multiple copies of data on different nodes for high availability, read scaling, and disaster recovery.

medium Read scales linearly with…
FundamentalsDatabasesReplication

CDN and Edge Caching

A CDN is a globally distributed cache that serves content from the PoP nearest each user.

easy Sub-50ms global p99 with …
FundamentalsCDNPerformance

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.

medium B-tree O(log N) lookup
FundamentalsDatabasesIndexing

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…

hard Write latency = 1 RTT to …
FundamentalsConsensusDistributed Systems

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)…

hard 100B msgs/day → ~1.2M msg…
Case StudyRealtimeMessaging

Design Netflix / Video Streaming

Video streaming delivers tens of millions of concurrent streams globally with sub-second startup and smooth playback.

hard 200M users
Case StudyStreamingCDN

Design a Web Crawler

A web crawler discovers and downloads web pages so a search engine or archive can index them.

hard 1B pages
Case StudyCrawlingDistributed

Design a Notification System

A notification platform delivers transactional and marketing messages to users across push, email, SMS, in-app, and chat.

medium 10M+ notifications/min peak
Case StudyAsyncPub/Sub

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.

medium 100K-1M ops/s per node
Case StudyCachingSharding

Design a Payment System

A payment system processes charges, refunds, transfers, and the bookkeeping that records them.

hard 100-10K TPS depending on …
Case StudyPaymentsConsistency

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…

medium Kafka: 1M+ msg/s/cluster
FundamentalsMessagingAsync

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.

medium 10K writes/s sustained
Case StudyKey GenerationKV Store

Design Twitter / News Feed

A social feed system serves a per-user, recent-first list of posts from accounts the user follows.

hard 5K tweets/s sustained
Case StudyFeedFanout

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)…

hard 100B msgs/day → ~1.2M msg…
Case StudyRealtimeMessaging

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.

hard 10M active drivers
Case StudyGeoRealtime

Design Netflix / Video Streaming

Video streaming delivers tens of millions of concurrent streams globally with sub-second startup and smooth playback.

hard 200M users
Case StudyStreamingCDN

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…

hard 500M users
Case StudyStorageSync

Design a Web Crawler

A web crawler discovers and downloads web pages so a search engine or archive can index them.

hard 1B pages
Case StudyCrawlingDistributed

Design Typeahead / Search Autocomplete

Search autocomplete (typeahead) returns top query completions as the user types, in under 100 ms.

medium <100 ms p99
Case StudySearchTrie

Design a Notification System

A notification platform delivers transactional and marketing messages to users across push, email, SMS, in-app, and chat.

medium 10M+ notifications/min peak
Case StudyAsyncPub/Sub

Design a Distributed Key-Value Store (Dynamo-style)

A Dynamo-style distributed KV store provides scale-out and high availability for simple put/get.

hard Linear scale with nodes
Case StudyKV StoreQuorum

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.

medium 100K-1M ops/s per node
Case StudyCachingSharding

Design a News Feed Ranking Pipeline

Feed ranking decides what each user sees in their home feed.

hard <150ms feed render
Case StudyFeedML

Design a Payment System

A payment system processes charges, refunds, transfers, and the bookkeeping that records them.

hard 100-10K TPS depending on …
Case StudyPaymentsConsistency

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…

hard 1M+ events/s
Case StudyStreamingAnalytics

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…

hard Sub-100ms keystroke echo
Case StudyRealtimeCRDT / OT

Back-of-Envelope: Twitter Timeline Capacity

Capacity estimation turns vague requirements ('design Twitter') into concrete numbers that constrain the rest of the design.

medium Drives shard count
MathCapacity PlanningFeed

Back-of-Envelope: Video Streaming Bandwidth

Estimating bandwidth and storage for video streaming is a different muscle from tweets.

medium PoP count × per-PoP capac…
MathCapacity PlanningStreaming