0% completed
The First Ten Minutes
On This Page
Part 1: A Vague Question Is the Test
Part 2: Two Kinds of Requirements
Part 3: Questions That Change the Design
Part 4: How Stale Can This Be?
Part 5: Stating Assumptions Out Loud
Part 6: Saying the Scope Back
Part 7: Turning Answers Into Numbers
Part 8: Using This in an Interview
Common Mistakes
Key Takeaways
"Design a leaderboard for a mobile game."
How many players does the game have? How often do new scores arrive? Must a new score appear on the board at once, or is a minute late acceptable? Is there one board for the whole world, or one per country or per week?
The question answers none of these, and each answer could change the design. Finding the facts that decide the design is the first thing the round measures. This lesson shows how to turn one vague sentence, in ten minutes, into clear requirements, stated assumptions, and an agreed scope.
Part 1: A Vague Question Is the Test
The running example is the leaderboard from the opening. A leaderboard is a list of players ranked by score. The game in this lesson shows the top 100 players, and it also tells each player their own rank.
The question leaves out almost every fact that would decide the design, and it does so on purpose. The interviewer wants to see whether you find the missing facts or design without them. This is the first of the four signals from the previous lesson, scoping under ambiguity.
On a common 45-minute clock, scoping takes minutes 0 to 7, and the key numbers take minutes 7 to 10. The diagram below shows how this lesson divides those ten minutes into four steps.
Notice the line under the steps: every answer should show up later as the reason for a choice. Candidates often waste these minutes in one of two ways. Some start drawing at once, so every choice rests on a guess. Others ask fifteen questions and never use the answers. Parts 2 to 7 follow the four steps in order.
Part 2: Two Kinds of Requirements
The first step is to confirm what the leaderboard must do. A requirement is a condition the design must meet, and requirements come in two kinds.
A functional requirement says what the system does, as an action a user or another system can take. The leaderboard has three:
- A finished game submits a score.
- Any player can view the top 100.
- Any player can view their own rank.
A non-functional requirement says how well the system must do it. It is usually a number about load, speed, freshness, or availability. Examples are the scores per second at the busiest time and how stale the rankings may be. Stale data is data that was correct a short time ago but may have changed since. The diagram below places the two kinds side by side.
Notice what the left side cannot do. A system that ranks the scores once an hour delivers all three features. So does a system that updates the ranking on every score. A feature list rules nothing out, and the numbers decide which design survives. For this reason, confirm the features in about a minute, and spend the rest of the time on the numbers.
Part 3: Questions That Change the Design
The second step is to ask for those numbers. As the previous lesson said, a good scoping question has one property: the design would differ depending on the answer. The table below lists four questions that usually pass this test.
| Question | What the answer decides |
|---|---|
| How many scores arrive in the busiest minute? | Whether one machine can take every write |
| How many reads are there for each write? | Whether reads or writes hold the hard part |
| How stale can the rankings be? | Whether to use caching, copies of the data, and background work |
| What happens if the leaderboard is down? | How much to spend on keeping it running |
Candidates ask the first two often. The third is asked the least, yet it decides the most. Part 4 shows why.
Part 4: How Stale Can This Be?
The third question decides so much because three common design tools gain speed by giving up freshness:
- Caching keeps a copy of a result so it can be served again without computing it. The copy can be out of date.
- Replication keeps copies of the data on more than one machine. A copy can lag behind the main machine for a short time.
- Asynchronous processing accepts a request now and does the work a little later, often through a queue.
Used this way, each tool is safe only if some staleness is allowed. One answer therefore decides all three at once. The diagram below shows how two answers lead to two different leaderboards.
If a minute of staleness is fine, the design is simple. Scores go into a queue and are saved in the background. Once a minute, a job computes the top 100 and caches it, so every view is a cheap lookup. Rank lookups can go to copies of the database, called replicas.
If the rankings must be exact at every moment, those tools no longer fit. Each score must update the ranking before the request returns, and reads must come from up-to-date data. A common design keeps a sorted set in memory, which is a structure that keeps its entries in score order as they change. Scores are also saved to a database, so a restart does not lose them.
Notice that the features did not change. Only the tolerance for staleness changed, and the two designs are built very differently.
Part 5: Stating Assumptions Out Loud
The third step is to state assumptions and say the scope back. Sometimes the interviewer does not answer a question like the one in Part 4, and says "What do you think?" instead. Then you make an assumption. An assumption is a fact you choose to treat as true so the design can proceed. Stating one well takes three steps.
Step 1: Name the value. "I am assuming the rankings can be up to a minute old."
Step 2: Name the other case. "If they had to be exact at every moment instead..."
Step 3: Name what would change. "...I would drop the cache and the queue, and update a sorted set on every score."
The form is short: "I am assuming X. If it were Y instead, I would change Z." The second half shows what the design rests on.
Compare three weaker forms:
- "I'll assume 10 million users" shows nothing that depends on the value.
- "I'll design for the largest scale I can imagine" is over-building, which weakens the judgment signal.
- "I'll come back to the numbers later" is fine once. As a habit, it leaves the design without limits.
A stated assumption also protects you. If the interviewer later changes the fact, you have already said what you would change.
Part 6: Saying the Scope Back
The scoping minutes end with the second half of the third step. You give a short summary of what you will build and what you will not, and then you ask the interviewer to confirm it.
"I'll design score submission, the top 100, and each player's own rank, for about 5 million players a day. I'm assuming the rankings can be up to a minute old. I'll leave out friend leaderboards, weekly resets, and cheat detection. Does that match what you had in mind?"
Naming what is out matters more than it seems. If you never mention cheat detection, the interviewer cannot tell whether you chose to leave it out or forgot it. Saying it turns the omission into a decision. The interviewer may still bring it back in later, to see how you handle it.
Each part you add later should trace back to something in the agreed scope.
Part 7: Turning Answers Into Numbers
With the scope agreed, the fourth step begins. Minutes 7 to 10 turn the answers into the one or two rough numbers that decide the design. These numbers are examples.
Assume 5 million players a day, each finishing about ten games. That is 50 million scores a day. A day has about 86,400 seconds, so the average is about 600 scores a second. If the busiest hour runs at five times the average, the peak is about 3,000 a second.
A single machine holding a sorted set in memory can usually take tens of thousands of updates a second. Raw write volume is therefore not the hard part of this design. The staleness answer from Part 4 is. Stop estimating once the numbers have decided something.
Part 8: Using This in an Interview
The four steps are easier to follow when the interviewer knows they are coming. A short plan at the start tells the interviewer what the first minutes are for.
"Before I draw, I'd like a few minutes on requirements: the main actions, then load and freshness. Where you would rather I decide, I'll state an assumption and what would change it."
When told "Just pick some numbers," pick them, and attach a consequence to the one that matters most. When told "Actually, the rankings must be exact," do not defend the old design. The cache and the queue go, and every score updates the sorted set directly. This is the change you named when you stated the assumption in Part 5.
Common Mistakes
Mistake 1: Collecting answers you never use. Each answer should appear later as the reason for a choice. An answer you never use shows no scoping.
Mistake 2: Listing every feature. More features do not narrow the design. Confirm the core actions, then move to the numbers.
Mistake 3: Assuming in silence. An assumption you never said cannot be scored, and the interviewer cannot correct it.
Key Takeaways
- Functional requirements set the scope, and non-functional requirements choose the design. A feature list on its own rules nothing out.
- Ask only questions whose answers change the design. Load, the mix of reads and writes, staleness, and availability usually qualify.
- "How stale can this be?" decides the most and is asked the least. Its answer governs caching, replication, and asynchronous processing at once.
- State each assumption with its consequence. "I am assuming X. If it were Y instead, I would change Z."
- In a system design interview, end the opening by saying the scope back, including what is out, and get agreement before you draw.
The next lesson, From Correct to Right, shows how team size, timeline, and budget decide between designs that all meet the requirements.
Surbhi Rastogi
· 9 days ago
Often core requirements are something the candidate has to deduce, and in order to that its important to understand the user journeys on an ambiguous problem statement, extract all requirements and then confirm the core requirements; which might take more than 10 minutes.
Reading Progress
0%
On This Page
Part 1: A Vague Question Is the Test
Part 2: Two Kinds of Requirements
Part 3: Questions That Change the Design
Part 4: How Stale Can This Be?
Part 5: Stating Assumptions Out Loud
Part 6: Saying the Scope Back
Part 7: Turning Answers Into Numbers
Part 8: Using This in an Interview
Common Mistakes
Key Takeaways