Skip to main content

System Design Interview Framework

Learning objectives
  • Run a 45–60 minute design interview with a predictable structure and time budget
  • Turn vague prompts into scoped requirements and decision-driving numbers
  • Drive the whiteboard so the interviewer can follow and steer you
  • Talk about trade-offs in a way that signals judgment, not memorisation
  • Extend a design to architect level: NFRs, cost, migration, team and org impact

TL;DR​

  • Four steps: (1) Clarify & scope (with a quick estimate), (2) High-level design & buy-in, (3) Deep dive, (4) Wrap-up. Spend about half the time in steps 2–3 combined on the deep dive.
  • Write requirements and numbers on the board first and keep them visible; every later decision should point back to them.
  • Estimate only what changes a decision ("≈ 20k reads/s → a cache tier is required"), then move on.
  • Get explicit buy-in on the high-level design before deep-diving; let the interviewer choose — or propose — the 2–3 hardest areas.
  • State trade-offs as "I choose X over Y because requirement Z; the cost is W; I would revisit if V."
  • Architect level adds: quality attributes with numbers, cost, migration from what exists, risks/ADRs, and how teams will own and run it.

Why it matters​

Interviewers rarely fail candidates for a missing box. They fail them for no structure (jumping into Kafka at minute two), no numbers, no trade-offs, or not listening. A framework frees your attention for the actual problem and makes your thinking visible — which is what the rubric scores (see Mock Interview Checklist & Scoring).

At banks and e-commerce companies, panels often include a senior engineer, an enterprise/solution architect and sometimes a business or security person. The framework gives each of them a moment where their concerns are addressed: scope and compliance early, design in the middle, operations and cost at the end.

The framework at a glance​

Time budget​

Activity45-min interview60-min interviewWhat is on the board afterwards
Intro, restate prompt2 min3 minPrompt in one line
1a. Clarify & scope6 min8 minFunctional reqs, NFRs, out of scope
1b. Estimate4 min5 minQPS, storage, memory, the implication of each
2. High-level design & buy-in10 min14 minAPI, data model, component diagram, 1–2 flows
3. Deep dive18 min24 minDetailed sub-diagrams, failure handling, trade-off notes
4. Wrap-up5 min6 minBottlenecks, monitoring, next steps

Glance at the clock at the end of each step. If you are 5 minutes late after step 2, shorten the deep dive to one area rather than skipping the wrap-up.

Step 1a — Clarify and scope​

Goal: turn "Design a payment system" into something you can design in 40 minutes.

Ask in this order (and write answers down as you go):

  1. Users and core use cases. Who uses it, what are the 3–5 things they must be able to do? Which are in scope today?
  2. Scale. Users, DAU, requests per day, data volume, growth. Peak vs average (sales events, payday, Tết).
  3. Read/write pattern. Read-heavy? Write-heavy? Bursty?
  4. Latency and availability targets. p99 for the main path; availability per path (paying vs viewing history).
  5. Consistency and correctness. Can a user see stale data? Can money/stock be wrong even briefly? (In banking the answer is usually "no" for balances.)
  6. Constraints. Compliance (PCI DSS, data residency, SBV rules), existing systems to integrate, cloud vs on-prem, team skills.
  7. Out of scope. Say explicitly what you will not cover.

What to say:

  • "Before drawing anything, I'd like to pin down scope and a few numbers — is that OK?"
  • "I'll assume X; tell me if your system is different."
  • "I'll focus on A and B and treat C as out of scope unless you want it."

What it looks like on the board:

PROMPT: Merchant QR payment at checkout
FUNCTIONAL
- Customer scans merchant QR, confirms amount, pays from account/wallet
- Merchant gets real-time confirmation
- Refunds (full/partial)
NON-FUNCTIONAL
- 2,000 TPS peak (12.12), p99 confirm under 2 s
- No double charge, no lost payment; 99.95% for pay path
- Audit trail 10 years; PCI DSS scope minimised
OUT OF SCOPE: merchant onboarding/KYC, settlement reports UI
ASSUMPTIONS: integrate with existing core banking + NAPAS-style switch

Step 1b — Estimate​

Estimate only numbers that drive decisions, round aggressively, and say the implication out loud. Method and shortcuts: Back-of-the-Envelope Estimation and the Cheat Sheet.

NumberTypical implication
Read QPSAbove a few thousand/s per hot entity → cache tier, read replicas
Write QPSAbove what one primary sustains → partitioning, async ingestion
Storage over retentionTens of TB → partitioned store, tiering/archival
Hot set sizeFits in a few GB → single Redis cluster; much larger → selective caching
Peak / average ratio10× → autoscaling is too slow; pre-scale, queue, shed load
Fan-out factorOne write → millions of reads/writes → push/pull decision

