Design Method & StylesChapter 16 · Draw it
High-level design
High-level design
The high-level design is the first whole picture — the boxes a request passes through (client, CDN, load balancer, stateless app servers, cache, database, queue and workers, object storage) and the arrows between them. Draw it from the requirements, not from a template. Walk one read and one write through it, point to where each non-functional requirement is met, and mark the parts you'd go deeper on. Every box should answer to a requirement or a number.
- Use when
- After the API and the data model, around the middle of a 45-minute interview · As the map you come back to for each deep dive · Explaining an existing system to a new team
- Avoid when
- Before requirements and estimates — the boxes will be guesses · As the place to settle every edge case — park them as deep-dive hooks
- Trade-offs
- Each box added is one more thing to run, secure and monitor, so each has to earn its place against a requirement · A queued arrow shortens the user's wait and absorbs bursts, at the cost of results that arrive later and a separate path for any reply · A cache cuts read latency and database load, and brings stale data to reason about
- Requires
- Data model
3 objectives · 5 misconceptions
- explain Explain a design by walking one read and one write through every box, saying what each box does for that request.
- choose Choose which components a design needs — cache, queue, CDN, replicas, object storage — by pointing each at the requirement or estimate it serves, and leave out the ones that serve none.
- predict Predict which box breaks first as the numbers grow, and mark it as the deep-dive candidate instead of solving everything up front.
- Not true: There is a standard diagram that fits every prompt — draw it from memory.
- Not true: Drawing a box — a cache, a queue — solves the problem it is named after.
- Not true: The high-level design should already handle every failure and every scale case.
- Not true: All arrows are the same — every call waits for its answer.
- Not true: Putting a load balancer in front makes the whole system scale.
Practice
No katas practise this yet.