Cost Engineering

Cost as a design constraint, not a monthly report. Which meter runs, which line item nobody predicted, and why the bill can triple without the compute changing at all.

COST-VARIES

No figure anywhere on this page is a price. Every bar, weight and comparison here teaches the shape of a cost and what drives it. Real rates depend on provider, region, commitment, volume and the day you look. Learn which meter runs and which line item is the surprise; look up the number when you actually need it.

Where the bill actually comes from

Relative weights, not currency. The point is which line item moves when the architecture changes.

Where the bill actually comes from
Toggle the architecture and watch the shape of the spend, not a price. Fixed weight is committed the moment you provision; usage weight only moves when the workload does.
right-sized to
Headroom is capacity you deliberately keep empty to absorb a spike, a deploy and a failed peer — it is the reliability budget. Waste is capacity nobody chose and nobody watches. The bill cannot tell them apart; only the sizing decision can.
managed database — reserved fixed
observability pipeline — usage · surpriseusage
application instances — reserved fixed
NAT gateway — usage · surpriseusage
object storage — usage usage
managed database — usage usage
NAT gateway — reserved · surprisefixed
load balancer — reserved fixed
load balancer — usage usage
application instances — usage usage
observability pipeline — reserved · surprisefixed
the reserved compute envelope, split honestly
35% used
25% headroom
40% waste
total weight
39
fixed / usage
46% / 54%
paid for and idle
7.2 of 18
zone × region factor
fixed weight is committed at provision time; usage weight follows the workload.
idle = 100% − 35% used  →  headroom 25% (chosen) + waste 40% (not chosen)
40% of the reserved envelope is neither used nor deliberately reserved. Fixed-shape lines (46% of the weight here) pay that in full every hour regardless of traffic — an idle instance, an idle managed database and an idle load balancer all bill exactly like busy ones. The fix is a smaller envelope or autoscaling, not a discount.
COST-VARIESILLUSTRATIVErelative weights only — real ratios depend on provider, region, commitment and volume

The bytes did not change. The path did.

The same bytes, four paths. Data movement is where the bill goes quietly wrong.

The bytes did not change. The path did.
Four flows of a single application. Same volume, same data, different routes — and the component that moves bytes ends up costing more than the ones that store or compute on them.
responses to end users8 TB/mo
app → object storage20 TB/mo
database → replica6 TB/mo
nightly analytics export4 TB/mo
to the internet via NAT gateway: per-GB processing on top of per-GB egress: the same byte metered twice
responses to end users · to the internet via NAT gateway · surpriseusage
app → object storage · to the internet via NAT gateway · surpriseusage
database → replica · across regions usage
nightly analytics export · to another cloud · surpriseusage
the compute doing the work on those bytes fixed
the storage holding those bytes usage
transfer weight
414
vs compute
6.90×
worst routing
414
best routing
68
weight per TB:  zone=0  private=1  xzone=2  xregion=5  cdn=6  nat=12  peer=12
Moving the bytes now weighs 6.90× the compute that produced them and 29.6× the storage holding them. Nobody provisions this line — it is emergent, and it shows up as one item on an invoice a month after the architecture decision. The two biggest offenders here are the NAT path (per-GB processing on top of per-GB egress: the same byte metered twice) and anything crossing a region or a cloud boundary. Note that the fix is never "a bigger pipe": route the object-storage traffic through a private endpoint so it never touches NAT, and put a cache in front of the user traffic so the bytes are not sent at all.
COST-VARIESILLUSTRATIVEweights are relative and invented; the ordering is the lesson

The seven cost lessons

Drivers, fixed against usage-shaped spend, idle capacity versus headroom, right-sizing, per-service attribution, egress and storage that ages.

Cost Engineering

Cost is a design constraint, not a monthly report. The ten drivers that actually move an infrastructure bill, why the ones nobody predicts are always the ones that move bytes rather than store or compute on them, and how to make spend a signal an engineer reads.

Fixed vs Variable Cost

An always-on instance bills for existing; a serverless invocation bills for happening. The crossover between those two shapes decides which one is cheaper, it moves with traffic, and nobody can tell you where it sits for your workload without measuring — which is why every number here is illustrative.

Idle Capacity: Headroom or Waste?

Allocated 100 CPU, using 12. The naive reading is that 88 units are wasted; the honest reading is that some of them are the reliability budget. Telling the two apart — and cutting only the second — is the difference between a saving and an outage at the next spike.

Right-Sizing Without Causing an Outage

A 32 GiB instance with 4 GiB in use looks like an obvious eight-fold over-provision. It sometimes is. But average use is not a sizing input: size for the peak, then for what happens when a zone fails and its traffic lands on the survivors.

Cost per Service and the Attribution Problem

Breaking the bill down by service turns "infrastructure costs too much" into a conversation someone can act on. The mechanism is tagging, the hard part is the shared resources that resist attribution, and the honest output is an allocation rule everybody agreed to rather than a precise truth.

Egress: Moving Data Costs Money, Not Just Storing It

The line item that surprises everyone. Storing a terabyte is cheap; serving it repeatedly is not, and the meters sit on paths an architecture diagram draws as plain arrows — internet egress, cross-region replication, cross-zone chatter and the NAT you forgot processes every outbound byte.

Storage Lifecycle: Hot, Warm, Archive, Delete

Data gets colder with age and almost nothing deletes itself. Lifecycle policies move objects down the tiers automatically — and the archive tiers hide a trap, because they charge to read the data back, charge again if you delete it early, and take hours to return it.