DevNotes
Support
System Design Basics · Chapter 01

How to Approach System Design

What system design interviews test, a repeatable step-by-step framework — requirements, estimates, API, data model, high-level design, deep dives and trade-offs — functional vs non-functional requirements, and common mistakes.

◷ 5 min read§ 7 sections? 3 interview questions{ } 0 code examples

#Introduction

System design is deciding how the pieces of a system — clients, services, databases, caches, queues — fit together to meet its requirements at the required scale, reliability and cost.

#What Interviewers Look For

SignalShown by
Clarifying ambiguityAsking about users, scale and priorities before drawing anything
Structured thinkingFollowing a clear process instead of jumping between ideas
BreadthKnowing the building blocks — load balancers, caches, queues, databases, CDNs
DepthGoing deep on one or two components when asked
Trade-offsExplaining why you chose X over Y and what it costs
CommunicationThinking aloud, checking in with the interviewer

#A Repeatable Framework

1 — Clarify requirements: functional and non-functional (about 5 minutes)
2 — Estimate scale: users, QPS, storage, bandwidth (about 5 minutes)
3 — Define the API (about 5 minutes)
4 — Design the data model (about 5 minutes)
5 — Draw the high-level design (10–15 minutes)
6 — Deep-dive the hardest parts (10–15 minutes)
7 — Discuss bottlenecks, failures and trade-offs (about 5 minutes)

Step 1 — Clarify Requirements

Functional requirements — what the system does:

  • "Users can shorten a long URL and get a short link."
  • "Visiting the short link redirects to the original URL."
  • "Links can have an optional expiry date."

Non-functional requirements — how well it does it:

QualityExample question
ScaleHow many users? Requests per second? Data size?
LatencyWhat response time is acceptable — 100 ms? 1 s?
Availability99.9% or 99.99%? Is a short outage acceptable?
ConsistencyMust every reader see the latest write immediately?
DurabilityCan any data ever be lost?
Read/write ratioRead-heavy (social feeds) or write-heavy (logging)?
Security / compliancePersonal data? Payments? Regional data laws?

Step 2 — Estimate Scale

Rough numbers decide the architecture: 10 requests per second fits on one server; 100,000 needs caching, sharding and many instances. See Back-of-the-Envelope Estimation.

Step 3 — Define the API

Text
POST /api/urls            { longUrl, expiresAt? }  →  201 { shortUrl }
GET  /{code}                                        →  301/302 Location: longUrl
GET  /api/urls/{code}/stats                         →  200 { clicks, … }

The API pins down exactly what the system must support.

Step 4 — Design the Data Model

What entities exist, how they're accessed, and which database fits the access patterns:

Text
url_mapping(code PK, long_url, user_id, created_at, expires_at)

Step 5 — High-Level Design

Draw the main components and the request flow:

Clients
Load balancer
Stateless app servers
Cache
Database

Walk through the main use cases on the diagram: "A create request goes to an app server, which generates a code, stores it, and returns the link…"

Step 6 — Deep Dives

Pick the hardest or most interesting parts — often guided by the interviewer:

  • How are short codes generated without collisions?
  • How do we serve 100,000 redirects per second with low latency?
  • How is data partitioned as it grows?
  • What happens when a database node fails?

Step 7 — Bottlenecks and Trade-offs

Identify single points of failure, hot spots and scaling limits, and say how you'd address them — plus what you'd monitor.

#The Building Blocks

The rest of this topic covers each building block:

Building blockPurposeChapter
EstimationSize the problemBack-of-the-Envelope Estimation
Scaling & availabilityGrow and survive failuresScalability & Availability
Load balancerSpread trafficLoad Balancing
Cache, CDNServe reads fastCaching
DatabasesStore data appropriatelySQL vs NoSQL
Replication & shardingScale and protect dataReplication & Sharding
Consistency modelsReason about correctnessCAP & Consistency
Queues & streamsDecouple and smooth loadMessage Queues & Async Processing
Rate limiterProtect the systemRate Limiting
API stylesTalk to clientsAPI Design

And two full worked designs: a URL shortener and a notification system.

#Common Mistakes

  • Jumping straight to a diagram without clarifying requirements.
  • Designing for Google scale when the problem needs 100 requests per second — or ignoring scale entirely.
  • Buzzword stacking — adding Kafka, Kubernetes and five databases without a reason.
  • No trade-offs — every choice has a cost; say what it is.
  • Going silent — the interviewer can't evaluate thinking they can't hear.
  • Ignoring failures — what happens when a node, a region or a dependency fails?

#Interview Questions

Q1How do you start a system design interview?

By clarifying functional and non-functional requirements, agreeing on scope, and estimating scale, before proposing any architecture.

Q2What's the difference between functional and non-functional requirements?

Functional requirements describe what the system does (features); non-functional requirements describe qualities — scale, latency, availability, consistency, durability, security.

Q3Why do back-of-the-envelope estimates matter?

They decide whether you need caching, sharding, queues or many servers at all — and show you understand the magnitude of the problem.

#Key Takeaways

  • System design interviews test structured thinking and trade-offs, not one correct answer.
  • Follow a framework: requirements → estimates → API → data model → high-level design → deep dives → trade-offs.
  • Separate functional from non-functional requirements and agree on scope.
  • Let estimates drive the design; justify every component.
  • Talk through failures, bottlenecks and what you'd monitor.