All playbooks
Playbook · Run and scale · 7 steps
Solving a performance or scaling problem
Find the bottleneck before buying more of everything.
“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.”
- 1Theory of ConstraintsWhere is the single bottleneck? Measure before optimising anything else.A system's throughput is set by its bottleneck; improving anything else is an illusion.Open
- 2Pareto PrincipleWhich few requests, queries, or customers cause most of the load?A minority of causes drives the majority of effects. Find the vital few.Open
- 3Little's LawWhat do queue lengths and wait times tell us about real throughput?Items in a system equal arrival rate multiplied by time in the system: L = λW.Open
- 4Amdahl's LawHow much of the work is serial and will not speed up with more machines?The speedup from parallelising is capped by the part that cannot be parallelised.Open
- 5Universal Scalability LawWill adding nodes help, or will coordination costs make things slower?Beyond a point, adding capacity makes systems slower, because coordination costs outgrow capacity.Open
- 6BackpressureWhen we hit the limit, do we slow down gracefully or fall over?When a consumer cannot keep up, it must be able to slow the producer — or the system falls over.Open
- 7Margin of SafetyWhat headroom do we keep once it is fixed?Build in buffer for what you can't predict. The future is usually worse than the plan.Open