We have principles, we know the pieces and the models, and we have requirements with figures. What is missing is the step that turns all of that into an architecture: deciding. Deciding in architecture is hard for two reasons. The first is that no option improves everything; each one gains on some quality attributes and loses on others. The second is that decisions get forgotten: two years later nobody remembers why it was done that way, and something important gets undone or something that no longer makes sense is kept. In this lesson you will learn to recognize which decisions deserve formal treatment, to analyze trade-offs, to compare options with a decision matrix, and to record them using architecture decision records (ADRs). We will also make Rutaverde's first two formal decisions.

Contents

  1. What an architecturally significant decision is
  2. The unavoidable trade-offs between quality attributes
  3. A process for deciding: context, options, criteria, and decision matrix
  4. Architecture decision records (ADRs)
  5. Rutaverde's ADR-001 and ADR-002
  6. Reversible and irreversible decisions
  7. Architecture evaluation: the idea behind ATAM

  1. What an architecturally significant decision is

Not every technical decision is an architecture decision. A decision is architecturally significant when it meets one or more of these conditions:

Criterion Check question Example at Rutaverde
It affects the structure Does it change the components or their relationships? Extracting Tracking as a service
It affects a priority quality attribute Does it influence any NFR in the table? How to deploy without service downtime
It is expensive to reverse Would undoing it cost weeks or months? Choosing a cloud provider
It affects several teams Does it force others to adapt? The format of the events between modules
It introduces a significant external dependency Does it tie us to a provider or a technology? Using a database exclusive to one provider
It departs from a principle Is it an exception to P1 through P7? Temporarily allowing Reports to read other modules' tables

If none of them is met, the decision belongs to the team carrying it out and needs no further ceremony. This filter is important: treating everything as architecture turns the architecture team into a bottleneck.

  1. The unavoidable trade-offs between quality attributes

A trade-off is a situation in which improving one attribute makes another worse. Trade-offs are not design flaws: they are a property of reality. The architect's job is not to avoid them, but to make them explicit and choose with sound judgment.

Trade-off What is gained on one side What is lost on the other
Consistency versus availability Identical data everywhere at all times The ability to keep responding when one part fails
Performance versus cost Faster responses with more resources Higher spending, often with diminishing returns
Security versus usability More controls and checks More steps and friction for the legitimate user
Availability versus cost Redundancy that tolerates failures Duplicated resources that sit unused most of the time
Flexibility versus simplicity The ability to adapt to future changes More pieces and abstractions to understand
Portability versus productivity Independence from the provider Giving up managed services that save work

Let's look at three in more detail.

Consistency versus availability: the CAP theorem

In a system with data spread across several nodes, the CAP theorem states that, when the network between those nodes fails and they are cut off from one another, you have to choose between two behaviors:

  • Prioritize consistency: reject the operations that cannot guarantee correct data. The system becomes partly unavailable.
  • Prioritize availability: keep responding, even if some node returns slightly stale data.

The acronym comes from consistency (C), availability (A), and partition tolerance (P). Since network failures cannot be ruled out, in practice the real choice is between C and A when they occur.

The interesting thing is that the right answer depends on the function, not on the whole system:

  • Tracking: if the recipient sees "out for delivery" a few seconds after the package has been delivered, nothing bad happens. Here it makes sense to prioritize availability.
  • Billing: an invoice with an incorrect amount is unacceptable. Here it makes sense to prioritize consistency, even if it means waiting.

How each option is implemented in the data layer is covered in Module 2.

Performance versus cost

Bringing the API's p95 down from 900 ms to 300 ms can be achieved with reasonable design improvements. Bringing it down from 300 ms to 50 ms would probably require multiplying the infrastructure. Requirement NFR-04 was set at 300 ms because that is what the merchants need; going further would mean paying for something nobody has asked for, contrary to NFR-12.

Security versus usability

Clara proposes that every access require a second authentication factor. For administration staff that is reasonable. For a courier who confirms 140 deliveries a day wearing gloves and in the rain, asking for a code on every operation would be unworkable. The solution is not to give up on security, but to apply it where it causes the least friction: strong verification at the start of the shift. The mechanisms are covered in Module 3.

  1. A process for deciding: context, options, criteria, and decision matrix

