Skip to content

How to Approach a System Design Interview

beginner · 30 min · Asked often · Last reviewed 29 Oct 2026 · by TheLearningLoop Team

Key takeaways

  • A design interview is about how you think. Clarify requirements first, then estimate, sketch a simple design, and go deep on the parts that are hardest.
  • Estimates are rough on purpose. State assumptions, round to easy numbers, and use the result to choose between a cache, replicas and sharding.
  • Start simple and make it scale. Draw a working design with few boxes, then find the bottleneck and fix it, naming the trade-off each time.
  • Say your reasoning out loud. A clear, structured answer that handles failure beats a clever design that you cannot explain.

Why you need a framework, and when to use it

A system design question such as "design a photo-sharing app" is deliberately open-ended. There is no single right answer, and in 45 minutes you cannot design everything. Without a plan, most people either jump straight to a favourite technology, or freeze. A framework is a fixed order of steps that keeps you moving, shows your thinking, and makes sure the important things get said.

It gives you two things interviewers always look for:

  • Clear communication: the interviewer can follow your reasoning, and can steer you when they want to.
  • Sound trade-offs: each choice is justified by the requirements and the numbers, and you name what you give up.

Use the framework when:

  • You face an open-ended design question, in an interview or in a real design review.
  • You are asked to "design X" and are unsure where to start.
  • You need to explain a design to someone else, such as a teammate or a manager.

Skip it, or adapt it, when:

  • The question is a narrow technical one, such as "how does a hash map handle collisions?": just answer it.
  • The interviewer steers you to a specific part: follow them, and return to the plan afterwards.
  • You are asked for a real production design with real data: the same steps apply, but the numbers come from measurements, not guesses.

Try it

Pick a system, then step through a back-of-the-envelope estimate (a quick, rough calculation done by hand). Each line builds on the one before it, and ends with what the numbers say about the design. Then inject a failure: a viral moment that multiplies traffic by 10.

A back-of-the-envelope estimate

Step 1 of 9 · Press Space to play, arrow keys to step

10 million daily users, each views 50 photos and uploads 0.5 photos a day.

Failure:
  1. Daily active users10 millionthe assumption to state first

10 million daily users, each views 50 photos and uploads 0.5 photos a day. Estimates are rough on purpose: state each assumption, round to easy numbers, and move on.

All numbers are rough on purpose. Storage uses decimal units (1 TB = 1,000 GB). The per-server capacities are assumptions you would state aloud and test later.

Things to try:

  • Photo sharing: 10 million daily users give about 17,000 reads a second at peak and 10 TB of new photos a day, which is 18 PB in five years. One database cannot hold that, so the data must be spread out, and photos should come from a CDN.
  • URL shortener: the same 10 million users make only about 3,500 reads a second at peak and need under 1 TB in five years. One database and a small cache are enough. Scale decides the design, not the product name.
  • Chat app: writes are high (about 28,000 a second at peak), so the numbers say sharding from the start, which is a very different design from the other two.
  • Now switch on the viral spike for photo sharing: app servers jump from 18 to 176, and the database needs 35 read copies instead of 4 and 2 shards instead of 1. Storage does not change, because a spike makes systems busy but does not store more data. Your design needs a way to scale out fast or shed load.

The steps of a design interview

A common plan for a 45-minute interview. The times are a guide, and the interviewer may steer.

StepWhat you doRough timeWhat the interviewer looks forCommon slip
1. RequirementsAsk what the system does (functional) and how well (scale, latency, availability, consistency). Agree what is out of scopeAbout 5 minutesYou ask before you assumeStarting to draw straight away
2. EstimatesWork out requests per second, storage and bandwidth from rough assumptionsAbout 5 minutesYou use numbers to make decisionsFake precision, or skipping it
3. API and dataSketch the main operations and the data they touch5 to 10 minutesA clean interface and a sensible data modelA model that cannot support the main query
4. High-level designDraw a few boxes and follow one request through themAbout 10 minutesA simple, working design that covers the requirementsToo many boxes, too early
5. Deep diveGo deep on the one or two hardest parts, often the bottleneck from your estimates10 to 15 minutesDepth, and trade-offs named out loudSpreading thin, or going deep on the easy part
6. Wrap upRevisit bottlenecks, failure, monitoring and what you would do with more timeA few minutesYou can critique your own designStopping when the diagram is done

Breadth first vs depth first

This is the main fork in the road: do you finish the whole picture before going deep, or go deep on the first interesting part?

  • Breadth first (recommended): draw a complete but simple design that meets the requirements, then choose where to go deep. It proves you can cover the whole problem, gives you and the interviewer a shared picture to point at, and lets you pick the deep dive from the numbers.
  • Depth first: start with the part you know best, such as the database, and perfect it. It can feel impressive, but the risk is running out of time with half the system missing, or polishing a part that was never the bottleneck.

A good habit: start simple, then make it scale. First a client, a server and a database that work. Then ask what breaks at the estimated scale, and fix that, one trade-off at a time.

How back-of-the-envelope estimation works

