The Complete System Design Interview Framework
A step-by-step structure for any system design question: requirements, estimation, API, data model, high-level design, deep dives and trade-offs, with a time plan and a reference of building blocks.
The previous twenty-nine articles in this series covered individual systems and concepts. This final article puts them into a single structure that can be applied to any system design question, including ones you have never seen.
A system design interview is not a test of whether you reach one correct architecture; there is none. It evaluates how you reason: whether you clarify the problem, make sensible assumptions, compare options and explain your decisions. The most common way to fail is poor time management, such as spending thirty minutes on a detailed database schema and never reaching the overall design. A framework prevents that.
The framework at a glance
For a 45-minute interview, the following allocation works well. The exact minutes are a guide; the order matters more.
Step What Time Output --------------------------------------------------------------------------------- 1 Requirements (functional, non-func.) ~5 min agreed feature list, scope, constraints 2 Estimation ~3 min QPS, storage, read/write ratio 3 API design ~4 min 3-5 core endpoints 4 Data model ~4 min main entities, keys, database choice 5 High-level design ~10 min diagram covering every requirement 6 Deep dives ~12 min 2-3 hard problems solved in detail 7 Trade-offs, bottlenecks, wrap-up ~5 min failure handling, limits, summary
Step 1: Requirements
Begin by asking questions. List the functional requirements, meaning the three or four core features, and propose what to leave out of scope. Then establish the non-functional requirements: the number of users, the expected latency, the availability target, whether consistency or availability is more important, and whether data loss is tolerable.
Finish this step by stating the summary aloud and getting agreement. Everything that follows will be justified by reference to these requirements. Day 4 of this series covers this step in detail.
Step 2: Estimation
Turn the requirements into approximate numbers: requests per second for reads and writes, storage per year, and bandwidth if media is involved. Use round numbers and say each assumption. The goal is to learn the scale and the read-to-write ratio, and to draw a conclusion from them, such as 'this is read-heavy at about 10,000 requests per second, so caching and replicas will be central'. Keep it to a few minutes. Day 10 covers the method.
Step 3: API design
Define the main endpoints: the method, the path, the important request fields and the response. Three to five endpoints are enough. This step makes the functional requirements concrete and often reveals questions that were missed, for example whether a list needs pagination or whether a create operation must be idempotent. Day 26 covers API conventions.
Step 4: Data model
List the main entities, their key fields and how they relate. Identify the primary access patterns, meaning the queries that will run most often, and choose the type of database for each kind of data with a reason: relational where transactions and relationships matter, a key-value or wide-column store for simple high-volume access, object storage for large files. Mention the partition key if the data will be sharded.
Keep this at the right level of detail. The entities, keys and database choice are needed; every column and index is not. Spending the interview on an exhaustive schema is the classic time-management mistake.
Step 5: High-level design
Draw the end-to-end architecture: clients, load balancer or API gateway, application services, databases, caches, queues, and external systems. Start with the simplest design that satisfies the functional requirements, then walk through each core use case from the client to the data store and back, explaining what each component does.
Make sure every functional requirement from step 1 is covered by the diagram before going deeper. A complete simple design is worth more than a partial sophisticated one. Then improve it where the non-functional requirements demand: add a cache for read load, a queue for slow or spiky work, replicas for availability.
Clients (web / mobile)
|
CDN (static content, media)
|
Load balancer / API gateway (TLS, auth, rate limiting)
|
Stateless application services ----> Cache (Redis)
| |
| +--> Message queue --> Workers (async jobs, notifications, fan-out)
v
Primary database (leader) --> Read replicas Object storage (files, images, video)
|
Shards (when one database is not enough)
Around everything: monitoring, logging, alertingStep 6: Deep dives
This is where most of the evaluation happens. Choose the two or three hardest parts of the system and examine them in detail. Often the interviewer will direct you; if not, propose the areas yourself. The hard part is usually different for each system, which is what the design articles in this series were about.
- URL shortener: unique ID generation without collisions.
- News feed: fan-out and the celebrity problem.
- Chat: message delivery, ordering and offline users.
- Flash sale and cab booking: race conditions and atomic operations.
- Payments: idempotency, uncertain states and reconciliation.
- Video streaming: transcoding, chunking and CDN delivery.
- Any system: what happens when a component fails, and what happens at ten times the load.
Step 7: Trade-offs, bottlenecks and wrap-up
Close by reviewing the design critically. Identify single points of failure and how each is removed. Name the bottleneck that would appear first as traffic grows. State the main trade-offs you made, for example accepting eventual consistency in the feed in exchange for speed and availability. Mention monitoring: which metrics and alerts would show that the system is healthy. If time remains, say what you would add next. Then summarise the design in three or four sentences.
Think aloud
The interviewer can evaluate only what is said. Silent thinking followed by a finished diagram hides the reasoning, which is the thing being assessed. Explain what you are considering, which options exist and why you choose one.
A useful habit is to attach 'because' to every decision. Not 'I will use Redis', but 'I will use Redis here because the feed is read a hundred times more often than it is written and we need responses under 200 milliseconds'. Not 'I will use Kafka', but 'I will put a queue here because sending the notification is slow and should not delay the response'. A decision without a reason is a guess; a decision with a reason linked to a requirement is engineering.
When the requirements change
Interviewers often change the problem midway: the traffic is now ten times higher, or the system must work across regions, or a new feature is required. This is not a sign that your design was wrong. It tests whether you can adapt.
Respond by identifying which part of the design is affected and what breaks first under the new condition, then adjust that part. If traffic grows tenfold, which component saturates first: the database writes, the cache memory, a single queue partition? Address that component and explain the consequence. Avoid starting again from the beginning, and avoid defending the original design as if it must not change.
A reference of building blocks
Most designs are assembled from the same components. Knowing which problem each one solves makes it quick to choose.
Problem Building block ------------------------------------------------------------------------------- One server is not enough horizontal scaling + load balancer Read-heavy, repeated reads cache, read replicas, CDN Write-heavy, bursts message queue, batching, LSM-based store Too much data for one database sharding, consistent hashing Slow work inside a request asynchronous processing with workers Users far from the servers CDN, multi-region deployment Large files object storage + CDN, chunked upload Server must push to client WebSocket or Server-Sent Events Concurrent updates to one resource atomic operation, lock with TTL, transaction Retries and duplicates idempotency keys, deduplication Component failure replication, failover, health checks Abuse or overload rate limiting, backpressure, circuit breaker Nearby search geohash or quadtree Prefix search trie with precomputed results Ranking by score sorted set Unique IDs across servers Snowflake-style ID generator Transaction across services saga with compensating actions
Common mistakes
- Starting to design without asking about requirements.
- Going deep on one area, such as the database schema, before the whole system is outlined.
- Naming technologies without giving a reason for them.
- Designing for extreme scale that the requirements never asked for.
- Ignoring failures: no mention of what happens when a server, cache or database is down.
- Working in silence, or not listening to the interviewer's hints.
- Presenting a design as perfect instead of acknowledging its trade-offs.
Interview summary
- Requirements first: features, scale, consistency versus availability, scope.
- Estimate briefly to find the scale and the read-to-write ratio.
- Define the API and the data model at the right level of detail.
- Draw a complete high-level design before going deep.
- Deep dive into two or three hard problems, then close with trade-offs and failure handling.
- Think aloud, and give a 'because' for every decision.
Summary
Every system design answer follows the same path: requirements, estimation, API, data model, high-level design, deep dives and trade-offs. Manage the time so that the whole system is covered before any one part is explored in depth, explain the reasoning behind each choice, and treat changed requirements as a prompt to adapt. With this structure and the building blocks from this series, an unfamiliar question becomes a matter of applying known ideas in a clear order.
Puneet Tiwari
Full Stack Developer
