📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

What is a system design interview, and what is the interviewer actually looking for? Walk me through a step-by-step method you could use for any design question, from the first five minutes to the last.

What a system design interview tests and a repeatable eight-step method: requirements, estimates, API, data model, high-level diagram, deep dives, failure modes and trade-offs.

Beginner Theory Beginner architecture capacity-estimation interview-method requirements system-design trade-offs

🎯 Key points

  • Open-ended 45–60 minute conversation that tests reasoning, not one right answer
  • Clarify functional and non-functional requirements (scale, latency, availability, security, compliance, cost) first
  • Ask about legal constraints early: Privacy Act 1988, data residency in Australia East/Southeast
  • Back-of-the-envelope estimate: requests/s, storage per year, peak vs average
  • Define the API (3–5 endpoints) and the data model from the access patterns
  • High-level diagram first, then deep dive on 1–2 hard parts
  • Failure modes with recovery: timeouts, retries with backoff, circuit breakers, fallbacks, failover
  • State trade-offs, how they shift at 10× scale, and map boxes to real services (Azure SQL, Redis, Service Bus)

⏱ 30-second answer

A system design interview is an open-ended conversation where you design a working system — a URL shortener, a booking system — in 45–60 minutes. There is no single right answer; the interviewer watches how you reason: whether you clarify scope, put numbers on scale, and justify choices.

I use the same eight steps every time:

  • Clarify requirements (functional and non-functional) and estimate scale.
  • Define the API and the data model, then draw a high-level diagram.
  • Deep dive on the one or two hard parts, walk through failure modes, and close with trade-offs and next steps.

The trade-off you manage all interview is breadth versus depth: cover the whole system quickly enough that there is time to go deep where it matters.

🗣 Full answer (senior)

How I would answer this in an interview

"A system design interview is a structured conversation, not a quiz. I'm given a vague prompt like 'design a notification system', and the interviewer wants to see whether I can turn it into a concrete, defensible design in under an hour: ask the right questions, put numbers on the problem, pick components for reasons, and spot what will break. They're also checking how I communicate, because that's what design work looks like on a real team.

I use the same method every time so I never freeze. First, requirements: what must the system do, and the non-functional side — how many users, what latency, what availability, any data residency rules like keeping Australian personal information in Australia East. Second, a quick capacity estimate: requests per second at peak, storage per year, bandwidth. Third, the API — three to five endpoints. Fourth, the data model, driven by the access patterns. Fifth, a high-level diagram: client, gateway, services, data stores, queues. Then I deep dive on the one or two hard parts — for a booking system that's preventing double booking — and finally I walk through failure modes and finish with trade-offs and what I'd do next.

The mistake I see is people jumping straight to boxes and buzzwords — Kafka, Kubernetes, microservices — before they know whether the system has ten users or ten million. A design is only good relative to its requirements, and a senior engineer makes that link out loud."


What the interviewer is scoring

Area What good looks like
Problem framing Asks clarifying questions, writes assumptions down, agrees scope
Estimation Rough but reasoned numbers that drive decisions
Design Clear components with responsibilities; data model fits access patterns
Depth Can go deep on one hard part (concurrency, consistency, scaling)
Trade-offs Names alternatives and why they lost
Communication Thinks aloud, checks in, adapts to hints

The eight steps and a time budget (45 minutes)

Step Minutes Output on the whiteboard
1. Requirements 5 Functional list, NFRs, out of scope
2. Estimates 3–5 Requests/s (avg and peak), storage/year
3. API 3–5 3–5 endpoints with request and response
4. Data model 5 Tables or documents, keys, indexes
5. High-level diagram 5 Boxes and arrows, read and write paths
6. Deep dive 10–15 The hard part in detail
7. Failure modes 5 What breaks, blast radius, recovery
8. Trade-offs and next steps 2–3 What you'd change at 10× scale

Mapping boxes to real services

Box Azure AWS note .NET
Edge / gateway Front Door, API Management CloudFront, API Gateway YARP if self-hosted
Service App Service, Container Apps, AKS ECS, EKS ASP.NET Core minimal APIs
Relational data Azure SQL RDS / Aurora EF Core
Cache Azure Cache for Redis / Azure Managed Redis ElastiCache HybridCache
Queue Service Bus SQS / SNS Azure.Messaging.ServiceBus
Files Blob Storage S3 Azure.Storage.Blobs

Production example

A team asked to build an internal URL shortener assumed it needed Cosmos DB and global distribution. A five-minute estimate showed about 2 million redirects a day — roughly 25 requests/s on average and maybe 100 at peak — which a single Azure SQL database with a Redis cache handles at well under 10 ms p95. The design took a week instead of a quarter.

🔍 What the interviewer is checking

Checks whether the candidate has a structured, repeatable approach to an ambiguous design problem and understands what is being assessed.

Green flags

  • Starts with clarifying questions and writes assumptions down
  • Uses numbers to justify components
  • Separates read and write paths
  • Raises failure modes without being prompted
  • States trade-offs and next steps

