System Design Interview: How to Structure Your Answer
Why Good Engineers Fail System Design Interviews
You've built distributed systems. You've debugged production outages. You know what a CDN is. And yet, when someone says "Design Twitter," your mind goes blank.
The problem isn't knowledge β it's structure. System design questions are deliberately open-ended. Without a clear framework, you bounce between components, forget to clarify requirements, and run out of time before you've covered the important parts.
The interviewers aren't grading your final diagram. They're watching how you think: do you gather requirements, propose a design, identify bottlenecks, and reason about trade-offs? That's what the system design interview actually tests.
The 5-Step Framework for Any System Design Interview
Step 1: Clarify Requirements (3β5 minutes)
Before drawing anything, ask questions. This is not a stall tactic β it's the most important part.
Functional requirements β what the system must do:
- What are the core user actions? (post, read, search, follow?)
- What use cases are out of scope?
Non-functional requirements β how the system must behave:
- Scale: how many daily active users? Read-heavy or write-heavy?
- Latency targets: what's acceptable for the main user action?
- Availability: what's the uptime SLA? Can we tolerate brief downtime during deployments?
- Consistency: strong consistency required, or eventual is fine?
Write the numbers down. "1M daily users, 100:1 read/write ratio, p99 < 200ms for reads" β this shapes every architectural decision you make.
Don't skip this step even if the prompt seems clear. Interviewers intentionally leave ambiguity to see if you'll ask.
Step 2: Estimate Scale (2β3 minutes)
Back-of-the-envelope math grounds your design. For a read-heavy system with 10M DAU:
- Assume 50 reads/day per user β 500M reads/day β ~6,000 reads/second
- Storage: if each record is 1KB and you store 10M new records/day β 10GB/day β 3.6TB/year
These numbers tell you whether you need a single database or sharding, whether a single cache node suffices, and what your CDN strategy should look like.
Step 3: High-Level Design (10β12 minutes)
Now draw. Start with the simplest design that satisfies your requirements. A good high-level design for most systems includes:
- Client β API Gateway β Application services
- Databases β what type and why (relational, NoSQL, time-series)?
- Cache β what are you caching and why?
- Async processing β where does a message queue fit?
- CDN β for static content or geographically distributed reads
For example, a URL shortener at scale:
- Write path: Client β API β Application server β DB (write short:long mapping) + Cache
- Read path: Client β CDN β Load balancer β App server β Cache (Redis) β DB on cache miss
- Short URL generation: Use a counter-based ID with base-62 encoding or a distributed ID generator (Snowflake)
State your choices out loud: "I'm using PostgreSQL here because the data is relational and we need strong consistency for writes. For reads, I'll put Redis in front."
Step 4: Deep-Dives (10β15 minutes)
After the high-level, the interviewer will typically steer you to areas they care most about. Common deep-dive topics:
- Database schema design β what are your tables, indexes, sharding strategy?
- Caching strategy β cache-aside vs. write-through? TTL? Cache invalidation?
- Handling hot spots β what happens when one celebrity user's posts get 10M hits?
- Consistency vs. availability β where are you making that trade-off explicitly?
- Data fan-out β for social feeds, how do you propagate writes to followers?
Go deep when asked. The interviewer wants to see you move beyond "put a cache in front of the database" to "here's the eviction policy, here's how I handle cache stampedes, here's the trade-off I'm making."
Step 5: Trade-Offs and Alternatives (5 minutes)
Close by acknowledging what you deliberately left out or simplified. This is what separates good candidates from great ones.
"I chose eventual consistency here to get better write throughput β but if the business required that every read reflects the latest write, I'd need to rethink this with synchronous replication, which adds latency."
This signals engineering maturity: you understand that every architectural decision is a trade-off, not a right answer.
Common System Design Interview Questions and What They're Really Testing
| Question | What they're actually testing |
|---|---|
| Design a URL shortener | Hashing, storage, high read throughput, caching |
| Design Twitter/Instagram feed | Fan-out strategies, eventual consistency, CDN |
| Design a rate limiter | Token bucket vs. leaky bucket, distributed counters |
| Design a notification system | Async processing, message queues, retry logic |
| Design a distributed cache | Consistent hashing, replication, eviction policies |
The Biggest Mistakes in System Design Interviews
Jumping straight to code or diagrams. Start with requirements every time, even if the problem seems obvious.
Designing the perfect system. There is no perfect system. The interviewer wants trade-off reasoning, not a textbook diagram.
Going silent. Narrate your thinking out loud. If you're considering two approaches, say so. "I'm choosing between X and Y β X gives us better write performance but Y is easier to scale reads. Given our 100:1 read ratio, I'll go with Y."
Ignoring scale. Every decision should connect back to your numbers. "This works at 1K QPS, but at 100K QPS we'd need to shard β here's how I'd approach that."
Practice This Now
Knowing the framework and applying it live under interviewer pressure are two very different things.