Skip to main content
VirtualInterview.ai

Technical Interviews

System Design Interview Guide: Framework and Practice

A system design interview asks you to design a large-scale system, such as a URL shortener or a news feed, in 45 to 60 minutes. Use a four-step framework: clarify requirements and estimate scale, sketch the high-level design, go deep on the one or two hardest components, then cover bottlenecks and failure. Interviewers score your reasoning and trade-offs, not one right diagram.

By VirtualInterview.ai TeamLast updated 11 min read

What the round tests

A system design round tests whether you can turn a vague product request into a workable architecture, out loud, while explaining what each choice costs. Interviewers grade the reasoning behind the diagram.

Large employers run design rounds as structured interviews: every candidate at a level gets a comparable prompt, and interviewers fill in a rubric rather than giving a gut score.[2] The rubric dimensions vary by company but almost always cover four things:

  • Problem navigation. Did you ask the questions that change the design (scale, read/write ratio, consistency needs) and ignore the ones that don’t?
  • Solution design. Does the high-level design work end to end, with named APIs, data model and request flow?
  • Technical depth. When you go deep on a component, do you know how it behaves under load and failure, not just its name?
  • Communication and trade-offs. Can you say what you chose, what you rejected and why, and change course when the interviewer adds a constraint?

Level changes the weighting. A mid-level candidate passes with a sound design and reasonable depth in one area. A senior or staff candidate is expected to drive: pick the hard parts unprompted, quantify them, and discuss operations (monitoring, rollout, cost) without being asked.

The four-step framework

Split a 45-minute round into four timed steps. The split stops you spending thirty minutes on boxes and arrows before anyone has agreed what you are building, which is the most common way strong engineers fail this round.

Timings assume a 45-minute round; scale them for 60.
StepTimeWhat you produceQuestions to ask or answer
1. Requirements and scale5 to 8 minFunctional list, non-functional targets, rough numbersWho uses it and how many? Read-heavy or write-heavy? What latency is acceptable? What can be eventually consistent?
2. High-level design10 minAPIs, core entities, components, one request traced end to endWhat are the endpoints? Where does data live? What happens on a read and on a write?
3. Deep dive15 to 20 minDetailed design of the one or two components that carry the riskWhich database and why? How is data partitioned? What is cached and how is it invalidated?
4. Bottlenecks and failure5 to 10 minWhat breaks at 10× load, what happens when a node dies, what you would monitorWhere are the hot spots? What fails over, and how fast? What would you alert on?

Step 1: requirements are where you earn the rest of the round

Split requirements into functional (users can shorten a URL; links redirect) and non-functional (redirects under 100 ms at p99; links never collide; 99.9% availability). Write them where the interviewer can see them. Then state what is out of scope (“I’ll leave analytics and custom domains for later unless you want them”) so the interviewer can redirect you early rather than late.

Step 2: the simplest design that works

Clients, a load balancer, a stateless service tier, one database. Trace one write and one read through it. Only then add a cache, queue or replica, and each addition should answer a requirement from step 1. An addition with no requirement behind it reads as pattern-matching.

Step 3: choose your own deep dive

Say which component carries the risk and why (“the hard part here is generating unique short keys without coordination, so I’ll go deep there”). Interviewers often let senior candidates pick, and picking well is itself signal.

Step 4: break it on purpose

Multiply the load by ten and find the first thing that falls over. Kill a node and describe what the user sees. Name the two or three metrics you would alert on. This is the step most often skipped for lack of time, which is why timing step 1 matters.

Back-of-the-envelope estimation

Estimation turns 'lots of users' into numbers that decide the design: requests per second, storage per year and bandwidth. Round aggressively, say your assumptions aloud, and only estimate what changes a decision.

Three conversions cover most rounds:

  • A day has about 100,000 seconds (86,400 rounded up). One million requests a day is about 12 per second on average; plan for peaks of 2 to 5× that.
  • Storage = items per day × size × retention. 100 million new rows a day at 500 bytes is 50 GB a day, about 18 TB a year before replication.
  • Read/write ratio decides the shape. At 100:1 reads to writes, caching and read replicas dominate the design; at 1:1, write path and partitioning do.

Latency numbers justify where data should live. The figures below are Jeff Dean’s widely circulated table, which has been updated as hardware changed; treat them as orders of magnitude, not benchmarks.[1]