A simple, repeatable process keeps the loudest voice from winning. It has five steps:

flowchart LR
    A["1. Describe the context"] --> B["2. Identify options"]
    B --> C["3. Define criteria and weights"]
    C --> D["4. Score and calculate"]
    D --> E["5. Decide and record"]
  1. Context: what the problem is, what forces are at play, what constraints exist. It is written before thinking about solutions.
  2. Options: at least three, and one of them must be "do nothing" or "the minimum." If there is only one option, it is not a decision.
  3. Weighted criteria: they are derived from the non-functional requirements and their priorities. Each criterion receives a weight; the weights add up to 100%.
  4. Scoring: each option is scored on each criterion using a simple scale, for example from 1 (very bad) to 5 (very good). The final score is the sum of each score multiplied by its weight.
  5. Decision and record: you choose, explain, and document.

Worked example: the evolution of RouteManager

Let's apply the process to the big question that was left open in the lesson on architecture models.

Context. RouteManager does not meet NFR-01, NFR-06, NFR-07, or NFR-10. The team consists of 22 developers and 6 operations people, with no experience in distributed systems. The business cannot stop.

Options.

  • A: keep the current monolith and upgrade the server.
  • B: evolve to a modular monolith and gradually extract a few services.
  • C: rewrite the whole platform as microservices.

Criteria and weights, agreed with Daniel, Íñigo, and Clara based on the workshop's priorities:

Criterion Weight Where it comes from
Ability to absorb peaks 30% NFR-01, NFR-06, NFR-07
Transition risk 25% The business cannot stop
Speed of delivering changes 20% NFR-10
Two-year cost 15% NFR-12
Fit with the team's capabilities 10% Principle P3

Scoring, from 1 to 5, where 5 is always the most favorable. On the risk criterion, therefore, a 5 means very low risk:

Criterion Weight A: upgrade B: modular and extraction C: rewrite
Ability to absorb peaks 0.30 2 4 5
Transition risk 0.25 5 4 1
Speed of delivering changes 0.20 2 4 5
Two-year cost 0.15 4 3 2
Fit with the team's capabilities 0.10 5 4 2
Weighted total 1.00 3.35 3.85 3.25

The calculation is a sum of products. This Python program reproduces it:

weights = {"peaks": 0.30, "risk": 0.25, "delivery": 0.20, "cost": 0.15, "team": 0.10}

options = {
    "A: upgrade":                {"peaks": 2, "risk": 5, "delivery": 2, "cost": 4, "team": 5},
    "B: modular and extraction": {"peaks": 4, "risk": 4, "delivery": 4, "cost": 3, "team": 4},
    "C: rewrite":                {"peaks": 5, "risk": 1, "delivery": 5, "cost": 2, "team": 2},
}

for name, scores in options.items():
    total = sum(weights[criterion] * scores[criterion] for criterion in weights)
    print(f"{name}: {total:.2f}")

Explanation:

  • weights is a dictionary: it maps each criterion to its weight, expressed as a fraction of 1.
  • options maps each option to another dictionary with its scores.
  • The loop goes through the options. For each one, sum(...) multiplies each criterion's weight by the option's score on that criterion and adds up the results.
  • For option B: 0.30 × 4 + 0.25 × 4 + 0.20 × 4 + 0.15 × 3 + 0.10 × 4 = 1.20 + 1.00 + 0.80 + 0.45 + 0.40 = 3.85.

The output is:

A: upgrade: 3.35
B: modular and extraction: 3.85
C: rewrite: 3.25

How to interpret a decision matrix

  • The matrix does not decide; it helps you decide. Its greatest value is forcing a discussion of the criteria and a justification for each score.
  • Be wary of small differences. Between 3.35 and 3.25 there is no real difference. Between 3.85 and 3.35, there is.
  • Run a sensitivity analysis: change the weights within reason and see whether the winner holds. If a small change flips the result, the decision is not mature.
  • Set the weights before scoring. Adjusting them afterward so that the favorite option wins is fooling yourself.
  • Watch out for vetoes. An option with a 1 on a critical criterion may be unacceptable no matter how high its total score. Option C, with a 1 on risk, is a good example.

  1. Architecture decision records (ADRs)

