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
Imagine your data is stored on two servers, one in Mumbai and one in Singapore, and the network link between them breaks.
Load Balancing: L4 vs L7, Algorithms, Health Checks
A load balancer sits in front of your servers and decides which one gets each request.
Caching Strategies: Cache-aside, Write-through, Write-back
A cache is a small, fast copy of data you would otherwise fetch from somewhere slow.
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.
Sharding Strategies: Range, Hash, Directory, Geo
Sharding means splitting one database into several, each holding part of the data.
Consistent Hashing
You have 10 cache servers and millions of keys.
Message Queues: Kafka vs RabbitMQ vs SQS
A message queue lets one part of your system hand work to another without waiting for it.
Rate Limiting: Token Bucket, Leaky Bucket, Sliding Window
Rate limiting means refusing requests when a caller sends too many.
Database Replication and Failover
Replication is easy to turn on and hard to reason about.
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.
Database Indexing: B-Tree vs LSM, Composite, Covering
Indexing questions look like trivia and are really about read/write trade-offs.
Consensus: Raft and Paxos in Plain English
Five servers hold a copy of the same data.
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.
Design Netflix / Video Streaming
Ten million people press play at 8pm.
Design a Web Crawler
A crawler downloads a page, finds the links in it, and repeats.
Design a Notification System
"Your order has shipped" needs to reach a user.
Design a Distributed Cache
A cache holds recently used data in memory so you do not have to fetch it from a slower database.
Design a Payment System
A payment system is judged on what it does when something goes wrong.
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.
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.
Design Twitter / News Feed
When you open the app, you see posts from everyone you follow, newest first.
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.
Design Uber / Ride-Hailing
A rider opens the app and wants a car.
Design Netflix / Video Streaming
Ten million people press play at 8pm.
Design Dropbox / Google Drive
You edit a file on your laptop.
Design a Web Crawler
A crawler downloads a page, finds the links in it, and repeats.
Design Typeahead / Search Autocomplete
Typeahead is the list of suggestions that appears while you type in a search box.
Design a Notification System
"Your order has shipped" needs to reach a user.
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.
Design a Distributed Cache
A cache holds recently used data in memory so you do not have to fetch it from a slower database.
Design a News Feed Ranking Pipeline
A feed in time order is easy: take everything from people you follow, newest first.
Design a Payment System
A payment system is judged on what it does when something goes wrong.
Design Ad Click Aggregation / Real-time Analytics
Every time someone clicks an advert, you record it.
Design a Collaborative Editor (Google Docs)
Two people type in the same document at the same time and both see the same result.
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.
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…
Back-of-envelope math 3 topics
Numbers Every Engineer Should Know
You do not need these memorised to be a good engineer.
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.
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…
Framework & approach 3 topics
How to Structure a 45-Minute System Design Interview
Most people who fail a system design round are not short of knowledge.
System Design Trade-offs Cheat Sheet
Every system design decision is a trade, and saying which side you took — and what it cost — is most of what separates a senior answer fr…
Functional vs Non-Functional Requirements
The first five minutes of a system design interview decide the next forty, and the mistake that costs most candidates is treating require…