System Design · Architecture

Trade-off Analysis

Every architectural choice costs something. The work is naming what, and deciding with the cost visible.

— min read System Design

There Is No Best, Only Suited

Architecture is the set of decisions where every option is worse at something. A design praised as "clean" or "scalable" without naming what it gave up has not been analysed — it has been advertised.

The senior habit is answering "it depends" and then saying what it depends on. Vague answers come from not knowing the axes; good answers name the quality attributes in tension and the constraint that decides between them.

Quality Attributes In Tension

GainingUsually costs
Strong consistencyAvailability under partition, and latency
Low latencyFreshness — caching means serving something older
Scalability via servicesOperational complexity and network failure modes
Flexibility and configurationComprehensibility — more paths to reason about
Security controlsConvenience, and sometimes throughput
Delivery speed nowRework later, if the shortcut is not repaid
Cost efficiencyHeadroom — the thing you want during an incident

Note that most of these are not resolvable, only positionable. CAP is the well-known example: during a network partition you choose consistency or availability, and no architecture escapes the choice — it only decides where on the dial you sit.

Requirements decide the position, so get numbers. "Fast" is not a requirement; "p99 under 200ms for the search endpoint at 500 requests per second" is one, and it eliminates options immediately.

A Usable Method

StepDetail
Name the driversThe two or three attributes that actually matter here
Quantify themNumbers with units — latency, volume, RPO, RTO, budget
List real optionsIncluding "do nothing" and "the boring one"
Score against the driversExplicitly, and note what each option sacrifices
Check reversibilityHow expensive is undoing this in a year
Decide and recordIn an ADR, with the sacrifices written down
Driver: order writes must survive an AZ failure with RPO = 0

Option A — single-region multi-AZ synchronous replication
  + RPO 0, simple operationally
  − Write latency +8ms; no region-level protection

Option B — multi-region active-active
  + Survives region loss
  − Conflict resolution in the application; ~3× cost; large complexity jump

Option C — single AZ with backups
  + Cheapest, simplest
  − RPO measured in minutes — fails the driver outright

Chosen: A. B is not justified until a region-loss requirement exists.
Always evaluate the boring option honestly. A single well-run relational database and a monolith meets the requirements of most systems, and the burden of proof belongs to the more complex proposal.

Reversibility Changes The Answer

How hard a decision is to undo should change how much analysis it deserves, and how much risk is acceptable.

TypeApproach
Two-way door — cheap to reverseDecide fast, at the lowest level, and move on
One-way door — expensive to reverseOptions, evidence, a written record, more people
Reversible but costlyPrototype or spike before committing
Irreversible in practiceData models, public API contracts, tenancy — slow down
Data decisions are the most one-way of all. Code can be rewritten in a sprint; a data model with three years of history, integrations and reports built on it cannot, which is why storage format, identifiers and tenancy deserve disproportionate care.

You can also buy reversibility deliberately: an abstraction at a boundary, a feature flag, a strangler pattern round a legacy component. Each costs a little now to keep an option open — and like any option, it is only worth buying where the uncertainty is real.

Interview Questions

What makes a good answer to an architecture question?

Naming the quality attributes in tension and the constraint that decides between them. "It depends" is only useful when followed by what it depends on.

Give an example of an unavoidable trade-off.

Consistency versus availability during a network partition. No architecture escapes it; the design only chooses where to sit and what to do when the partition happens.

Why insist on numbers in requirements?

"Fast" cannot eliminate an option. "p99 under 200ms at 500 requests per second" rules several out immediately and makes the comparison objective.

How does reversibility change the process?

Two-way doors should be decided quickly at the lowest level. One-way doors — data models, public contracts, tenancy — deserve options, evidence and a written record.

Why evaluate the boring option?

A single well-run relational database and a monolith meets most requirements. The burden of proof belongs to the more complex proposal, not the simpler one.

How do you buy reversibility?

An abstraction at a boundary, a feature flag, or a strangler around a legacy component. Each costs something now to keep an option open, and is only worth it where uncertainty is real.

Quick Quiz

1. A design described only as "scalable" is…
2. Low latency via caching usually costs…
3. Two-way door decisions should be…
4. The most one-way decisions are usually about…
5. A requirement useful for eliminating options looks like…