Topic 014 / Core
Software architecture fundamentals
Chapter 2.1 · What System Design Is
What and why
Not every decision deserves the same scrutiny: renaming a variable costs nothing to undo; choosing a primary database costs weeks. Software architecture is the set of significant decisions about a system's structure that are expensive to change later — the cost-of-change curve that drives how much care a decision deserves. Builds on: → 13 — architecture is exactly the layer of decision that LLD must then live inside without being able to cheaply undo.
Diagram
cost to
change │ ● in production, many users
│ ● after LLD
│ ● after HLD
│ ● after requirements
│ ● at idea stage
└────────────────────────────────────────► time
How it works
Identifying an architectural decision:
- Ask: if this choice is wrong, how much must be rewritten, and who else is affected?
- If the answer spans multiple components, touches data ownership, or is costly to reverse → it's architecture; decide it deliberately (→ 21).
- If the answer is "change one function" → it's a design or implementation detail; decide it pragmatically.
- Record genuine architectural decisions so later engineers know why (→ 57).
- Revisit decisions when the assumptions behind them change — architecture isn't permanent, just expensive.
Practical example
Choosing a service's primary programming language is architecture: expensive to reverse, affects hiring and tooling for years. Choosing a local variable name inside a function is not. Choosing SQL vs. NoSQL for a system's primary store (→ 62) is architecture, because resharding a live system later costs weeks, not minutes.
When to use it
- Use when: debating any decision — apply the expensive-to-change test before arguing further.
- Avoid when: treating every choice as architecture — over-designing trivial decisions stalls delivery for no benefit (rule 7, no forced complexity).
- Failure scenarios: two weeks spent debating a logging library (cheap to change) while a 10-minute conversation about data ownership (expensive to change) never happens.
- Simpler alternative: when a decision's cost is unclear, prototype the cheap option first — the real cost often only reveals itself once you try to change it.
Practice
(Decision kind — judge scenarios and defend the choice; 15–20 min, no lab services). Classify each of these six decisions as "architecture" or "detail," using the expensive-to-change test, and justify each in one sentence: choice of REST vs. RPC style; naming a local variable; choice of primary database; wording of an error message; choice of service boundaries; choice of a caching library. Done when your classification follows the test, not intuition alone.
Key takeaway
Architecture is the subset of decisions too expensive to get wrong casually. Done when you can apply the expensive-to-change test to a real decision in under a minute. Used next in → 21 (trade-offs), → 57 (ADRs).
References
None — this topic makes no external claims.
Source directory