78

Cost is an SLI, just like latency

#
  • practice
  • context-dependent
  • fragment

Conflicts with: Shadow-run ↔ cost, Cost as an SLI (78) ↔ latency headroom (100)

Cost-per-request / cost-per-tenant is an engineering metric with a budget and an alert, not a quarterly surprise from billing. For multi-cloud, egress is a first-order architectural constraint: cross-region / cross-cloud traffic can cost more than compute, and the data topology is designed around it.

There is no single origin for this one; it is a practice. The FinOps Foundation’s framework is the main public reference and centres on unit economics — cost divided by a business unit such as a request, an order or an active tenant. The engineering point is that a cloud bill is the sum of decisions made in code and configuration: a retry policy, a cache TTL, a log level, a cross-zone replica, a query that scans a whole partition. Those decisions are made by engineers, so the feedback has to reach engineers at the same speed as latency does — per deploy, per endpoint, per tenant — not monthly to a finance team that cannot change them.

Code example (fragment)
Gofragment
// cost is attributed in the same wide event (see 28)
logger.Info("request_completed",
    "tenant", tid, "compute_ms", ms, "bytes_egress", n,
    "downstream_calls", calls, "est_cost_usd", est) // → cost per tenant/endpoint
                                                    //   is answered by a query, not by finance

An example of a cost that latency dashboards miss: a service and its database replica in different availability zones. Every query crosses a zone boundary, which most clouds bill per gigabyte, and a chatty ORM can make that transfer a large share of the service’s cost while latency stays fine. The estimate in the event above needs only rough per-unit prices from the provider’s current price list, reconciled monthly against the real bill; trends matter more than cents.

Link to 55: an LLM fallback cascade is cost engineering in its purest form. Link to 38: USL tells you when an added node yields negative gain, and a cost SLI tells you how much you pay for that negative gain. Unit economics break silently: an alert on cost-per-request matters more than an alert on the absolute bill. The misuse is optimizing cost below the reliability target (30): removing the replica that made the SLO achievable is not a saving.

Last technical review: 2026-08-04 · Reference · 112 principles