The interview framework: requirements → API → design → deep dive
Structure any design question into clear phases with time boxes.
By Invicly Tech, , in System Design Deep Dive. About 11 minutes to read.
In short
A system design interview rewards structure more than clever tricks. Move through requirements, estimates, API, high-level design and deep dives, time-boxing each phase so you finish with a complete, defensible design.
Think of it like this: Like an architect: first ask who lives there, then sketch rooms, then detail the plumbing.
Explained simply
A system design interview asks you to design something huge, like YouTube or WhatsApp, in about 45 minutes. Nobody can build that in 45 minutes, so the interviewer is not looking for a perfect answer. They are watching how you think: do you ask good questions, make sensible choices and explain why?
A framework is simply a fixed order of steps you follow every time, like a recipe. When you are nervous, you do not have to invent a plan. You just do the next step: ask questions, agree on the API, draw the big picture, then zoom into the hard parts.
The most common mistake is drawing boxes straight away. If you do not know whether the app has a thousand users or a billion, you cannot know whether you need one database or fifty. Five minutes of questions at the start stops you from designing the wrong system.
Treat the interview as a conversation, not an exam. Think out loud, check in with the interviewer, and treat their hints as gifts. Every time you pick something, say what you gave up to get it. That one habit separates strong candidates from average ones.
Press Play on a diagram to walk through it one step at a time.
- 1Requirements
Functional and non-functional needs, about 5 minutes
- 2Estimates
QPS, storage and bandwidth, a few minutes
- 3API
Key endpoints with inputs and outputs
- 4High-level design
Boxes and arrows for the main request path
- 5Deep dive
Bottlenecks, scaling and failure handling
- 6Wrap up
Summarise trade-offs and future improvements
- What the system does
- Users can post a photo
- Users can follow others
- Defines the API
- How well it does it
- p99 latency under 200 ms
- 99.99% availability
- Drives the architecture
- Users and features
- Who uses it?
- Which 2–3 features matter most?
- What is out of scope?
- Scale
- Daily active users?
- Reads per write?
- Data created per action?
- Performance
- Latency target?
- Peak traffic pattern?
- Data rules
- Can data ever be lost?
- Is stale data OK for a few seconds?
- 1Name the problem
"Reads will overload the database"
- 2Offer two options
Cache vs read replicas
- 3Pick one with a reason
Tie it to a requirement or number
- 4State the cost
Stale data, extra moving parts
- 5Check in
Ask if the interviewer agrees, then move on
- Back to step 1
In depth
Asking questions that change the design
Good questions are ones whose answers would change what you draw. "Which colour is the button?" changes nothing. "Do messages need to arrive in order?" changes a lot.
Aim for three groups. First, features: pick the two or three that matter most and say the rest is out of scope. Second, scale: users per day, how often they read versus write, and how much data each action creates. Third, qualities: how fast it must feel, whether data can ever be lost, and whether slightly stale data is acceptable.
Write the answers on the board. You will point back at them later to justify choices.
- Features: what are the 2–3 must-haves?
- Scale: daily users, reads vs writes, data size
- Speed: what latency feels acceptable?
- Correctness: can we lose data or show stale data?
- Scope: what are we explicitly not building?
Turning features into an API
Each core feature usually becomes one or two API endpoints. Writing them down forces you to decide what goes in and what comes out, and it quietly reveals your data model.
For a photo app, "upload a photo" becomes POST /photos with the image and a caption, returning a photo ID. "See my feed" becomes GET /feed with a cursor, returning a page of photos. Now you know you need a photos table, a way to build feeds and somewhere to store image bytes. Keep it short: five endpoints are plenty for an interview.
- Upload a photo
- POST /photos
- Image + caption in, photo ID out
- See my feed
- GET /feed with a cursor
- Returns a page of photos
- What it reveals
- A photos table
- A way to build feeds
- Storage for image bytes
The first drawing should be boring
Start with the simplest design that actually works end to end: client, load balancer, one service, one database. Then walk one real request through it out loud, for example "a user opens their feed". If the walk-through works, you have a baseline.
Only then improve it, using the numbers you gathered earlier. Reads are 100 times writes? Add a cache. Images are large? Move them to object storage behind a CDN. Each addition now has a clear reason, which is exactly what interviewers want to hear.
- 1Baseline
Client, load balancer, one service, one database
- 2Walk one request
"A user opens their feed"
- 3Reads 100x writes?
Add a cache
- 4Large images?
Object storage behind a CDN
- 5Each box has a reason
Tied to an estimate
Choosing what to deep dive
You will not have time to perfect everything, so choose one or two areas. The best choice is the real bottleneck shown by your estimates: the hottest read path, the biggest data store or the trickiest consistency need. If unsure, ask: "I could go deeper on feed generation or on storage. Which would you prefer?"
Common deep dives are hot keys, cache invalidation, sharding the database, handling failures and keeping two copies of data in sync.
Managing a 45-minute clock
A rough budget keeps you honest: about 5 minutes for requirements, 5 for estimates and the API, 10 to 15 for the high-level design, 15 for deep dives and the last 3 to 5 for a summary. Glance at the clock at the 15 and 30 minute marks.
If you are behind, say so and simplify: "To save time, I will assume a managed database here." Finishing a complete, simple design beats half of a brilliant one.
Learn it in 4 short steps
About 30m each. Track them with a timer in your plan.
- 1Clarify functional and non-functional requirements~30m
- 2Define the API~30m
- 3Draw the high-level design~30m
- 4Deep dive into bottlenecks and time-box each phase~30m
Key points
- Spend the first minutes clarifying scope; never start drawing before you know the requirements.
- Non-functional requirements like latency, scale and consistency decide most architecture choices.
- Draw a simple working design first, then improve its bottlenecks.
- Always state trade-offs explicitly; there is rarely one correct answer.
Key terms
Tap a card to flip it. 0/5 known
Examples
Prompt: Design Instagram
Functional: upload photo, follow user, view feed
Non-functional: 500M DAU, feed p99 < 200 ms,
high availability, eventual consistency OK
API:
POST /photos -> photoId
POST /users/{id}/follow
GET /feed?cursor=... -> photos[], nextCursor
High-level: client -> LB -> API -> cache -> DB
photos -> object storage + CDNA requirements and API sketch before drawing boxes.
The first ten minutes of "Design Pastebin"
Step 1, features: users paste text and get a link; anyone with the link can read it; pastes can expire. Editing and accounts are out of scope. Step 2, scale: assume 1 million new pastes a day and 10 reads per paste, so reads matter most. Step 3, qualities: reads should feel instant, pastes must never be lost, and a few seconds of delay before a new paste is readable is fine. Step 4, API: two endpoints. Step 5, first drawing: client → load balancer → paste service → database, with large text stored in object storage.
Functional: create paste, read paste by link, optional expiry
Out of scope: accounts, editing, search
Scale: 1M writes/day (~12/s), 10M reads/day (~120/s)
Qualities: fast reads, durable, eventual consistency OK
API:
POST /pastes { text, expiresIn } -> 201 { id, url }
GET /pastes/{id} -> 200 { text } | 404
Design v1: client -> LB -> paste service -> DB (metadata)
-> object storage (text)Saying a trade-off out loud
The interviewer asks why you added a cache in front of the Pastebin database. A weak answer is "caches make things fast". A strong answer follows a pattern: problem, choice, reason, cost. "Reads are ten times writes and popular pastes are read again and again. I put Redis in front of the database so most reads take about a millisecond and the database stays calm. The cost is that a deleted paste may still be served for up to the cache expiry time, which I would set to five minutes. That is acceptable here because we agreed slight staleness is fine."
Quick reference
- Order: requirements → estimates → API → high-level design → deep dive → wrap up
- Pick 2–3 core features and say out loud what is out of scope
- Ask: daily users, reads per write, latency target, can data be stale or lost?
- One core feature ≈ one endpoint; write its inputs and outputs
- Draw the simplest working design first, then fix bottlenecks with numbers
- Trade-off pattern: "I chose X because Y; the cost is Z, which is fine because W"
- Check the clock at 15 and 30 minutes; finish a full design before polishing
Common mistakes
- Jumping into databases and caches before agreeing on requirements.
- Spending 30 minutes on one component and never finishing the design.
- Naming technologies without explaining why they fit.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Write the functional requirements, non-functional requirements and out-of-scope list for "Design a to-do list app for teams".
- Exercise 2medium
Write the API for a photo-sharing app with three features: upload a photo, follow a user, view your feed. Include inputs, outputs and status codes.
- Exercise 3hard
Do a full timed 45-minute design of a Pastebin on paper. Set phone timers at 5, 15, 30 and 40 minutes. Afterwards write a five-line wrap-up of your design and its trade-offs.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Is there one correct answer to a system design question?
- No. Several designs can be good. You are judged on whether your choices fit the requirements and whether you can explain their costs.
- What if the interviewer mentions a tool I do not know?
- Say so honestly and ask what it does, or describe the job it does in general terms, like "a distributed log". Reasoning clearly matters more than knowing every product.
- Should I start with microservices?
- Usually not. Start with a few clear components and split only when a part has different scaling or ownership needs. Interviewers like seeing that you avoid needless complexity.
- How much should I talk?
- Almost all the time, but in short sentences. Narrate what you are doing and why, and pause regularly to let the interviewer steer.