Sub topic 3
Set scope and write down your assumptions
This chapter assumes you can already list functional and non-functional requirements for a problem, as covered in the previous chapter. It also assumes you know basic client-server architecture. Here you decide what you will and will not design, and you record the numbers and guesses the design rests on.
Why scope comes before design
A requirements list for a real product is usually longer than one design session can cover. If you try to cover all of it, you produce a shallow design that is weak everywhere. Scope is the line you draw around the part you will design well. An assumption is a fact you do not know but will treat as true so the work can continue.
Both go on the page, in writing. A written scope and a written list of assumptions give everyone something to correct. They also let you revise the design later when one assumption turns out to be wrong.
Draw the scope line
Sort each candidate feature into one of three groups.
| Group | Meaning | Example for a short-text posting service |
|---|---|---|
| In scope | You will design it and size it | Create a post, read a post, list a user's posts |
| Deferred | You will mention it and say where it would attach | Search, notifications |
| Out of scope | You will not design it | Billing, moderation tooling, analytics dashboards |
Pick the in-scope items by asking which ones drive the hardest design decisions. A feature that is easy to build and does not change the architecture can usually be deferred.
Turn vague words into numbers
"Many users" and "fast" cannot be used in a calculation. Replace each vague word with a number and a unit. State it as an assumption, not as a fact.
- Daily active users: 10 million.
- Writes per user per day: 5.
- Reads per user per day: 100.
- Record size: 500 bytes.
- Peak traffic: 2 times the average.
- Read latency target: under 200 ms at the 99th percentile.
Keep the assumptions in one place, with a note on where each came from. This small Python structure does that and can be reused in the next chapter's estimate.
ASSUMPTIONS = {
"dau": (10_000_000, "given by the interviewer"),
"writes_per_user_per_day": (5, "guess based on a typical social app"),
"reads_per_user_per_day": (100, "guess, reads dominate writes 20 to 1"),
"record_bytes": (500, "text plus metadata, no media"),
"peak_factor": (2, "common rule of thumb"),
}
for name, (value, source) in ASSUMPTIONS.items():
print(f"{name:26} {value:>12,} ({source})")The source note matters. It tells you which assumptions to ask about first.
Common errors
- Hidden assumptions. You assume media uploads are excluded but never say so. Later the design fails when someone asks about images.
- Unconfirmed numbers. An assumption nobody has seen is only your private guess. Say it aloud and wait for a correction.
- Scope that is too wide. Six features designed in two minutes each is worse than two designed well.
- Scope that is too narrow. Cutting the one feature that creates the hard problem, such as a feed that merges many users' posts, avoids the point of the exercise.
- Treating assumptions as fixed. When a number changes, redo the estimate and check which design choices change with it.
Check your work
Before moving on, check that your scope list has at most a few in-scope features. Every number in your assumptions list should have a unit and a source. Anything you were unsure about should be stated aloud so the other person can correct it.
Exercise
You are asked to design a photo-sharing service. Name one feature you would put in scope, one you would defer, and two numeric assumptions you would write down before estimating capacity.
Show answer
One reasonable answer: in scope is uploading a photo and viewing a user's photo list, because storage and read volume drive the architecture. Defer photo search. Assumptions: 5 million daily active users, and an average stored photo size of 2 MB. Other valid answers work if each number has a unit and each choice is justified by its effect on the design.