The aim is a number that is right to the nearest power of ten, quickly, to decide the shape of the design. Precision is not the point.

  1. State the assumptions: daily active users, actions per user per day, the size of one item, how long data is kept. They are guesses, and saying them aloud is what matters.
  2. Turn users into requests per day: users × actions per user.
  3. Divide by the seconds in a day to get requests per second. A day has 86,400 seconds, and 100,000 is close enough for mental arithmetic.
  4. Multiply for the peak: systems are sized for the busiest moment. A peak of two to three times the average is a common first guess.
  5. Storage is writes per day × size of one item × days kept. Bandwidth is requests per second × size of one response.
  6. Read the result: it tells you what to add. Many more reads than writes points to caching and read replicas. A huge storage or write rate points to sharding. Large files point to a CDN.

Use units that are easy to calculate: round to one significant figure, and use powers of ten (a thousand, a million, a billion). Write the units next to every number.

A framework vs winging it

ConcernA frameworkJumping straight to boxesReciting a memorised design
Covers the whole problem in the timeYesOften runs out of timeOnly if the question matches
Shows how you reasonYesHard to followNo
Handles a new twist from the interviewerYesGets lostGets stuck
Justifies choices with numbersYesNoNo
Feels natural at firstNeeds practiceYesYes
Best forOpen-ended questionsNothing in particularA question you have seen before

A framework wins whenever the question is open-ended, which is nearly always. The cost is practice: do the steps on a few questions until they feel automatic.

Avoiding a single point of failure in your own design

An interviewer will always ask, in some form, "what happens if this dies?". Build the answer in as you go, rather than waiting to be asked:

  • Go through every box on your diagram and ask the question. A single server becomes several behind a load balancer. A single database gets replicas and a failover plan. A single queue or cache gets redundancy or a way to run without it.
  • For requests in flight, say how you survive a failure: timeouts, retries with backoff, and operations that are safe to repeat (idempotent).
  • For data, say where copies live and how you would restore it.
  • Say how you would notice: metrics, alerts and health checks.

The trade-off you accept: every extra copy costs money and adds work to keep copies in step. Say that out loud too, and match the level of redundancy to the requirement you agreed in step 1.

Common mistakes

  • Jumping straight to technologies. "I would use Kafka and Cassandra" before you know the requirements. Choose tools last, and say why.
  • Skipping requirements or estimates. You then cannot justify anything. Spend the first ten minutes on them.
  • Thinking in silence. The interviewer cannot give credit for thoughts they cannot hear. Narrate your reasoning.
  • Designing for the wrong scale. A design for a billion users when the question implied thousands is as wrong as the reverse. Let the numbers decide.
  • Ignoring failure. A design with no answer to "what if it dies?" looks unfinished.
  • Name-dropping tools without trade-offs. For each tool, say what problem it solves, and what it costs.
  • Never checking in. Pause to ask whether the interviewer wants to go deeper somewhere. They often have a direction in mind.

How to run the interview itself

  • Think out loud, and structure your answer with the steps above, so the interviewer always knows where you are.
  • Ask clarifying questions, and write down the requirements and the numbers so you can refer back to them.
  • Start simple, then scale: a working basic design first, then the bottleneck your estimates revealed.
  • Name trade-offs unprompted: consistency against availability, latency against cost, simplicity against scale.
  • Handle hints well: when the interviewer nudges you, take it as a gift, and say how it changes the design.
  • Be honest about what you do not know: reason from the problem the technology solves, and ask a question if needed.

Where you meet this framework in real systems

The interview is a short version of what engineers do at work: agree what to build, estimate its scale, sketch a design, and argue the trade-offs. Three examples are drawn out below, the first with a small script you can run, then more.

Example 1: Sizing a photo-sharing app on a napkin

Before a team builds anything, someone does the sums to see how big the system must be. A photo-sharing app with 10 million daily users, each viewing 50 photos and uploading half a photo a day, needs about 17,000 reads a second at peak and adds 10 TB of photos a day. Those numbers say the design needs a cache, a CDN and a database that is spread across machines. Open the example below to see the picture and the script in three languages.

Code: a back-of-the-envelope estimateSetup 1 short scriptCode runs in a second
Users10 million a dayRequests500 million readsPeak rate17,000 a secondMachines18 app serversStorage18 PB in 5 years
The estimate turns user behaviour into requests, requests into a peak rate, and the peak rate and data size into the number of servers and the amount of storage. Each arrow multiplies by an assumption.
import math

SECONDS_PER_DAY = 86_400   # about 100,000: a handy number to round to in your head


