Capacity planning and postmortems
Quick answer
Capacity planning compares demand with measured sustainable service capacity. A postmortem documents what happened and how to reduce recurrence without blaming individuals.
If a service sustainably handles 200 requests per second and peak demand is 150, the measured spare capacity is 50 requests per second under those test conditions. Reserve headroom for failures and growth; document assumptions and assign corrective actions with owners.
Prepare the practice environment
Run python3 lab-fixtures/observability/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not change live monitoring or services. All supplied records are fictional. Review the lab guide.
Prerequisites
Review: Incident response and runbooks.
How it works
Utilization is the fraction of a resource in use; saturation means demand is waiting or cannot be served promptly. A system can show high CPU utilization while meeting latency targets, or low CPU while waiting on storage. Examine queue length, latency, throughput and resource pressure together. In the synthetic workload, demand increases from 100 to 300 requests/s, throughput plateaus at 200, and p95 latency rises. This suggests a bottleneck, not its identity. A p95 of 900 ms means at least roughly 95% of observed durations are at or below that value according to the chosen estimator. Do not mix windows or average host p95 values. For a toy capacity model, if validated per-instance sustainable throughput is 100 requests/s and the policy reserves 25% capacity, each instance is planned for 75 requests/s; 300 requests/s needs four instances before redundancy allowance. Real scaling can be nonlinear and needs workload tests and dependency limits. A postmortem contains impact, timeline, contributing conditions, detection, mitigation, follow-up actions with owners and due dates, and verification. Avoid fabricating root causes or benchmarks.
Try the examples
awk -F, 'NR>1 && $2>$3 {print $1, $2-$3, $4}' workload.csvAt peak, offered demand exceeds completed throughput by 100 requests/s; p95 is 900 ms.
Expected stdout:
peak 100 900Ceiling of demand divided by planned capacity; independent equal instances are assumed.
Expected stdout:
4 instances before redundancyFictional owners and dates illustrate accountable follow-up; completion needs evidence.
Expected stdout:
add-readiness team-app 2025-01-08review-capacity team-ops 2025-01-10Common mistakes
Do not assume adding CPU fixes all bottlenecks, or use a postmortem to assign personal blame.
Practice
Analyze workload.csv. Propose a controlled experiment, a capacity change only if supported, and two measurable follow-up actions with owners and verification criteria.
Related references
Study: uptime, free. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Capacity planning and postmortems — Knowledge Check
Apply observability and reliability concepts to synthetic fixtures and VM-only scenarios.
What is saturation?
Why avoid averaging p95 values?
At 75 requests/s planned capacity per instance, how many for 300?
What belongs in a postmortem?