Distinguish throughput from response time

Check units and version numbers as you type. · 182 words

Throughput says how much work finishes in a period; response time says how long one request waits from arrival to completion. Consider a travel-planning chatbot. One worker handles a request in 30 seconds, so one worker can complete at most 2 requests per minute. Four workers can complete up to 8 requests per minute if the database and model server do not become bottlenecks. If eight requests arrive together, only four begin immediately. The other four queue, so their response times are longer even though the system's throughput may soon be 8 per minute.

A batch job shows the difference more clearly. A bookstore imports 1,000 book titles and tags each one as fiction, history, or science. If the tagger processes 8 titles per second, its throughput is 8 titles per second, and 1,000 titles take 1,000 / 8 = 125 seconds. The response time of one title still includes any queue and processing delay. A system can therefore have high throughput while giving an individual request a poor response time. Track both, plus error rate and queue length, when checking reliability.

Check your recall

A service completes 6 requests per second, and each request takes 0.5 seconds. With three identical workers and three requests arriving together, when does each request finish?

Check your answer

The first request finishes after 0.5 seconds, the second after 1.0 second, and the third after 1.5 seconds, assuming no additional queueing or overhead.

Sources and credits

Original KeyTouch lesson. Background reading · Google · Rules of Machine Learning.