Six steps for any design question, sized for a 45-minute interview. It is built to fix the three pieces of feedback candidates hear most: didn't clarify, didn't ask, didn't know the basics. Every design problem on AlgoRung is walked through in this order.
LListen and clarify
AAsk about scale
DDefine the API and data
DDraw the high-level design
EExpand the hard part
RReview trade-offs
L
1. Listen and clarify
About 3 min
Repeat the problem in one sentence. Fix the scope: which features are in, which are out.
Ask the interviewer
Is this for one region or global?
Do we need X, or just the core flow?
Who are the users: consumers or internal teams?
They will ask you
Why did you leave that out?
A
2. Ask about scale
About 4 min
Get the numbers: users, requests per second, data size, read/write ratio. Do back-of-the-envelope math out loud, but only where the numbers change the design.
Ask the interviewer
How many daily active users?
Reads vs writes?
How long do we keep data?
They will ask you
So how many servers is that?
What is the storage per year?
D
3. Define the API and data
About 5 min
Write the 3 to 5 core endpoints and the main records. Pick SQL or NoSQL and say why.
Ask the interviewer
Is strong consistency required here, or is a few seconds of lag fine?
They will ask you
What is the primary key?
How do you paginate?
D
4. Draw the high-level design
About 8 min
The simplest system that works: client, load balancer, service, database, cache. Trace one request end to end.
Ask the interviewer
Is this the shape you had in mind, or should I go deeper on one part?
They will ask you
What happens when the database goes down?
E
5. Expand the hard part
About 15 min
Pick the one or two hardest requirements and go deep: sharding, fan-out, consistency, hot keys. This is where the score is decided.
Ask the interviewer
Which part matters most to you: latency, consistency or cost?
They will ask you
How does this behave at 10x?
Where is the single point of failure?
R
6. Review trade-offs
About 5 min
Name what you traded away, the failure modes, how you would monitor it, and what you would do next.
Ask the interviewer
Anything you would like me to revisit?
They will ask you
Why not X instead?
Three rules that go with it
Never draw before you ask. The first five minutes are questions. Every clarifying question in our walkthroughs is written on the page with the answer it got.
Say the trade-off before the interviewer asks. Every component you add gets one sentence: what it costs.
Depth beats width. One hard part explained well scores more than ten boxes. Senior candidates are expected to find the hard part themselves; mid-level candidates can let the interviewer point to it.
The 45-minute checklist
The 25 questions interviewers ask most
Each one links to the concept episode that answers it. Episodes marked "coming" are on the way, one a day.