With the previous lesson, the architecture of the Rutaverde platform was decided, planned, and documented. But everything we know about it we know as of today. Volume will multiply by five, the teams will learn to operate a distributed system, there will be incidents, and some hypotheses will turn out to be false: it already happened with the fifteen creations per second, which in the load tests turned out to be twelve. An architecture is not designed once; it is kept fit for purpose, or it stops being so without anyone deciding it. In this lesson you will learn to evaluate it periodically and, above all, continuously: with reviews, with delivery metrics, with automated checks, and with what incidents teach. And we will carry out the first annual review of the platform, before building, in order to have a baseline to compare against.
Contents
- Architecture as something that evolves
- The PDCA cycle applied to architecture
- Periodic evaluation: requirements, principles, and lightweight ATAM
- Pillar-based reviews
- Health and delivery metrics: the four DORA metrics
- Fitness functions: continuous evaluation
- Learning from incidents, and retrospectives
- Maturity models
- Managing evolution: the ADR life cycle
- Rutaverde's first annual review and the scorecard
- Architecture as something that evolves
An architecture degrades along three paths, and none of them makes any noise:
| Path | What happens | Example in RouteManager |
|---|---|---|
| The context changes | The architecture stays the same, but the business, the volume, or the technology are no longer what they were | Designed for one city and thousands of shipments; today, six cities and 40,000 a day |
| Erosion | The code drifts away from the design little by little, shortcut by shortcut | Reports started reading a Shipments table "just this once" |
| Obsolescence | The components age and lose support | The Java runtime |
RouteManager was not a bad architecture. It was a reasonable architecture that nobody evaluated again for ten years. The new platform will suffer the same fate unless we do something different, and that something is what this lesson studies: turning evaluation into a routine, and not into an audit commissioned when there are already symptoms.
- The PDCA cycle applied to architecture
Continuous improvement rests on a very well-known cycle, PDCA or the Deming cycle: plan, do, check, and act.
flowchart LR
P["Plan: requirements, decisions, and hypotheses"] --> D["Do: build and operate"]
D --> C["Check: measure and compare with what was expected"]
C --> A["Act: correct, and change the decision if necessary"]
A --> P
Applied to architecture:
| Phase | In architecture | At Rutaverde |
|---|---|---|
| Plan | Measurable requirements, decisions with their hypothesis made explicit | NFRs with figures; ADR-004 assumes 15 creations per second per instance |
| Do | Build and put into operation | The pre-production environment |
| Check | Measure and compare with the hypothesis | The load tests give 12.4 |
| Act | Adjust the design and record what was learned | ADR-017: six instances in peak season; baseline in the pipeline |
We have already done it, without calling it that. The key lies in two details. The first: you can only check what was planned with a figure; that is why we insist so much on measurable requirements. The second: the cycle does not end. The "act" of one turn is the "plan" of the next.
The cycle turns at several speeds at once, and each one has its instrument:
| Speed | Instrument | Section |
|---|---|---|
| On every change | Fitness functions in the pipeline | 6 |
| Every week or every month | Delivery and operations metrics; scorecard | 5 and 10 |
| After every incident | Post-incident review | 7 |
| Every quarter | Review of ADRs and triggers | 9 |
| Every year | General architecture review | 3 and 4 |
- Periodic evaluation: requirements, principles, and lightweight ATAM
Once a year, or when facing a big change, it is worth stopping to look at the whole. The review has three questions.
Are the requirements met? You go through the table of NFRs with the most recent measurement of each one. It is the table with which we closed the previous module, repeated with new data.
Are the principles respected? For each principle, a concrete check:
| Principle | Check question |
|---|---|
| P1. Every piece of data has a single owner | Does any module read or write another module's tables? |
| P2. Contracts before implementations | Does any integration depend on internal details? |
| P3. Simple first | Is there any piece we could not justify today? |
| P4. Everything fails, and we plan for it | Which remote call has no timeout or fallback? |
| P5. Adding a city is configuration | How much did opening the last one cost? |
| P6. If it repeats, automate it | Which manual task was done more than three times this quarter? |
| P7. Secure by design | Which ADR was accepted without its security section? |
Does the architecture stand up to the scenarios that matter? Here ATAM returns, which we met at the end of the first module: testing the architecture against prioritized quality scenarios, to find risks, sensitivity points, and trade-off points. Back then we said that the full method takes days and that what is valuable is its logic. A lightweight version, half a day long, applies it like this:
- Before the session, each participant proposes two scenarios that worry them.
- They are voted on and four or five are chosen.
- For each one, you walk through on the diagrams what happens, which decisions are involved, and what has been measured.
- Whatever turns up is noted: a risk, something that may breach a requirement; a sensitivity point, a parameter on which the outcome depends heavily; or a trade-off point, a decision that improves one attribute at the expense of another.
Rutaverde's session, on 26 January 2027, with the architecture board, Daniel, and a dispatch manager:
| Scenario | Decisions involved | Finding |
|---|---|---|
| 2027 peak season: 21 creations per second at peak and one instance goes down | ADR-004, ADR-014, ADR-017 | No new risk: three instances; with two, 24 creations per second remain. Sensitivity point: the value of 12 per instance, which the pipeline baseline watches |
| The 05:00 route planning with 200,000 shipments must finish in time to print the load sheets at 05:30 | None | Risk: nobody has measured how long the process takes with five times as many shipments. The load tests covered creation and tracking, not the batch processes |
| The identity provider does not respond at 07:00, when couriers start their shift | ADR-009, ADR-019 | Trade-off point between security and availability: short-lived tokens protect, but whoever has not signed in cannot start. Contingency mode covers whoever was already working. It has never been rehearsed |
| Rutaverde opens a new city | P5 | Risk: opening the last city cost about three weeks of one developer. The principle exists, but nothing measures or checks it |
mono-batch-01 fails at 04:50 |
ADR-004, ADR-008 | A known and accepted risk, but with no procedure: there is no runbook for running the jobs on another instance |
Notice what kind of findings the method produces. They are not errors in the diagrams: they are things nobody had asked. The second scenario was proposed by the dispatch manager; it had not occurred to any architect.
- Pillar-based reviews
The large cloud providers publish frameworks of best practices, generically called well-architected, that organize the review of an architecture into pillars. The names vary a little between providers, but the content coincides:
| Pillar | Central question | Where we have covered it |
|---|---|---|
| Operational excellence | Do we know how to operate, observe, and change the system safely? | Observability, automation, on-call |
| Security | Are the data, the identities, and the systems protected? | Module 3 |
| Reliability | Does the system do what it should, even when something fails? | High availability, continuity |
| Performance efficiency | Does it use the right resources for the load it has? | Scalability, load tests |
| Cost optimization | Is money spent only on what provides value? | FinOps |
| Sustainability | Is the consumption of energy and resources minimized? | Only in passing |
The method is a questionnaire: a few questions per pillar, each with an honest answer, a piece of evidence, and an assessment. An excerpt from Rutaverde's:
| Pillar | Question | Answer and evidence | Assessment |
|---|---|---|---|
| Operational excellence | Does every change reach production through an automated, reversible process? | Designed in ADR-016; today, 37 manual steps | Pending construction |
| Operational excellence | Is the on-call load sustainable? | First level with the six people in operations | At risk |
| Security | Is there a current threat model for every exposed component? | Yes for tracking and delivery; those for ADR-015, 016, and 019 are missing | Partial |
| Reliability | Has recovery been tested, and how long did it take? | Restore: 70 minutes, measured. Failover to the recovery site: not measured | At risk |
| Reliability | Are there components without redundancy on which a function with a deadline depends? | mono-batch-01 |
At risk |
| Performance | Have all critical workloads been measured at the target volume? | Creation and tracking, yes; batch processes, no | Partial |
| Cost | Is the cost per business unit known, and is its target met? | It is known: €0.039; it is not met until 90,000 shipments a day | Known and accepted |
| Sustainability | Does the installed capacity match demand? | The data center is sized for peak season: eleven months a year more than half of it is spare | No indicator |
Three tips to make such a review useful:
- You answer with evidence, not with intentions. "It is designed" and "it is measured" are different answers, and the table distinguishes them.
- The result is a short list of improvements with an owner, not a score.
- Sustainability usually coincides with cost. Capacity that is not used costs money and energy at the same time. What the pillar adds is the question, which almost nobody asks.
- Health and delivery metrics: the four DORA metrics
An architecture is also judged by what it allows those who work with it to do. If changing the system is slow and risky, the architecture is failing, even if all the diagrams are correct. The DORA research program (DevOps Research and Assessment) identified four metrics that summarize an organization's delivery capability:
| Metric | What it measures | Type |
|---|---|---|
| Deployment frequency | How often a change is put into production | Speed |
| Lead time for changes | How long it takes from when a change is merged into the code until it is in production | Speed |
| Change failure rate | What percentage of deployments cause a failure that requires an urgent fix or a rollback | Stability |
| Time to restore service | How long it takes to recover the service after a failure | Stability |
Its best-known finding runs against intuition: speed and stability are not opposed. The organizations that deploy most often are also the ones that fail least, because each change is small, easy to review, and easy to roll back. RouteManager is the opposite example: one deployment a month, with everything accumulated over thirty days.
The calculation is simple. With RouteManager's twelve deployments from the last year:
from statistics import median
deployments = [
# (days from when the change was merged until production, did it require an urgent fix or a rollback?)
(22, False), (41, True), (35, False), (52, False), (38, True), (29, False),
(44, False), (38, False), (61, True), (33, False), (47, True), (26, False),
]
restore_times_min = [40, 55, 70, 90, 100, 120, 150, 200] # duration of each incident in the year
frequency = len(deployments) / 12
lead_time = median(days for days, _ in deployments)
failure_rate = sum(failed for _, failed in deployments) / len(deployments)
restore_time = median(restore_times_min)
print(f"Deployment frequency: {frequency:.0f} per month")
print(f"Lead time for changes: {lead_time:.0f} days (median)")
print(f"Change failure rate: {failure_rate:.0%}")
print(f"Time to restore service: {restore_time:.0f} min (median)")deploymentshas one row per deployment, with two pieces of data that in a system with a pipeline are obtained automatically: how long the change waited and whether it had to be fixed urgently.- The median is used and not the mean, for the same reason we use percentiles for performance: an extreme case must not hide what is usual.
sum(failed ...)counts the true values: four out of twelve.
Deployment frequency: 1 per month
Lead time for changes: 38 days (median)
Change failure rate: 33%
Time to restore service: 95 min (median)These are the starting values. The targets are set in two stages, consistent with the program's milestones:
| Metric | Starting point, RouteManager in 2026 | Target, December 2027 | Target, December 2028 |
|---|---|---|---|
| Deployment frequency | 1 per month, with two hours of downtime | Weekly and zero-downtime: it is NFR-10 | Monolith, weekly; services, on demand |
| Lead time for changes | 38 days | 7 days or fewer | 2 days or fewer |
| Change failure rate | 33% | 15% or less | 10% or less |
| Time to restore service | 95 minutes | 30 minutes or less | 15 minutes or less |
Three cautions when using them:
- They are read together. Improving frequency at the expense of the failure rate is not improving.
- They belong to the system, not to people. Using them to compare teams or to evaluate someone destroys them: people learn to dress them up.
- They do not replace operations metrics. SLOs say how things are going for the user; these say how things are going for whoever changes the system. Both are needed.
- Fitness functions: continuous evaluation
Periodic reviews have a limit: a year goes by between one and the next. The fitness function, which we introduced when talking about governance, closes that gap: it is an automated, objective check that the system retains an architecture characteristic. It runs by itself, in the pipeline or periodically, and it fails when the characteristic is lost.
It has three ingredients: a characteristic to protect, an objective measure, and a threshold. Let's look at three examples of different kinds.
Example 1: dependencies between modules
ADR-001 decided on a modular monolith, and we warned then that its boundaries "depend on the team's discipline and on tools that watch over them." This is the tool. An analysis utility extracts from the code which module uses which, and a rule compares it with what is allowed:
ALLOWED = {
"customers": [],
"shipments": ["customers"],
"planning": ["shipments", "customers"],
"delivery": ["shipments", "planning"],
"billing": ["shipments", "customers"],
"reports": [],
}
# (module that uses, module used, part used), extracted from the code by a tool
dependencies = [
("shipments", "customers", "api"),
("delivery", "shipments", "api"),
("billing", "shipments", "internal"),
("reports", "shipments", "api"),
("planning", "delivery", "api"),
]
violations = []
for source, target, part in dependencies:
if target not in ALLOWED[source]:
violations.append(f"{source} -> {target}: dependency not allowed")
elif part != "api":
violations.append(f"{source} -> {target}.{part}: only the published interface may be used")
for line in violations:
print("VIOLATION:", line)
print("Result:", "FAIL" if violations else "PASS")ALLOWEDis the architecture of the monolith written as data: for each module, which ones it may depend on. It is level 3 of the C4 model that the veterans are documenting, in executable form.reportshas an empty list: it does not depend on any module, because it reads from the published views on the replica.- The first condition detects forbidden dependencies; the second, the use of internal parts of an allowed module, which violates principle P2.
VIOLATION: billing -> shipments.internal: only the published interface may be used
VIOLATION: reports -> shipments: dependency not allowed
VIOLATION: planning -> delivery: dependency not allowed
Result: FAILThree violations. The third is a circular dependency: Delivery depends on Planning, and Planning may not depend on Delivery.
In a legacy system, the first run gives hundreds of violations, and you cannot stop everything until they are fixed. The technique is the ratchet: the current number is recorded as the maximum allowed, the pipeline fails only if it increases, and the maximum is lowered every time something is fixed. Erosion stops on day one, even if the cleanup takes months.
Example 2: the performance baseline
It has existed since ADR-017, and it is a textbook fitness function:
fitness_function:
id: FF-02
protects: NFR-04, shipments API with a p95 below 300 ms
measure: p95 of shipment creation in the pipeline's short load test
baseline_ms: 185
tolerance: 10%
threshold_ms: 203.5
runs: on every change to the monolith, in pre-production
on_failure: the change does not go to production
owner: Core teamprotectslinks the check to the requirement. A fitness function with no requirement behind it is just one more test.- The
threshold_msis not the requirement, 300 ms, but the baseline plus 10%: 185 × 1.10 = 203.5. This is how gradual degradation is detected, long before the requirement is breached. Twenty changes that each make things 2% worse would go unnoticed against a threshold of 300.
Example 3: policy as code
The guardrails from ADR-011 and the obsolescence rule from ADR-015 are expressed as policies that evaluate the declared infrastructure before deploying it:
policies:
- id: FF-03
protects: B-01, EU regions only
rule: "every resource declares a region from the allowed list"
runs: on every infrastructure change
on_failure: blocks
- id: FF-04
protects: B-08, mandatory tags
rule: "every resource has environment, service, owner, and classification"
runs: on every infrastructure change
on_failure: blocks
- id: FF-05
protects: obsolescence rule from ADR-015
rule: "no component in the inventory is less than 180 days from its end of support"
except: [EXC-001]
runs: every week
on_failure: notifies the owner and the boardFF-03andFF-04block: what does not comply is not deployed.FF-05notifies, because it does not depend on a change but on the passage of time: a component that is fine today stops being so a year from now without anyone touching it.exceptlinks to the exception register. WhenEXC-001expires, the function will start failing again by itself. It is the way to keep an exception from being forgotten.
Rutaverde's catalog
| Id | Protects | Check | When | On failure |
|---|---|---|---|---|
| FF-01 | ADR-001, P1, and P2 | Dependencies between modules, with a ratchet | On every change | Blocks |
| FF-02 | NFR-04 | Performance baseline | On every change | Blocks |
| FF-03 | B-01 | EU regions only | On every change | Blocks |
| FF-04 | B-08 | Mandatory tags | On every change | Blocks |
| FF-05 | ADR-015 | End of support more than 180 days away | Weekly | Notifies |
| FF-06 | ADR-007, ADR-010 | The event schema contains no personal data fields | On every change | Blocks |
| FF-07 | ADR-019 | The monthly restore finishes in less than 90 minutes | Monthly | Notifies |
| FF-08 | P5 | A test city is created in pre-production with configuration alone | Weekly | Notifies |
Not everything can be checked this way. Whether a decision is still the right one for the business is something no test will tell you. Fitness functions free people from watching over the mechanical so that they can devote themselves to that other question.
- Learning from incidents, and retrospectives
An incident is the most expensive and most honest architecture evaluation there is: it shows how the system really behaves, and not how we believed it behaved. Wasting it is a luxury.
We met the blameless post-incident review when talking about operations. What matters here is its output: an incident can end up in five different places, and only one is a code fix.
flowchart TB
I["Incident"] --> R["Blameless review: what happened, why what was done made sense"]
R --> A["Actions with an owner and a date"]
A --> C["Fix for the defect"]
A --> O["New alert or runbook"]
A --> F["New fitness function"]
A --> D["Architecture decision: a new ADR or one that supersedes another"]
A --> Q["New or clarified requirement"]
The incident of the report that brought down shipment creation, which we have been carrying since the first module, runs through the whole diagram:
| Output | What it produced |
|---|---|
| Architecture decision | Reports and jobs on mono-batch-01; reads on the db-02 replica |
| Requirement | Different availability for shipment creation and for reports |
| Fitness function | FF-01: Reports may not depend on other modules |
| Alert | Replication lag of db-02 |
Two rules to make the learning happen:
- Every action has an owner and a date, and is tracked at the board. The percentage of post-incident actions closed on time is one more indicator.
- The final question of every review is: does this call any decision into question? If the answer is yes, it goes to the board as an ADR proposal.
Retrospectives are the same mechanism without an incident: each team, at the end of a cycle or a phase, spends an hour on three questions: what went well, what cost more than it should have, and what one thing changes in the next cycle. For the architect they are a first-hand source: what costs more than it should is usually an architecture problem that has not yet caused an incident.
- Maturity models
A maturity model describes, for a practice, a scale of levels, from improvised to optimized, and makes it possible to place an organization on it:
| Level | Usual name | Description | Example: deployment |
|---|---|---|---|
| 1 | Initial | It depends on specific people | Whoever knows how does it, from memory |
| 2 | Repeatable | There is a procedure, a manual one | RouteManager's 37 steps |
| 3 | Defined | It is standardized and automated in the essentials | Pipeline with approval |
| 4 | Managed | It is measured and controlled with data | Canary with automatic rollback; delivery metrics |
| 5 | Optimizing | It is improved continuously on the basis of the measurements | Targets reviewed every quarter |
They are useful for two things: for having an orderly conversation about where you are, and for taking a reasonable next step, which is always the level immediately above. And they should be used with caution:
- The level is not the goal. The goal is the business outcome. Reaching level 5 in a practice that does not limit the company is a waste.
- Not everything has to be at the same level. Rutaverde needs level 4 deployment; its management of the technology catalog can stay at 3.
- Self-assessment tends to be generous. Without evidence, the level is an opinion.
- Comparing levels between organizations, or between teams, says little.
- Managing evolution: the ADR life cycle
ADRs are not edited: they are superseded. We have known that since the first module. What is missing is knowing when to review one, because a quarterly review that rereads twenty-five documents with no criterion ends up not being done.
The answer is triggers: conditions, written in the ADR itself, that force it to be reviewed when they are met. ADR-006 was the first to have them. There are four types:
| Type | Example | Who watches it |
|---|---|---|
| Metric threshold | ADR-006: writes above 2,000 per second, CPU on the primary above 70%, or more than 2 TB of data | An alert |
| Date | ADR-002: the core migration is decided within 18 months at most | The calendar |
| Event | A serious incident, a change of provider, a legal change | The post-incident review; the board |
| Change of scale | ADR-016: more than five services in the cloud reopens the decision on Kubernetes | The quarterly review |
The status of the triggers, at the end of January 2027:
| ADR | Trigger | Current value | Status |
|---|---|---|---|
| ADR-002 | Decide the core migration before 5 September 2027 | 7 months to go | Upcoming |
| ADR-005 | Cache hit rate below 85% | 87% in tests | Close; watch in production |
| ADR-006 | 2,000 writes per second; 70% CPU; 2 TB | 600 GB | Far off |
| ADR-016 | More than 5 services in the cloud | 2 planned | Far off |
| ADR-018 | 90,000 shipments a day: the €0.02 rule starts to apply | 40,000 | Expected for late 2027 |
| ADR-019 | RTO measured above 2 hours in a drill | Not measured | First drill, in May 2027 |
| ADR-021 | Spending commitments longer than one year, after deciding the core migration | — | Tied to ADR-002 |
When a trigger fires, there are three possible outcomes, and all three leave a trace:
| Outcome | When | How it is recorded |
|---|---|---|
| Confirm | The context has changed, but the decision is still the best one | A dated note in the ADR: "reviewed, still in force," and the triggers updated |
| Clarify | The decision stands and a parameter changes or a detail is added | A short new ADR that says so; in the original, only the link "clarified by." That is what ADR-022 did with the monthly backups from ADR-019 |
| Supersede | The decision is no longer the right one | A complete new ADR; the original moves to "Superseded by" |
An ADR with no trigger will only be reviewed when it fails. That is why, from ADR-025 onward, the template includes a ## Review section with at least one.
- Rutaverde's first annual review and the scorecard
The review
The general architecture review is on the governance calendar, every January. The first, from 25 to 27 January 2027, has a peculiarity: the platform is not yet built. It evaluates the design and the starting point, and its result is the baseline against which the following ones will be compared. It combines the three pieces we have seen: the walk through requirements and principles, the lightweight ATAM session, and the pillar questionnaire.
| Id | Pillar | Finding | Severity | Action | Owner | Date |
|---|---|---|---|---|---|---|
| AR-01 | Reliability | The 2-hour RTO is a design; it has not been measured. The drill planned for February is not possible: db-dr and dr-core will not exist until M0 |
High | First technical recovery drill, after M0 | Íñigo | May 2027 |
| AR-02 | Reliability | mono-batch-01 is a single point for a function with a deadline, with no procedure |
Medium | Runbook for running the jobs on a mono instance, and testing it |
Íñigo | M1 |
| AR-03 | Performance | The 05:00 planning has not been tested with 200,000 shipments | High | Load test of the batch processes | Core team | Before 1 October 2027 |
| AR-04 | Security | The threat modeling exercises for ADR-015, 016, and 019 are missing; the start of shift without the identity provider has not been rehearsed | Medium | Threat modeling from January to March; scenario in the tabletop drill | Clara | March 2027 |
| AR-05 | Operational excellence | First-level on-call with six people: one week in six on paper, one in four with vacations and sick leave, and more and more pieces | Medium | Widen the rotation to ten, with four trained developers; indicator of nighttime pages | Íñigo | June 2027 |
| AR-06 | Operational excellence | Delivery metrics are not measured | Medium | Obtain them from the pipeline | Platform team | M0 |
| AR-07 | Cost | NFR-12 is not met; 64% of the cost is in the data center | High | Decide the core migration | Marta | Before 5 September 2027 |
| AR-08 | Sustainability | Data center capacity idle eleven months a year; no indicator | Low | Indicator of average utilization; depends on AR-07 | Íñigo | M1 |
| AR-09 | Principles | P5 is not measured: opening a city costs about three weeks of development | Medium | Fitness function FF-08; per-city configuration | Core team | M3 |
| AR-10 | Principles | P1 is breached, with exception EXC-002; technical debt is not recorded | High | Technical debt register, prioritized | Marta | February 2027 |
| AR-11 | Providers | A single SMS and email provider | Low | Contractual decision on a second provider | Daniel | Phase 3 |
Eleven findings: four of high severity, five medium, and two low. Three readings:
- None invalidates the design. The four serious ones are things not measured or not decided, not wrong decisions. That is to be expected in a baseline.
- AR-03 is the most valuable, because nobody had it on the list. A planning run that finished at 06:40 in the middle of peak season would leave 280 couriers waiting at the warehouses, with every API indicator green.
- Two findings, AR-07 and AR-10, are not resolved with a task. Each calls for a big decision, and they will be the subject of the next lesson.
The scorecard
The annual review gives the snapshot. The architecture scorecard gives the movie: one page, with few indicators, each with its target and its thresholds. It is presented every month at the board and every quarter at the committee.
architecture_scorecard:
service:
- { indicator: availability of shipment creation, baseline: "99.2%", green: ">= 99.9%", red: "< 99.5%" }
- { indicator: error budget consumed in the month, baseline: not measured, green: "< 50%", red: "> 100%" }
- { indicator: p95 of the shipments API, baseline: 900 ms, green: "< 250 ms", red: ">= 300 ms" }
delivery:
- { indicator: deployments per month, baseline: 1, green: ">= 4", red: "< 2" }
- { indicator: lead time for changes, baseline: 38 days, green: "<= 7 days", red: "> 21 days" }
- { indicator: change failure rate, baseline: "33%", green: "<= 15%", red: "> 25%" }
- { indicator: time to restore service, baseline: 95 min, green: "<= 30 min", red: "> 60 min" }
cost:
- { indicator: projected annual infrastructure spending, baseline: "€365,000", green: "<= €600,000", red: "> €600,000" }
- { indicator: cost per shipment, baseline: "€0.025", green: "<= €0.02 from 90,000 shipments a day", red: "> €0.02 from 90,000 shipments a day" }
architecture_health:
- { indicator: fitness functions passing on the main branch, baseline: they do not exist, green: "100%", red: "< 100% for more than 2 days" }
- { indicator: dependency violations between modules, baseline: not measured, green: goes down every quarter, red: goes up }
- { indicator: components less than 180 days from end of support with no exception, baseline: 1, green: 0, red: ">= 1" }
- { indicator: capacity devoted to technical debt, baseline: "0%", green: ">= 15%", red: "< 10%" }
governance:
- { indicator: expired exceptions, baseline: 0, green: 0, red: ">= 1" }
- { indicator: calendar reviews done on time, baseline: no calendar, green: ">= 90%", red: "< 75%" }
- { indicator: post-incident actions closed on time, baseline: not measured, green: ">= 80%", red: "< 50%" }
people:
- { indicator: nighttime pages per week to on-call, baseline: not measured, green: "<= 2", red: "> 4" }- Each indicator has a
baselinevalue, the one from January 2027. Many are "not measured": knowing that something is not measured is the first piece of data. - Between
greenandredlies the amber band, which is not written down: it is whatever is neither one nor the other. - There are six groups, and not just technical metrics: an architecture scorecard that ignores cost, governance, and people measures half the picture.
capacity devoted to technical debtchecks that the four people reserved in the roadmap really are reserved: 18% of 22.- There are seventeen indicators. That is the reasonable maximum for one page; adding one should force another to be removed.
# ADR-025: Continuous evaluation of the architecture
Status: Accepted
Date: 2027-01-28
Participants: architecture board; Daniel (business)
## Context
RouteManager was not evaluated in ten years. The new platform rests
on hypotheses that will change with volume, and one of them has
already turned out to be false. There are no delivery metrics and no
periodic review of the whole.
## Options considered
A. External audit when problems appear.
B. Internal annual review.
C. Continuous evaluation: fitness functions, delivery metrics,
scorecard, and annual review.
## Decision
We will adopt option C. General review every January: requirements,
principles, half-day lightweight ATAM, and a questionnaire across six
pillars. The four delivery metrics are obtained from the pipeline,
with targets for December 2027 and 2028. Catalog of fitness
functions, FF-01 to FF-08; the dependency ones, with a ratchet.
Scorecard monthly to the board and quarterly to the committee. Every
post-incident review asks whether a decision is called into question.
Every new ADR includes a review section with at least one trigger.
## Security
Data affected: internal metrics, with no personal data. The delivery
metrics are not used to evaluate people or to compare teams.
Requires threat modeling: no.
## Review
Trigger: two consecutive quarters with the scorecard not presented,
or more than 25 indicators.
## Consequences
Positive: erosion is detected in the change that causes it; baseline
of January 2027 with eleven findings. Negative: maintenance of the
fitness functions; three days of review a year.
Risks: noisy fitness functions that end up being disabled.
Cost: no additional infrastructure cost.Common Mistakes and Tips
- Evaluating only when there are problems. By then it is no longer an evaluation but an autopsy.
- Reviews that end in a report and not in actions with an owner and a date.
- Answering the questionnaire with intentions. "It is planned" is not evidence.
- Measuring a lot and looking little. Seventeen indicators that someone reviews are worth more than two hundred on a dashboard.
- Using delivery metrics to judge people or compare teams.
- Fitness functions with no requirement behind them, or so noisy that the team learns to ignore them.
- Turning on a dependency rule without a ratchet in a legacy system: it fails a thousand times on the first day and is disabled on the second.
- Chasing the maturity level instead of the outcome.
- Incidents closed with "human error." The useful question is why the system allowed that error to cause harm.
- ADRs without triggers, which are only reviewed when they fail.
- Tip: for each important decision, ask yourself how you would find out that it is no longer being followed. If the answer is "someone would tell me," it needs a fitness function or a trigger.
Exercises
Exercise 1
In the third quarter of 2027, the pipeline records 13 deployments of the monolith in 13 weeks. The lead times, in days, were: 9, 4, 6, 12, 5, 7, 3, 8, 6, 5, 10, 4, and 6. Two deployments required a rollback, and the service was restored in 12 and in 48 minutes.
- Calculate the four metrics.
- Compare them with the targets for December 2027.
- What would you look at next?
Exercise 2
Design a fitness function for each of these decisions. State what it measures, the threshold, when it runs, and whether it blocks or notifies.
- ADR-015: logs contain no personal data.
- ADR-008: every remote call has a timeout.
- ADR-022: tracking data is deleted 90 days after delivery.
Exercise 3
It is March 2028. For three weeks, the hit rate of the tracking cache has been 79%. The p95 of the tracking page is 140 ms, within NFR-05. A developer proposes raising the TTL from 30 to 120 seconds to get back to 85%. What do you do?
Solutions
Solution 1
- Frequency: 13 deployments in 13 weeks, one a week. Lead time: sorted, 3, 4, 4, 5, 5, 6, 6, 6, 7, 8, 9, 10, and 12; the median is the seventh value, 6 days. Failure rate: 2 out of 13, 15.4%. Time to restore: with two values, the median is their mean, 30 minutes.
- Weekly frequency: met. Lead time, 6 against 7 days: met. Failure rate, 15.4% against 15%: not met, by very little. Restore, 30 minutes: just met.
- With thirteen deployments, one failure more or less moves the rate by eight points: there is no need to dramatize the 15.4%, but the two reviews should be read. The most striking thing is the 48-minute restore, when the automatic rollback should take less than 10: did the rollback fail, or did detection take a long time? There is something to learn there. And it is worth looking at the tail of the lead times: the 10- and 12-day changes, what were they waiting for?
Solution 2
- Logs with no personal data. Two checks. In the pipeline, a code analysis that detects fields classified as personal, such as phone, email, name, or address, being written to the log: it blocks. And, every day, a search for phone and email patterns over a sample of the production logs: threshold, zero matches; it notifies Clara, because the data has already been written and must be treated as an incident.
- A timeout on every remote call. A static analysis that locates the calls to HTTP, database, and bus clients, and checks that each one declares a timeout: threshold, zero calls without one; on every change; it blocks. A complement: on drill day, inject latency into each dependency and check that the response arrives within the expected time. It is a fitness function that does not run in the pipeline but twice a year.
- Deletion at 90 days. A daily query on
db-tracking: the number of rows inshipment_trackingwith a delivery earlier than 91 days ago. Threshold: zero. It notifies the Services team and Clara; it cannot block anything, because it does not depend on a change. It is of the same type as FF-05: it watches the passage of time.
Solution 3
First, recognize what has happened: a trigger in ADR-005 has fired, which set a hit-rate target of 85%. That does not force anything to change yet; it forces the decision to be reviewed.
Second, separate the symptom from the requirement. The requirement, NFR-05, is met with room to spare: 140 ms against 500. The hit rate was an intermediate target, meant to protect the Tracking database during peaks. The right question is not how to get back to 85%, but why it has dropped and whether it matters: has the query pattern changed? Are there more shipments in progress, with a short TTL? Is someone enumerating the codes? The load on db-tracking and the per-IP rate limit will tell.
Third, the proposal. Raising the TTL to 120 seconds is not a technical tweak: it changes what the recipient sees, who could take two minutes to see a status change. It is a trade-off between freshness and load that ADR-005 settled at 30 seconds, and touching it goes through the board, by the asynchronous route, with the business informed.
Likely outcome: if the database has headroom, confirm ADR-005 with a note and revise the trigger, perhaps toward the load on the database, which is what was really meant to be protected. If it does not, study options that do not degrade freshness, such as more capacity or a different TTL depending on the status, and clarify the ADR. In no case is the TTL changed in production and the document updated afterward.
Conclusion
An architecture degrades because its context changes, because the code drifts away from the design, or because its components age, and none of the three gives any warning. The answer is a cycle of plan, do, check, and act that turns at several speeds. Once a year, a review of the whole: the requirements with their measurements, the principles with one question each, a lightweight ATAM that walks through the scenarios that matter, and a pillar questionnaire answered with evidence. Every month, the four delivery metrics, which say whether the system can be changed quickly and without breaking it. On every change, fitness functions that turn a decision into a test. After every incident, a review that asks whether any decision is called into question. And in every ADR, triggers that say when to look at it again, with three outcomes: confirm, clarify, or supersede.
With ADR-025, Rutaverde has its continuous evaluation system and its baseline. RouteManager's delivery metrics are one deployment a month, 38 days of waiting, a 33% failure rate, and 95 minutes to restore the service; the targets for December 2027 are weekly, 7 days, 15%, and 30 minutes. There are eight fitness functions cataloged and a scorecard of seventeen indicators. The first annual review, in January 2027, left eleven findings, and the best one was brought by a dispatch manager: nobody had tested the five-in-the-morning planning with five times as many shipments.
Two of those findings are of a different size. AR-10 says that RouteManager's technical debt is not recorded: we know there is an unsupported Java runtime, a database approaching the end of its support, a 6,000-line class, but not how much each thing costs us or in what order to pay it off. AR-07 says that the most expensive decision is still open: what is done with the core, which consumes 64% of the cost in a data center, and whose deadline expires in September. And behind both lies the question the program takes for granted: how do you replace, piece by piece and without stopping it, a ten-year-old system that bills €140,000 a day? That is the topic of the module's last lesson: technical debt and the evolution of legacy systems.
Technological Architecture Course
Module 1: Fundamentals of Technological Architecture
- Introduction to Technological Architecture
- System Design Principles
- Components of a Technological Architecture
- Architecture Models
- Non-Functional Requirements and Quality Attributes
- Architecture Decisions and Trade-off Analysis
Module 2: Designing Scalable Systems
- Scalability Concepts
- Scalable Design Patterns
- Load Balancing
- Caching and In-Memory Storage
- Data Layer Scalability: Replication and Partitioning
- Asynchronous Communication: Message Queues and Events
- High Availability and Resilience
Module 3: Security in Technological Architecture
- Security Fundamentals
- Authentication and Authorization
- Data Protection
- Cloud Security
- Network Security and Zero Trust Architecture
- Threat Modeling
Module 4: Efficiency and Optimization
- Resource Optimization
- Monitoring and Maintenance
- Process Automation
- Performance Evaluation
- Technology Cost Management (FinOps)
- Business Continuity and Disaster Recovery
Module 5: Managing Technological Architecture
- IT Governance
- Technology Project Management
- Documentation and Communication
- Evaluation and Continuous Improvement
- Technical Debt and the Evolution of Legacy Systems