Red flags

  • Jumps to a buzzword architecture immediately
  • No estimate, or numbers that never influence the design
  • Spends 20 minutes on a trivial part
  • Treats the interviewer's hints as interruptions

📚 Learn in depth

1. Why interviewers use open-ended design questions

Coding interviews test whether you can implement something correct. Design interviews test whether you can decide what to build when the requirements are fuzzy and the constraints conflict. That is most of a senior engineer's job: weighing latency against cost, consistency against availability, and build against buy.

The interviewer usually has a rubric with four or five areas (framing, estimation, design, depth, communication). Each step in the method feeds one of them.

2. The method as a flow

  vague prompt
      |
      v
 [1] requirements ----> assumptions written down
      |
      v
 [2] estimates -------> numbers that rule options in or out
      |
      v
 [3] API  +  [4] data model
      |
      v
 [5] high-level diagram (read path, write path)
      |
      v
 [6] deep dive on the hard part(s)
      |
      v
 [7] failure modes ---> what breaks, what users see
      |
      v
 [8] trade-offs, next steps

Each step constrains the next. Estimates decide whether one database is enough. The API reveals the access patterns. The access patterns decide the data model and the keys.

3. Finding the hard part

Every classic question has one or two parts that carry the marks:

System Hard part
URL shortener Generating unique short codes; read-heavy caching
Booking Preventing double booking under concurrency
Chat Fan-out of messages to online users; ordering
Payments Idempotency and reconciliation
Rate limiter Distributed counters with low latency

If you're not sure, ask: "Which part would you like me to go deeper on?"

4. Failure modes as a habit

For every box ask: what if it is slow, what if it is down, what if it returns wrong data? A short list — database failover, cache miss storm, queue backlog, a dependency timing out — shows production experience. Pair each with the user-visible effect and the mitigation (retry with backoff, circuit breaker, degrade to cached data).

5. Trade-offs are the answer

A design without trade-offs sounds like a brochure. Name the alternative you rejected and why: "I chose Azure SQL over Cosmos DB because the data is relational and the scale fits one database; I'd revisit if writes passed a few thousand per second."

Try it yourself

  1. Pick "design a URL shortener" and run the eight steps aloud against a 45-minute timer. Note where you overran.
  2. Write the capacity estimate for 100 million redirects a day and check which steps change.
  3. For a system you work on, list its three hardest failure modes and what users see.
  4. Record yourself explaining one trade-off in under 60 seconds.
  5. Draw the read path and the write path of your current system as two separate diagrams.

💻 Code

A design discussion often ends with a sketch of the API. Here is the URL shortener's API as a compilable .NET 10 minimal API skeleton, the kind of thing you'd describe in step 3.

// Program.cs — .NET 10, nullable enabled
using System.Collections.Concurrent;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<ILinkStore, InMemoryLinkStore>();
var app = builder.Build();

// Write path: low volume, needs validation and uniqueness.
app.MapPost("/api/links", async (CreateLink request, ILinkStore store, CancellationToken ct) =>
{
    if (!Uri.TryCreate(request.Url, UriKind.Absolute, out _))
        return Results.ValidationProblem(new Dictionary<string, string[]> { ["url"] = ["Must be an absolute URL."] });

    var code = await store.CreateAsync(request.Url, ct);
    return Results.Created($"/{code}", new LinkCreated(code));
});

// Read path: very high volume, so it must be cacheable and cheap.
app.MapGet("/{code}", async (string code, ILinkStore store, CancellationToken ct) =>
    await store.FindAsync(code, ct) is { } url ? Results.Redirect(url) : Results.NotFound());

app.Run();

public sealed record CreateLink(string Url);
public sealed record LinkCreated(string Code);

public interface ILinkStore
{
    Task<string> CreateAsync(string url, CancellationToken ct);
    Task<string?> FindAsync(string code, CancellationToken ct);
}

// Stand-in for Azure SQL + Redis; the interface is what the design discussion is about.
public sealed class InMemoryLinkStore : ILinkStore
{
    private readonly ConcurrentDictionary<string, string> _links = new();

    public Task<string> CreateAsync(string url, CancellationToken ct)
    {
        var code = Guid.NewGuid().ToString("N")[..7];
        _links[code] = url;
        return Task.FromResult(code);
    }

    public Task<string?> FindAsync(string code, CancellationToken ct) =>
        Task.FromResult(_links.TryGetValue(code, out var url) ? url : null);
}

