The week of testing ended with good news for capacity and with a question from Daniel that can no longer be put off. Since we started redesigning RouteManager we have added database replicas, an event bus, a managed edge, an identity provider, an observability platform, a pipeline, and, after the tests, a sixth instance in peak season. Every lesson has ended with the same warning: "we still do not know how much it costs." NFR-12 sets the limit at two cents of infrastructure per shipment, and the starting point is two and a half cents. In this lesson you will learn to treat cost as what it is, an attribute of the architecture that is designed, measured, and governed, and with Íñigo and Daniel we will do the complete sum. The result will not be the one we expected, and out of it will come one of the most important conversations in the course between architecture and the business.
Warning. All the figures in this lesson are fictitious and serve only to illustrate the method. Real prices vary by provider, region, contract, and point in time, and must be obtained from the official price lists and calculators. Decisions about spending commitments, depreciation, and accounting treatment must be reviewed with the finance department.
Contents
- Why cost is an architecture attribute
- CAPEX, OPEX, and total cost of ownership
- Cloud pricing models
- FinOps: principles, phases, and roles
- Visibility: tagging and cost allocation
- Unit economics: the cost per shipment
- Optimization levers
- Budgets, forecasts, and anomaly alerts
- The cost of the Rutaverde platform
- Cost versus other attributes
- Why cost is an architecture attribute
In a company's own data center, cost is decided once every several years, when servers are bought, and purchasing decides it. In the cloud, every design decision is a spending decision, and it is made by whoever designs: choosing a database in two zones, a storage tier, or a scaling maximum has a price that shows up on next month's bill.
That is why cost is treated like any other quality attribute:
| Like any quality attribute... | Applied to cost |
|---|---|
| It is expressed as a measurable requirement | NFR-12: infrastructure below €0.02 per shipment |
| It enters the trade-offs of every decision | It was a criterion in the matrix of ADR-016 |
| It is measured continuously | Cost per service and per shipment, every month |
| It has an owner | Each team sees what it spends and answers for it |
Two important nuances. The goal is not to spend less, but to spend well: to get the most business value out of every euro. And cost sits in sixth place among the priorities we set with the business, behind availability, scalability, performance, maintainability, and observability. It is optimized within what those priorities allow.
- CAPEX, OPEX, and total cost of ownership
| CAPEX: capital expenditure | OPEX: operating expenditure | |
|---|---|---|
| What it is | An investment that is bought and depreciated over years | A recurring expense that is paid as it is consumed |
| Example | Buying db-03 |
The monthly fee for db-tracking |
| Commitment | High: the server is yours, whether you use it or not | Low: you stop paying when you stop using it |
| Predictability | High once bought | Variable; it can grow without anyone deciding it |
| Typical risk | Idle or insufficient capacity | Runaway spending |
The cloud turns CAPEX into OPEX. That is neither better nor worse in itself: it changes who decides, when, and with what risk.
To compare options we use the total cost of ownership (TCO): everything something costs over its lifetime, not just its price. The comparison between an owned server and the cloud is usually done badly because the cloud bill is compared with the price of the server, forgetting everything else:
| Item | Own data center | Cloud |
|---|---|---|
| Hardware | Purchase and renewal every 4 or 5 years | Included |
| Hosting, power, and cooling | Yes | Included |
| Licenses and maintenance | Yes | Partly included |
| People who operate it | More hours | Fewer hours, not zero |
| Idle capacity | Always paid for | Paid for only if it is not turned off |
| Data egress | Not billed by volume | Yes |
| Time to get new capacity | Weeks | Minutes |
An example: the db-02 replica, with 16 cores and 128 GB, over five years.
| Item, 5 years | Owned server | Cloud, on-demand | Cloud, 3-year commitment |
|---|---|---|---|
| Purchase | €35,000 | — | — |
| Usage: €1.90/h × 8,760 h × 5 | — | €83,220 | €49,932, with a 40% discount |
| Maintenance: €2,000/year | €10,000 | — | — |
| Hosting and power: €1,500/year | €7,500 | — | — |
| Storage: €1,400/year | Included | €7,000 | €7,000 |
| Administration hours | €15,000 | €5,000 | €5,000 |
| Total | €67,500 | €95,220 | €61,932 |
Three lessons in one table: for a stable, permanent load, paying on demand is the most expensive option; with a commitment, the cloud matches or beats the owned server; and the decisive difference is not in the table, but in the flexibility. The owned server only wins if it really is used for five years.
- Cloud pricing models
| Model | How it works | Indicative discount | When to use it | Risk |
|---|---|---|---|---|
| On-demand | You pay by the hour or the second, with no commitment | None | New, variable, or temporary loads | It is the highest price |
| Commitments or reservations | You commit to a usage or a spend for 1 or 3 years | 20% to 60% | The stable base that always runs | Paying for something you stop using |
| Interruptible instances | Spare capacity that the provider can take back with little notice | 60% to 90% | Batch jobs, load tests, whatever tolerates interruptions | Interruption at any moment |
| Pay-per-use in managed services | You pay per request, per message, per GB | — | Low or irregular traffic | At high volume it ends up costing more than a fixed instance |
| Data egress | Taking data out of the cloud is charged per GB; bringing it in is usually free | — | It is not a choice: it has to be anticipated | The cost forgotten in every estimate |
The usual combination: commitment for the base, on-demand for the peaks, interruptible for whatever can wait. And a word about egress: in a hybrid architecture, every piece of data that travels from the cloud to the data center pays for it. It is one more reason for Tracking to have its own data and not query the monolith.
- FinOps: principles, phases, and roles
FinOps is the practice of managing the cost of the cloud as a responsibility shared among technology, finance, and the business. Its premise: whoever makes the decisions that generate spending must see that spending and answer for it.
Its principles, in brief:
- Teams collaborate. Engineering, finance, and the business work with the same data.
- Each team is responsible for its consumption. Cost is one more metric of the service, like latency.
- Decisions are guided by business value, not by absolute spending. Hence unit economics.
- Data is accessible and timely. A quarterly report arrives three months late.
- A central team drives the practice: it negotiates commitments and maintains the tools and the rules.
- The variable model of the cloud is put to use: adjustments are continuous, not once a year.
The work is organized in three phases that repeat:
flowchart LR
I["Inform: who spends what and why"] --> O["Optimize: rightsize, turn off, commit"]
O --> P["Operate: budgets, alerts, periodic review"]
P --> I
| Phase | Question | Activities |
|---|---|---|
| Inform | How much do we spend, who spends it, and on what? | Tagging, allocation, cost dashboards, unit cost |
| Optimize | Where can we spend better? | Rightsizing, turning off, storage tiers, commitments |
| Operate | How do we keep it that way? | Budgets, alerts, monthly review, criteria in the ADRs |
The order matters: you cannot optimize what you cannot see. It is the same method of measuring before optimizing, applied to money.
As for roles, a company the size of Rutaverde does not need a dedicated team. It is enough to distribute responsibilities:
| Role | Who at Rutaverde | Responsibility |
|---|---|---|
| Practice owner | Íñigo | Tools, tags, commitments, monthly report |
| Finance | Financial controller | Budget, forecast, accounting treatment |
| Service teams | Each of the three development teams | The cost of their services |
| Architecture | Marta | Cost as a criterion in every ADR |
| Business | Daniel | Deciding what is worth what it costs |
- Visibility: tagging and cost allocation
A cloud provider's bill has thousands of lines. Turning it into information requires knowing what each one corresponds to, and that is achieved with tags. Rutaverde already has them: guardrail B-08 requires every resource to carry environment, service, owner, and classification. What was decided for security now serves cost: because they have been mandatory from day one, there are no orphaned resources.
Tags make cost allocation possible, which comes in two forms:
| Showback | Chargeback | |
|---|---|---|
| What it is | Showing each team what its services cost | Charging that cost to each team's budget |
| Effect | Awareness and conversation | Formal budget accountability |
| Complexity | Low | High: internal accounting, disputes over shared costs |
| Suitable for | Small organizations or those just starting out | Large organizations with autonomous units |
Two practical difficulties:
- Shared costs. The private link, the edge, and observability serve everyone. They are split with a simple, explicit rule, for example in proportion to each service's consumption, or shown separately as "common platform."
- What is not in the cloud. The data center has no tags. Its cost is split by an allocation key, such as the vCPUs reserved by each component.
Access to the cost data uses the role that already existed, role-cost, read-only on the billing of the five accounts.
- Unit economics: the cost per shipment
Total spending does not say whether the money is being spent well. If the bill goes up 40% and shipments go up 100%, that is good news. Unit economics relates cost to a business unit:
For Rutaverde, today: €365,000 / 14.6 million shipments = €0.025 per shipment. With an average revenue of €3.50 per shipment, infrastructure accounts for 0.7% of revenue.
What makes this metric useful is distinguishing two types of cost:
| Type | What it is | Examples | Effect on unit cost |
|---|---|---|---|
| Fixed | It does not depend on volume | The data center, the minimum of two instances, the link, the edge plan | It goes down as volume grows: it is spread over more shipments |
| Variable | It grows with volume | Photo storage, logs ingested, identity provider users, requests to the edge | It stays constant per shipment |
A platform with a lot of fixed cost is expensive at low volume and cheap at high volume. This formula is going to explain everything that happens in section 9.
- Optimization levers
In order of ease, from the most immediate to the deepest:
| Lever | What it consists of | Typical savings | Where it was covered |
|---|---|---|---|
| Turn off | Removing what is not used; stopping environments outside working hours | Up to 65% in non-production environments | Resource optimization |
| Rightsize | Adjusting sizes to the real load | 10% to 40% on what is oversized | Resource optimization |
| Storage tiers | Lifecycle: infrequent, archive, deletion | 40% to 80% of storage | ADR-014 |
| Commit | Reservations for the stable base | 20% to 60% of what is committed | This lesson |
| Reduce observability data | Trace sampling, log levels, retention | 30% to 60% of observability | ADR-015 |
| Architecture | Caching, asynchrony, avoiding transfers, choosing between managed and self-run | The largest, and the most costly to change | Module 2 |
The recommended order is the one in the table, with one exception: do not commit what has not yet been sized. Reserving for three years an instance twice as large as needed turns temporary waste into contractual waste.
- Budgets, forecasts, and anomaly alerts
Three mechanisms turn visibility into control:
- Budget: how much is expected to be spent per account and per service, with notifications on reaching, for example, 80% and 100%.
- Forecast: how much will have been spent by the end of the month at the current pace. It warns before the spending happens.
- Anomaly detection: a daily spend that departs from its pattern, even if it is within budget.
budgets:
- account: rv-prod
monthly_eur: 16000
notifications:
- { at: "80%", to: [operations-team] }
- { at: "100% forecast", to: [operations-team, finance] }
anomalies:
- scope: service
condition: "daily spend > 130% of the average of the previous 7 days"
notify: [service_owner, operations-team]
technical_limits:
- service: tracking
max_instances: 8
- service: notifications
max_instances: 6
- service: observability
max_daily_ingest_gb: 60budgetsdefines the expected monthly spend of the production account and who is notified. The second notification fires when the forecast reaches 100%, not when the money has already been spent.anomaliescompares each day with the previous week, service by service, using theservicetag.technical_limitsis the only thing that prevents spending: budgets warn, they do not stop anything. A maximum number of instances and an ingest cap are the real seat belt.
Here we pick up a loose end from threat modeling. Threat TH-05, a flood of queries on tracking, was accepted with a condition raised by Íñigo: autoscaling turns an attack into a bill. Let us calculate how much, with a week of 1,000 requests per second:
| Item | Calculation | Cost |
|---|---|---|
| Six additional instances, up to the maximum of 8 | 6 × €0.09/h × 168 h | €91 |
| Requests at the edge | 605 million × €0.60 per million | €363 |
| Logs of those requests | 302 GB × €0.50/GB | €151 |
| Total for the week | about €600 |
The cost is bounded, and it is bounded by design: there is a maximum of eight instances, negative caching absorbs the nonexistent codes, and log ingestion is capped. With no scaling maximum and no ingest cap, the figure would have no ceiling. The anomaly alert warns on the first day; the decision to activate stricter rules at the edge belongs to operations and security.
- The cost of the Rutaverde platform
The starting point
RouteManager's €365,000 a year breaks down as follows:
| Item | Annual cost |
|---|---|
| Hosting, power, and cooling of the data center | €96,000 |
| Hardware depreciation | €118,000 |
| Software licenses and support | €64,000 |
| Connectivity: two fiber lines | €36,000 |
| Maintenance contracts | €51,000 |
| Total | €365,000 |
All of it is fixed cost. It does not include people, and that should be said: it is the criterion of NFR-12, which speaks of infrastructure.
The target platform, component by component
Íñigo estimates each piece of the target diagram with two numbers: its annual fixed cost and its variable cost per million shipments.
| Component | Fixed, €/year | Variable, € per million shipments | What makes the cost vary |
|---|---|---|---|
| Current data center | 365,000 | 0 | Nothing in the short term: it is owned capacity |
Servers db-02 and db-03: depreciation and maintenance |
24,000 | 0 | — |
| Compute for Tracking and Notifications | 3,800 | 150 | Instances above the minimum |
| Managed load balancer | 2,400 | 20 | Requests |
db-tracking |
7,600 | 60 | Storage |
cache-tracking |
2,400 | 0 | — |
event-bus |
4,800 | 40 | Messages |
| Object storage: photos, backups, archive, static files | 1,000 | 40 | 200 GB of photos per million shipments |
| Private link and data transfer | 21,000 | 100 | GB transferred |
| Managed edge: CDN, WAF, and DDoS protection | 24,000 | 400 | Requests |
| Identity provider | 12,000 | 800 | Users: more shipments mean more couriers and merchants |
| KMS, secrets, posture, and audit | 12,000 | 50 | Operations and audit logs |
| Observability | 24,000 | 1,200 | Logs and traces ingested |
| Pipeline and pre-production | 18,000 | 0 | — |
| Cloud provider support | 9,000 | 0 | — |
| Provision for disaster recovery | 30,000 | 50 | It is designed in the next lesson |
A few observations before adding up:
- Photo storage, which looked like the big problem, is almost irrelevant: with the lifecycle of ADR-014, €40 per million shipments.
- The two largest variable items are not compute: observability, which charges per unit of data ingested, and the identity provider, which charges per user.
- The sixth peak-season instance does not appear: it runs on data center capacity that is already paid for.
- The last row is a provision: we have not yet designed disaster recovery, but we know it will cost something, and a budget that ignored it would be badly done.
The calculation
components = [
# (name, fixed cost in €/year, variable cost in € per million shipments)
("Current data center", 365_000, 0),
("Servers db-02 and db-03", 24_000, 0),
("Compute for Tracking and Notifications", 3_800, 150),
("Managed load balancer", 2_400, 20),
("db-tracking", 7_600, 60),
("cache-tracking", 2_400, 0),
("event-bus", 4_800, 40),
("Object storage", 1_000, 40),
("Private link and data transfer", 21_000, 100),
("Managed edge", 24_000, 400),
("Identity provider", 12_000, 800),
("KMS, secrets, posture, and audit", 12_000, 50),
("Observability", 24_000, 1_200),
("Pipeline and pre-production", 18_000, 0),
("Cloud provider support", 9_000, 0),
("Provision for disaster recovery", 30_000, 50),
]
scenarios = {"Today": 14.6, "Year 1": 36.5, "Target": 73.0} # millions of shipments per year
TARGET = 0.02 # NFR-12, in € per shipment
def summary(title, fixed, variable):
print(title)
print(f" Fixed: €{fixed:,}/year | variable: €{variable:,} per million shipments")
for name, millions in scenarios.items():
total = fixed + variable * millions
unit_cost = total / (millions * 1_000_000)
print(f" {name:<9}{millions:5.1f} M shipments: €{total:,.0f}/year -> €{unit_cost:.4f}/shipment")
break_even = fixed / (TARGET * 1_000_000 - variable)
print(f" NFR-12 is met from {break_even:.1f} M shipments/year "
f"({break_even * 1_000_000 / 365:,.0f} per day)")
fixed = sum(c[1] for c in components)
variable = sum(c[2] for c in components)
summary("Target platform, not optimized", fixed, variable)componentsis the previous table, turned into a list. Each item has a name and its two costs.scenariosdefines three annual volumes: the current one, 40,000 shipments a day; an intermediate point of 100,000 a day; and the target of 200,000, which is 73 million a year.summaryapplies the formula from section 6 to each scenario: total cost equals fixed plus variable times volume, and unit cost equals total divided by shipments.break_evenanswers the key question: from what volume is NFR-12 met? It comes from solving for the volume infixed / shipments + variable = target.- The final lines add up the columns and call the function.
Target platform, not optimized
Fixed: €561,000/year | variable: €2,910 per million shipments
Today 14.6 M shipments: €603,486/year -> €0.0413/shipment
Year 1 36.5 M shipments: €667,215/year -> €0.0183/shipment
Target 73.0 M shipments: €773,430/year -> €0.0106/shipment
NFR-12 is met from 32.8 M shipments/year (89,935 per day)Reading the result
The result deserves to be read slowly, because it contains one piece of bad news and one of good news:
- At the current volume, the new platform costs €0.041 per shipment. Not only does it fail to come down to the €0.02 of NFR-12: it goes up 65% compared with the €0.025 we started from. In euros, from €365,000 to a little over €600,000 a year.
- At the target volume, it costs €0.011 per shipment: half the requirement and less than half of today's figure.
- The break-even point is at about 90,000 shipments a day, which the growth plan reaches around month 12.
The explanation is the formula: 93% of the cost is fixed. By area, at today's volume:
| Area | Annual cost | Share of the total |
|---|---|---|
| Core in the data center, with the new replicas | €389,000 | 64% |
| Cloud services and link | €48,986 | 8% |
| Security: edge, identity, keys, and posture | €66,250 | 11% |
| Operations: observability, pipeline, and support | €68,520 | 11% |
| Continuity: provision | €30,730 | 5% |
| Total | €603,486 | 100% |
Two architecture conclusions:
- The hybrid phase is the most expensive one. Rutaverde pays for an entire data center and, on top of that, a cloud. This is not a design mistake: it is the price of migrating progressively, which we chose in ADR-002 to reduce risk. But it is a decisive data point for the pending decision on the migration of the core.
- What drives up the cost is not scaling, but operating well. Security, operations, and continuity add up to about €165,000 that RouteManager did not spend, because it had none of that. Its absence also had a cost, which did not show up on any bill.
Optimization decisions
We apply the levers in order:
| Decision | Lever | Effect on fixed | Effect on variable |
|---|---|---|---|
| Stop pre-production outside working hours: it stays on for 60 of the 168 hours in the week | Turn off | −€6,400 | — |
| Remove from the data center what is no longer used: licenses for the old machines, extended maintenance of the NAS, which no longer grows | Turn off | −€14,000 | — |
| Observability: trace sampling at 10%, no debug logs, 30 days of retention | Reduce data | −€3,000 | −€500 per million |
| One-year commitment on the stable base in the cloud: about €31,000 of consumption, with a 30% discount | Commit | −€9,300 | — |
| Total | −€32,700 | −€500 per million |
fixed_savings = 9_300 + 6_400 + 3_000 + 14_000
variable_savings = 500
summary("Target platform, optimized", fixed - fixed_savings, variable - variable_savings)Target platform, optimized
Fixed: €528,300/year | variable: €2,410 per million shipments
Today 14.6 M shipments: €563,486/year -> €0.0386/shipment
Year 1 36.5 M shipments: €616,265/year -> €0.0169/shipment
Target 73.0 M shipments: €704,230/year -> €0.0096/shipment
NFR-12 is met from 30.0 M shipments/year (82,285 per day)Optimization saves about €40,000 a year at the current volume and almost €70,000 at the target, and brings the break-even point forward to about 82,000 shipments a day. But it does not change the conclusion: at today's volume, NFR-12 is not met. The spending commitment, moreover, will have to wait until a provider is chosen.
The conversation with Daniel
Marta and Íñigo present the numbers to Daniel without dressing them up. The conversation has three parts.
What it costs extra. About €200,000 a year during the transition, on revenue of about €51 million: infrastructure goes from 0.7% to 1.1% of revenue.
What it avoids. The last peak season left 3 hours and 20 minutes of downtime. At peak-season volume, €70,000 of revenue per hour, that is about €233,000 at risk in a single day, plus the discounts for breaching the SLA and two large customers lost. A single peak season without incidents pays for the year's difference.
What is decided. NFR-12 was formulated when nobody knew what operating well cost. The requirement remains valid as a target, and what gets clarified is its condition:
| Before | Now | |
|---|---|---|
| NFR-12 | Infrastructure ≤ €0.02 per shipment | Infrastructure ≤ €0.02 per shipment from 90,000 shipments a day onward; until then, a ceiling of €600,000 a year |
| Tracking of the metric | None | Cost per shipment on the business dashboard, every month |
A requirement that is revised with data and with the person who answers for the business is a healthy process. What would not be healthy is declaring it met by cutting observability or the database replica.
# ADR-018: Cost management: unit economics, per-service allocation, budgets, and commitments
Status: Accepted
Date: 2026-11-12
Participants: Íñigo (operations), Marta (architecture), Daniel (business), finance
## Context
The target platform costs about €603,000 a year at the current
volume, €0.041 per shipment, against RouteManager's €365,000 and
€0.025 and against the €0.02 target of NFR-12. 93% of the cost is
fixed: at 200,000 shipments a day it drops to €0.011.
## Options considered
A. Cut components until €0.02 is met at the current volume.
B. Keep the design, optimize, and clarify NFR-12 with the business.
C. Speed up the migration of the core to close the data center sooner.
## Decision
We will adopt option B. The reference metric is the cost per
shipment, published every month. Per-service allocation in showback
mode, with the B-08 tags; the data center is split by vCPU.
Monthly budget per account, anomaly alert on exceeding 130% of the
7-day average, and technical limits on scaling and ingestion.
Optimizations: stopping pre-production outside working hours, removing
what is unused in the data center, reducing observability data, and a
one-year commitment on the stable base once a provider is chosen.
NFR-12 is clarified: €0.02 per shipment from 90,000 shipments a day
onward; until then, a ceiling of €600,000 a year. Every ADR will
include a cost estimate. Option C will be studied in the ADR on the
migration of the core.
## Security
No changes to data or boundaries. role-cost, read-only.
## Consequences
Positive: cost is visible and has an owner; the target is achievable
and verifiable.
Negative: the cost per shipment goes up during the transition.
Risks: that growth is delayed and the fixed cost weighs for longer;
quarterly review together with the capacity plan.
- Cost versus other attributes
Optimizing cost is legitimate until it starts being paid for with another attribute. Some boundaries:
| Tempting cut | What it saves | What it really costs |
|---|---|---|
Removing db-03 |
About €14,000 a year | The single point of failure returns; NFR-01 is no longer met |
| A single Tracking instance off-peak | About €800 a year | One zone down means the service is down |
| Keeping logs for 7 days instead of 30 | A few thousand euros | Incidents that cannot be investigated |
| Turning off field-level encryption | One instance in peak season | It breaches NFR-09; it is not negotiable |
| Going back to five instances in peak season | Nothing: the capacity is already paid for | No N+1 at the peak |
The rule Rutaverde uses:
- Redundancy of what is critical is not cut. The standby replica and the N+1 instance are not waste.
- Security is not cut. It is a constraint.
- What does get cut without hesitation is what is idle, what is oversized, the data nobody looks at, and the environments nobody uses at night.
- What is not critical is sized as not critical.
mono-batch-01anddb-02have no redundancy because NFR-03 allows it: that saving was already taken, consciously, at design time.
Common Mistakes and Tips
- Looking only at the total bill. Without a business unit there is no telling whether the money is well spent.
- Comparing the price of the server with the cloud bill. You have to compare total costs of ownership.
- Tagging later. What is born without a tag rarely gets one.
- Committing before sizing. It turns waste into a contract.
- Relying on budgets as a brake. They warn; what stops spending is the technical limits.
- Forgetting data egress and observability. They are the two items that cause the most surprises.
- Optimizing by cutting what is critical. The saving is seen every month; the cost, on the day of the incident.
- Dressing up an unmet requirement. It is better to take the data to the business and revise the requirement.
- Treating cost as a finance problem. It is decided in the design, and it is decided by whoever designs.
- Tip: add two numbers to every architecture decision, its fixed cost and its cost per business unit. With the second you will know how it will behave when the business grows.
Exercises
Exercise 1
Indicate which pricing model you would choose for each load and why:
db-tracking, which runs 24 hours a day all year round.- The Tracking instances from the third to the eighth, which exist only at the peaks.
- The load generators for the test campaign, one week a year.
- A new service for exporting invoices as PDFs, with about 300 requests a day.
Exercise 2
A service has a fixed cost of €48,000 a year and a variable cost of €1,500 per million shipments.
- Calculate its cost per shipment at 14.6 and at 73 million shipments a year.
- From what volume does it cost less than €0.003 per shipment?
- A colleague proposes an alternative with €12,000 of fixed cost and €3,000 of variable cost per million. From what volume does it stop being worthwhile?
Exercise 3
The anomaly alert reports that the daily spend on observability has tripled since yesterday. What do you check, in what order, and which design decisions would limit the damage next time?
Solutions
Solution 1
- Commitment for one or three years. It is a stable, permanent load: on-demand would be the most expensive option. First the size has to be confirmed, which the tests found adequate, and a provider chosen.
- On-demand. They exist for few hours a year; a commitment would be paid for without being used.
- Interruptible, or on-demand if interruption complicates the test. It is a temporary load and tolerates being repeated. The generators are not part of the system being measured.
- Pay-per-use on a managed service that charges per execution. With 300 requests a day, a fixed instance would be idle almost all the time. If the volume grows a lot, it is reviewed.
Solution 2
- At 14.6 million: 48,000 + 1,500 × 14.6 = €69,900, that is, €0.0048 per shipment. At 73 million: 48,000 + 109,500 = €157,500, €0.0022 per shipment.
48,000 / shipments + 0.0015 = 0.003, from whichshipments = 48,000 / 0.0015= 32 million a year, about 87,700 a day.- They are equal when
48,000 + 1,500 × M = 12,000 + 3,000 × M, that is,36,000 = 1,500 × M, M = 24 million shipments a year. Below that, the alternative is cheaper; above it, more expensive. At the current volume of 14.6 million the alternative is the better choice; at the target, the first one. It is the usual dilemma between pay-per-use and fixed capacity, and the answer depends on when you expect to cross the threshold.
Solution 3
- Which data has grown: logs, metrics, or traces. It is almost always the logs.
- From which service, with the
servicetag. - What changed yesterday: the deployment markers on the dashboards. The most common cause is a debug level left on, or an error being logged in a loop.
- Whether it reflects a real problem: an error repeated millions of times may be an incident that users have not yet noticed, or an attack like TH-05.
- Mitigate: roll back the deployment or lower the log level; if it is hostile traffic, rules at the edge.
Design decisions that limit the damage: a daily ingest cap, which is already among the technical limits; sampling and a limit on repetition of the same message in the collectors otel-dc-01 and otel-dc-02; forbidding the debug level in production except for temporary activation with an expiration; and a check in the pipeline that compares the log volume of the new version with that of the previous one, as is done with the p95.
Conclusion
Cost is an attribute of the architecture: it is decided at design time, it is expressed as a requirement, it is measured continuously, and it has owners. We have distinguished investment from operating expenditure and learned to compare options by their total cost of ownership; we have seen the cloud pricing models and the rule of committing the base, paying on demand for the peaks, and using interruptible capacity for whatever can wait; and we have met FinOps, with its phases of inform, optimize, and operate. The central tool is unit economics: separating fixed cost from variable cost and expressing the result per business unit.
Applied to Rutaverde, the sum has given an uncomfortable and honest result. The target platform costs about €603,000 a year at the current volume, €0.041 per shipment, against RouteManager's €0.025. Optimized, €0.039. At the target volume it drops to €0.010, half of what NFR-12 asked for. The cause is that 93% of the cost is fixed and that the hybrid phase pays for two infrastructures. ADR-018 establishes the cost practice and clarifies the requirement with Daniel: two cents from 90,000 shipments a day onward and, until then, a ceiling of €600,000 a year. What was not done was making the number work by cutting what protects the business.
Among the items there was one we have not yet designed: €30,000 of provision for disaster recovery. And there is a risk that ADR-008 left in writing and that no lesson has addressed: 64% of the cost, and one hundred percent of shipment creation, lives in a single building in Zaragoza. We have redundancy for the failure of a server, a load balancer, or a link. We have no answer for a fire, a flood, or an attack that encrypts the data. In the next lesson, the last of the module, we will finally define NFR-14 and design what happens on the day everything fails at once.
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