OperationApproximate latencyWhat it tells you
Main memory reference~100 nsAn in-memory cache hit is effectively free next to anything on the network.
SSD random read~150 µsDisk-backed reads are fine per request, but thousands per page load add up.
Round trip within one datacenter~0.5 msEach extra service hop costs real time; chatty microservices hurt p99.
Round trip across continents~150 msServe users from a nearby region or CDN; never chain cross-region calls.

Building blocks and their trade-offs

You will reach for the same handful of components in almost every design. Interviewers listen less for the names than for whether you know what each one costs: consistency, operational load, money or latency.

ComponentReach for it whenWhat it costs you
Load balancer (L4/L7)You have more than one stateless serverAnother hop; sticky sessions undo much of the benefit
Cache (Redis, Memcached)Reads dominate and data tolerates brief stalenessInvalidation bugs, cold-start stampedes, memory cost
Read replicasOne primary database cannot serve the read loadReplication lag: a user may not see their own write
Sharding / partitioningWrites or data size outgrow one machineCross-shard queries and transactions get hard; hot keys
Message queue (Kafka, SQS)Work can happen after the response, or spikes must be absorbedEventual consistency, retries, duplicate delivery
CDNStatic or cacheable content served to a wide geographyPurging is slow; personalised content cannot be cached
SQL databaseRelations, transactions and ad-hoc queries matterHarder horizontal scaling
Wide-column / key-value storeHuge write volume with simple access patternsWeak query flexibility; design tables around queries

Consistency is the trade-off interviewers probe most. Know the vocabulary well enough to use it precisely: strong consistency (every read sees the latest write), eventual consistency (replicas converge, reads may be stale), and quorum reads and writes (R + W > N), the approach Amazon’s Dynamo paper popularised for tuning between the two.[4] Kleppmann’s Designing Data-Intensive Applications is the standard reference if you want the depth behind these terms.[3]

Worked example: a URL shortener

Here is the framework applied to the most common warm-up prompt, at the level of detail an interviewer expects to hear spoken aloud. Use it as a model for pacing, not as an answer to memorise.

Requirements. Create a short link for a long URL; redirect short links; links do not expire by default. Non-functional: redirect p99 under 100 ms, no collisions, high availability for reads. Out of scope for now: analytics, custom aliases.

Estimates. Assume 100 million new links a month (about 40 writes a second) and a 100:1 read ratio (about 4,000 redirects a second, peaking near 15,000). At roughly 500 bytes per record, five years is 6 billion links, about 3 TB. A 7-character base-62 key gives 62⁷ ≈ 3.5 trillion combinations, plenty of headroom.

High-level design. POST /links returns a key; GET /:key returns a 301 or 302. Stateless app servers behind a load balancer, a key-value store mapping key → URL, and a cache in front of it for hot links.

Deep dive: key generation. Hashing the URL and truncating risks collisions and needs a check-and-retry. A counter encoded in base 62 never collides but is a coordination point. A common middle path hands each app server a pre-allocated range of IDs from a small coordination service, so servers generate keys locally and only call out when a range runs out.

Bottlenecks. Reads dominate, so the cache carries the load; a viral link becomes a hot key, handled by replicating it across cache nodes. If the coordination service dies, servers keep issuing from their current ranges, buying time. Choosing a 301 lets browsers cache the redirect (less load) but makes click analytics impossible later. Say that trade-off out loud.

What made that answer strong

Every component traced back to a number from the estimate, the deep dive was chosen and justified, and the 301-versus-302 trade-off was raised without prompting. That is the pattern interviewers mark as senior.

Practice problems by bottleneck

Classic prompts repeat because each one forces a different bottleneck. Practise them in this order so each problem adds one new idea to the patterns you already have, instead of re-practising caching six times.

ProblemLevelThe bottleneck it teaches
URL shortenerWarm-upKey generation, read-heavy caching, redirects at scale
Rate limiterMidDistributed counters, token bucket vs sliding window, consistency at the edge
News feed / timelineMidFan-out on write vs on read, the celebrity problem, ranking
Chat / messagingSeniorPersistent connections, delivery guarantees, ordering, presence
Video streamingSeniorUpload and transcoding pipeline, adaptive bitrate, CDN cost
Ride matchingSeniorGeospatial indexing, high-frequency location writes, matching latency
Distributed key-value storeStaffPartitioning, replication, quorum, failure detection

