Unit 9 of 9 · about 2 hours · derive

Unit cost, headroom and simpler designs

Reliability without cost is a wish. This unit turns the saturation and capacity numbers into a provisioning choice the team can afford, and keeps the simpler design on the table.

You'll be able to

  • Derive per-request unit cost in the constrained resource and the provisioned headroom for a stated workload.
  • Defend the design against a 10x workload change with numbers: scale, shed, degrade or simplify.
  • Compare against a simpler alternative and name what the complexity buys.

Covers

Unit cost, headroom and simpler design alternatives
1

Read

In this order, only the parts listed

0 of 3 done

  1. Risk tolerance and the cost of reliabilityGoogle Site Reliability Engineering - selected core chapters

    Risk Tolerance of Services (Target level of availability; Cost); Identifying the Risk Tolerance of Infrastructure Services

  2. Spare capacity and scaling limitsGoogle SRE Workbook - SLO, load, incident and canary exercises

    Autoscaling (Configuring Conservatively: spare capacity for overload and redundancy; Setting Constraints: minimum and maximum bounds, quota)

  3. Simplicity defensePython Experimental Systems Kit - measurement slice

    Design-defense questions (When should this remain a script instead of this package)

    Use the one question as the simpler-alternative test for your design. The full kit returns in later stages.

2

Focus on

  • Unit cost is per useful request in the constrained resource: 10 ms service time is 0.01 CPU-s per request, so 80 rps costs 0.8 CPU and 95 goodput rps costs 0.95 CPU.
  • Headroom is provisioned over expected peak at a utilization target: 0.8 CPU at a 0.7 target provisions about 1.14 CPUs, with autoscale bounds and kill switches capping the bill when the model breaks.
  • 10x (800 rps) is 8 CPU-seconds of work per second, so about 11.4 CPUs at the same 0.7 target, or shedding, degrading or removing work. Amdahl bounds splitting one request or job across CPUs: 90% parallel on 4 CPUs gives 3.08x, not 4x.
  • The simpler alternative (one process, no cache, fewer moving parts) wins unless the complex design names the failure or cost it removes.
Common mistakes · 3
  • Pricing peak capacity at 100% utilization. Queue math forbids it; buy the headroom or buy the queue.
  • Counting hosts instead of the constrained resource. Cost follows CPU-s, bytes stored and bytes moved per request, not box count.
  • Letting experiment capacity become permanent. Time-box canary and load-test capacity and remove it in the rollback plan.
3

Try it yourself

Closed-book, before checking anything

Closed-book, derive from 10 ms service and 80 rps: 0.8 CPU used, about 1.14 CPUs provisioned at a 0.7 target. Show the 10x table (800 rps is 8 CPUs busy, about 11.4 provisioned at 0.7, or shed, degrade or simplify), and the Amdahl check for parallelizing one job: .
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.80 rps at 10 ms service with target 0.7: provision?Answer

    CPUs. Round up to whole CPUs, set the autoscale minimum and bound the maximum.

  2. 2.Amdahl with 0.9 parallel on 4 CPUs: speedup? What does it say about 10x load?Answer

    3.07692, and never above 10x with any CPU count. That caps speeding up one job. Serving 10x more independent requests needs 10x the CPU-seconds, or less work per request, shedding or degradation.

  3. 3.A simpler single-process design handles 3x but not 10x. Keep the complex one?Answer

    Only with numbers: name the load where simplicity breaks, price both, and show what the complexity removes (failure domain, cost or toil).

5

Practice

  • AlgoMaster: Calculate Amdahl's Law Speedup

    AmdahlSpeedupCalculator.speedup: 1/((1 - parallelFraction) + parallelFraction/processors), rounded to 5 places (examples: 0.9 on 4 gives 3.07692)

    Attempt only after your own serial-fraction estimate. Compare the platform answer with the scale-out limit in your 10x defense.

You're done when

You derive unit cost, headroom and the 10x table without notes and can defend the simpler alternative against your design with numbers.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 4 more in the section
  • Google Site Reliability Engineering - selected core chaptersGoogle SRE · primary

    Read Chapters 3, 4, 6, 10, 12, 17, 19-22: risk, SLOs, monitoring, alerting, troubleshooting, reliability tests, load balancing, overload and cascading failure. Apply every concept to the same bounded RPC and store rather than inventing separate examples.

  • Google SRE Workbook - SLO, load, incident and canary exercisesGoogle SRE · required

    Use Chapters 2, 4, 9-11, 12, 14, 16 and 17. Define one SLO, estimate capacity, load through saturation, canary a changed version, roll it back, and write one evidence-based incident timeline.

  • Python Experimental Systems Kit - measurement sliceRoadmap-Final · support

    Use its artifact, bounded-pipeline, failure-injection, profiling and reproducibility requirements as the evidence checklist. Reuse the current service instead of building the full project again.

Also in this section

  • OpenTelemetry Python - metrics, logs and tracesOpenTelemetry · required

    Instrument request ID, queue wait, handler time, storage time, status and bounded labels. Export locally, retain raw load records and verify that instrumentation does not hide the bottleneck or create unbounded cardinality.

  • AlgoMaster System Design - quantitative and failure drillsAlgoMaster · support

    Use Solve Little's Law, Calculate System Availability, Plan Reliability Recovery Targets, Calculate Amdahl's Law Speedup, Analyze Capacity Bottlenecks, Simulate Partition Quorums and Audit Failure Domains only after producing your own estimates. Compare the platform answer with measured service behavior.

  • Gil Tene - How NOT to Measure Latency (talk)Strange Loop Conference via YouTube · support

    Use for coordinated-omission vocabulary only: closed-loop testers that wait for each reply, the missing samples under queueing, and the correction concept of recording intended send time. Do not adopt wrk, hey or ab; write the small Python generator in the saturation unit instead.

  • M/M/1 queue - model definition and stationary analysisWikipedia · reference

    Read Model definition (Poisson arrivals, exponential service, single server, infinite buffer, FIFO) and Stationary analysis (stability , , , response time via Little's Law). Use the closed forms as approximations with assumptions stated, checked by your own simulation.