Repaso
EspaƱol
System DesignCoreSD-34

Latency vs throughput?

Options

  1. They are the same thing, measured two ways
  2. Latency: time of one request; throughput: rate (Correct option)
  3. Latency is measured in megabytes per second
  4. Throughput is the rate of errors in a system

Answer

Latency = how long one request takes; throughput = how many requests are handled per unit of time

Why

Picture a highway. Latency is how long one car takes to travel from A to B. Throughput is how many cars pass per hour.

You can have high throughput with high latency (a big batch job) or low latency with low throughput.

For APIs, latency is usually reported as percentiles: p50 (typical), p99 (the slowest 1%).

Remember

Latency = time per request. Throughput = requests per second.

Key terms

Practice this question in Repaso