Part 02
System Design Fundamentals, Requirements and Estimation
Turn a vague problem into measurable requirements and traffic estimates.
Part context
Designing without requirements is the most common beginner failure; this part exists to prevent it.
2.1 What System Design Is
Chapter outcomes and context
Topics covered: 11 Introduction to system design (Core) · 12 High-level design (Core) · 13 Low-level design (Core) · 14 Software architecture fundamentals (Core)
Learning outcomes
- Define system design: translating requirements into an architecture of components, data, and interactions that meets functional and quality goals under constraints.
- Distinguish HLD (components, data flow, technology choices, deployment topology) from LLD (classes, interfaces, schemas, algorithms within a component), and know which audience each serves.
- Define software architecture as the set of significant decisions that are expensive to change later — the cost-of-change curve drives everything in this book.
Key concepts: components, interfaces, data flow, abstraction levels, architecture vs. design vs. implementation.
2.2 Requirements
Chapter outcomes and context
Topics covered: 15 Functional requirements (Core) · 16 Non-functional requirements and quality attributes: scalability, availability, reliability, latency, measurable acceptance criteria (Core) · 17 Business requirements: stakeholders, priorities, constraints, assumptions (Core) · 18 Use cases and user workflows (Core)
Learning outcomes
- Extract functional requirements (what the system does) from a vague problem statement by asking clarifying questions.
- Define the quality attributes precisely and write each as a measurable acceptance
criterion — a target someone could test:
- Scalability — handling increased load by adding resources.
- Availability — fraction of time the system is usable; 99.9% ≈ 8.8 hours of downtime per year, 99.99% ≈ 53 minutes.
- Reliability — probability of correct operation over a period.
- Latency — p50/p99 response-time targets (deep treatment → 100).
- Map the stakeholders and their priorities — requirements conflict because people's goals do; capture constraints (budget, deadline, team, compliance, systems that must stay) and state assumptions explicitly, marking which would change the design if wrong.
- Write use cases and user workflows that drive the design, including the unhappy paths.
Pitfall: quality attributes conflict — strong consistency vs. availability vs. latency. Naming the conflict is the start of the design, not the end.
Exercise: Merge what you produced in the practices of topics 15–18 into a single one-page requirements document for the same system, and mark every line that is not yet testable — each mark names the topic to revisit.
2.3 Estimation and Workload Modeling
Chapter outcomes and context
Topics covered: 19 Latency numbers every engineer should know (Core) · 20 Estimation and workload modeling: read/write ratio, QPS, peak and burst traffic, concurrent users, storage, bandwidth, user geography (Core)
Learning outcomes
- Keep a working latency table (orders of magnitude): L1 cache ~1 ns, RAM ~100 ns, SSD read ~100 µs, datacenter round trip ~0.5 ms, cross-continent round trip ~100+ ms, disk seek ~10 ms. Exact figures vary by hardware; the ratios drive design.
- Model the workload, not just the average: DAU → QPS with a peak factor and burst shape; read/write ratio; storage growth per year; bandwidth; concurrent users via Little's Law (→ 101); user geography (where the users are decides where the system lives → 94, 142).
- Show the arithmetic and state every assumption — an estimate without assumptions is a guess.
Boundary: this topic is estimation at design time. Ongoing capacity planning for a running system is topic 102.
2.4 Trade-offs and Method
Chapter outcomes and context
Topics covered: 21 Architectural trade-offs and decision-making (Core) · 22 System design methodology (Core)
Learning outcomes
- Make trade-offs deliberately: for each significant decision, record the options considered, the choice, and the consequences — the ADR practice (→ 57) formalizes this.
- Apply the 21-step method used by every project (
projects/_methodology.md): business problem → requirements → scope → journeys → estimation → domain model → high-level design before detailed API and database design → flows → contracts → schema → LLD → consistency → security → failure handling → scalability → testing → deployment → observability → disaster recovery → alternatives considered (including the simpler option), cost and review. A teaching order — real work loops back. - Internalize the governing principle: there is no best architecture, only a best fit for the requirements, constraints, and team. "It depends" is only acceptable when followed by on what — and then which.
Done when you can
- Turn a one-line product idea into testable requirements with measurable targets.
- Produce a defensible workload model in ten minutes.
- Defend a design decision by naming the alternatives you rejected and why.