Try
↑ ↓ move↵ openesc close

Interview prep / Load shedding and backpressure

Junior · Load shedding and backpressure · System design interview question

What is the difference between throughput and goodput, and why can goodput collapse when throughput does not?

Sketch your own answer first, then compare it with the one below.

A strong answer

Throughput is how many requests the system finishes per unit of time. Goodput is how many of them finish in time to be useful, for example before the client timed out.

Below capacity they are equal. Above capacity with an unbounded queue they diverge. The queue grows, so each request waits longer. Once the wait passes the client timeout, every request a worker picks up has already been abandoned. The worker finishes it anyway, so throughput stays at capacity and the server looks busy and healthy. But no one receives the answers, so goodput falls toward zero.

This is a form of livelock: the system does work all the time and delivers nothing. It was described for network stacks long ago, where a machine spent all its time on interrupts and delivered no packets.

On a dashboard the signs are full CPU, flat throughput, rising latency and falling client success.

Sources

Learn it by running it

The load shedding and backpressure lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms