Summary#
A system design interview asks you to take a vague prompt ("Design Ticketmaster") and, in 35–50 minutes of working time, turn it into a working architecture while explaining your reasoning out loud. The most common way to fail isn't lack of knowledge; it's failing to deliver a complete, working system because time went to the wrong things. A fixed structure prevents that. It keeps you moving in a straight line, gives you somewhere to return to when nerves strike, and puts the interviewer's attention on the parts they grade.
The framework has six steps, plus a short wrap-up:
- Requirements (~5 min): the top three functional requirements ("users should be able to…") and three to five quantified non-functional requirements ("search under 500 ms", "no double-booking"). Estimate only when it will change the design.
- Core entities (~2 min): a short list of the nouns the system stores and exchanges.
- API (~5 min): the contract, usually REST endpoints mapped from the functional requirements.
- Data flow (optional, ~5 min): for pipeline-style systems, the ordered steps from input to output.
- High-level design (~10–15 min): boxes and arrows that satisfy each endpoint in turn, kept deliberately simple.
- Deep dives (~10–15 min): harden the design against the non-functional requirements, bottlenecks, edge cases and the interviewer's probes.
Throughout, talk while you draw, check in at each transition, drive the session yourself, and handle unknowns by reasoning aloud from first principles. The framework is the same one used in real design work (The Design Process: From Problem to Architecture), compressed to fit a clock.
Why It Exists#
A system design interview tests whether you can do the work of a senior engineer facing an under-specified problem. Can you find out what actually matters, break the problem into pieces, choose sensible technologies, reason about trade-offs, and bring a colleague along with you? There is rarely a single right answer. Interviewers grade how you navigate, not whether you reproduced a reference solution.
These interviews become common from mid-level roles upward and often carry the most weight at senior and staff levels, because they're the closest proxy to day-to-day architectural judgement. Most are one of two kinds:
- Product design: "Design a ride-hailing app", "Design Instagram". The system behind a user-facing product, with APIs, services, storage and scale.
- Infrastructure design: "Design a rate limiter", "Design a distributed cache", "Design a job scheduler". A building block other systems use; the "users" are other services.
Related formats exist and need adapted preparation:
- Low-level or object-oriented design: class structure and interfaces rather than distributed infrastructure.
- ML system design: data, features, training and serving. See ML System Design and Feature Stores.
- Frontend and mobile system design: client architecture, state, rendering and offline behaviour. See Frontend System Design and Mobile System Design.
- API design interviews and past-project deep dives ("walk me through a system you built").
The framework on this page is for product and infrastructure design. Most of its habits transfer to the others.
Company rubrics differ in wording, but almost all assess four areas. Interview Expectations by Level and How to Prepare covers them in detail:
- Problem navigation: exploring and scoping an ambiguous problem, prioritising what matters, not getting stuck. Failures here are the most common and the most costly: burning time on trivia, missing the core challenge, never finishing.
- Solution design: a coherent, well-structured architecture that solves each piece and handles scale. Failures: weak fundamentals, ignored scale, "spaghetti" designs nobody can follow.
- Technical excellence: knowing current technologies and patterns and applying them correctly. Failures: not knowing the options, designing around outdated hardware limits, misapplying tools.
- Communication and collaboration: explaining clearly, responding well to probes and pushback, working with the interviewer. Failures: muddled explanations, defensiveness, drifting into the weeds alone.
Without structure, nervous candidates jump around: three minutes on requirements, then a database schema, then a tangent on Kafka, then back to an API they forgot. With 40 minutes on the clock, that pattern rarely ends in a complete design. The framework exists to make progress linear and visible, so each step builds on the last and the interviewer can see the design taking shape.
The structure also helps the interviewer. They have a limited window to collect evidence on each rubric area, and they usually have specific deep dives in mind for the problem. A candidate who reaches a working high-level design by minute 25 leaves room for those probes. A candidate still debating requirements at minute 20 leaves the interviewer with no evidence for the areas that decide senior offers.
How It Works#
The structure at a glance#
Each step produces something visible on the board that the next step uses:
- requirements decide what the entities and API must support;
- the API decides what the high-level design must serve;
- the non-functional requirements decide which deep dives matter.
Keeping the arrows pointing forward is what keeps the interview linear. When you discover something new (a missing entity, an extra field), add it to the earlier section, say so briefly, and keep going.
Timing for 45- and 60-minute interviews#
Interview slots include introductions and time for your questions, so the design time is shorter than the slot. Plan on about 35–38 working minutes in a 45-minute slot and 48–52 in a 60-minute slot.
| Step | 45-minute slot | 60-minute slot | What to write on the board |
|---|---|---|---|
| Introductions | 2–3 min | 3–5 min | Nothing yet; listen for hints about the team and focus |
| Requirements | ~5 min | 5–7 min | "Functional" list of 3 items; "Out of scope" list; "Non-functional" list with numbers; any estimate that matters |
| Core entities | ~2 min | 2–3 min | A bulleted list of nouns (fields come later) |
| API | ~5 min | ~5 min | Endpoint signatures: method, path, key inputs, return type |
| Data flow (optional) | 0–3 min | 0–5 min | A numbered list of processing steps, for pipelines only |
| High-level design | 10–13 min | 15–18 min | Boxes and arrows built endpoint by endpoint; key fields next to each datastore |
| Deep dives | 8–12 min | 15–20 min | Changes drawn onto the design; short notes on each trade-off chosen |
| Wrap-up and your questions | 3–5 min | 5 min | Optionally circle remaining risks or "next steps" |
Some practical points about the clock:
- Front-load decisiveness, not detail. The first three steps should feel brisk: about 12 minutes in a 45-minute slot. They decide what you build, but the interviewer learns most from the design and deep dives.
- Set checkpoints. In a 45-minute interview, aim to have a complete high-level design by about minute 25–28; in a 60-minute interview, by about minute 32–35. If you're behind, simplify and move on (see the Deep Dive on time management).
- Senior candidates compress the early steps and spend more time in deep dives; more junior candidates can expect more interviewer guidance there. The proportions shift, but the order doesn't.
- Ask your recruiter about the format: duration, whiteboard or a specific online tool (Excalidraw, Miro, a shared document), and whether the interviewer expects estimation. Practise in the actual tool beforehand. Fumbling with shapes costs minutes.
The first two minutes#
How you open sets the tone. After introductions, the interviewer reads out a prompt, often deliberately vague ("Design a ticketing site"). Three moves make a strong start:
- Restate the problem in your own words. "So we're building something like Ticketmaster, where users find events and buy seats." This catches gross misunderstandings immediately.
- State your plan. "I'll start with requirements, list core entities, define the API, sketch a simple design, then go deep on the hardest parts." It takes ten seconds and tells the interviewer you have a structure, so they can relax and let you drive.
- Start writing. Put a "Requirements" heading on the board and begin asking questions. An empty board after three minutes looks like hesitation even if you're thinking hard.
Avoid two common openings. One is silent thinking for a minute or more. The other is launching into a technology ("So we'll need Kafka…") before you know what the system does.
Step 1: Requirements (~5 minutes)#
The goal is a shared, prioritised understanding of what you're building. You're not trying to capture everything. Treat the interviewer as a product manager or customer and ask targeted questions: "Do users need to pick specific seats, or just a section?", "What happens if two people try to book the same seat?", "Is this global, or one country?"
Functional requirements are "Users should be able to…" statements, or "Clients should be able to…" for infrastructure problems. Real products have hundreds of features; your job is to agree on the top three or so that define the problem, and to say explicitly what's out of scope. A long list hurts you, because everything you list is something you're now expected to design, and several top companies explicitly assess your ability to focus.
For a ticket-booking system like Ticketmaster:
- Users should be able to search for events.
- Users should be able to view an event with its available seats.
- Users should be able to book tickets for an event.
- Out of scope: adding events as an organiser, dynamic pricing, resale, viewing past bookings.
For an infrastructure problem like a distributed cache, the "users" are client services: clients should be able to set a key with an optional expiry, get a key, and delete a key.
Non-functional requirements are the qualities the system must have: "The system should be…" statements. The key is to make them specific to this system and quantified where possible. "Low latency" says nothing, since every system wants that. "Search returns in under 500 ms at p99" identifies which part must be fast and how fast. Pick the three to five that will shape the design. A checklist to scan quickly:
- Consistency vs availability (CAP Theorem and PACELC). Which operations must never show conflicting state, and which can be briefly stale? Often the answer differs per feature. Ticket booking needs strong consistency (no seat sold twice), while event search and viewing should prioritise availability.
- Scale and traffic shape. Daily active users, peak requests per second, read-to-write ratio, bursts. A popular on-sale might bring 10 million users to one event within minutes, while normal traffic is a tiny fraction of that.
- Latency targets for the operations users feel: search, feed load, message delivery.
- Durability. What data loss is tolerable? A like count can lose a few increments; a payment record can't.
- Fault tolerance. Expected behaviour when a component, zone or region fails.
- Security and compliance. Authentication and authorization, PII, payment card data (PCI DSS), regional data laws.
- Environment constraints. Mobile clients on flaky networks, limited battery, low-bandwidth regions.
A complete requirements board for the ticketing example might read:
- Non-functional: strong consistency for booking (no double-booking); high availability for search and event pages; search p99 under 500 ms; must absorb on-sale spikes of about 10 million concurrent users for one event; read-heavy, roughly 100 reads per booking.
Questions that uncover requirements, if you're unfamiliar with the domain: Who uses it, and how? How many users, and how many requests per second? What are the inputs and outputs? How much data, growing how fast? What's the read-to-write ratio? What must never go wrong? Requirements Gathering: From Problem Statement to Scope and Non-Functional Requirements and How They Drive Design go deeper.
Capacity estimation: only when it changes the design. Many guides prescribe calculating storage, daily users and requests per second up front. Usually this produces "it's big", which the interviewer already knew. A better default is to say: "I'll skip detailed estimates for now and calculate where a number changes a decision." Then do the maths at that point:
- Top-K trending topics: is the number of distinct topics small enough for one in-memory heap, or must counting be sharded?
- Choosing a database: will 50,000 writes per second fit one primary?
- Sizing a connection tier: how many servers for 5 million concurrent WebSockets?
Some interviewers do expect up-front estimates, so if they ask, do them quickly and say what each number implies. Back-of-the-Envelope Estimation and Numbers Every Engineer Should Know give the shortcuts. Use current hardware numbers. Modern machines have hundreds of cores, terabytes of RAM and tens of terabytes of local SSD, so many workloads older material would shard fit comfortably on one node.
End the step with a check-in: "These are the features and qualities I'll design for. Does that match what you had in mind?" It takes ten seconds and catches misunderstandings before they cost twenty minutes.
Step 2: Core entities (~2 minutes)#
Next, list the core entities: the main nouns or resources your API will exchange and your system will persist. Two questions find them fast:
- Who are the actors? Users, drivers, merchants, client services.
- What are the nouns needed to satisfy each functional requirement?
For the ticketing system that gives Event, Venue, Performer, Ticket (one per seat per event, with a status) and Booking (a user's purchase of one or more tickets). For a distributed cache it's just Key/Value entry with an expiry.
Write them as a plain bulleted list, not a full schema. You don't yet know which fields matter. Fields fall out naturally when you design the API and the high-level design, and you add them then. Writing a complete schema now spends five minutes on columns that never come up and invites you to optimise a data model before you know the access patterns (Data Modeling covers access-pattern-driven modelling).
Two traps to avoid:
- Entity sprawl. Ten entities for a three-feature problem means you've let scope creep back in. Stick to what the top functional requirements need.
- Missing the "join" entity. Many designs hinge on an entity that isn't obvious from the prompt. Booking links User and Ticket. Follow is a User-to-User edge in a social feed. Ride links Rider and Driver. If a requirement mentions a relationship, it often needs its own entity.
Checking in here is short: "These are the entities I'll start with; I'll add fields as we go."
Step 3: API or system interface (~5 minutes)#
The API is the contract between the system and its users, and the bridge from requirements to design. Usually one endpoint per functional requirement is enough, sometimes two. Go through the requirements in order and write a signature for each:
GET /events/search?keyword&start&end&page -> Partial<Event>[]
GET /events/:eventId -> Event & Venue & Performer & Ticket[]
POST /bookings/reserve { ticketId } -> 200 | 409 (already held)
POST /bookings/confirm { ticketId, paymentDetails, idempotencyKey } -> BookingPick a protocol, briefly. API Styles: REST, gRPC, GraphQL and More compares them in depth. For the interview:
- REST is the default. It's familiar, it maps cleanly onto resources, and it's right for most public, user-facing APIs.
- GraphQL fits when many different clients (mobile, web, partner) need different shapes of the same data, and you want to avoid over-fetching and endpoint proliferation.
- gRPC/RPC fits internal service-to-service calls where performance and a strict schema matter more than browser friendliness.
- WebSockets or Server-Sent Events fit when the server must push updates (chat, live scores, ride location); see Polling, Long Polling, SSE, WebSockets and Webhooks.
State your choice in one sentence and move on. Debating protocols for five minutes is a classic time sink.
Conventions that signal experience (API Design Best Practices):
- Plural resource nouns (
/events,/bookings) and HTTP verbs for actions. - Never take the current user from the request body. The user ID comes from the authentication token (a session cookie or a JWT in the
Authorizationheader). A client that can putuserIdin the body can impersonate anyone. Interviewers notice this. - Pagination on list endpoints (cursor-based for feeds, see the API design page).
- Idempotency keys on any write that charges money or creates something a retry could duplicate (Idempotency and Safe Retries).
- Return partial objects where full ones aren't needed. Search results don't need every seat.
For infrastructure problems the "API" is a library or service interface rather than HTTP: set(key, value, ttlSeconds), get(key), delete(key) for a cache; produce(topic, key, value) and consume(topic, group) for a message queue; isAllowed(clientId, ruleId) -> {allowed, remaining, resetAt} for a rate limiter.
Step 4 (optional): Data flow (~5 minutes)#
For data-processing systems, where the interesting part is a pipeline rather than request-response CRUD, describe the high-level sequence of actions from input to output before drawing boxes. A numbered list is enough. For a web crawler:
- Fetch seed URLs from a frontier queue.
- Resolve DNS and download the HTML (respecting robots.txt and per-domain politeness).
- Extract text and store it in blob storage.
- Extract links, normalise them, de-duplicate them against already-seen URLs.
- Push new URLs back into the frontier, and repeat.
For an ad click aggregator: click arrives → logged and redirected → events streamed → aggregated in time windows per ad → aggregates stored for querying → periodic reconciliation against raw logs.
This list becomes the spine of your high-level design: each step usually becomes a component or stage. Skip this step for product-style systems like a ticket booker or a social feed, where the API already gives the structure. Doing a data flow there adds nothing and burns time.
Step 5: High-level design (~10–15 minutes)#
Now draw the boxes and arrows: clients, gateway or load balancer, services, databases, caches, queues, blob storage. The goal is a design that works, meaning it satisfies every API endpoint and therefore every functional requirement. It doesn't need to scale yet.
Build it endpoint by endpoint. Take the first endpoint, add just the components needed to serve it, and trace a request through. Then the next endpoint, reusing what's there and adding what's missing. This keeps the drawing grounded and guarantees coverage. For the ticketing example:
- Search: client → API gateway → Search Service → Events DB (
LIKEquery to start; you'll fix it in a deep dive). - View event: gateway → Event Service → Events DB, returning event, venue, performer and ticket statuses.
- Reserve and confirm: gateway → Booking Service → Tickets and Bookings tables, plus a call to a payment processor such as Stripe, with its webhook confirming the charge.
Habits that make this step strong:
- Narrate state changes. As you trace each request, say what's read and written and how state changes: "Reserve sets the ticket's status to RESERVED with a timestamp; confirm sets it to BOOKED after Stripe's webhook succeeds, inside a transaction with the booking insert." This is how the interviewer sees that the design actually works.
- Put key columns next to the datastores. Write only the fields relevant to the flow (as in the dashed notes above), not every column. They anchor later deep dives about indexes and shard keys.
- Keep it simple first, on purpose. Say it out loud: "I'm keeping this simple to get something working. A
LIKEsearch won't scale and reservations need an expiry. I'll come back to both." That shows you see the problems without losing the thread. - Handle complex logic verbally. If a component has an interesting algorithm (a ranking function, a matching heuristic), note it in a sentence ("matching picks the nearest available driver, details later") instead of designing it mid-diagram.
- Choose technologies with one-sentence reasons. "Postgres, because bookings need transactions and the data is relational" is enough. Choosing a Database and Choosing Technologies give the defaults.
- Don't over-split services. One box per clear responsibility. Ten microservices on the board is a distraction, not a signal of seniority.
Close with: "This satisfies all three functional requirements. Next I'd like to address the non-functional ones: double-booking, search latency and the on-sale spike. Anything you'd prefer I start with?"
Step 6: Deep dives (~10–20 minutes)#
With a working design on the board, harden it. Deep dives have four jobs:
- Meet the non-functional requirements. Each quantified NFR from step 1 should get a concrete mechanism. "Search p99 under 500 ms" → a search index plus caching. "No double-booking" → a reservation scheme with an atomic state transition.
- Handle edge cases. What happens when a user reserves and walks away? When a payment webhook arrives twice? When a hot event's page is requested 100,000 times a second?
- Remove bottlenecks. Find the single database, the single queue partition, or the synchronous call chain that will fail first under the stated load, and fix it.
- Respond to probes. Interviewers steer you towards what they want to assess. Treat each question as a signal of where they want depth.
Who leads depends on level. At mid-level, it's normal for the interviewer to pick most deep dives. At senior and staff, you're expected to identify the important problems yourself: "The two riskiest parts are contention on popular seats and the on-sale spike; let me start with contention." Proactively spotting the hard parts is one of the strongest seniority signals (Interview Expectations by Level and How to Prepare).
Leave room for the interviewer. A common failure among strong candidates is talking for fifteen minutes straight about something the interviewer doesn't care about, while their questions go unasked. After each deep dive, pause: "That covers contention. Do you want more depth here, or should I move to the spike?"
Example: three ticketing deep dives
Deep dive A: no double-booking, and holds that expire. Users need a few minutes to pay after picking a seat. Options, in rising sophistication:
- Pessimistic row lock held during checkout. Correct, but holding a database lock for minutes while a user types card details ties up connections and doesn't survive a crashed client.
- Status column with an expiry.
UPDATE tickets SET status='RESERVED', reserved_until=now()+interval '10 minutes', reserved_by=:user WHERE id=:id AND (status='AVAILABLE' OR reserved_until < now()). The conditional update is atomic, so exactly one of two concurrent requests wins. Expiry is checked inline; a periodic sweeper resets abandoned rows. Simple and robust. - Distributed lock with TTL in Redis.
SET ticket:{id} {userId} NX EX 600gives the hold, with the TTL doing the expiry. The database records only final bookings. It's fast and keeps lock churn out of the database, but now correctness spans two systems: if Redis loses the lock, two users could proceed, so the final booking still needs a database guard (a unique constraint or a conditional update). See Distributed Locks and Pattern: Dealing with Contention.
Deep dive B: surviving a 10-million-user on-sale. No reasonable fleet should take that as raw booking traffic for one event. Add a virtual waiting room: users join a queue (for example a Redis sorted set by arrival time), and a controller admits batches at the rate the booking path can sustain, pushing "your turn" over WebSocket or SSE. This converts an uncontrolled spike into a steady, bounded flow, and it's fairer. Pair it with gateway Rate Limiting and Throttling.
Deep dive C: fast search and event pages. Replace LIKE '%term%' (a full table scan) with an inverted index in Elasticsearch or OpenSearch, kept in sync from Postgres through change data capture (Elasticsearch and Search Systems). Cache event and venue details aggressively, since they rarely change, and put popular search results and static assets behind a CDN. Seat availability changes constantly, so serve it from a fresher path (a short TTL, or pushed updates for the seat map).
The full treatment, with numbers and alternatives, is in Design a Ticket Booking System (Ticketmaster).
Scripts for the two most common deep dives
Some deep dives come up in almost every interview. Having a rehearsed structure means you sound deliberate, not improvised.
Introducing a cache. Don't just draw a Redis box. Walk through:
-
The bottleneck, with a number. "Event pages get 100k reads per second at peak; Postgres with replicas comfortably serves perhaps tens of thousands of simple reads per second, so reads are the problem."
-
What to cache and the key. "Event details by
event:{id}, about 2 KB each; 100k hot events is only about 200 MB." -
The pattern. Cache-aside is the default; write-through when reads must see writes immediately (Caching Strategies: Cache-Aside, Read-Through, Write-Through, Write-Behind).
-
Eviction and TTL. LRU with a TTL matched to staleness tolerance (minutes for event details, seconds or none for seat status).
-
The downsides you'll handle:
- invalidation on updates (delete-on-write, or events from CDC);
- cache failure (the database must survive a cold cache, or you need a warm replica);
- thundering herd when a hot key expires (request coalescing or early refresh).
See Cache Failure Modes: Stampedes, Hot Keys and Penetration.
Introducing sharding. Interviewers are wary of candidates who shard by reflex. Do it like this:
- Prove the need with maths. "500M bookings × 1 KB is 500 GB, which fits on one well-provisioned node. Writes peak around 5k/s, which is also fine. So I won't shard the bookings table yet." When it is needed, say which limit you hit: storage, write throughput, or working set.
- Pick the shard key from access patterns. It should spread load evenly and keep the hottest queries on one shard. Sharding tickets by
eventIdkeeps a seat map's reads on one shard, but a mega-event becomes a hot shard. Know that trade-off and its mitigation (sub-partitioning hot events, or caching). - Choose the distribution scheme. Hash-based with Consistent Hashing for even spread, range-based when range scans matter, directory-based when you need explicit placement.
- Name the costs. Cross-shard queries become scatter-gather, cross-shard transactions need sagas or two-phase commit, and rebalancing is operational work (Partitioning and Sharding).
- Plan growth. Start with more logical shards than machines (for example, 64 logical shards on 8 nodes), so growth means moving shards rather than re-hashing every row.
Networking and resilience deep dives
These come up whenever services call each other or users are spread across the world:
- Regionalization and latency. Light in fibre travels about 200,000 km/s, so New York to London (~5,600 km) is about 56 ms round trip before any processing. A single-region design can't give a Sydney user 50 ms latency. Options:
- CDN for static and cacheable content (Content Delivery Networks (CDN)).
- Regional partitioning, where data lives near the users who use it. Ride-hailing is the classic case: a rider in one city never needs drivers from another, so each region can be largely independent.
- Multi-region replication, with its consistency costs (Multi-Region and Global Data).
- Timeouts, retries, backoff and jitter. Every network call needs a timeout. Retries should use exponential backoff with jitter, so thousands of clients don't retry in lockstep. Retries of writes must be idempotent, which is why the confirm endpoint takes an idempotency key (Resilience Patterns: Timeouts, Retries and Circuit Breakers).
- Circuit breakers. When a dependency like the payment provider is failing, stop calling it for a while and fail fast or degrade gracefully, instead of exhausting your threads waiting on it.
- Cascading failures and thundering herds. A recovering service hit by every client's retry at once falls over again. Use jittered backoff, load shedding and admission control.
Wrapping up (~2–5 minutes)#
The last few minutes are short but disproportionately memorable. Stop deep-diving when about three to five minutes remain, even mid-topic ("I'll pause there so we have time to wrap up"), and do three things.
- Recap the design in two or three sentences. Tie it back to the requirements on the board: "Search goes through Elasticsearch, fed by CDC from Postgres, for the 500 ms target. Seats are held with a TTL lock and confirmed by a conditional update, so no double-booking. A virtual waiting room absorbs the on-sale spike."
- Name the main trade-offs and open risks. "The Redis hold adds a second system to the correctness path, so the database update is the backstop. Elasticsearch results can lag writes by a second or two, which is acceptable for search but not for seat status." Saying the weaknesses yourself shows judgement; the interviewer would have noticed them anyway.
- Say what you'd do next with more time: observability (booking success rate, hold expiry rate, queue wait time), load testing the on-sale path, a multi-region plan, cost review.
Then ask your questions. Thoughtful questions about the team's real systems ("What's the hardest scaling problem you've had with this?") end the session as a conversation between engineers, which is the impression you want to leave.
If you've run badly over time and the interviewer has to stop you, a one-sentence recap is still better than none: "In short: Postgres for correctness, Elasticsearch for search, a queue for the spike. Thanks!"
Communication and whiteboard tips#
The interviewer can only grade what they can see and hear. Most "I knew that but didn't get credit" stories are communication failures.
Lay the board out in zones. A consistent layout lets the interviewer find things, and lets you point back to requirements during deep dives. Keep requirements visible all session.
Tips that consistently help:
- Think out loud, but in headlines. Say what you're deciding and why ("I need atomicity across ticket and booking, so one relational database"), not a stream of half-thoughts. Silence for over 30 seconds makes the interviewer guess; rambling makes them dig for the signal.
- Draw left to right, request to data. Clients on the left, then edge, services, and storage on the right. Label every arrow with what flows ("reserve ticketId", "CDC events").
- Use colour or a second style for changes. When a deep dive adds a cache or a queue, draw it differently, so the evolution from simple to scaled is visible.
- Keep words on the board short. Labels, not paragraphs. Note decisions as "Postgres: ACID for bookings" rather than full sentences.
- Practise the tool. If the interview uses Excalidraw, Miro, a Google Doc or a coding pad, practise in it. Know how to draw a box, connect arrows, duplicate shapes and pan. Losing three minutes to tooling in a 45-minute interview is common and avoidable. Turn on any grid or snap options before you start.
- Point while you talk. In person, gesture at the box you mean; remotely, use the cursor or highlight. "This service" is ambiguous on a busy board.
- Summarise at transitions. One sentence when you finish each step ("API done, four endpoints") gives the interviewer natural moments to redirect you.
Driving the interview#
In most system design interviews, the candidate is expected to drive. The interviewer answers questions, nudges and probes, but you set the agenda. Concretely:
- Announce the plan at the start. "I'll clarify requirements, list core entities, sketch the API, then a simple high-level design, then deep dives on scale and correctness. Does that work for you?" It's ten seconds, and it tells the interviewer you have a structure.
- Make decisions, then invite challenge. "I'll use Postgres here. Happy to revisit if you see a reason not to" beats "Should I use Postgres or Cassandra?" Asking the interviewer to choose for you hands over the design; deciding with stated reasons is what they're assessing.
- Watch the clock yourself. Glance at the time at each transition. If requirements ran long, say "I'll keep the API brief to leave time for the design."
- Treat hints as instructions. "How would this behave if the payment provider is down?" isn't small talk. It's the interviewer telling you what they want to see. Address it now, or explicitly schedule it ("Great question. Let me finish this flow, then that's my first deep dive").
- Don't fight the steer. If the interviewer wants to talk about the feed ranking and you'd prepared to talk about storage, follow them. Their rubric matters more than your prepared material.
- Don't wait to be asked. At senior levels especially, the signal comes from you noticing that the counter will be a hot key, or that the webhook needs idempotency, without prompting.
Handling unknowns#
You'll meet things you don't know: an unfamiliar domain, a technology you've never used, a number you can't recall. Strong candidates handle this calmly and visibly:
- Say so, then reason from first principles. "I haven't used Spanner directly, but I know it gives external consistency through synchronised clocks, so the trade-off would be higher write latency. Let me reason from that." Interviewers value honest reasoning far more than a confident bluff, and bluffs about specifics tend to get probed.
- Make an explicit assumption. If you don't know the scale or the domain rule, propose a value: "I'll assume 10M daily users and a 100:1 read-to-write ratio. Tell me if it's very different." Then design to it. A stated assumption is gradable; a vague one isn't.
- Use relative reasoning when you forget a number. You may not remember exact SSD latency, but knowing memory is about 100× faster than SSD, and SSD is about 100× faster than a cross-region round trip, is usually enough to make the decision (Numbers Every Engineer Should Know).
- Ask the interviewer to fill domain gaps. "How do venues usually release seats: all at once, or in waves?" is a perfectly good question. You're not expected to know the ticketing industry.
- Generalise from patterns you do know. Most problems reduce to a handful of recurring patterns: scaling reads, scaling writes, realtime updates, contention, long-running tasks, multi-step workflows, large blobs (Choosing the Right Pattern). Name the pattern and apply its standard solutions.
- If you're stuck, simplify. Solve a smaller version (one region, one server, no failures), then relax the constraints one by one.
Common mistakes and ways to fail#
Interviewers usually assess four broad areas: problem navigation, solution design, technical depth, and communication. Most failures map to one of them.
| Area | Mistake | What it looks like | Better approach |
|---|---|---|---|
| Problem navigation | Jumping straight to boxes | Drawing Kafka in minute two, before knowing what the system does | Spend ~5 minutes on requirements; get agreement |
| Problem navigation | Scope creep | Fifteen functional requirements, then running out of time on all of them | Top three plus an explicit out-of-scope list |
| Problem navigation | Never reaching a working design | 30 minutes on requirements, estimates and schema; no end-to-end flow | Have a complete simple design by about the 60% mark |
| Problem navigation | Vague non-functional requirements | "Scalable, available, low latency" | Specific and quantified: "seat holds must never overlap", "search p99 < 500 ms" |
| Solution design | Premature optimisation | Sharding and multi-region before a single request works | Simple first, then scale where the NFRs demand it |
| Solution design | Buzzword architecture | Microservices, Kafka, Kubernetes with no stated reason | Every component earns its place with a requirement |
| Solution design | Not satisfying requirements | A beautiful design with no path for one of the core features | Build endpoint by endpoint, and trace every flow |
| Technical depth | Shallow deep dives | "Add a cache" with no keys, TTL, invalidation or failure plan | Use the cache and sharding scripts above |
| Technical depth | Hand-waving correctness | "Use a lock" without saying what's locked, where, or what happens on expiry | Name the mechanism, its failure mode and the backstop |
| Technical depth | Outdated numbers | Sharding 200 GB because "one machine can't handle it" | Modern hardware: TBs of RAM, tens of TB of SSD per node |
| Communication | Silent thinking | Minutes of drawing with no narration | Headline your decisions as you make them |
| Communication | Monologuing | Fifteen-minute deep dive without checking in | Pause after each deep dive; invite redirection |
| Communication | Defensiveness | Arguing when the interviewer challenges a choice | Treat a challenge as a hint; weigh it openly and adapt if it's right |
| Communication | Asking permission constantly | "Is that OK? Should I do X?" every two minutes | Decide, state the reason, invite challenge at transitions |
Two subtler ways to fail are worth calling out:
- Over-preparing a memorised design. If you've studied "Design Twitter" and recite your rehearsed answer even though the interviewer's version changes a constraint, it shows you aren't listening. Use prepared knowledge, but redesign for the actual requirements.
- Treating the interviewer as an adversary. The best interviews feel like two engineers designing together at a whiteboard. Interviewers often have a question on the rubric about whether they'd enjoy working with you.
When to Use It#
Use this framework for any product or infrastructure system design interview, the common format at most technology companies:
- Product-style prompts ("Design Ticketmaster", "Design WhatsApp", "Design Uber"): the full sequence, usually skipping data flow.
- Infrastructure-style prompts ("Design a rate limiter", "Design a distributed cache", "Design a message queue"): the same sequence, with client services as the "users" and a library or service interface as the "API".
- Data-pipeline prompts ("Design an ad click aggregator", "Design a web crawler", "Design Top-K"): include the data-flow step; it becomes the backbone of the design.
- Design reviews at work. Requirements, entities, interface, simple design, then hardening is also a good order for a design document or architecture review (The Design Process: From Problem to Architecture covers the real-world version).
Concrete signals you're in framework territory: an open-ended "Design X" prompt; 45–60 minutes; a whiteboard or diagramming tool; an interviewer who says little at first and waits for you to start.
When NOT to Use It#
Pick something else instead when:
- It's an object-oriented or low-level design interview ("Design a parking lot's classes"). Those focus on classes, interfaces and design patterns. Use requirements → use cases → class diagram → key methods instead.
- It's an ML system design interview. Requirements still come first, but the middle steps become data, features, model, training, evaluation and serving (ML System Design and Feature Stores).
- It's frontend or mobile system design. Focus on component architecture, state management, rendering, offline behaviour and client-side performance, with backend APIs as a smaller part (Frontend System Design, Mobile System Design).
- The interviewer sets their own agenda. Some open with "I'd like to focus on how you'd store this data" or hand you an existing architecture to critique. Follow them; don't force the framework.
- It's a deep-dive-only round. "Here's our design. How would you make it multi-region?" Skip straight to deep-dive mode, starting with requirements for the change (what consistency, what failover time).
- It's a behavioural "tell me about a system you built" round. Use situation, decisions, trade-offs and outcome, not a fresh design.
In all of these, the underlying habits still apply: clarify before solving, simple before scaled, decide with reasons, check in.
How to Implement It#
Turning the framework into instinct takes deliberate practice, not just reading. A practice loop that works:
- Learn the building blocks first. You can't pick a cache pattern or shard key you don't understand. Work through the core concept pages (Caching Fundamentals, Partitioning and Sharding, Asynchronous Processing and Message Queues, and so on) before heavy mock practice.
- Learn the recurring patterns. Most interview problems combine a few patterns. Study each pattern page and know its standard escalation path.
- Do timed solo runs. Pick a case study prompt, set a 45-minute timer, and go through all six steps out loud with the board template below. Only then read the case study and compare.
- Review against the rubric. After each run, ask:
- Did I finish a working design by about minute 25?
- Were my NFRs quantified?
- Did each deep dive end with a trade-off stated?
- Where did time go?
- Do mock interviews with a human. Peers, colleagues or a paid service. Solo practice can't teach you to handle interruptions and probes.
- Iterate on weak steps. If you always run out of time, drill the first three steps to under 12 minutes. If deep dives are shallow, practise the cache and sharding scripts on several problems.
- Rehearse the opening and the close. A crisp first two minutes (plan statement, first requirements questions) and a confident wrap-up are cheap to perfect and shape the interviewer's impression.
A reusable board template you can paste into a diagramming tool or doc at the start:
REQUIREMENTS
Functional (top 3): 1. ... 2. ... 3. ...
Out of scope: ...
Non-functional: consistency: ... scale: ... DAU, ... peak RPS
latency: p99 < ... for ... durability/availability: ...
Estimates (if needed): ...
CORE ENTITIES
- ... - ... - ...
API
METHOD /path { body } -> response
METHOD /path?query -> response
(auth: user from token; idempotency key on payment writes)
DATA FLOW (pipelines only)
1. ... 2. ... 3. ...
HIGH-LEVEL DESIGN
[Client] -> [Gateway] -> [Service A] -> [DB: key cols]
-> [Service B] -> [Cache] / [Queue] -> [Worker]
DEEP DIVES (in priority order)
1. NFR: ... decision: ... trade-off: ...
2. Bottleneck: ... decision: ... trade-off: ...
3. Edge case: ... decision: ...| Technology | Fits when |
|---|---|
| Excalidraw | Common in remote interviews; hand-drawn style, fast boxes and arrows; practise shortcuts beforehand |
| Miro / FigJam | The company's standard tool; good for infinite canvases and sticky-note requirements |
| Google Docs / plain text | The interviewer asks for a doc; use the text template above and ASCII arrows |
| Physical whiteboard | On-site loops; write large, leave the top strip for requirements, carry your own markers if allowed |
| Mermaid or diagram-as-code | Your own preparation notes and design docs; too slow for live interviews |
| A timer | Every practice session; build a feel for 5, 15 and 25 minutes |
Trade-offs#
| Option | Pros | Cons | Pick when |
|---|---|---|---|
| Strict step-by-step framework | Predictable coverage; hard to forget requirements or the API; calming under stress | Can feel robotic; may spend time on steps the interviewer doesn't value | Mid-level and early senior candidates; unfamiliar problems |
| Flexible, interviewer-led flow | Responsive to what's actually being assessed; feels collaborative | Easy to lose structure and miss the working design | Interviewer explicitly redirects; staff-level rounds with a narrow focus |
| Estimation up front | Satisfies interviewers who expect it; frames scale early | Often produces numbers that change nothing; costs 3–5 minutes | The interviewer asks for it, or scale is the whole problem (e.g. Top-K, a counter) |
| Just-in-time estimation | Numbers appear where they decide something; saves time | Can look like avoidance if never done | Default; announce the choice in requirements |
| Breadth (many components, light depth) | Shows awareness of the whole system | Shallow; little technical-depth signal | Only for the high-level design pass |
| Depth (few components, deep) | Strong signal on technical depth and seniority | Risk of an incomplete design if started too early | Deep-dive phase, after the design works end to end |
| Full schema in the entities step | Data model visible early | Wastes time on fields that don't matter; premature | Rarely; only for data-model-centric prompts |
| Fields added just in time | Only relevant columns; tied to real flows | Schema is spread across the board | Default |
Common Pitfalls#
- Skipping the check-ins. Ten seconds after requirements and after the high-level design catches misunderstandings that otherwise cost the interview.
- Treating the timings as rules. They're budgets. If the interviewer wants to spend 15 minutes on requirements for an ambiguous prompt, that's fine. Adjust later steps and say so.
- Forgetting to come back. If you said "the
LIKEquery won't scale, I'll fix it later", fix it later. Unresolved promises look like forgotten problems. - Designing the API around the database. Endpoints should reflect user actions (
/bookings/reserve), not tables (/ticket_rows/update). - Deep-diving the easy parts. Spending ten minutes on load balancers in a ticketing interview, while double-booking goes unaddressed, signals poor prioritisation. Deep-dive where the risk is.
- No wrap-up. Ending mid-sentence when time runs out wastes the last impression. Keep two minutes to summarise the design, the main trade-offs, and what you'd do with more time (monitoring, failure testing, cost).
Real-World Examples#
The framework's value shows when you apply the same six steps to very different prompts. Below are three compressed walk-throughs: a product system, an infrastructure system and a data pipeline. Each shows what goes on the board at each step and which deep dives the requirements point to. The numbers are illustrative assumptions of the kind you'd propose and confirm with the interviewer.
A URL shortener (product, read-heavy)#
Requirements. Functional:
- create a short URL from a long one, optionally with a custom alias and an expiry;
- redirect a short URL to the original.
Out of scope: user accounts, analytics dashboards. Non-functional:
- redirects in under about 100 ms at p99;
- short codes unique (no two long URLs share one);
- highly available for redirects (eventual consistency is fine for a new link's visibility);
- scale to about 1 billion URLs and 100 million daily users.
Estimates, only because they decide things. With about 1M new links per day (~12 writes/s) and a 100:1 read ratio (~1,200 redirects/s average, perhaps 10k/s at peak), it's a read-heavy system. 1B URLs × ~500 bytes is about 500 GB, which fits on one database node, so sharding isn't the first concern. Seven base62 characters give 62^7 ≈ 3.5 trillion codes, far more than needed.
Entities: URL (short code, long URL, expiry, creator). API: POST /urls {longUrl, alias?, expiresAt?} -> shortUrl and GET /{code} -> 302 redirect.
High-level design: client → load balancer → write service → database; client → read service → database, returning a redirect.
Deep dives, chosen by NFR:
- Uniqueness: compare hashing plus collision checks against a global counter encoded in base62 (Unique ID Generation). Counter ranges handed out in batches from Redis avoid a per-write round trip.
- Redirect latency: cache-aside with an in-memory cache in front of the database, plus a CDN or edge cache for very hot links.
- 301 vs 302: a 301 is cached by browsers, which cuts load but loses visibility of each click; a 302 keeps every redirect flowing through you.
The full design is in Design a URL Shortener (Bitly).
A distributed rate limiter (infrastructure)#
Requirements. Functional: other services ask "is this request allowed?" for a client identity (user ID, API key or IP) against configurable rules, for example 100 requests per minute per API key. Over-limit requests get 429 Too Many Requests with headers saying when to retry. Non-functional:
- adds under about 10 ms per request;
- stays correct across a fleet of gateway nodes, not per node;
- remains available (decide fail-open or fail-closed when the limiter is down);
- handles about 1M requests/s at peak across the fleet.
Entities: Rule (key type, limit, window), Client counter state. API: isAllowed(clientId, ruleId) -> {allowed, remaining, resetAt}, called in-process from the gateway.
Data flow is skipped. It's request-response.
High-level design: gateway nodes → rate-limiter library → shared Redis holding counters → rules loaded from a config store and cached locally.
Deep dives:
- Algorithm: fixed window is simple but bursts at window edges; sliding-window counter is a good balance; token bucket allows controlled bursts (Rate Limiting and Throttling).
- Atomicity: do read-modify-write in one Redis Lua script, so two gateway nodes can't both take the last token.
- Scale: 1M checks/s is more than one Redis node should carry comfortably, so shard counters by client key across a Redis cluster. 100M clients × ~100 bytes is ~10 GB of state.
- Failure: fail open for most APIs (a few extra requests beat an outage), fail closed for abuse-sensitive ones like login.
See Design a Distributed Rate Limiter.
An ad click aggregator (data pipeline)#
Requirements. Functional:
- users clicking an ad are redirected to the advertiser;
- advertisers can query click counts per ad over time, at one-minute granularity.
Non-functional:
- scale to about 10,000 clicks/s at peak;
- queries return in under about 1 s;
- counts must be accurate enough to bill on, so no lost clicks and no double counting;
- data visible within about a minute;
- resistant to click fraud by duplicate clicks.
Entities: Click event, Ad, Aggregated count (ad, minute, count). API: GET /click?adId&impressionId -> 302 to advertiser and GET /ads/{id}/metrics?from&to&granularity -> counts.
Data flow, the backbone here:
- Click hits the click service, which logs the event and redirects.
- Events go to a durable stream.
- A stream processor aggregates per ad per minute.
- Aggregates land in an OLAP store.
- Queries read pre-aggregated rows.
- A periodic batch job recomputes counts from raw logs to reconcile.
High-level design: click service → Kafka, partitioned by ad ID → Flink with one-minute tumbling windows → an OLAP database such as ClickHouse, Druid or Pinot → query service. In parallel, raw events go to S3 for the batch reconciliation job.
Deep dives:
- Exactly-once-ish counting: de-duplicate by impression ID, and use Flink checkpoints with transactional sinks (Delivery Guarantees: At-Most, At-Least and Exactly-Once).
- Hot ads: a viral ad overloads one partition, so append a small random suffix to its key and merge the sub-counts downstream.
- Lambda-style reconciliation: the streaming result is fast; the batch result is authoritative for billing (Batch vs Stream Processing).
See Design an Ad Click Aggregator.
What the three have in common. In each, the requirements step decided the interesting deep dives. Uniqueness and read latency for the shortener; atomicity and fleet-wide correctness for the limiter; accuracy and hot partitions for the aggregator. That is the framework working as intended: the hard parts are found by following the requirements, not by memorising the answer.
Case studies that use this pattern#
Every case study in this handbook follows the framework's order. Good ones to practise with, in rising difficulty:
- Design a URL Shortener (Bitly)
- Design a Distributed Rate Limiter
- Design a News Feed (Facebook / Twitter)
- Design a Chat System (WhatsApp)
- Design a Web Crawler
- Design an Ad Click Aggregator
- Design a Ticket Booking System (Ticketmaster)
- Design a Ride-Hailing App (Uber)
- Design Top-K / Trending (Top Videos, Leaderboards)
In the Interview#
Common follow-ups:
- "Why did you skip capacity estimation?" Because none of the decisions so far depend on it. Then show the estimate that does matter, for example storage per shard or connections per server, and the decision it drives.
- "What would you do with another hour?" Name the next deep dives in order: observability and alerting, failure testing, multi-region, cost.
- "What's the weakest part of your design?" Have an honest answer ready: a single point of failure, a hot key, an assumption you're unsure of, and how you'd mitigate it.
- "How would this change at 10× scale?" Identify the first component to break, using numbers, and the change you'd make. Not "add more servers".
- "Can you walk me through what happens when…?" Trace the request through the board, saying what's read, written and returned at each hop, including failure paths.
Deep Dive: What interviewers write down, and how the bar moves by levelShow
Interviewers usually fill in written feedback against a rubric soon after the session, and a hiring committee or debrief often reads it without having seen you. Two things follow. Only observable behaviour counts: if you thought of the hot-key problem but didn't say it, it doesn't exist in the feedback. And specific moments carry weight: "Candidate identified that the seat-hold TTL needed a database backstop without prompting" is the kind of line that moves a decision.
Most rubrics group signals into four areas.
Problem navigation. Did you turn an ambiguous prompt into a crisp problem? Positive signals:
- focused requirements, with out-of-scope items named;
- quantified NFRs;
- prioritising the hard parts.
Negative signals:
- solving a different problem;
- getting lost in minor features;
- never reaching a complete design.
Solution design. Is the design coherent, does it satisfy the requirements, and does each component have a reason to exist? Positive signals:
- a clean end-to-end flow;
- sensible service boundaries;
- appropriate technology choices with stated reasons.
Negative signals:
- missing flows;
- components with no purpose;
- copying a famous architecture regardless of requirements.
Technical depth. When pushed on a component, can you go deeper than its name? Positive signals:
- explaining how a lock expires and what happens on a pause;
- choosing a shard key from the actual queries;
- quoting realistic numbers;
- naming failure modes.
Negative signals:
- buzzwords without mechanism;
- outdated assumptions (single machines as tiny);
- not recognising a correctness problem.
Communication and collaboration. Would the interviewer want to design systems with you? Positive signals:
- clear narration;
- inviting and using feedback;
- adapting when challenged;
- calm handling of unknowns.
Negative signals:
- monologues;
- defensiveness;
- needing constant prompting;
- talking past questions.
How the bar shifts by level. Exact expectations vary by company, but the general shape is consistent.
| Level | Breadth vs depth | Who drives | What earns a strong rating |
|---|---|---|---|
| Mid-level | Mostly breadth; some depth in one or two places | Candidate leads early steps; interviewer may choose deep dives | A complete, working design; reasonable choices; can respond sensibly to probes |
| Senior | Balanced; depth in several areas | Candidate leads throughout, including choosing deep dives | Proactively finds the hard problems; justifies choices with trade-offs; realistic numbers; knows failure modes |
| Staff and above | Depth-heavy; breadth is assumed | Candidate drives and often teaches | Spots the non-obvious risk; reasons about evolution, cost, operability and organisational impact; draws on real production experience |
Two implications for preparation:
- The same design can earn different ratings at different levels. A clean design with interviewer-led deep dives can be a strong mid-level performance and a weak senior one. Preparing for a senior role means practising proactive deep dives, not just a correct design.
- Staff-level interviews often go off the standard path. The interviewer may skip straight to "the database is now 80% full and growing 10% a month; what do you do?" or ask about migration, rollout and team ownership. The framework still gives you a place to stand, but expect a conversation more like a design review than a recital.
Deep Dive: Time management and recovery tacticsShow
Running out of time is the most common reason otherwise capable candidates fail. It rarely comes from one big mistake. It comes from small overruns in every early step. A few techniques prevent it.
Use checkpoints, not a stopwatch. Remember three numbers:
- Minute ~12 (45-min) / ~15 (60-min): requirements, entities and API are done.
- Minute ~25 / ~33: a complete high-level design is on the board.
- About 3–5 minutes before the end: stop deep-diving and wrap up.
If you're past a checkpoint, take a compressing action immediately rather than hoping to catch up.
Compressing actions, in order of preference:
- Shrink the API to signatures. Method, path, one-line description. Skip request and response shapes.
- Merge steps. Write entities next to the API rather than as a separate pass.
- Simplify the high-level design. One service box with a note ("would split by responsibility later"), one database. Make it work end to end.
- Pick fewer deep dives. Two done well beat four done shallowly. Say: "Given time, I'll focus on double-booking and the on-sale spike."
Recovering from a bad start. Some situations, and what to do:
- You misunderstood the problem and the interviewer corrects you at minute 15. Don't panic or restart silently. Say: "Thanks, that changes the core flow. Let me adjust." Keep what still applies (entities and API often survive) and redraw only the affected flow. Interviewers often score recovery positively.
- You realise your design has a correctness bug. Say so as soon as you see it: "Wait. Two users could both pass this check. I need an atomic conditional update here." Self-correction is a strong technical signal; hoping nobody notices is a weak one.
- You froze on a deep-dive question. Restate the question, narrow it ("Are you asking about consistency across regions, or within one region?"), then reason from the simplest case. Thinking out loud through a simple case is better than silence while you search for the perfect answer.
- The interviewer seems disengaged or keeps redirecting. That's information: you're probably spending time where they don't need signal. Ask directly: "Is there an area you'd like me to focus on?"
Spend time where the grade is. A rough mental model of where marks come from in a typical product design interview:
- Requirements and scoping: about 15%.
- A working high-level design: about 30%.
- Deep dives: about 40%, and more at senior levels.
- Communication throughout: the rest.
These aren't official weights, but they explain why a candidate with perfect requirements and no deep dives tends to fail, while one with brisk requirements, a simple design and two excellent deep dives tends to pass.
Rehearse with the clock running. Timing intuition only comes from practice. Do at least a few full mock runs with a visible timer, and note where you were at each checkpoint. Most people discover they spend twice as long on requirements as they thought.
Deep Dive: Choosing deep dives by risk, the patterns behind most prompts, and estimation shortcutsShow
Rank deep dives by risk. With limited time, choose the problems where a wrong answer would hurt most. A quick way to rank candidates is to score each potential issue on two axes: impact if ignored (data loss, a correctness violation, an outage, or merely slower) and likelihood at the stated scale. Then work down the list:
- Correctness under concurrency. Double-booking, overselling, lost updates. These are usually top, because they break the product's promise.
- The stated scale-critical path. Whatever handles the spike or the largest QPS: the feed read path, the location-update ingest, the click stream.
- Latency on the user-facing hot path. Search, timeline load, message delivery.
- Durability and failure handling. What happens when a node, a zone or a dependency fails.
- Everything else. Monitoring, cost, multi-region, unless the requirements raised them.
Most prompts are combinations of a few patterns. Recognising them early tells you where the deep dives will be:
| Problem shape | Pattern | Typical deep dive |
|---|---|---|
| Many more reads than writes; hot content | Pattern: Scaling Reads | Cache design, read replicas, CDN, hot keys |
| Very high write or ingest rate | Pattern: Scaling Writes | Sharding, batching, write-optimised stores, hot partitions |
| Users must see changes instantly | Pattern: Pushing Realtime Updates | WebSockets/SSE, pub/sub fan-out, connection routing |
| Many users compete for the same item | Pattern: Dealing with Contention | Atomic updates, locks with TTL, optimistic concurrency, queues |
| Work takes seconds to hours | Pattern: Managing Long-Running Tasks | Async job queue, status polling, retries, idempotent workers |
| Several services must all succeed or roll back | Pattern: Multi-Step Processes and Workflows | Sagas, workflow engines, compensation |
| Large files and media | Pattern: Handling Large Files and Blobs | Pre-signed URLs, multipart upload, CDN delivery |
The ticketing example is contention (seats) plus scaling reads (event pages and search) plus a spike. The shortener is mostly scaling reads. The ad aggregator is scaling writes plus stream processing. Naming the pattern out loud ("this is fundamentally a contention problem") is itself a good signal.
Estimation shortcuts for when you do need numbers. Keep these memorised so maths takes seconds, not minutes (Back-of-the-Envelope Estimation):
- A day is 86,400 s, about 10^5. So 1M events/day ≈ 12/s, 100M/day ≈ 1,200/s, and 1B/day ≈ 12,000/s.
- A month is about 2.6M s; a year is about 31.5M s, roughly π × 10^7.
- Peak is often 2–10× average. Say which multiplier you assume and why: bursty social events are higher, and steady B2B traffic is lower.
- Storage = items × size × retention × replication. For example, 100M items/day × 1 KB × 365 days × 3 replicas is about 110 TB.
- Order-of-magnitude capacities. These are rough, workload-dependent planning numbers to state as assumptions:
- a single well-tuned relational primary handles thousands to low tens of thousands of simple writes per second;
- a single Redis node handles on the order of 100k simple operations per second;
- one modern server can hold hundreds of thousands to millions of mostly idle WebSocket connections, with careful tuning.
- Latency ladder. Memory access is about 100 ns. An SSD random read is tens to hundreds of microseconds. A same-datacentre round trip is about 0.5 ms. A cross-continent round trip is 50–150 ms. These decide where caches and regions go (Numbers Every Engineer Should Know).
Turn every number into a decision. "1,200 writes per second, so one Postgres primary is fine and I won't shard" is a useful estimate. "We need 110 TB" with no consequence isn't. If a number doesn't change the design, you didn't need it.
Key Takeaways#
- The framework is six steps plus a wrap-up: requirements → core entities → API → (data flow) → high-level design → deep dives. Each step's output feeds the next, which keeps the interview linear and complete.
- Budget the time:
- 45-minute slot: about 12 minutes for requirements, entities and API; a working design by about minute 25; deep dives until a few minutes before the end.
- 60-minute slot: scale each step up, with the design done by about minute 33.
- Requirements: the top three functional ones, an explicit out-of-scope list, and three to five quantified, system-specific non-functional ones. Estimate only when a number changes a decision.
- Entities as a list, fields later. API from the requirements: REST by default, the user from the auth token, idempotency keys on risky writes.
- High-level design endpoint by endpoint: simple on purpose, narrate state changes, key columns by the datastore, and say which known problems you'll fix later.
- Deep dives by risk: correctness under concurrency first, then the scale-critical path, latency, and failure handling. Use rehearsed scripts for caching and sharding, and pause after each so the interviewer can steer.
- Drive the session:
- state the plan;
- decide with reasons;
- treat hints as instructions;
- handle unknowns with explicit assumptions and first principles.
- Most failures come from scope creep, never reaching a working design, shallow deep dives, or communication: silence, monologues, defensiveness. All are fixable with timed practice.