# Functional and Non-Functional Requirements — System Design Interview Prep

Source: https://www.skillbyai.com/en/system-design-interview/f-reqs

> Turn a vague prompt into a spec.

## Ask, then write it down

**Functional requirements** are what the system does (create a short link, redirect, show analytics). **Non-functional requirements** are qualities: scale (users, requests per second), latency targets, availability, consistency needs, durability, security and cost. Ask about read/write ratio, data retention, global users and which features are out of scope. Write the agreed list on the board; it justifies every later decision.

## Example: "Design a URL shortener"

Questions and the resulting assumptions.

```text
Q: custom aliases? expiry? analytics?      -> custom alias yes, expiry optional, basic click counts
Q: how many new links per day?             -> ~10 million
Q: read/write ratio?                       -> ~100:1 (redirects dominate)
Q: latency target for redirect?            -> p99 < 50 ms
Q: availability vs consistency?            -> redirects must be highly available;
                                              a new link visible within seconds is fine
Out of scope: user accounts UI, spam detection (mention as follow-up)
```

## State assumptions when unsure

If the interviewer says "you decide", pick a sensible number, say it aloud and move on.

**Quiz:** Which is a non-functional requirement?

- [ ] Links can expire
- [ ] Users can create short links
- [ ] Users can set a custom alias
- [x] Redirects must have p99 latency under 50 ms

*Answer:* Redirects must have p99 latency under 50 ms. Qualities, not features.
