Preparation · System Design

System Design Interview: A 45-Minute Framework With a Worked Example

Person pointing at a system design diagram of connected boxes drawn on a whiteboard

The hardest part of a system design interview is not knowing every technology. It is organising a vague, open-ended question into a clear answer within 45 minutes. This guide gives you a six-step framework, a rough time budget and a worked example, so you always know what to do next.

The framework and time budget below are our own suggested structure based on common practice, not an official format from any company. Adjust it to the interviewer's lead.

What interviewers are looking for

  • Clear thinking: you clarify the problem before you design.
  • Trade-offs: you explain why you chose one option over another.
  • Depth: you go deep on one or two components, not shallow on all.
  • Communication: you think aloud and invite the interviewer to steer.
  • Realism: you consider scale, failures and cost.

The six-step framework and time budget

StepWhat you doSuggested time
1. Clarify requirementsAsk about users, features and constraints5 minutes
2. Estimate scaleRough numbers for traffic, storage and bandwidth5 minutes
3. Define the API and data modelMain endpoints and core entities5 minutes
4. Draw the high-level designBoxes for clients, services, storage, cache10 minutes
5. Deep diveGo deep on the hardest one or two parts15 minutes
6. Trade-offs and wrap-upBottlenecks, failure cases, next steps5 minutes

Step 1: Clarify requirements

Start with questions, not boxes. Ask who uses the system, which features matter most and what you can leave out. Separate functional requirements (what it does) from non-functional requirements (how fast, how available, how consistent). Write them on the board and confirm them with the interviewer.

Useful questions: How many users? Read-heavy or write-heavy? Is some data loss acceptable? Do we need global users? What latency feels fast enough?

Step 2: Estimate the scale

Use simple arithmetic to size the problem. Say your assumptions aloud so the interviewer can correct them.

  1. Estimate daily active users and actions per user.
  2. Convert to requests per second: daily requests divided by 86,400 seconds.
  3. Estimate storage: record size times records per day times retention.
  4. Note the read-to-write ratio, because it drives caching and database choices.

The goal is not perfect numbers. It is to know whether you need one server or a distributed system.

Step 3: Define the API and data model

List the main endpoints and the key entities with their fields. This keeps your design concrete. For example, POST /urls creates a short link and GET /{code} redirects. Name the primary keys and the access patterns, since they decide your storage choice.

Step 4: Draw the high-level design

Draw a simple picture first: client, load balancer, application servers, database, cache, and a queue if work is asynchronous. Walk through one request from start to finish. Add components only when a requirement demands them, and say why.

Step 5: Deep dive on the hard parts

Ask the interviewer which area they want to explore, or pick the one that carries the most risk. Common deep dives:

  • Data storage: SQL or NoSQL, indexing, partitioning (sharding) and replication.
  • Caching: what to cache, expiry, and how to handle stale data.
  • Consistency and availability: where you accept eventual consistency and why.
  • Scaling hot spots: celebrity users, popular links, and uneven traffic.
  • Asynchronous work: queues, retries and idempotent consumers.

Step 6: Trade-offs and wrap-up

Summarise the design in a few sentences. Name the main bottlenecks, how the system behaves when a server or region fails, what you would monitor, and what you would build next. Interviewers value an honest "here is where this breaks" more than a claim that nothing does.

Worked example: design a URL shortener

Requirements. Users create short links for long URLs, and visiting a short link redirects quickly. Assume reads far outnumber writes, links should not collide, and an expiry option is nice to have.

Estimates. Suppose 100 million new links a month. That is roughly 40 writes per second on average. If each link is visited 100 times, reads are about 4,000 per second on average, with higher peaks. A record of about 500 bytes means about 50 GB of new data a month, which is manageable with partitioning.

API and data. POST /urls takes a long URL and returns a code. GET /{code} returns a redirect. The main table holds the code, the long URL, the created time and the expiry.

High-level design. A client calls a load balancer, which sends requests to stateless application servers. Servers read from a cache first and fall back to the database. A key generation service hands out unique codes.

Deep dive. For codes, you can encode an incrementing counter in base 62, or pre-generate random codes in a store so servers never collide. For the database, a key-value store partitioned by code fits the lookup pattern. Cache the hottest codes, because a few links get most of the traffic.

Trade-offs. A counter is simple but predictable; random codes avoid guessing but need collision checks. A cache speeds reads but can serve a stale redirect after a link is deleted, so set a short expiry or invalidate on delete.

For more practice problems in the same format, see our list of system design interview questions for software engineers.

Common mistakes to avoid

  1. Jumping to a diagram before clarifying requirements.
  2. Naming technologies without saying why.
  3. Spending the whole time on one box and ignoring the rest.
  4. Ignoring failure cases, such as a database going down.
  5. Silence. Think aloud so the interviewer can follow and help.

How to practise

  1. Take one classic problem a week: URL shortener, news feed, chat app, rate limiter, file storage.
  2. Time yourself for 45 minutes and follow the six steps.
  3. Say the answer aloud and record it.
  4. Review the recording for skipped requirements and missing trade-offs.
  5. Repeat the same problem a few days later, aiming for a cleaner version.

A practice partner helps, whether a friend or an AI tool that asks follow-up questions. Qevra AI is a desktop app for Windows and Mac with 10 free minutes, then ₹3 per minute (pricing), so a short mock session is cheap. Use it to rehearse and hear where your reasoning is thin. See AI interview assistant vs mock interview apps and the best AI interview copilot for software engineers for more, or start with what a virtual interview assistant is.

Frequently asked questions

How long should I spend on each part?

A common split is 5 minutes on requirements, 5 on estimates, 5 on API and data, 10 on the high-level design, 15 on a deep dive and 5 on trade-offs. Follow the interviewer if they steer you elsewhere.

Do I need to memorise numbers for the estimates?

No. Know the basics, such as seconds in a day and rough storage sizes, and state your assumptions clearly.

Should I choose SQL or NoSQL?

Choose based on the access pattern, scale and consistency needs, and explain your reasoning. Either can be right.

What if I do not know a technology the interviewer mentions?

Say so, describe the problem it solves, and reason from first principles. Honesty reads better than guessing.

How many system design problems should I practise?

Five to ten well-studied problems usually cover the common patterns. Depth matters more than quantity.

How do I practise system design alone?

Time yourself, speak the answer aloud, record it, and review for missing steps. A mock partner or an AI practice tool can add follow-up questions.