What to say: "100M transactions/day is ≈ 1,200/s average; with a 5× peak, ≈ 6,000/s writes. One Postgres primary can be pushed near that, but with no headroom — so I'll plan for partitioning by account from day one."

Step 2 — High-level design and buy-in​

Order of work:

  1. API — 3–5 endpoints or events, with the key fields (idempotency key, IDs, amounts). See API Design.
  2. Data model — main entities and the access patterns that decide the store.
  3. Components — clients → edge → services → async → data, drawn left to right.
  4. Walk one or two core flows end to end, numbering the arrows (1, 2, 3…), including the response.
  5. Ask for buy-in: "This is the shape I'd start from. Does it cover what you had in mind? I suggest we go deeper into idempotency of the payment call and the ledger write — or is there an area you'd rather explore?"

Keep it simple here. A good high-level design is boring: stateless services, a database, a cache, a queue. The interesting parts come in the deep dive.

Step 3 — Deep dive​

Pick the 2–3 areas where the requirements are hardest, not the ones you know best:

ProblemUsual deep-dive areas
Payment / transferIdempotency, ledger and balance consistency, external timeouts, reconciliation
Flash saleInventory contention, admission control/queueing, oversell prevention
ChatConnection tier, ordering, delivery guarantees
FeedFan-out model, ranking latency, cache sizing
NotificationPriority isolation, retries/TTL, provider failover

For each area, cover in order: the mechanism (how it works), failure modes (what happens when X dies, times out, or retries), numbers (does it hold at peak?), alternatives (what else you considered) and the trade-off you are accepting.

A useful prompt to yourself for every arrow on the board: "What if this call times out after the other side did the work?" — that single question leads to idempotency, outbox, sagas and reconciliation, which is most of what bank interviews probe. See Distributed Transactions and Idempotency & Exactly-Once.

Step 4 — Wrap-up​

In 3–5 minutes:

  • Summarise the design in 3 sentences against the requirements on the board.
  • Bottlenecks and risks you know about, and what you'd do next (10× scale, a second region).
  • Operations: key metrics and alerts (SLOs, error budget), deployment strategy, how you'd detect the worst failure. See Observability & SLOs.
  • Open questions you would take back to the business.

What to say: "If I had another 20 minutes, I'd look at multi-region failover for the ledger — today's design gives RPO ≈ 0 within a region but minutes across regions."

Driving the whiteboard​

  • Zones. Top-left: requirements and numbers (never erased). Centre: the main diagram. Right side: deep-dive sketches, trade-off notes, open questions.
  • Left-to-right flow. Clients → edge (CDN, WAF, LB, API gateway) → services → async (queue/stream) → data stores. Readers expect it.
  • Line conventions. Solid = synchronous call; dashed = async/event. Say it once ("dashed means async").
  • Number the steps of each flow and narrate them: "Step 3, the payment service writes the intent with status PENDING…".
  • Name the technology only when it matters. "A log-based stream (Kafka) because we need replay" beats "Kafka" with no reason.
  • Virtual interviews: know your tool (Excalidraw, draw.io, Miro) before the day. Prepare shapes you reuse. Share your screen early and zoom so text is readable.
  • Talk while drawing, but pause every few minutes: "Am I going in the direction you want?"

A typical board skeleton:

Phrases for trade-offs and tricky moments​

SituationWhat to say
Making a choice"I'll pick X over Y because of requirement Z. The cost is W, and I'd revisit if V changes."
Two good options"Both work. At our scale the deciding factor is operational familiarity, so I'd choose…"
You are unsure"I haven't run that at scale. My reasoning is…; I'd validate with a load test before committing."
Interviewer pushes back"Good point — if that constraint holds, my design breaks at… Let me adjust: …"
Requirements change"That changes the consistency requirement. Let me update the board and see what moves."
Out of time"Let me summarise where we are and the two things I'd do next."
Asked a fact you don't know"I don't remember the exact number; the order of magnitude is…, and here's how I'd measure it."
Tempted to add tech"We could add a cache here, but the numbers say the DB handles it; I'd rather keep it simple."

Common mistakes​

MistakeWhat the interviewer seesFix
Drawing before clarifyingSolving the wrong problemSpend the first 6–8 minutes on scope; write it down
Estimating everythingTime sink, no insightOnly numbers that change decisions; say the implication
Buzzword architectureKafka + Kubernetes + microservices for 50 req/sJustify each component by a requirement
No buy-in checkDeep-diving into the wrong areaAsk explicitly after the high-level design
Happy path onlyNo failure thinkingFor each arrow: timeout, retry, duplicate, partial failure
MonologueInterviewer can't steerPause, ask, invite challenges
Ignoring the domain"Eventually consistent balance" at a bankName money/stock correctness early
Running out of timeNo wrap-upWatch the clock at each step boundary
Defending a bad choiceLow coachabilityAcknowledge, adjust, move on

