System Design Interview Framework

A step-by-step approach for a 45–60 minute design interview, and the pitfalls that sink candidates.

What is it?

A system design interview asks you to design something large ("design a URL shortener", "design a news feed") in under an hour. There's no single right answer. The interviewer is judging how you think: do you clarify the problem, reason with numbers, make sensible trade-offs, and communicate clearly?

A repeatable framework keeps you from freezing or wandering:

1. Requirements: functional and non-functional, plus scope. 2. Estimates: traffic, storage, bandwidth. 3. API: the main endpoints or operations. 4. Data model: entities, keys, and the storage choice. 5. High-level design: boxes and arrows for the main flows. 6. Deep dives: the one or two hardest parts, in detail. 7. Bottlenecks and failures: what breaks at scale or on failure. 8. Trade-offs and wrap-up: what you chose, what you gave up, what's next.

Explain like I'm 10

It's like an architect meeting a client. They don't start drawing a skyscraper. They ask how many people, what budget, what the building is for, then sketch the floor plan, then zoom into the tricky parts like the foundations and fire exits, and explain why they made each choice.

Examples

Applying the framework to a URL shortener (condensed)

1. Requirements
   Functional: create short link for a long URL; redirect short → long;
               optional custom alias and expiry.
   Non-functional: redirects very fast (p99 < 50 ms), highly available,
               short codes not guessable in sequence. Read-heavy.
   Out of scope: analytics dashboard, user accounts.

2. Estimates
   100M new links/month ≈ 40 writes/s; 100:1 reads → ~4,000 reads/s avg.
   500 bytes/link × 100M × 12 × 5 years ≈ 3 TB.

3. API
   POST /links { longUrl, customAlias?, expiresAt? } → { code }
   GET  /{code} → 301/302 redirect

4. Data model
   links(code PK, long_url, created_at, expires_at)  → key-value lookup

5. High-level
   Client → LB → stateless API → cache (code → URL) → DB

6. Deep dive
   Code generation: base62 of a unique id (7 chars = 62^7 ≈ 3.5 trillion)
   vs random + collision check. Cache hot codes; CDN for redirects.

7. Bottlenecks
   DB reads → cache; id generator → pre-allocated ranges;
   hot links → CDN; region failure → replicate across regions.

8. Trade-offs
   301 is cached by browsers (less load, loses click counts) vs 302.

How it works

A rough time budget for a 45-minute interview:

1. Requirements (~5 min). Ask about core features, users, scale, read/write ratio, latency, consistency needs, and what's out of scope. Write down 3–5 functional requirements and the key non-functional ones. Confirm with the interviewer.

2. Estimates (~3–5 min). QPS (average and peak), storage over the retention period, bandwidth. Only as precise as needed to make a decision, and say what each number implies.

3. API (~3–5 min). List the main operations with inputs and outputs: REST endpoints, RPCs, or events. Include pagination and idempotency where relevant.

4. Data model (~3–5 min). Core entities, primary keys, access patterns, and a storage choice justified by those patterns (relational for relations and transactions, key-value for simple lookups at scale, etc.).

5. High-level design (~10 min). Draw clients, load balancer, services, databases, caches, queues, object storage, CDN. Walk through each main flow (write path and read path) end to end.

6. Deep dives (~10–15 min). Pick the parts that are hardest or that the interviewer steers you to: feed fan-out, ID generation, consistency, hot keys, search. Compare at least two options and choose one.

7. Bottlenecks and failures (~5 min). Single points of failure, scaling limits, what happens when a node, zone or dependency dies; monitoring and alerting.

8. Wrap-up (~2 min). Summarise the design, the main trade-offs, and what you'd do with more time.

Throughout: think out loud, check in with the interviewer, keep the diagram up to date, and adapt when they redirect you.

