โ† Backend Performance & Scaling learning path
Backend Performance & Scaling ยท Module 8 of 8

Load testing and capacity planning

Know your limits before users find them.

๐Ÿ“– Key ideas

  1. Load testing sends many simulated users to measure latency and errors as load grows.
  2. Run tests on an environment close to production, with realistic data and user behaviour.
  3. Find the knee: the load where latency starts rising steeply; plan to stay well below it.
  4. Capacity planning combines expected growth and peak days, such as exam results or a sale, with test results.
  5. Tools such as k6, JMeter and Locust script these tests; only test systems you own or have permission to test.
๐Ÿ’ก Real-life example: Load testing is like a fire drill: you practise the crowded day on purpose, so the real crowded day is not a surprise.
Load testMeasuring behaviour under expected or higher traffic
Knee pointLoad where latency starts rising sharply
HeadroomSpare capacity above normal peak load
Capacity planningDeciding resources needed for future load