def estimate(dau, reads_per_user, writes_per_user, write_kb, years, peak_factor, app_qps):
    """A back-of-the-envelope capacity estimate. Every input is a rough guess you state out loud.

    dau              daily active users
    reads_per_user   reads each user makes per day
    writes_per_user  writes each user makes per day
    write_kb         size of one stored write, in kilobytes (1 TB = 1,000,000,000 KB)
    years            how long data is kept
    peak_factor      busiest moment as a multiple of the daily average (3 is a common first guess)
    app_qps          requests per second one app server can handle (an assumption to check by testing)
    """
    reads_per_day = dau * reads_per_user
    writes_per_day = dau * writes_per_user
    peak_read_qps = reads_per_day / SECONDS_PER_DAY * peak_factor
    peak_write_qps = writes_per_day / SECONDS_PER_DAY * peak_factor
    storage_per_day_tb = writes_per_day * write_kb / 1e9
    return {
        "peak reads/s": round(peak_read_qps),
        "peak writes/s": round(peak_write_qps),
        "storage per day (TB)": round(storage_per_day_tb, 2),
        "storage for the retention period (PB)": round(storage_per_day_tb * 365 * years / 1000, 2),
        "app servers": math.ceil((peak_read_qps + peak_write_qps) / app_qps),
    }


# A photo-sharing app: 10 million daily users, each views 50 photos and uploads 0.5 photos a day.
print(estimate(10_000_000, 50, 0.5, 2000, 5, 3, 1000))

Run on the example inputs, all three versions print the same numbers: 17,361 peak reads a second, 174 peak writes a second, 10 TB of storage per day, 18.25 PB over five years, and 18 app servers. The JavaScript version runs on Node.js. The inputs and the 1,000 requests a second per server are assumptions, not measurements, which is exactly how you would present them in an interview.

Example 2: The six steps of a design answer

Every strong answer follows the same path, whatever the question. The picture below shows the order. The deep dive is the step where the answer is won or lost, because it is where the hard trade-offs are.

Requirementsask firstEstimatesuse numbersAPI and datathe contractHigh levelfew boxesDeep divethe hard partWrap upfailure, next steps
Start by clarifying requirements and estimating scale. Sketch the interface and data, draw a simple high-level design, then spend the most time going deep on the hardest part, and finish by critiquing your own design.

Example 3: A typical first draft

The first high-level design for a read-heavy service is usually the same shape: clients, a load balancer, several stateless app servers, a cache for hot data and a database. Starting here, you then use your estimates to decide what to add, such as read replicas, a queue for slow work or a CDN for large files.

ClientsLoad balancerApp serversCacheDatabase
Requests pass through a load balancer to several app servers. The servers check the cache first and only go to the database on a miss. Every box on this picture is a candidate for the question: what happens if it fails?

More real-world scenarios

4. Design documents at work

Before building a large feature, engineers write a design document that states the requirements, the scale, the proposed design and the alternatives that were rejected. It is the same structure as an interview answer, written down.

5. Architecture reviews

A team presents a design to other engineers, who ask about scale, failure and trade-offs. The questions are the ones an interviewer asks, which is why interviews use this format.

6. Capacity planning

Operations teams estimate next year's traffic and storage from user growth, so they can order machines or cloud capacity before the system runs out. It is the estimate from this lesson with real measurements in place of guesses.

7. Incident reviews

After an outage, a team asks what was assumed, what scale was expected and what broke first. A missing estimate or an unconsidered failure is often part of the answer.

8. Build or buy decisions

Choosing between running your own database and using a managed service depends on scale, cost and the effort of operating it. The numbers from an estimate make the argument concrete.

9. Startups planning for growth

A new product does not need a design for a billion users. Founders estimate the next stage of growth, build for that, and note what would break first, so that they know when to redesign.

Tools and managed services

KindNameNotes
ReferenceLatency numbers every programmer should knowA widely shared table of typical times for memory, disk and network operations, popularised by Jeff Dean. Useful for estimates.
BookDesigning Data-Intensive ApplicationsBy Martin Kleppmann. A deep guide to the ideas behind modern data systems.
BookSystem Design InterviewBy Alex Xu. A collection of worked design questions in this framework.
DiagrammingExcalidrawAn open-source whiteboard tool for quick hand-drawn style diagrams.
Diagrammingdiagrams.net (draw.io)A free diagram editor that runs in the browser or as an app.
SpreadsheetAny spreadsheetA quick way to keep assumptions and calculations in one place, and to change one number and see the result.

The takeaway

Whenever you are asked to design something open-ended, the first box you draw is not a server, it is the list of requirements and the scale. Estimate, draw a simple design, find the bottleneck with your numbers, and say the trade-off each time you fix it.

Interview questions

Try answering out loud before you reveal hints. Interviewers care about how you reason, not just the final answer.

  1. 1.

    You are asked to design a photo-sharing service. What do you do in the first five minutes?

    easy
  2. 2.

    A service has 10 million daily active users and each makes 20 requests a day. Estimate the average and peak requests per second.

    easy
  3. 3.

    Why draw the whole high-level design before going deep on any one component?

    medium
  4. 4.

    You have drawn your design. How do you show that it survives failure?

    medium
  5. 5.

    The interviewer suggests a technology you have never used. What do you do?

    medium

Finished this lesson?

Progress is saved on this device. Create a free account to keep it everywhere.

Topics:System design interviewFrameworkRequirementsBack of the envelopeEstimationTrade offsCommunication

↑ Back to top

Next lesson