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

Latency, throughput and percentiles

The numbers that describe a fast backend.

๐Ÿ“– Key ideas

  1. Latency is how long one request takes; throughput is how many requests the system handles per second.
  2. Averages hide slow requests; use percentiles such as p50 (median), p95 and p99.
  3. p99 = 800 ms means 1 in 100 requests takes 800 ms or longer.
  4. A service level objective (SLO) states a target, for example p95 under 300 ms.
  5. As a server gets close to full capacity, latency rises sharply, not gradually.
๐Ÿ’ก Real-life example: A railway ticket counter: latency is how long one person waits, throughput is how many tickets are sold per hour, and p99 is the unlucky person who waited the longest.
LatencyTime taken by one request
ThroughputRequests handled per second
p9595% of requests are this fast or faster
SLOTarget level for a service metric