An ADR (Architecture Decision Record) is a short document, one or two pages long, that records a significant decision: what was decided, in what context, and with what consequences. ADRs are numbered, stored alongside the code or the documentation, and never deleted.

Their value lies in preserving the why. The code shows what was done; only the ADR explains why everything else was ruled out.

Format

Section Content
Title Number and a short phrase summarizing the decision
Status Where it is in its life cycle
Date and participants When it was decided and who took part
Context The problem, the forces at play, and the constraints, stated neutrally
Options considered The alternatives, with their advantages and drawbacks
Decision What is going to be done, in the active voice: "we will..."
Consequences What results from the decision: the positive, the negative, and the risks

Statuses and life cycle

stateDiagram-v2
    [*] --> Proposed
    Proposed --> Accepted: is approved
    Proposed --> Rejected: is discarded
    Accepted --> Superseded: a new ADR replaces it
    Accepted --> Deprecated: no longer applies
    Rejected --> [*]
    Superseded --> [*]
    Deprecated --> [*]
  • Proposed: under discussion.
  • Accepted: approved and in force.
  • Rejected: it was analyzed and discarded. It is kept, because it avoids repeating the discussion.
  • Superseded: a later ADR replaces it; the record states which one.
  • Deprecated: it no longer applies, for example because the affected system was retired.

The golden rule is that an accepted ADR is never modified. If the decision changes, a new ADR is written that supersedes the previous one. That way the complete history of the reasoning is preserved.

  1. Rutaverde's ADR-001 and ADR-002

These are the project's first two records, as approved.

ADR-001

# ADR-001: Evolve RouteManager into a modular monolith with gradual extraction of services

Status: Accepted
Date: 2026-02-12
Participants: Marta (architecture), Íñigo (operations), Clara (security), Daniel (business)

## Context

RouteManager is a monolith with no internal boundaries, with a single
active instance and a single database of 180 tables in one schema. It does
not meet requirements NFR-01 (99.9% availability), NFR-06 and NFR-07
(200,000 shipments a day with ×5 spikes), or NFR-10 (weekly deployment
without downtime). In the last peak season it accumulated 3 h 20 min of
downtime, and a heavy report took shipment creation out of service.

The technology department has 22 developers in three teams and 6 operations
people, with no experience in distributed systems. The business must
keep operating throughout the transformation and plans to go from 6 to 20
cities in two years.

## Options considered

A. Keep the monolith and upgrade the server. Fast and cheap, but it does
   not eliminate the single points of failure or the domino effect between
   functions.
B. Modular monolith with gradual extraction of a few services.
C. Complete rewrite as microservices. Maximum capacity, but with an
   unacceptable transition risk and an operational complexity that the
   team cannot take on today.

Weighted decision matrix: A = 3.35; B = 3.85; C = 3.25.

## Decision

We will evolve RouteManager into a modular monolith and gradually
extract only those services whose extraction solves a specific
problem.

1. We will reorganize the monolith into eight modules: Customers, Shipments,
   Planning, Delivery, Tracking, Notifications, Billing, and
   Reports. Each module will have a published interface and its own
   database schema (principles P1 and P2).
2. We will first extract Tracking as an independent service with its own
   data, because it concentrates most of the reads.
3. We will then extract Notifications, fed by events, so that
   the SMS and email provider stops slowing down operations.
4. We will not extract any other service without a new ADR that justifies it.

## Consequences

Positive:
- Tracking will be able to scale separately, and its peaks will not affect
  shipment creation.
- The boundaries between modules will let the three teams work with
  less interference.
- The risk is spread across small, reversible steps.

Negative:
- During the transition, old and new access paths will coexist, with
  exceptions to P1 that will have to be registered and retired.
