Skip to content
About
Main content

Summary and key takeaways

The governing question. What quantity is metered, and what is the smallest increment you are charged for? Every price has the form billed = ceil(q ÷ g) × g × r. The metered quantity is a proxy for the work, never the work itself. Cost engineering is the study of the gap between the unit you are billed for and the unit you needed.

Four meters. Stock ($/GB-month), occupancy ($/vCPU-hour), flow ($/GB transferred) and event ($/request, $/TB scanned). A vendor meters what is scarce for the vendor, rivalrous and cheap to count. Per-request pricing exists because a resource whose use does not depend on payload cannot be recovered through a byte meter.

Formulas to remember:

FormulaMeaning
billed = ceil(q ÷ g) × g × revery price: quantity, , rate
= list rate ÷ compute sells capacity-time; utilization is your problem
S* = c_req ÷ c_byte (about 100 KB)below this object size you pay for the envelope, not the letter
idle multiplier ≈ (peak ÷ mean) ÷ ρ_targetthe price of variance (about 5× for a bursty, latency-sensitive service)
p(read) × retrieval cost < stock savingwhen a cold tier wins
value = (1 − selectivity) × bytes × rate × frequencythe dollar value of ; techniques multiply (40 × 30 × 3 = 3,600×)
N* = (B + R × changes + S × T) ÷ saving per querymaterialization
elastic wins when d × k < 1; d is , k the premium
= ramp rate × loop delay cannot handle spikes
survival = (1 − p)ⁿ (0.95¹⁰⁰ ≈ 0.6%)
commit at the forecast quantile equal to the discount (P40 at 40% off)an unused committed unit costs the committed price (0.6), a missing one only the discount (0.4)

Patterns that repeat:

  • Granularity mismatch creates , whether the granularity is physical (a flash erase block) or contractual (a 128 KB minimum object size, a 60-second minimum).
  • The vendor's fixed cost sets your natural batch size.
  • Costs are conserved. Every escape (batching, , changing the meter) moves a cost and converts it to , correlation risk or forecasting risk.
  • Two opposed meters on one granularity parameter give an (partition count against scan volume and metadata).
  • The meter decides the answer. Compression strength, cache value, materialization and admission control invert at a metering boundary.
  • Concurrency hides latency and never money. The small-file problem is economic before it is a performance problem.
  • Cost is concentrated in the tail. Performance work is a median exercise; cost work is a tail exercise.
  • means selling and buying demand risk. is 2–5× the committed rate; spot is 60–90% below on-demand. The spread is the market price of your uncertainty.
  • A cannot regulate faster than its delay. Cost needs a fast (governors, caps, dry-run estimates) and a slow outer loop (, , forecasting).
  • Attribution granularity cannot exceed isolation granularity.
  • Anti-patterns are abstractions succeeding. The remedy is to show the meter at the moment of authorship.

Six corrections of common claims:

  1. "The cheaper engine is cheaper": not at low utilization.
  2. "Tiering means colder hardware": it is a contract (an option trade).
  3. "128 MB is the right file size because of HDFS": historically true, causally dead; two independent forces agree.
  4. " is why you cannot leave the cloud": exit fees were waived in 2024; remaining lock-in is operational.
  5. "Scale-to-zero costs nothing when idle": storage and reactivation still bill, and sparse traffic is the worst case.
  6. "Three-year commitment at 40% saves 40%": with prices falling about 20% a year it saves about a quarter.

Escapes, cheapest first: change the workload, change the meter, change the layout, change the architecture.

The rule that lasts. Conclusions that come from a structure (a ratio, a fixed latency, an asymmetric loss) survive a price change. Conclusions that come from a number in the price list do not.