⚠ Common mistakes

  • Mistake: Drawing boxes in the first minute. Why it is wrong: Without requirements you can't justify any component, and you may design the wrong system. Instead: Spend about five minutes on requirements and write the assumptions down.
  • Mistake: Skipping the estimate. Why it is wrong: The numbers decide whether one database is enough or you need partitioning. Instead: Do a 3-minute back-of-the-envelope calculation of peak requests/s and storage per year.
  • Mistake: Naming technologies without saying what they are for. Why it is wrong: "Kafka" on its own says nothing about the box's responsibility or why it beats the alternatives. Instead: Naming real services is good — tie each one to a responsibility and a reason: "a durable queue so the write path doesn't wait for email delivery — Service Bus, because we're on Azure and need dead-lettering".
  • Mistake: Going deep on an easy part. Why it is wrong: Time spent on the login screen is time not spent on the concurrency problem that carries the marks. Instead: Ask which part to go deeper on, or pick the one with the hardest consistency or scale issue.
  • Mistake: Ignoring failure, or naming it without recovery. Why it is wrong: Every real system fails; "the database might go down" with no plan signals no production experience. Instead: For each failure give the recovery: timeouts and retries with jittered backoff, a circuit breaker, a fallback to cached data, zone-redundant failover.
  • Mistake: Forgetting compliance and cost. Why it is wrong: Data residency rules or a budget can rule out an otherwise good design (for example, a multi-region database that replicates personal information offshore). Instead: Ask about privacy, residency and budget in the requirements step and design within them.
  • Mistake: Talking in silence or not at all. Why it is wrong: The interviewer scores your reasoning, which they can't see if you don't say it. Instead: Think aloud and check in at each step.
  • Mistake: Presenting one option as obviously right. Why it is wrong: It hides the trade-off the interviewer wants to hear. Instead: Name the alternative and why it lost for these requirements.

🏛 Senior insight: trade-offs

Seniors treat the method as scaffolding, not a script. If the interviewer clearly cares about one area — say, the consistency of a ledger — a senior compresses the early steps and spends half the time there. The method guarantees you never miss a step; judgement decides how long each one gets.

The other senior signal is linking every decision back to a number or a requirement. "Read-heavy at 100:1, so a cache in front of the database" is a senior sentence; "we'll add Redis for performance" is not.

Approach When it fits Cost When not to
Full eight steps evenly Generic prompt, no steer from the interviewer Shallow depth everywhere Interviewer signals a focus area
Compressed start, long deep dive Interviewer probes one hard part Risk of missing a requirement Requirements still unclear
Breadth-first, then iterate Very large system (e.g. a SaaS platform) Needs good time discipline Small, focused problem

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions clarifying requirements as step one Why: Checks that the candidate can actually turn a vague prompt into concrete, testable requirements
    How to answer

    Functional requirements describe what the system does — the user journeys, such as "a patient finds a slot and books it". Non-functional requirements describe how well it does it: performance (latency and throughput), scale, availability, consistency, security, cost and data residency.

    In an interview I spend about five minutes walking the main journey and asking: who are the users and how many; what's the read/write ratio; what latency at p95 and how many requests/s at peak; what availability; which data must never be wrong; any privacy or residency rules. Then I write down assumptions ("10 million users, 100:1 reads to writes, Australia only") and what is out of scope, and confirm them with the interviewer — on a real project, with stakeholders.

    The trade-off: ask too little and you design the wrong system; ask too much and you run out of time to design anything.

  2. When: Candidate mentions back-of-the-envelope estimates Why: Checks that the candidate can do the arithmetic and use it to drive decisions
    How to answer

    A capacity estimate turns user numbers into load. Start with daily active users × actions per user to get requests per day, divide by ~86,400 s (round to 10^5) for average requests/s, then multiply by a peak factor (2–10×, often 3×). For storage, multiply writes per day by record size and 365, then add indexes and replicas. For bandwidth, multiply requests/s by payload size.

    Example: 10M DAU × 20 reads = 200M reads/day ≈ 2,300/s average, ~7,000/s peak.

    The point is not precision — it's deciding whether one database and a cache are enough or you need partitioning. The trade-off is speed versus accuracy: round hard, but state every assumption.

  3. When: Candidate draws a load balancer in front of the services Why: Checks understanding of what the load balancer box actually does
    How to answer

    A load balancer spreads traffic across healthy instances.

    • Layer 4 (TCP/UDP: Azure Load Balancer, AWS NLB, Kubernetes Services via kube-proxy) picks a backend per connection using IPs and ports. Fast, protocol-agnostic, no HTTP awareness.
    • Layer 7 (HTTP: App Gateway, ALB, Front Door, ingress controllers, Envoy, YARP) picks per request, can route by path/host/header, terminate TLS, retry and add headers.

    Health checks remove unhealthy instances (in Kubernetes: readiness for traffic, liveness for restarts). Algorithms: round robin, least connections/requests, hashing. Sticky sessions pin a user to one instance, which hurts scaling and failover. Connection draining stops new traffic to an instance before shutdown so in-flight requests finish.

    gRPC uses long-lived HTTP/2 connections, so an L4 balancer balances connections, not calls: one client connection carries all its calls to one pod. Use L7 balancing (mesh/Envoy) or client-side load balancing.

↩ Usually asked after

More in Core System Design

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me