- Tracking data will be eventually consistent: it may
  show a status with a delay of a few seconds.
- The operations team will have to learn to operate independent
  services and event-based communication.

Risks:
- That the boundaries between modules erode without tools to
  enforce them.
- That modularization drags on and delays the extractions.

ADR-002

The second decision answers a different question: where the platform will run. The Zaragoza data center has fixed capacity and cannot meet NFR-08, which requires adding capacity in under 10 minutes. Marta applies the same process with four criteria: elasticity (35%), transition risk (25%), two-year cost (20%), and control over data and regulatory compliance (20%).

Criterion Weight A: expand the data center B: full migration in one go C: progressive, hybrid cloud
Elasticity 0.35 1 5 4
Transition risk 0.25 5 1 4
Two-year cost 0.20 2 3 3
Data control and compliance 0.20 5 3 4
Weighted total 1.00 3.00 3.20 3.80
# ADR-002: Migrate from the company's own data center to the public cloud progressively, with a hybrid period

Status: Accepted
Date: 2026-03-05
Participants: Marta (architecture), Íñigo (operations), Clara (security), Daniel (business)

## Context

The whole platform is hosted in the company's own data center in Zaragoza,
with fixed capacity: too much for eleven months of the year and too little
in peak season. Adding capacity requires buying hardware and takes weeks,
which fails NFR-08. The backups are in the same building as the data. The
20-city plan and the volume in NFR-06 and NFR-07 exceed what the data
center can offer.

The operations team has no cloud experience. The main database
takes up about 600 GB and underpins the entire operation. Recipients'
personal data is subject to the GDPR.

## Options considered

A. Expand the company's own data center. Maximum control, but with no
   elasticity and a high investment for capacity that is used one month a year.
B. Migrate everything to the cloud in one go. Maximum elasticity, but it
   concentrates all the risk in a single operation on a critical system,
   with an inexperienced team.
C. Progressive migration with a hybrid period.

Weighted decision matrix: A = 3.00; B = 3.20; C = 3.80.

## Decision

We will adopt the public cloud progressively, with a hybrid
architecture during the transition.

1. New services, starting with Tracking and Notifications,
   will be deployed directly in the cloud.
2. The modular monolith and its database will remain in the data center
   in the first phase.
3. The data center and the cloud will be connected through an encrypted
   private link.
4. Backups will be sent to object storage in
   the cloud.
5. Only regions located in the European Union will be used.
6. The migration of the monolith and its database will be decided in a
   later ADR, within a maximum of 18 months, with the experience
   gained.

## Consequences

Positive:
- The functions with the most variable load get elasticity from the
  very beginning.
- The team learns to operate in the cloud with new, lower-risk
  services before moving the core.
- The backups no longer share a location with the data.

Negative:
- During the hybrid period, two environments will have to be operated and secured.
- The link between the data center and the cloud becomes a critical element.
- The data center and cloud usage will be paid for at the same time.

Risks:
- That the hybrid period drags on indefinitely.
- That provider-exclusive services are adopted without assessing their
  effect on portability (NFR-13).
- That cloud costs grow out of control if they are not managed.

Notice several features common to both records:

  • The context cites specific requirements by identifier, along with measured facts.
  • The discarded options are written down with the reason.
  • The decision is written in the future tense and the first person plural: it is a commitment.
  • The negative consequences and the risks appear just as clearly as the positive ones. An ADR with no downsides is not credible.
  • ADR-002 does not name any provider. Choosing one will be a separate decision, with its own record.

  1. Reversible and irreversible decisions

Not every decision deserves the same analysis effort. A very useful distinction is the one between doors:

  • Two-way door (reversible decision): if it turns out to be a mistake, you can go back at an acceptable cost. It pays to decide quickly, try it, and correct.
  • One-way door (irreversible decision, or one that is very expensive to reverse): once you have gone through, going back is very costly or impossible. It deserves analysis, consultation, and caution.
