How to Crack Any System Design Interview: A Repeatable Framework
Most people fail system design interviews for lack of a method, not knowledge. Here's a repeatable framework to design any system in 45 minutes.
- Author
- Randhir Jassal
- Published
- Reading time
- 15 min read
- Views
- 6 views
Most people don't fail a system design interview because they don't know the technology. They fail because they have no method. They jump straight to "let's use a database," design one random corner in great detail, ignore the rest, and run out of time with a half-drawn box on the whiteboard. The candidates who pass aren't smarter — they follow a repeatable sequence, out loud, every single time. This is that sequence.
System design interviews feel intimidating because the questions are deliberately open-ended: "Design Twitter." There is no single right answer, the scope is huge, and you have 45 minutes. But the open-endedness is the trick — the interviewer isn't checking whether you memorized Twitter's architecture. They're watching how you navigate ambiguity, make trade-offs, and communicate. Give them a clear, structured walk through the problem and you pass, even if your final design isn't "perfect." This post is the framework I'd teach anyone before their first one — a step-by-step method that works for any "Design X" question, plus the building blocks and numbers you need at your fingertips.
TL;DR — the framework at a glance
| Step | What you do | Time (of ~45m) |
|---|---|---|
| 1 | Clarify requirements (functional + non-functional) and narrow scope | ~5 min |
| 2 | Back-of-envelope estimates (QPS, storage, bandwidth) | ~5 min |
| 3 | API design — the handful of endpoints that matter | ~5 min |
| 4 | Data model — entities, schema, SQL vs NoSQL and why | ~5 min |
| 5 | High-level architecture — draw the boxes | ~10 min |
| 6 | Deep-dive the hard part — the 1–2 things that make this problem interesting | ~10 min |
| 7 | Bottlenecks & scaling — cache, shard, replicate, queue | ~5 min |
| 8 | Trade-offs & wrap-up — what you'd do with more time | ~3 min |
- You are not being tested on the answer — you're tested on method, trade-offs, and communication. Narrate everything.
- Drive the conversation. Silence reads as being stuck. State what you're doing before you do it.
- Scope down, hard. "Design YouTube" in 45 minutes means upload + view, not comments + monetization + Shorts. Say so out loud.
- Estimate first. Numbers tell you whether you need one server or a thousand — and they justify every later decision.
- Draw the architecture. A clear diagram is worth more than ten sentences; the interviewer thinks in boxes and arrows too.
- Go deep on the interesting part, not the boring CRUD. Every problem has a core challenge — find it and spend your time there.
- There are no free lunches — every choice (SQL vs NoSQL, sync vs async, strong vs eventual consistency) is a trade-off. Name both sides.
- Master a small set of reusable building blocks; every "Design X" is a recombination of the same ~10 components.
- Memorize the latency numbers, powers of two, and QPS math — they make your estimates fast and credible.
- Adapt to the level. Junior: get a working design. Senior/staff: bottlenecks, trade-offs, failure modes, and "why."
The one mental shift: the interviewer is your collaborator, not your examiner. It's a conversation, not an exam. Think out loud, check in ("does it make sense if I focus on the write path?"), and treat their nudges as hints, not traps. A design you build with them beats a "perfect" design you build in silence.
The framework, step by step
Step 1 — Clarify requirements and narrow scope (~5 min)
Never start designing. Start asking. The prompt is intentionally vague, and your first job is to turn "Design Twitter" into a concrete, bounded problem.
Split requirements into two buckets:
- Functional — what the system does. ("Users can post a tweet. Users see a timeline. Users follow others.") Then cut ruthlessly: pick 2–4 core features and explicitly park the rest. Say: "I'll focus on posting and the timeline, and treat search, DMs, and ads as out of scope for now — is that reasonable?"
- Non-functional — the qualities: scale (how many users / requests?), latency (how fast?), availability vs consistency, read vs write ratio, durability. These numbers drive every later decision.
The single most common failure is skipping this step and designing the wrong system beautifully. Two minutes of scoping saves you from that.
Step 2 — Back-of-envelope estimates (~5 min)
Now put numbers to it. You're not looking for precision — you're looking for the order of magnitude that tells you whether this is a single-box problem or a globally-distributed one.
Estimate, out loud:
- Traffic: daily active users → requests/day → average QPS → peak QPS (≈ 2–3× average).
- Storage: bytes per record × records/day × retention → total. Project 5 years.
- Bandwidth: QPS × payload size.
- Memory: what fraction of data is "hot" and cacheable?
Example, for a read-heavy feed with 100M daily users each loading the feed 10×:
1,000,000,000 reads/day ÷ 86,400 s ≈ 11,600 QPS average
Peak ≈ 3× ≈ ~35,000 QPS
That single number already tells you: no single database serves this — you'll need caching, replicas, and probably sharding. Estimates aren't busywork; they justify your architecture.
Step 3 — API design (~5 min)
Define the contract before the internals. List the handful of endpoints that cover your core features — method, path, key params, and what they return.
POST /tweets { text } -> tweetId
GET /feed?cursor=... (auth) -> [tweets], nextCursor
POST /follow { targetUserId } -> 200
Two things score points here: cursor-based pagination (not offset — it doesn't break when data shifts), and being explicit about auth (who's calling). This step also forces you to nail down exactly what the system promises.
Step 4 — Data model (~5 min)
Sketch the core entities and their relationships, then choose storage and justify it:
- SQL when you need transactions, joins, and strong consistency (payments, orders, anything with money or invariants).
- NoSQL (key-value / wide-column / document) when you need massive horizontal scale, flexible schema, and can tolerate eventual consistency (feeds, activity streams, metrics).
Don't just say "I'll use NoSQL" — say why: "Tweets are append-heavy, read by key, and don't need joins, so a wide-column store scales better here than a relational one." The reasoning is what's being graded.
Step 5 — High-level architecture (~10 min)
Now draw it. Start from the generic scalable skeleton (below) and adapt. Walk the request path end to end — client → load balancer → app servers → cache/DB → response — narrating as you go. Keep app servers stateless so you can scale them horizontally. Push heavy or slow work (media processing, notifications, fan-out) onto a queue + workers so the request path stays fast.
This is the backbone the interviewer will anchor on for the rest of the conversation. Make it clean and legible.
Step 6 — Deep-dive the hard part (~10 min)
Every "Design X" has one or two things that actually make it interesting — and that's where the interviewer wants to see you go deep. The rest is plumbing. Find the core challenge and spend your time there:
| Problem | The hard part to deep-dive |
|---|---|
| URL shortener | Short-code generation & collision handling |
| Rate limiter | The algorithm + distributed counters |
| News feed | Fan-out on write vs. read (the celebrity problem) |
| Chat / WhatsApp | Real-time delivery, ordering, presence |
| Uber | Geospatial indexing & matching |
| Payment system | Idempotency & the ledger |
| YouTube | The transcoding pipeline & CDN |
Don't spread yourself thin across every component. One well-reasoned deep-dive beats ten shallow boxes.
Step 7 — Bottlenecks & scaling (~5 min)
Pressure-test your own design. Ask "what breaks first?" and reach for the standard levers:
- Caching (Redis) for hot reads — and name the invalidation strategy.
- Read replicas to scale reads; sharding to scale writes (state your shard key).
- Async processing via queues to absorb spikes and decouple slow work.
- CDN for static/media content close to users.
- Single points of failure — remove them; replicate across availability zones.
Proactively raising bottlenecks (before the interviewer does) is a senior signal.
Step 8 — Trade-offs & wrap-up (~3 min)
Close by naming the trade-offs you made and what you'd revisit with more time: consistency vs. availability, cost vs. latency, simplicity vs. scale. This shows judgment — that you know your design isn't free and isn't final. "I chose eventual consistency on the feed for availability; if this were a bank ledger I'd have gone the other way."
The 45-minute timeline
0min +---------------------------------------------+
| 1. Clarify requirements + scope (~5m) |
5min | 2. Back-of-envelope estimates (~5m) |
10min | 3. API design (~5m) |
15min | 4. Data model (~5m) |
| 5. High-level architecture (DRAW) (~10m) |
25min | 6. Deep-dive the hard part (~10m) |
35min | 7. Bottlenecks & scaling (~7m) |
42min | 8. Trade-offs + wrap-up (~3m) |
45min +---------------------------------------------+
Watch the clock. If you're 20 minutes in and still clarifying requirements, you've already lost. Keep each step tight and move.
The reusable building blocks
Here's the secret that makes every problem tractable: you're always recombining the same ~10 components. Learn these cold and any "Design X" becomes an assembly problem.
Clients (web / mobile)
|
v
[ DNS ] --> [ CDN ] (static assets, media, edge caching)
|
v
[ Load Balancer ] (spread traffic, health checks)
|
+----+----+----+
v v v v
[ App servers (STATELESS) ] (scale horizontally)
|
+--> [ Cache: Redis ] (hot reads)
+--> [ Message Queue ] --> [ Workers ] (async writes, fan-out, media)
|
v
[ Database ]
- primary (writes) --> replicas (reads)
- sharded by <key> for write scale
|
v
[ Blob store: S3 ] (files, images, video)
- Load balancer — distributes traffic, removes single points of failure.
- Cache — Redis/Memcached in front of the DB for read-heavy paths; know your eviction (LRU) and invalidation.
- CDN — serves static and media content from the edge, near the user.
- Database — SQL for consistency/transactions, NoSQL for scale; replication for read scale + failover, sharding for write scale.
- Message queue — Kafka/RabbitMQ/SQS to decouple, buffer spikes, and run work asynchronously.
- Blob store — S3-style object storage for large files (never put video in your database).
- Consistent hashing — how you distribute data across shards/cache nodes without reshuffling everything when one is added.
- Rate limiter / API gateway — protect the system at the edge.
The numbers to memorize
Fast, credible estimates come from having these at your fingertips.
Latency (order of magnitude):
| Operation | ~Time | Takeaway |
|---|---|---|
| L1 cache reference | ~1 ns | — |
| Main memory (RAM) reference | ~100 ns | the baseline for "fast" |
| Read 1 MB sequentially from RAM | ~10 µs | — |
| SSD random read | ~100 µs | ~1,000× slower than RAM |
| Round trip within the same datacenter | ~500 µs | — |
| Read 1 MB from SSD | ~1 ms | — |
| Disk (HDD) seek | ~10 ms | avoid on the hot path |
| Round trip across continents | ~150 ms | why the CDN exists |
The one relationship to internalize: memory is fast, disk is slow, and the network is slower the farther it goes. A cross-continent round trip is roughly a million times a RAM access — so cache aggressively and keep data near users.
Powers of two (data sizes):
| Power | ≈ | Size |
|---|---|---|
| 2^10 | Thousand | 1 KB |
| 2^20 | Million | 1 MB |
| 2^30 | Billion | 1 GB |
| 2^40 | Trillion | 1 TB |
| 2^50 | Quadrillion | 1 PB |
QPS math shortcut: there are ~86,400 seconds in a day ≈ 10^5. So requests per day ÷ 100,000 ≈ average QPS. Peak ≈ 2–3× average.
Availability: 99.9% ≈ 8.7 hours down/year · 99.99% ≈ 52 minutes · 99.999% ≈ 5 minutes. Each "nine" is ~10× harder and more expensive — so ask how many you actually need.
See the framework run: "Design Pastebin" in one lap
To make it concrete, here's the whole method applied fast to a simple prompt — paste some text, get a shareable link. In a real interview you'd expand each step; the point is to see how they connect.
- Requirements & scope. In: create a paste, read a paste by link. Out (parked): editing, accounts, syntax highlighting, expiry. Non-functional: read-heavy (~10:1), highly available, pastes are immutable.
- Estimates. Say 1M new pastes/day → ~12 writes/sec average, ~35 peak. Reads ~10× → ~120/sec. Average paste 10 KB → ~10 GB/day → ~18 TB over 5 years. Verdict: writes are tiny, reads modest — storage is the real driver, so lean on object storage + a small metadata DB + a cache.
- API.
POST /pastes { text } -> { id, url }·GET /pastes/{id} -> { text }. - Data model. A metadata row
(id, createdAt, size, blobKey)in the DB; the paste body in blob store (S3), not the DB.id= base62 of a unique counter. - Architecture. Client → LB → stateless app servers. Write: body → S3, metadata → DB. Read: check Redis → fall back to DB/S3 → populate cache. CDN in front for popular pastes.
- Deep-dive (the hard part). ID generation — a global counter (or a key-generation service) rendered as base62 gives short, collision-free IDs with no hashing — and read scaling, since the 10:1 ratio makes the cache the workhorse.
- Bottlenecks. Hot pastes → CDN + Redis; metadata reads → replicas; storage growth → a lifecycle/expiry policy.
- Trade-offs. Object storage keeps the DB tiny but adds a second read hop; counter-based base62 IDs are simple but leak ordering (fine for pastebin, not for anything security-sensitive).
That's the entire framework in one pass. Every other "Design X" is these same eight steps — with a different hard part in Step 6.
The interview checklist
- Clarify before designing — functional + non-functional, then scope down to 2–4 features.
- Estimate early — QPS, storage, bandwidth; let the numbers justify the architecture.
- Define the API before the internals; cursor pagination, explicit auth.
- Justify the data store — SQL vs NoSQL with a reason, not a reflex.
- Draw the architecture and walk the request path out loud.
- Deep-dive the one hard part, not every box.
- Name bottlenecks and fixes — cache, replicate, shard, queue, CDN.
- State the trade-offs you made and what you'd revisit.
- Narrate throughout — no silent whiteboarding.
The honest stuff: where the framework bends
- Don't over-engineer for scale you don't need. If the interviewer says "10,000 users," don't design for a billion. Match the design to the stated scale; over-building reads as poor judgment, not ambition.
- Don't jump to microservices by default. "I'd split this into 20 services" is a red flag for a 45-minute design. Start with a clean monolith or a few services and split only where you can justify it.
- Don't disappear into one component. Deep-diving is good; spending 30 minutes perfecting the database schema while the rest of the system is undrawn is not. Budget your time.
- Don't go silent. The framework is a script to speak, not a checklist to complete in your head. If you're thinking, say what you're thinking about.
- Adapt to the company and level. A payments company wants consistency and correctness; a social app wants scale and availability. Junior interviews reward a working design; senior ones reward failure modes and trade-offs.
- Estimates are directional, not exact. Round aggressively (a day is ~10^5 seconds). Nobody wants you doing long division for two minutes — they want the order of magnitude and the decision it implies.
- Perfect is not the goal. You will not produce a production-grade design in 45 minutes, and you're not expected to. A clear, reasoned, appropriately-scoped design that you communicated well is a pass.
The model to carry forward
A system design interview is a guided conversation about trade-offs, not a test with an answer key. Your job is to take an intentionally vague prompt, make it concrete, and reason from requirements to a design — out loud, with the interviewer, adjusting as you go. The framework is just a way to never freeze: whatever the problem, you always know the next move. Master the eight steps, the ten building blocks, and the handful of numbers, and "Design X" stops being scary — it becomes the same well-worn walk, applied to a new destination.
Three habits that separate a pass from a fail:
- Clarify and scope before you design. The candidates who fail almost always skipped this and built the wrong thing well.
- Let numbers drive decisions. Estimate first, and every architectural choice becomes a justified consequence instead of an opinion.
- Communicate relentlessly. Narrate your thinking, draw clearly, and check in. The design is half of it; the conversation is the other half.
Further reading
This is the framework post for a full series — each "Design X" below applies these exact eight steps to a specific problem. In the meantime, these published deep-dives cover patterns that show up constantly in system design:
- Outbox Pattern — A Complete Guide with Order Processing Example
- Saga Pattern for Microservices — A Complete Guide
- We Replaced REST with Kafka and Cut Failures by 90%
Prepping for a system design round and want a second pair of eyes on your approach — or a specific "Design X" walked through end to end? I'm always happy to help; reach me at randhir.jassal@gmail.com.
Get the next issue
A short, curated email with the newest posts and questions.