Teams record significant decisions in short documents called ADRs, and cost decisions are some of the most common. This part explains the format, then reads a small fictional one (right-sizing and committing the hosting for PhotoDrop's web API) to practise checking every claim against the rules from Parts 6 to 8. It ends with a checklist and a glossary for reading any cost proposal.
This is the ninth part of the Azure series and the last about money. Parts 6, 7 and 8 built the pieces: how a bill is made, provisioned versus serverless compute, and commitment discounts. This part is about using them: reading a written cost proposal and checking whether its numbers and its reasoning hold up.
The worked example is deliberately small and fictional, about the hosting for PhotoDrop's web API, with illustrative prices. The skill it practises is general: the same questions apply to a database, a fleet of VMs, or any other resource a team proposes to resize or commit to.
An Architecture Decision Record (ADR) is a short document recording one significant technical decision: what was decided, why, what else was considered, and what it costs. Teams keep ADRs alongside their code, numbered in order, so that much later anyone can find out why something is built or paid for the way it is, without relying on memory.
Most ADRs follow a similar skeleton:
| Section | Answers |
|---|---|
| Status | is this proposed, accepted, or replaced by a later decision? |
| Context | what is true today, with measurements, and which rules constrain the choice? |
| Decision | what exactly will be done? |
| Options considered | what were the alternatives, and why were they rejected? |
| Consequences | what gets easier, what gets harder, what needs revisiting later? |
| Rollout and rollback | how will it be introduced, and how is it undone if it goes wrong? |
A cost ADR is only as good as its evidence. Reading one well comes down to two habits: check that every number has a source and adds up, and check that every argument follows from a documented rule. The example below is annotated with exactly those checks.
The PhotoDrop web API runs on an App Service plan (Part 10 places App Service on the map; for now it is enough that a plan is a set of identical instances, each billed per hour, whether busy or idle). The plan runs a fixed 4 instances, all day, every day.
Illustrative price: USD 0.40 per instance-hour.
4 instances × 0.40 × 8,760 hours ≈ USD 14,000 per yearMeasured over the last two months, in "instances' worth" of CPU actually needed:
| Measure | Instances needed |
|---|---|
| p50 (a typical hour) | 1.2 |
| p90 | 1.8 |
| p99 | 2.6 |
| busiest moment | 3.5, briefly, when a weekly newsletter goes out |
Check it. The plan is allocated capacity (Part 6): billed every hour it exists. Four instances are paid for around the clock while a typical hour needs barely more than one. The figures are percentiles (Part 7), which is the right basis for sizing. The yearly cost is the standard conversion: instances × price × 8,760 hours.
Check it. Each constraint is a rule from an earlier part or from the service's documentation, not an opinion. The first sets a floor of two instances that will run no matter what, which is exactly the amount Part 8 says is safe to commit to. The third is the honest cost of automatic scaling: it reacts, it does not predict.
| Option | Instances billed on average | Yearly cost (illustrative) | Commitment |
|---|---|---|---|
| Keep a fixed 4 | 4 | ≈ USD 14,000 | none |
| Fixed 3 | 3 | ≈ USD 10,500 | none |
| Autoscale 2 to 5 | ≈ 2.3 | ≈ USD 8,100 | none |
| Autoscale 2 to 5, reserve the 2-instance floor | 2 reserved + ≈ 0.3 at normal rate | ≈ USD 5,600 | 1 year, 2 instances |
| Autoscale 2 to 5, savings plan for compute | ≈ 2.3, partly discounted | between the two above | 1 year, a spend per hour |
Check it. Recompute each row. Autoscale: 2.3 × 0.40 × 8,760 ≈ 8,100. With an illustrative 35% reservation discount, the floor costs 2 × 0.26 × 8,760 ≈ 4,550, and the extra 0.3 instance at the normal rate adds 0.3 × 0.40 × 8,760 ≈ 1,050, for about 5,600 in total. Then look at the shape: the biggest saving (14,000 to 8,100) comes from right-sizing, which needs no commitment and can be undone with one setting. The commitment takes a further, smaller slice. That is the ordering Part 8 recommends, and a proposal that leads with the commitment instead is worth questioning.
Check it. The commitment comes last, after measuring at the new configuration, because it is the only step that is hard to undo (Part 8). The reservation quantity equals the minimum instance count, the amount that runs every hour, so its utilization should stay near 100%. The scope keeps the discount on the workload it was bought for.
Easier: the bill drops by roughly 60% and follows actual traffic; the newsletter peak gets up to 5 instances instead of being capped at 4.
Harder: the API must be safe to run on a changing number of instances. Nothing important may live in one instance's memory, because scale-in removes instances (Part 1: scaling out needs stateless instances). Autoscale rules need tuning and monitoring, and the first minutes of a sudden spike will be slower than before, while new instances start.
To revisit: the reservation size at renewal, or sooner if the floor grows.
Check it. A trustworthy consequences section always has a "harder" list. If a proposal lists only benefits, its costs have usually moved somewhere it does not mention: into the code, the monitoring, or someone's on-call rota.
Autoscale is a setting on the plan, so it is easy to undo before any money is committed:
# Turn on autoscale: between 2 and 5 instances, starting at 2
az monitor autoscale create --resource-group rg-photodrop-prod \
--resource asp-photodrop-api --resource-type Microsoft.Web/serverfarms \
--name autoscale-photodrop-api --min-count 2 --max-count 5 --count 2
# Add an instance when average CPU stays above 70% for 10 minutes
az monitor autoscale rule create --resource-group rg-photodrop-prod \
--autoscale-name autoscale-photodrop-api --condition "CpuPercentage > 70 avg 10m" --scale out 1
# Rollback: turn autoscale off and go back to a fixed 4 instances
az monitor autoscale update --resource-group rg-photodrop-prod \
--name autoscale-photodrop-api --enabled false
az appservice plan update --resource-group rg-photodrop-prod \
--name asp-photodrop-api --number-of-workers 4Once the reservation is bought, rolling back to a fixed size still works, but the reservation keeps costing money either way, so the rollback plan changes from "flip a setting" to "use an exchange, within Microsoft's rules" (Part 8).
Check it. Every step before the purchase is reversible with a control-plane change (Part 4). The proposal says plainly where that stops being true. Look for that sentence in any real proposal: the point after which undoing the decision costs money.
The same questions apply whatever the service:
| Term | Meaning | Part |
|---|---|---|
| meter | one measured quantity of a resource, billed at a unit price | 6 |
| vCore, vCore-hour | a unit of compute; one vCore for one hour | 6 |
| retail / effective price | the public list price / what you actually pay after discounts | 6 |
| Retail Prices API | public API returning list prices by meter, region and currency | 6 |
| allocated / consumed | billed for existing / billed for use | 6 |
| replica, instance | a running copy, each billed for its own compute | 6, 7 |
| provisioned compute | a fixed size, billed every hour | 7 |
| serverless compute | auto-scaling between a minimum and maximum, billed per second for what the formula measures | 7 |
| auto-pause | a serverless resource stopping compute charges when idle | 7 |
| p50 / p90 / p99 | the usage level that 50% / 90% / 99% of hours stayed at or below | 7 |
| autoscale | rules that add and remove instances automatically, between a minimum and maximum | 7, 9 |
| transient error | a short-lived failure, such as a dropped connection, fixed by retrying | 7 |
| idempotent | safe to run more than once with the same result | 7 |
| reservation | a 1- or 3-year pre-purchase of a specific resource quantity, applied hourly, use it or lose it | 8 |
| scope | where a commitment's discount may land: resource group, subscription, management group or shared | 8 |
| utilization | the share of committed capacity actually used | 8 |
| exchange / refund | swapping a reservation for another / cancelling it, within published limits | 8 |
| savings plan | a 1- or 3-year commitment to spend a fixed amount per hour across eligible services | 8 |
| Azure Hybrid Benefit | using licences you already own to remove the licence part of a price | 8 |
| ADR | Architecture Decision Record: a short document recording one decision and its reasons | 9 |
A cost proposal is a chain of claims, and each link can be checked: a measured cost, explained by a billing rule, with every copy counted, sized from percentiles, saving first through right-sizing (free and reversible) and only then through a commitment sized to the floor, with its operational costs listed honestly and its one irreversible step last. Recompute the numbers, match each argument to the rule behind it, and find the point after which undoing the decision costs money.
That completes the money side of the fundamentals. Part 10 steps back to look at the whole catalogue: Azure's couple of hundred services sorted into a handful of categories, each with a rule for when to reach for it, and the rest of this path placed on that map.