Decision Type Why
Number of replicas of a service Reversible It can be changed in minutes
Library used inside a module Reversible It is hidden behind the module's interface
Public format of the merchant API Almost irreversible Hundreds of external customers depend on it
Data model for shipments Expensive to reverse It requires migrating millions of records
Cloud provider, if its exclusive services are used Expensive to reverse Whatever depends on them has to be rewritten
Deleting historical data Irreversible There is no way back

Two practical consequences:

  • Match the effort to the type of door. Analyzing a reversible decision for weeks is a waste; taking an irreversible one lightly is reckless.
  • Design to turn one-way doors into two-way doors. A good part of the craft consists of this. ADR-001 does it by modularizing before extracting: if a boundary turns out to be wrong, correcting it inside the monolith is cheap. ADR-002 does it by starting with new services and postponing the migration of the core.

  1. Architecture evaluation: the idea behind ATAM

Individual decisions are analyzed with matrices and recorded with ADRs. But sometimes it is worth examining a complete architecture before investing in building it. That is what evaluation methods are for, and the best known is ATAM (Architecture Tradeoff Analysis Method).

The general idea is simple: bring the stakeholders together and test the proposed architecture against the most important quality attribute scenarios, in order to discover where the risks are before they become expensive to correct.

flowchart LR
    A["Business goals"] --> B["Prioritized quality scenarios"]
    C["Proposed architecture and its decisions"] --> D["Analysis of each scenario"]
    B --> D
    D --> E["Risks"]
    D --> F["Sensitivity points"]
    D --> G["Trade-off points"]

The result is not a score or a pass mark. It is three lists:

  • Risks: decisions that may prevent a requirement from being met.
  • Sensitivity points: decisions on which an attribute depends heavily. For example, the availability of tracking depends a great deal on the link between the data center and the cloud.
  • Trade-off points: decisions that affect several attributes in opposite directions. For example, feeding tracking with events improves availability and scalability, and worsens immediate consistency.

A full ATAM is a formal exercise lasting several days, justified for large systems. What matters is to retain its logic, which you have already practiced in this module: measurable scenarios, explicit decisions, and trade-offs in plain view.

Common Mistakes and Tips

  • Deciding without options. Presenting a single proposal for approval is not deciding. Always demand alternatives, including doing nothing.
  • Manipulating the matrix. If you tweak weights and scores until your favorite wins, the matrix is useless. Set the criteria first and do the sensitivity analysis afterward.
  • Writing extremely long ADRs. An ADR that nobody reads does not do its job. One or two pages.
  • Rewriting an accepted ADR. The history is lost. Decisions are superseded, not edited.
  • Hiding the negative consequences. They will show up anyway; better that they are anticipated and accepted.
  • Recording everything. Apply the filter from the first section: only what is architecturally significant.
  • Treating every decision with the same solemnity. Reserve in-depth analysis for one-way doors.
  • Tip: write the ADR before deciding, not after. Drafting the context and the options often reveals that the problem was not well understood.

Exercises

Exercise 1

Do a sensitivity analysis of the ADR-001 matrix. Daniel suggests giving more importance to peaks and less to risk: 40% for the ability to absorb peaks and 15% for transition risk, keeping the rest of the weights and all the scores. Recalculate the three totals and state whether the winning option changes and what conclusion you draw.

Exercise 2

Classify each decision as reversible or expensive to reverse, and state how much analysis it deserves:

  1. Changing the timeout for calls to the maps provider from 2 to 3 seconds.
  2. Deciding that the public identifier of a shipment will be the tracking code printed on the label.
  3. Choosing the tool the team uses to draw diagrams.
  4. Storing delivery photos in a storage service exclusive to one provider, accessing it directly from six modules.

Exercise 3

Write a brief ADR, in Proposed status, for this decision: the merchant integration API will be versioned, and each version will be kept running for at least 12 months after the next one is published. Include context, at least two options, decision, and consequences.

Solutions

Solution 1

