A framework for system design interviews

Topic 9 of 9 in Week 1: Foundations and the interview framework12 min readBeginnerFree course

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

A framework for a 45-minute design interview in eight steps with approximate time. 1 Clarify scope, users and features, 3 minutes. 2 Requirements: what it does and how well, 4 minutes. 3 Estimates of QPS, storage and traffic, 3 minutes. 4 API endpoints and payloads, 4 minutes. 5 Data model: entities, keys and store, 4 minutes. 6 High-level design with boxes and arrows, 10 minutes. 7 Deep dives into one or two hard parts, 12 minutes. 8 Trade-offs, risks and next steps, 5 minutes. Tips: write requirements and numbers on the board because they justify every later choice; get a simple end-to-end design first, then improve it; let the interviewer steer the deep dives and say each trade-off out loud.

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.

Text
POST /v1/stories            {media_id, caption}   -> 201 {story_id}
GET  /v1/stories/tray?cursor=...                  -> 200 {users: [...], next_cursor}
POST /v1/stories/{id}/views                       -> 204

5. 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.

Exercise

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.

Text
Clarifying questions:
-

Functional requirements (in scope):
-

Out of scope:
-

Non-functional requirements:
-

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.