Requirements ─▶ Estimates ─▶ API ─▶ Data model ─▶ High-level design
                                                        │
          Wrap-up ◀── Bottlenecks & failures ◀── Deep dives
     (trade-offs, next steps)

 Generic starting skeleton:
   Client ─▶ DNS/CDN ─▶ Load balancer ─▶ Stateless services ─┬─▶ Cache
                                                             ├─▶ Database
                                                             ├─▶ Object storage
                                                             └─▶ Queue ─▶ Workers

Why does it exist?

Open-ended design problems are easy to get lost in: it's tempting to start drawing Kafka clusters before knowing what the system does. A framework ensures you cover what interviewers look for (scoping, quantitative reasoning, sound components, trade-offs) and leaves time for depth. It's also how real design reviews work, just compressed.

When to use it

In system design interviews, in design docs and architecture reviews, and when estimating a new project. The same order (requirements → numbers → interfaces → data → architecture → risks) works for real work.

When not to use it

Don't apply it rigidly. If the interviewer wants to skip estimates or go straight to one component, follow them. For a narrow question ("how would you design a rate limiter's algorithm?"), go deep immediately instead of drawing the whole system.

Common mistakes

  • Jumping into components and technologies before clarifying requirements and scale.

  • Spending too long on estimates or the high-level diagram and never reaching a real deep dive.

  • Name-dropping technologies (Kafka, Cassandra, Kubernetes) without explaining why they fit this problem better than simpler options.

  • Presenting one design as if it were the only option, without stating trade-offs or alternatives.

  • Designing in silence, or ignoring the interviewer's hints and questions instead of treating it as a collaboration.

Practice exercises

  1. Easy:

    For 'design a pastebin', write 4 functional and 3 non-functional requirements, and list 2 things you'd declare out of scope.

  2. Medium:

    Run steps 1–5 of the framework for a 'design a rate-limited public API for weather data' prompt in 20 minutes, with a timer.

  3. Hard:

    Do a full 45-minute mock for 'design a news feed' with a friend acting as interviewer. Afterwards, list where you lost time and which trade-offs you failed to state.

Interview questions

What's the first thing you do in a system design interview?

Clarify requirements: core features, users and scale, read/write patterns, latency and consistency needs, and what's out of scope. Then confirm the list with the interviewer before designing.

What's the difference between functional and non-functional requirements? Give examples.

Functional: what the system does ('users can post photos', 'users see a feed'). Non-functional: how well ('p99 feed load < 200 ms', '99.99% available', 'eventual consistency acceptable', '100M DAU').

Why do estimates before the high-level design?

The numbers determine the architecture: whether one database suffices, whether a cache or CDN is needed, whether to shard, and which path (reads or writes) needs optimising.

Why define the API and data model before drawing the architecture?

They make the problem concrete. The access patterns (which queries, by which keys, how often) drive the storage choice, indexes, partitioning keys and caching strategy.

How do you choose what to deep dive into?

Pick the part that's hardest or most specific to the problem (fan-out for a feed, ID generation for a shortener, matching for ride-hailing), or follow the interviewer's lead. Compare options and justify a choice.

How should you discuss trade-offs?

Name at least two options, what each optimises for and what it costs (latency, consistency, complexity, cost), then pick one based on the stated requirements. 'It depends' is only useful when followed by what it depends on.

What makes a deep dive senior-level rather than junior-level?

Covering failure modes and edge cases (retries, idempotency, hot keys, partial failures), operational concerns (monitoring, migrations, rollout), quantitative reasoning, and knowing when a simpler design is enough.

How do you handle a requirement you don't know how to solve?

Say so, reason from first principles out loud, propose a simple approach that works, then discuss how to improve it. Interviewers value reasoning and honesty over bluffing.

What are common reasons candidates fail system design interviews?

Not clarifying scope, no numbers, a vague diagram with no data flow, no depth on any component, ignoring failures, no trade-offs, poor time management, and not engaging with the interviewer's hints.

How would you identify bottlenecks in your own design?

Trace each request path and check every component against the estimated load, look for single points of failure, shared resources (one DB, one hot key), synchronous chains, and ask what happens when each component is slow or down.