Text size
2. Requirements
Time: 5 min · Output: 3 functional requirements, 3–5 quantified non-functional requirements, an out-of-scope list
← Back to the framework · ← Understand · Next: Estimation →
Read the prompt for clues
The prompt is short on purpose. Each phrase hints at a requirement, a quality to ask about, or both. For example, in the URL shortener prompt:
| Phrase in the prompt | Question it raises |
|---|---|
| "like Bitly" | How many links a day, and how many clicks? |
| "paste a long URL and get a short link" | Can users choose the code? Does it expire? |
| "Anyone who opens the short link" | How fast must a redirect be, and what if it's down? |
| "Link owners want to know" | How does the system know who owns a link? |
The requirements come from questions you ask yourself. Propose the answers out loud and let the interviewer confirm them. Some will repeat the questions you asked in step 1; here, each answer becomes a requirement.
Re-read the prompt before moving on. Everything it names ends up in a requirement or in out of scope.
Functional requirements
What users can do. Technique: walk through the user journey.
- Pick a user and narrate each step as a question: "I do X. What do I see?" or "What happens?"
- Do it for each kind of user (the person who makes a link and the person who clicks it), and include the step where they come back later.
- Each answer is a candidate requirement. Write them as "Users can …".
- Keep the top 3. Each one becomes at least one API endpoint and one path through the diagram, so every extra requirement costs time you need later. Park the rest under out of scope.
Example (URL shortener; see the questions behind it):
- Users can create a short URL from a long URL, optionally with a custom alias and an expiry date.
- Users can open a short URL and be redirected to the original.
- Users can see how many clicks their link got.
Non-functional requirements
How well it must work. Technique: ask "how well?" for each quality. Pick the 3–5 that matter for this system, and put a number on each.
The questions in this table are a starting point. Rewrite each one in the system's own terms: "How many users?" becomes "How many fans watch a final at the same time?"
| Quality | Question to ask | Vague | Concrete |
|---|---|---|---|
| Scale | How many users, requests, how much data? | "Handles lots of traffic" | "100M new URLs/month, 1B redirects/day" |
| Latency | Which operation, which percentile? | "Fast" | "Redirect p99 < 100 ms" |
| Availability | What happens when it's down? | "Highly available" | "99.99% for redirects; link creation can degrade" |
| Consistency | What goes wrong if a read is stale? | "Consistent" | "Short codes must be unique; click counts may lag a few minutes" |
| Durability | Can we ever lose data? | "Reliable" | "A link is never lost before it expires" |
| Ordering | Does order matter, and per what? | "In order" | "Messages ordered per chat, not globally" |
| Abuse | Who might misuse it? | "Secure" | "Block known-malicious URLs; rate-limit creation per user" |
| Dependency | What if an outside service is slow or down? | "Relies on the provider" | "If the feed stops, show the last known score, marked as delayed" |
| Cost | Is there a budget? | — | "LLM cost under $X per 1,000 requests" |
A reason to ask about a quality can come from the prompt, from the system's shape (step 1), or from the domain: a public link service attracts abuse whether the prompt says so or not. Skip a quality with no reason, and say why in one line.
The same quality turns into a different question in each design:
| Quality | URL shortener | Live soccer dashboard |
|---|---|---|
| Latency | How fast must a redirect be? | How long between a real goal and the fan seeing it? |
| Ordering | Not needed: no events whose order matters | Can a card show up before the goal that came first? |
| Dependency | Not needed: no outside service supplies the data | What if the match data provider is slow or down? |
Consistency per feature, not per system
CAP: during a network partition, a distributed system must choose between consistency (every read sees the latest write) and availability (every request gets an answer). Make that choice for each feature:
| Feature | Choice | Why |
|---|---|---|
| Seat booking, payments, unique usernames | Strong | A stale read means double-booking or duplicates |
| Feeds, likes, view counts, search index | Eventual | A few seconds of staleness hurts nobody |
PACELC adds the everyday case: even without a partition, you trade latency against consistency. That's why reading from a replica is faster but can return stale data.
Ordering is not strong consistency
You can guarantee order per entity (per chat, per match, per account) and still choose availability. The usual tools:
- Partition by the entity ID, so one entity's events go through one ordered partition.
- Attach a sequence number, so clients can drop or reorder late events.
Out of scope
Say it out loud: "I'll leave out account management, admin tools and analytics dashboards unless you want them." The interviewer can pull something back in. Saying nothing makes it look like you forgot.
Mistakes to avoid
- Asking the same generic questions for every design.
- Vague NFRs like "scalable, available, fast". Each needs a number and an operation.
- A long list of functional requirements you won't have time to design.
- Choosing strong consistency everywhere "to be safe". It costs latency and availability.