New weights: peaks 0.40; risk 0.15; delivery 0.20; cost 0.15; team 0.10. They add up to 1.00.

  • A: 0.40 × 2 + 0.15 × 5 + 0.20 × 2 + 0.15 × 4 + 0.10 × 5 = 0.80 + 0.75 + 0.40 + 0.60 + 0.50 = 3.05
  • B: 0.40 × 4 + 0.15 × 4 + 0.20 × 4 + 0.15 × 3 + 0.10 × 4 = 1.60 + 0.60 + 0.80 + 0.45 + 0.40 = 3.85
  • C: 0.40 × 5 + 0.15 × 1 + 0.20 × 5 + 0.15 × 2 + 0.10 × 2 = 2.00 + 0.15 + 1.00 + 0.30 + 0.20 = 3.65

Option B still wins, so the decision is robust to this change. But the analysis teaches something else: option C moves from last place to second and gets closer to B. In other words, the less weight risk carries, the more attractive the rewrite becomes. That confirms that transition risk is the deciding criterion and that it needs to be very well justified. In addition, C keeps a 1 on that criterion, which on its own acts as a veto.

Solution 2

  1. Reversible. It is a configuration parameter. You decide, measure, and adjust; it does not need an ADR.
  2. Expensive to reverse. The code ends up printed on labels, stored in merchants' systems, and sent to recipients. It deserves analysis and an ADR, with Clara's involvement, given the problem with consecutive codes.
  3. Reversible. A team decision, with no structural impact.
  4. Expensive to reverse, and for an avoidable reason: what makes it expensive is not using the service, but accessing it from six places. If access is concentrated behind an interface, in line with principle P2, the decision becomes much more reversible. It is an example of turning a one-way door into a two-way door. As stated, it also requires an ADR because of NFR-13.

Solution 3

One valid answer:

# ADR-003: Version the merchant integration API with 12 months of coexistence

Status: Proposed
Date: 2026-03-19
Participants: Marta (architecture), Daniel (business)

## Context

Large merchants integrate their systems with the Rutaverde API.
The current API exposes internal database names, such as stat_cd,
so any internal reorganization would break the integrations.
ADR-001 requires reorganizing the monolith into modules with their own
contracts (P2). Merchants need time to adapt their systems.

## Options considered

A. Change the API whenever necessary and notify the merchants. Simple
   for Rutaverde, but it breaks integrations and damages the business relationship.
B. Never change the API. It protects the merchants, but prevents
   the platform from evolving.
C. Version the API and maintain each version for a fixed period.

## Decision

We will version the integration API. We will publish a version 2 with a
contract that is independent of the internal structure, and we will keep
each version running for at least 12 months after the next one is
published.

## Consequences

Positive:
- Merchants migrate at their own pace within a known time frame.
- The internal structure can change without affecting customers.

Negative:
- Two versions have to be maintained and tested at the same time for a year.
- A layer is needed to translate the old version to the new model.

Risks:
- That some merchants do not migrate in time and extensions have to be negotiated.

What matters is that there is more than one real option, that the decision is specific and verifiable (the 12-month period), and that the cost of maintaining two versions is acknowledged.

Conclusion

This lesson closes the fundamentals module. You have learned to identify architecturally significant decisions, to accept that every design is a balance between competing quality attributes, to compare options with weighted criteria, and to keep decision records that preserve the why. You also know that reversible decisions are made quickly and irreversible ones carefully, and that a complete architecture can be evaluated by testing it against scenarios, as ATAM proposes.

Over the course of the module we have gone from a system with symptoms to a defined direction. Rutaverde has seven principles, P1 through P7; an inventory of what exists; a table of requirements, NFR-01 through NFR-14; and two accepted decisions: ADR-001, which turns RouteManager into a modular monolith from which Tracking and Notifications will be extracted, and ADR-002, which takes the platform to the public cloud progressively, with a hybrid period.

But deciding on the direction is not the same as having arrived. The decisions say what shape the platform will have, not how it will manage to serve 50 shipment creations and 250 tracking queries per second without degrading. How is the load spread across several instances? How do we keep the database from being the bottleneck? How does the system keep working when a piece fails? That is the subject of Module 2, devoted to designing scalable systems, where we will build, step by step, the Rutaverde platform's ability to withstand the ×5 spikes of peak season.

© Copyright 2026. All rights reserved