هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
$ مستخدم عادي# بصلاحية root (أو مع sudo)
المهارات في هذا الفصل
- Unit economics — P1142–P1151
Unit economics: cost per request, per tenant, per team
A total is not a unit cost.
The bill tells you what you spent. It does not tell you what anything costs.
- Measure: Request count, Tenant usage, Team tags
- Divide: Unit cost, Shared pool, Allocation key
- Decide: Margin floor, Tenant tier, Owner review
Full note: P1142 — Unit economics: cost per request, per tenant, per team
A cost model someone can defend
A cost model that nobody can defend is a spreadsheet with better formatting. The difference is whether each line can be traced from a driver to a total, and whether the reader can challenge the arithmetic.
- A claim per line: Driver, unit, owner and a range on every row.
- A counted unit: Requests, tenants, seats or teams, from telemetry.
- A written split: Shared cost divided by a rule anyone can recompute.
- A scored forecast: Freeze, compare, classify, correct, publish the miss.
Full note: P1143 — A cost model someone can defend
Five cost drivers nobody budgets for
The invoice lists services. It rarely lists the decisions that made them expensive.
- Cross-zone traffic between services that look local.
- Logs and traces kept hot long after the incident.
- Idle capacity sized for a launch that already happened.
- Orphaned volumes, snapshots and stale container images.
Full note: P1144 — Five cost drivers nobody budgets for
Six numbers in a cloud bill
Read the bill as ratios.
A cloud bill is a total, and totals hide decisions. Six ratios turn an invoice into something you can argue with.
- 3 bill dimensions that matter: Compute, storage and egress explain most of the variance.
- 8x peak to average demand: Capacity is bought for the peak and paid for all month.
- 60% spend in the top three services: An example share. Find yours before any negotiation.
- 30d lag from change to invoice: A saving shipped today lands in next month's bill.
Full note: P1145 — Six numbers in a cloud bill
Spot capacity, without the 2am page
Spot capacity is not a cheaper version of the same promise. It is a different promise: capacity that can be reclaimed with short notice, for a much lower unit rate.
- A different promise: Capacity that returns with short notice.
- A restartable workload: Idempotent, checkpointed, stateless where it counts.
- A drain that works: Trap the signal, finish the item, exit in time.
- A capped share: A floor of on-demand, a ceiling on spot, spread wide.
Full note: P1146 — Spot capacity, without the 2am page
Speed, reliability, cost, complexity
Every architecture decision is a trade with four dials: speed, reliability, cost and complexity. Turning one usually moves another, and the useful conversation is about which dial you are willing to give up.
- Cache for speed; accept staleness and a second copy.
- Add a replica; pay twice for the same data.
- Autoscale for cost; accept cold starts and slower first calls.
- Abstract for simplicity; pay in indirection and debugging time.
Full note: P1147 — Speed, reliability, cost, complexity
Storage tiers: hot, warm, cold, archive
Cheap storage is not free storage.
Storage tiers look like a pricing table and behave like an engineering decision. Hot, warm, cold and archive differ not only in unit cost but in retrieval time, retrieval cost, durability and the number of requests needed to get data back.
- Hot: Serving reads and writes now; highest unit cost.
- Warm: Read often, written rarely; same access, cheaper.
- Cold: Monthly reads; retrieval in minutes, not seconds.
- Archive: Compliance copy; restore in hours, cheapest per GB.
The cost of delay on a platform team
Platform teams report their cost in headcount and cloud spend. The cost of their queue is reported somewhere else: in the scripts other teams wrote, the tools they bought and the incidents that took longer because the golden path did not cover the case.
- A hidden cost: Delay is paid in workarounds, not in invoices.
- A ratio: Cost of delay divided by duration ranks the queue.
- A counted workaround: Hours per team per month, with incidents added.
- A decision: One sentence, one date, a recount one quarter later.
Full note: P1149 — The cost of delay on a platform team
Five questions before you cut the bill
Cost optimisation starts with a number and ends with an argument. The questions you ask before touching anything decide whether the argument is winnable.
- What does this service cost per request or per team?
- Which line grows faster than the traffic it serves?
- Who owns the driver, and can they change it this quarter?
- What breaks first if this capacity disappears?
Cost analysis commands
A bill you cannot split is a bill you cannot defend.
Cost analysis is mostly a handful of commands run in a loop: read the bill, split it by a unit, tag what is unowned, watch what changes.
- Read:
aws ce get-cost-and-usage --metrics AmortizedCost - Split:
kubectl cost namespace -A --window 7d - Tag:
aws resourcegroupstaggingapi get-resources - Watch:
aws ce get-anomalies --date-interval $P
Full note: P1151 — Cost analysis commands