The frameworks, patterns, and trade-offs that come up in every system design interview distilled into one reference.
Interviewers don't evaluate perfect answers - they evaluate structured thinking. This sequence applies to every question.
Before designing anything, nail down the scope. Assumptions made here drive every decision downstream.
Write requirements on the board before drawing a single box - it anchors the rest of the interview.
Rough numbers reveal the architecture. 100 QPS and 100,000 QPS require fundamentally different systems - this is where that distinction becomes concrete.
Ballpark estimates, not exact figures. The goal is to identify whether you're in "single server" or "distributed system" territory.
Draw the big boxes. Don't overthink it. Every system in the world follows roughly the same skeleton:
Client → CDN → Load Balancer → App Servers → Database
Then add the special ingredients based on what the system needs:
The interviewer will pick a component and ask you to go deeper. Choose 2-3 components and examine the trade-offs, not just the happy path.
Don't just stop when the diagram is drawn. Close with:
These questions appear across FAANG, mid-stage companies, and startups. Each maps to a repeatable architecture pattern - learn the pattern, and variations become straightforward.
| # | Question | Core Pattern | The Trap Most People Fall Into | Difficulty | Practice |
|---|---|---|---|---|---|
| 01 | URL Shortener (TinyURL) | Hashing + Key-Value Store | Forgetting collision handling with Base62. What happens when two URLs hash to the same key? | Easy | Level 3 → |
| 02 | Rate Limiter | Token Bucket / Sliding Window | Only designing for a single server. In real life, you need distributed counting (Redis + Lua scripts) | Easy | Level 4 → |
| 03 | Notification System | Queue + Priority Routing | Treating all notifications the same. SMS, push, email have completely different delivery guarantees and costs | Medium | Level 5 → |
| 04 | Key-Value Store (Redis) | Consistent Hashing + Replication | Not discussing what happens during a network partition. How do you handle split-brain scenarios? | Medium | Level 6 → |
| 05 | Web Crawler (Google) | BFS Queue + Workers + Dedup | Ignoring politeness (don't DDoS websites!) and URL deduplication at scale | Medium | Level 8 → |
| 06 | Twitter / News Feed | Fanout on Write vs Read | Using the same strategy for celebrities (10M followers) and regular users. Hybrid fanout is the answer | Hard | Level 10 → |
| 07 | WhatsApp / Chat System | WebSocket + Message Queue | Not handling offline users. Where do messages go when someone's phone is off? You need a persistent queue | Hard | Level 11 → |
| 08 | Search Autocomplete | Trie + Ranking + Caching | Building a trie that updates in real-time. In reality, you rebuild it periodically and serve from cache | Medium | Level 12 → |
| 09 | YouTube / Video Platform | Streaming + CDN + Transcoding | Forgetting the transcoding pipeline. A single video needs 20+ formats (different resolutions, codecs, devices) | Hard | Level 13 → |
| 10 | Google Drive / Dropbox | Chunked Upload + Sync Engine | Not addressing conflict resolution. What if two people edit the same file at the same time? | Hard | Level 14 → |
| 11 | Uber / Ride Sharing | Geospatial Index + Matching | Using simple lat/lng queries. You need geohashing or quadtrees for efficient nearby-driver lookups | Hard | Level 18 → |
| 12 | Instagram / Photo Sharing | Blob Storage + CDN + Feed | Storing images in the database. Images go in S3/blob storage, only metadata goes in the DB | Medium | Level 16 → |
| 13 | Payment System (Stripe) | Idempotency + Saga Pattern | Not making payments idempotent. If a request retries, you could charge someone twice. Idempotency keys are mandatory | Hard | Level 21 → |
| 14 | Monitoring System (Datadog) | Time-Series DB + Aggregation | Trying to store raw metrics forever. You need downsampling: keep 1-second data for 1 day, 1-minute data for 30 days, 1-hour data for 1 year | Hard | Level 19 → |
| 15 | AI Chatbot (RAG System) | Vector DB + LLM + Embeddings | Sending entire documents to the LLM. You need chunking + embedding + similarity search to find relevant pieces first | Hard | Blog → |
Want to actually build these systems, not just read about them? ScaleDojo has 70+ interactive levels where you drag-and-drop components, connect them, and get AI-powered feedback on your architecture.
The #1 question interviewers ask to test your judgment: "Why did you pick that database?" Here's how to answer it every time.
→ PostgreSQL / MySQL
When you're dealing with money, orders, or anything where "almost correct" isn't good enough, you need ACID transactions. Think of it like a bank vault - every operation either fully completes or fully rolls back. No in-between.
→ DynamoDB / Cassandra
When you're writing more than reading (like IoT sensors or activity logs), these databases spread data across hundreds of machines automatically. They sacrifice some consistency for insane write speed. Like having 100 cash registers instead of 1.
→ Redis / Memcached
These keep everything in memory (RAM), not on disk. It's the difference between grabbing a book from your desk vs walking to the library. 1000x faster. Use for sessions, leaderboards, rate limiting, and caching hot data.
→ Elasticsearch
Regular databases search by exact matches. Elasticsearch searches by MEANING. It builds an inverted index (like the index at the back of a textbook) so it can find "running shoes" even if the document says "sneakers for jogging."
→ InfluxDB / TimescaleDB
Regular databases aren't built for "give me the average CPU usage every 5 minutes for the last 3 months." Time-series databases optimize for exactly this - they compress sequential timestamps and make aggregation queries lightning fast.
→ Neo4j / Amazon Neptune
When your data is about relationships (social networks, recommendation engines, fraud detection), graph databases let you ask "who are the friends of friends of this user?" in milliseconds. In SQL, that same query would take minutes with multiple JOINs.
→ Pinecone / pgvector / Weaviate
Vector databases store things as numbers that represent MEANING. So "happy" and "joyful" are stored close together. This powers AI search, recommendation systems, and RAG chatbots.
→ MongoDB / CouchDB
When you're building fast and your data shape keeps changing (startups, prototypes), document databases let you store anything without defining the structure upfront. Like a filing cabinet where each folder can have different contents.
Caching eliminates redundant database calls and is often the highest-leverage performance improvement available. The trade-off is always between freshness and speed.
"There are only two hard things in Computer Science: cache invalidation and naming things." - Phil Karlton
Discussing cache invalidation proactively - not just the cache-hit path - signals engineering depth to interviewers.
Systems don't start at Netflix scale. They grow. Here's what you add at each stage, and WHY. This is gold for "how would you scale this?" follow-ups.
Web server, application logic, and database all on one machine. Suitable for early-stage products with low traffic. Resist the urge to add complexity before you need it.
Separate the database onto its own server. Add read replicas to offload query traffic from the primary. Place a load balancer in front of multiple application servers. Most startups operate at this tier for years.
Introduce Redis to cache hot data (sessions, feeds, popular queries). Serve static assets from a CDN. Scale application servers horizontally behind the load balancer. Database reads are now mostly served from cache.
Your single database can't handle 10M users. Time to shard (split data across multiple databases by user ID or region). Add Kafka for async processing. Break your monolith into microservices so teams can work independently. This is where things get serious.
Deploy across multiple regions (US, Europe, Asia). Route traffic to the nearest data center. Implement CRDTs or conflict resolution for cross-region data consistency. This is the architecture major streaming and social platforms run.
Off-the-shelf solutions hit their limits. Google built Spanner, Amazon built DynamoDB, Meta built TAO - custom infrastructure designed around one company's specific access patterns and consistency requirements.
System design interviews are evaluated on trade-off reasoning, not on arriving at a single "correct" architecture. These are the comparisons that come up repeatedly.
These components appear in almost every system design answer. Know what each one is, when to reach for it, and what you're trading away when you add it.
Most interview rejections aren't caused by missing knowledge - they're caused by how that knowledge is communicated.
22 topics organized by dependency. Each tier assumes the previous one. Studying in this order avoids the common mistake of learning distributed systems concepts before understanding database fundamentals.
This exact roadmap is available as an interactive, clickable map at /roadmap - each topic links to a detailed blog post with diagrams and examples. Completely free. No signup needed.
Translate SLA percentages into real downtime figures. Each additional nine of availability costs roughly 10x more in engineering effort and infrastructure.
| Availability | Downtime / Year | Real-World Example |
|---|---|---|
| 99% (two 9s) | 3.65 days | Internal tools, dev environments |
| 99.9% (three 9s) | 8.77 hours | SaaS apps, content sites |
| 99.99% (four 9s) | 52.6 minutes | E-commerce, banking, health |
| 99.999% (five 9s) | 5.26 minutes | AWS, Google Cloud, stock exchanges |
Each extra 9 costs roughly 10x more money and engineering effort. For most systems, four 9s is the sweet spot.