A framework for system design interviews
Overview
A design interview is short and open-ended, which makes it easy to wander. The best candidates use a simple, repeatable structure so the conversation always moves forward and covers what the interviewer is looking for. This lesson gives you that structure. You’ll use it for every case study in week 7 and every mock in week 8.
The eight steps
The timings are a guide for a 45-minute slot. If the interviewer wants to skip ahead or dig into something, follow them: the structure is there to help you, not to box them in.
1. Clarify the problem (about 3 minutes)
Prompts are deliberately vague. Before designing, find out what you’re building:
- Who are the users and how do they use it (web, mobile, other services)?
- Which features matter most? Which can we leave out?
- Is this a global product or a single region?
“Before I start, I’d like to make sure I understand what we’re building. Who uses this, and what are the two or three things they must be able to do?”
2. Requirements (about 4 minutes)
Write two short lists on the board.
Functional requirements: three to five things the system must do, phrased as user actions (“users can shorten a URL”, “users are redirected when they open a short URL”). Also note what’s out of scope.
Non-functional requirements: the qualities that shape the design:
- scale (daily active users, requests per second),
- latency targets (for example p99 under 200 ms for reads),
- availability vs consistency (can users see slightly stale data?),
- durability (can we ever lose data?),
- anything special: security, cost, regional rules.
3. Back-of-the-envelope estimates (about 3 minutes)
Estimate only what will change a decision: read and write QPS, peak traffic, storage over a few years, and bandwidth for media. Round aggressively and state your assumptions. Week 2 has a full lesson on this.
“100 million daily users, each doing about 10 reads a day, is a billion reads a day, roughly 12,000 per second on average and maybe 30,000 at peak. That’s more than one database can comfortably serve, so caching will matter.”
4. API (about 4 minutes)
List the core endpoints with their main parameters. This turns requirements into something concrete and catches misunderstandings early.
POST /v1/stories {media_id, caption} -> 201 {story_id}
GET /v1/stories/tray?cursor=... -> 200 {users: [...], next_cursor}
POST /v1/stories/{id}/views -> 2045. Data model (about 4 minutes)
Name the main entities, their key fields and how they’re accessed. Then choose a storage type based on the access patterns (relational, key-value, wide-column, object storage). Don’t pick a database by brand; pick it by what queries it must answer.
6. High-level design (about 10 minutes)
Draw a simple design that meets all the functional requirements end to end: clients, load balancer, services, databases, caches, storage, queues. Walk through one or two requests (“when a user posts a story, the app uploads the video to object storage, then calls…”).
A complete simple design is worth more than a brilliant half-design. Optimise afterwards.
7. Deep dives (about 12 minutes)
Now improve the parts that are hardest for this problem. Typical deep dives:
- the hot path that must be fast (feed generation, redirects),
- the data store under the heaviest load (sharding, replication, caching),
- correctness problems (double payments, overselling tickets),
- handling spikes (queues, rate limiting).
Often the interviewer chooses. If they don’t, propose: “I think the most interesting parts are X and Y. Which would you like me to go into?”
8. Trade-offs and wrap-up (about 5 minutes)
Finish by stepping back:
- Bottlenecks: what breaks first as traffic grows 10×?
- Failures: what happens if the cache, a database node or a whole region goes down?
- Trade-offs: what did you give up and why (for example eventual consistency for availability)?
- Next steps: monitoring, alerts, security and the features you left out.
Communication habits that score points
- Think out loud. Silence gives the interviewer nothing to assess.
- Name the trade-off every time you choose. “I’ll use a queue here; uploads become asynchronous, which is fine because users don’t need the thumbnail instantly.”
- Check in. “Does this level of detail work, or should I go deeper on storage?”
- Use numbers. Refer back to your estimates to justify decisions.
- Take hints gracefully. If the interviewer asks “what if this server dies?”, it’s a hint to address failure, not a trick.
Common mistakes
- Jumping straight to boxes without requirements.
- Spending fifteen minutes on estimates.
- Naming technologies without explaining why (“we’ll use Cassandra” with no reason).
- Going deep on one component and never completing the end-to-end design.
- Over-engineering: microservices, five databases and Kafka for a system with 1,000 users.
- Ignoring failure until the interviewer asks.
Recap
Clarify, write requirements, estimate what matters, sketch the API and data model, draw a complete simple design, deep-dive into the hard parts, and wrap up with trade-offs, failures and next steps. Practise this structure until it’s automatic, so in the interview your attention goes to the problem rather than to what to do next.
The first eight minutes
Your interviewer says: 'Design a system like Instagram Stories.' Write what you would cover in the first eight minutes: the clarifying questions you would ask, the functional requirements you would agree on (in and out of scope), and the non-functional requirements with rough numbers. Assume reasonable answers to your own questions.
Clarifying questions:
-
Functional requirements (in scope):
-
Out of scope:
-
Non-functional requirements:
-Clarifying questions:
- Photos only, or photos and short videos? (Both; videos up to 15 s.)
- How many daily active users? (~500 million; ~100 million post a story per day.)
- Who can see a story: followers only, or close friends lists too? (Followers; lists out of scope.)
- Do stories really disappear after 24 hours? (Yes, from viewers; archive out of scope.)
- Do we need view counts / "seen by" lists? (Yes, for the owner.)
Functional requirements (in scope):
- Post a photo/video story that expires after 24 hours.
- See a tray of stories from people I follow, newest first.
- Watch stories in order; mark them as seen.
- The owner sees who viewed each story.
Out of scope:
- Stickers, music, replies/DMs, ads, close-friends lists, archive, moderation pipeline.
Non-functional requirements:
- Read-heavy: each story is viewed many times (assume ~50 views per story).
- Viewing must be fast: tray loads in < 200 ms p99; media starts in < 1 s.
- Highly available (99.99%); a story appearing a few seconds late is fine
(eventual consistency is acceptable).
- Media storage: 100M stories/day x ~2 MB average = ~200 TB/day; expires after 24 h
(but may be kept for the archive later).Summary
- Spend the first 5–10 minutes on clarifying questions and functional and non-functional requirements; write them down.
- Estimate only the numbers that will change your design, such as QPS, storage and read/write ratio.
- Sketch the API and data model before drawing boxes; they anchor the design.
- Draw a simple end-to-end design first, then improve it with deep dives on the hardest parts.
- Say trade-offs out loud, invite the interviewer's input, and finish with bottlenecks, failures and next steps.