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

Imagine your data is stored on two servers, one in Mumbai and one in Singapore, and the network link between them breaks.

easy Consistency dictates per-…
FundamentalsDistributed SystemsConsistency

Load Balancing: L4 vs L7, Algorithms, Health Checks

A load balancer sits in front of your servers and decides which one gets each request.

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

Caching Strategies: Cache-aside, Write-through, Write-back

A cache is a small, fast copy of data you would otherwise fetch from somewhere slow.

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

SQL vs NoSQL: When to Pick Which

SQL databases store rows in tables with a fixed set of columns, and let you combine tables in a query.

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

Sharding Strategies: Range, Hash, Directory, Geo

Sharding means splitting one database into several, each holding part of the data.

medium Linear scale with shard c…
FundamentalsDatabasesSharding

Consistent Hashing

You have 10 cache servers and millions of keys.

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

Message Queues: Kafka vs RabbitMQ vs SQS

A message queue lets one part of your system hand work to another without waiting for it.

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

Rate Limiting: Token Bucket, Leaky Bucket, Sliding Window

Rate limiting means refusing requests when a caller sends too many.

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

Database Replication and Failover

Replication is easy to turn on and hard to reason about.

medium Read scales linearly with…
FundamentalsDatabasesReplication

CDN and Edge Caching

A CDN is a network of servers spread around the world that keep copies of your files close to your users.

easy Sub-50ms global p99 with …
FundamentalsCDNPerformance

Database Indexing: B-Tree vs LSM, Composite, Covering

Indexing questions look like trivia and are really about read/write trade-offs.

medium B-tree O(log N) lookup
FundamentalsDatabasesIndexing

Consensus: Raft and Paxos in Plain English

Five servers hold a copy of the same data.

hard Write latency = 1 RTT to …
FundamentalsConsensusDistributed Systems

Design WhatsApp / Chat System

A chat app has to deliver a message in under a second, to a phone that may be asleep, behind a patchy network, or switched off.

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

Design Netflix / Video Streaming

Ten million people press play at 8pm.

hard 200M users
Case StudyStreamingCDN

Design a Web Crawler

A crawler downloads a page, finds the links in it, and repeats.

hard 1B pages
Case StudyCrawlingDistributed

Design a Notification System

"Your order has shipped" needs to reach a user.

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

Design a Distributed Cache

A cache holds recently used data in memory so you do not have to fetch it from a slower database.

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

Design a Payment System

A payment system is judged on what it does when something goes wrong.

hard 100-10K TPS depending on …
Case StudyPaymentsConsistency

Case studies 18 topics

Message Queues: Kafka vs RabbitMQ vs SQS

A message queue lets one part of your system hand work to another without waiting for it.

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

Design a URL Shortener (TinyURL / bit.ly)

A URL shortener looks like a hash map with a web server in front, and interviewers use it precisely because that first impression is wrong.

medium 10K writes/s sustained
Case StudyKey GenerationKV Store

Design Twitter / News Feed

When you open the app, you see posts from everyone you follow, newest first.

hard 5K tweets/s sustained
Case StudyFeedFanout

Design WhatsApp / Chat System

A chat app has to deliver a message in under a second, to a phone that may be asleep, behind a patchy network, or switched off.

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

Design Uber / Ride-Hailing

A rider opens the app and wants a car.

hard 10M active drivers
Case StudyGeoRealtime

Design Netflix / Video Streaming

Ten million people press play at 8pm.

hard 200M users
Case StudyStreamingCDN

Design Dropbox / Google Drive

You edit a file on your laptop.

hard 500M users
Case StudyStorageSync

Design a Web Crawler

A crawler downloads a page, finds the links in it, and repeats.

hard 1B pages
Case StudyCrawlingDistributed

Design Typeahead / Search Autocomplete

Typeahead is the list of suggestions that appears while you type in a search box.

medium <100 ms p99
Case StudySearchTrie

Design a Notification System

"Your order has shipped" needs to reach a user.

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

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

A key-value store saves a value under a key and gives it back when you ask.

hard Linear scale with nodes
Case StudyKV StoreQuorum

Design a Distributed Cache

A cache holds recently used data in memory so you do not have to fetch it from a slower database.

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

Design a News Feed Ranking Pipeline

A feed in time order is easy: take everything from people you follow, newest first.

hard <150ms feed render
Case StudyFeedML

Design a Payment System

A payment system is judged on what it does when something goes wrong.

hard 100-10K TPS depending on …
Case StudyPaymentsConsistency

Design Ad Click Aggregation / Real-time Analytics

Every time someone clicks an advert, you record it.

hard 1M+ events/s
Case StudyStreamingAnalytics

Design a Collaborative Editor (Google Docs)

Two people type in the same document at the same time and both see the same result.

hard Sub-100ms keystroke echo
Case StudyRealtimeCRDT / OT

Back-of-Envelope: Twitter Timeline Capacity

This is the estimate interviewers use to find out whether you can turn a product description into numbers that constrain a design.

medium Drives shard count
MathCapacity PlanningFeed

Back-of-Envelope: Video Streaming Bandwidth

Streaming estimates are the clearest example of arithmetic driving architecture: the egress number is so large that it eliminates most de…

medium PoP count × per-PoP capac…
MathCapacity PlanningStreaming