Bookmarks

Architectural trade-off

A deliberate choice between solution options in which strengthening one property of the system weakens another.

Also: trade-off, tradeoff, trade-off between quality attributes

checked 8 Nov

All terms

Every architectural decision has a price: the characteristics of a system are interconnected, and gaining in one place means losing in another. A trade-off is not a sign of poor design but its very essence: the goal is not to get rid of trade-offs, but to accept them deliberately and remember what was paid for them.

What a trade-off looks like

Classic “gain — price” pairs that almost every project encounters:

DecisionWhat we gainWhat we pay
A cache in front of the databasefast repeated readsrisk of stale data and the complexity of cache invalidation
A synchronous call instead of a queuesimple code and an instant responseservice coupling and cascading failures
Microservicesindependent deployment and scaling by teamsnetwork latency, distributed transactions, operations
Strong data consistencypredictable write resultslatency and availability constraints
A ready-made cloud servicefaster launch and less codevendor lock-in and the billing model

How to make and record trade-offs

A decision is made against criteria, not out of habit: first establish which quality attributes matter more for the system, then compare the options against that scale and record what was chosen, what the alternatives were and what will have to be paid:

  1. rank the quality attributes: for a payment system consistency matters more than latency, for a news feed the other way round;
  2. for each option, write down the gain and the price, including the less obvious costs — operations and hiring;
  3. record the decision and its consequences — for example, as an architecture decision record (ADR) — so that a year from now you remember why it was made that way.

ATAM

Major trade-offs are examined with ATAM (Architecture Tradeoff Analysis Method), developed by Rick Kazman, Mark Klein and Paul Clements at the Software Engineering Institute (SEI) at Carnegie Mellon University and described in a 2000 report. The name speaks for itself: the method shows not only how well the architecture meets its quality goals, but also how those goals interact with one another.

The analysis proceeds in nine steps grouped into two phases: first the architect and a small team work through the approaches and scenarios, then the stakeholders do the same — and check the results of the first phase. Along the way, risks, sensitivity points and tradeoff points are recorded. A sensitivity point is a property on which a single quality attribute critically depends — for example, a component’s priority for latency. A tradeoff point is a parameter behind which several such properties stand: increasing it improves one attribute and worsens another. The classic example is link speed: the higher the throughput, the lower the reliability.

Sources

the term is written from these pages

Verified 8 Nov

Not to be confused with

what it is mixed up with and how it differs

  • technical debt

    A trade-off is a deliberate choice with a known price; technical debt is the accumulated consequences of decisions that were not reworked.

  • ADRarchitecture decision record

    An ADR is a document in which the decision and its consequences are recorded; a trade-off is the very balance of gain and price from which the decision is chosen.

  • quality attribute

    A quality attribute is an individual property of the system, while a trade-off is a relationship between properties: strengthening one at the expense of another.

In depth in the references

where the topic is covered in detail