The follow-ups interviewers ask, and how to respond

Once your design is on the board, most of the score comes from how you handle changes to it. These follow-ups come up in almost every system design round.

Common system design follow-up questions and how to respond
Follow-upWhat it testsA good first move
"Traffic grows ten times. What breaks first?"Whether you know your bottleneckName the component by your estimate (often the database), then the fix: read replicas, caching or sharding.
"A data centre goes down."Failure thinkingSay what the user sees, then replication across regions and how failover happens.
"One key gets most of the traffic."Hot spotsCache that key, add a random suffix to spread writes, or rate-limit it.
"Do you need strong consistency here?"Trade-off judgementSay which operations need it (payments, inventory) and which can be eventually consistent.
"How would you monitor this?"Operating the systemLatency percentiles, error rate and queue depth, with an alert on each.
"What would you build first?"PrioritisationThe simplest version that serves the core use case, and what you would add next.

Start each answer by restating the change and its effect on your numbers. "Ten times traffic means about 12,000 reads a second on the database" shows you are reasoning from your estimate rather than reaching for a buzzword.

A four-week study plan

Four weeks at four to six hours a week is enough for an engineer who already writes production code. Front-load the building blocks, then spend most of the time designing out loud against a timer.

  1. Week 1: building blocks. Caching, replication, partitioning, queues, consistency models. For each, write one paragraph on when you would not use it.
  2. Week 2: two warm-ups. URL shortener and rate limiter, each designed twice: once on paper without time pressure, once out loud in 45 minutes.
  3. Week 3: two mid-level problems. News feed and chat. Record yourself and listen back for the moment you stopped explaining and started just drawing.
  4. Week 4: mock rounds. At least two full rounds with someone (or something) that interrupts. The interruption is the part solo practice cannot reproduce.

For the spoken half, a technical practice interview asks the prompt, interrupts with follow-ups and scores each answer for relevance, depth and clarity. For the rest of the loop, see the coding interview study plan and the STAR method guide.

Frequently asked questions

Short, direct answers to the questions people ask most often about this topic. Each answer stands on its own, so you can jump straight to the one you need.

What is a system design interview?
A 45-to-60-minute round in which you design a large system, such as a URL shortener, chat app or news feed, with the interviewer. There is no single right answer: you are scored on how you scope the problem, structure the design, reason about trade-offs and respond to pushback.
Who gets system design interviews?
Most mid-level, senior and staff software engineering loops include at least one. New-graduate loops usually do not, or use a lighter object-oriented design round instead. Engineering managers often get one focused on trade-offs and team boundaries rather than deep internals.
How long should I spend preparing for system design?
If you have not built distributed systems at work, plan on four to six weeks of a few hours a week: two weeks on building blocks, then one or two classic problems a week, each designed out loud against a 45-minute timer. Engineers who run such systems day to day often need only the practice half.
Do I need to memorise latency numbers?
Only their orders of magnitude. Knowing that a memory read is about 100 nanoseconds, an SSD read about 150 microseconds and a cross-continent round trip about 150 milliseconds lets you justify caching and placement decisions. Exact figures change with hardware; the ratios between them are what matter.
What is the most common reason candidates fail system design rounds?
Drawing before scoping. Candidates who skip requirements end up defending a design for a problem the interviewer did not ask about, then run out of time before the deep dive, which is where senior signal is collected.
Can I practise system design with AI?
Yes, for the talking half. An AI interviewer can ask the prompt, push back with "why not X?" and score how well you explain your reasoning. It cannot see a whiteboard, so practise the diagram separately and use the voice rounds to rehearse explaining it.

Sources

The studies, statutes and primary pages this guide relies on. Numbers in square brackets in the text link here; where a claim has no number, it is our own guidance from running practice interviews.

  1. 1.Latency numbers every programmer should know (Jeff Dean, via Peter Norvig). Colin Scott, interactive update, UC Berkeley
  2. 2.Use structured interviewing. Google re:Work
  3. 3.Designing Data-Intensive Applications. Martin Kleppmann, O'Reilly Media, 2017
  4. 4.Dynamo: Amazon’s Highly Available Key-value Store. DeCandia et al., SOSP, 2007

How answers are scored and which data we publish: data and research · methodology

Continue reading

All guides