Architect-level extension​

For Solution/System Architect roles, the same design is scored higher when you address the system's context, not only its internals. Add these in step 1 (as questions) and step 4 (as conclusions), or when asked "what else would you consider?"

DimensionSenior engineer answerArchitect answer
NFRs"It should be fast and available"Quality attributes with numbers and priorities: availability 99.95% for pay, RTO 15 min / RPO 0, p99 under 2 s, audit 10 years — and which one wins in a conflict (Quality Attributes)
CostNot mentionedMain cost drivers (compute at peak, storage growth, SMS/provider fees, licences), managed vs self-hosted, a rough monthly number, and how cost scales with traffic (Capacity Planning & Cost)
MigrationGreenfield onlyHow to get from the current system: strangler fig, CDC-based sync, dual-run and reconciliation, cut-over and rollback plan (Legacy Modernization & Migration)
Org and teamsNot mentionedService boundaries aligned to teams (Conway's law), ownership and on-call, skills the team has, build vs buy, vendor dependencies (Role of the Architect)
Security and compliance"Use HTTPS"Data classification, PCI scope reduction (tokenisation), PII handling under Vietnam's PDP Law (Law 91/2025/QH15), audit logging, threat model of the critical flow (Security for Architects)
Risk and decisionsImplicitTop 3 risks with mitigations, decisions recorded as ADRs, assumptions to validate with a spike (Documenting Architecture)
RoadmapOne final designPhases: MVP that meets compliance → scale-out → multi-region; what each phase buys

A compact way to close an architect interview: "Phase 1 ships in a quarter with a modular monolith and one Postgres cluster, because the team is eight people and peak is 2,000 TPS. The seams are drawn so the ledger can be extracted in phase 2. The main risk is the core-banking integration latency; I'd run a spike in week one and record the decision in an ADR."

Self-check​

1. What are the four steps and how would you split a 45-minute interview?

Clarify & scope with a quick estimate (≈ 10 min), high-level design with buy-in (≈ 10 min), deep dive (≈ 18 min), wrap-up (≈ 5 min), plus a couple of minutes to restate the prompt. Check the clock at each boundary.

2. How do you decide which numbers to estimate?

Only numbers that change a design decision: read/write QPS at peak, storage over retention, hot-set size for caching, fan-out factor, peak-to-average ratio. For each, state the implication ("so we need partitioning"). Skip numbers that don't move anything.

3. How do you pick deep-dive areas?

Choose where the requirements are hardest — correctness of money or stock, the scale bottleneck, the most failure-prone integration — and confirm with the interviewer. Avoid choosing a topic just because you know it well.

4. Give a trade-off statement for choosing asynchronous processing of order confirmation emails.

"I'll send confirmation emails asynchronously via a queue rather than inside the checkout request, because checkout p99 and availability matter more than instant email. The cost is a delay of seconds and the need for retries and idempotent sends. I'd revisit if the email carries something the user needs immediately, like a payment code."

5. The interviewer says your design will not pass the bank's security review. What do you do?

Ask what the concern is, acknowledge it, and adjust visibly: e.g. move card data behind a tokenisation service to shrink PCI scope, add mTLS between services, add audit logging of every balance change. Update the board and note the trade-off (latency, complexity). Coachability is scored.

6. What turns a good senior answer into an architect answer?

Quantified NFRs with priorities, cost drivers, a migration path from the existing system, team/ownership impact and build-vs-buy, explicit risks and ADRs, and a phased roadmap — all tied back to business requirements.

🧠 Flashcards0/8 learned · 0 retries

Exercise​

Pick three prompts from the Mock Interview Checklist. For each, write only the step-1 board (requirements, NFRs, out of scope, 4–5 numbers with implications) in 10 minutes with a timer. Then record yourself doing a full 45-minute run on one of them. Done when your recording shows every step boundary within ±3 minutes of the budget and at least three explicit trade-off statements.

Further reading​

  • System Design Interview — An Insider's Guide (Vol. 1 and 2), Alex Xu (and Sahn Lam for Vol. 2) — the 4-step framework.
  • Fundamentals of Software Architecture, Mark Richards & Neal Ford — architecture characteristics and trade-offs.
  • Software Architecture: The Hard Parts, Neal Ford et al. — trade-off analysis for distributed systems.
Finished this page?

Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).