Latency vs Throughput Trade-Off
Why a server that serves more users at once can make each user wait longer, and how to pick a setting for chat or for batch work, explained simply for your AI interview.
In short
Latency is how long one user waits. Throughput is how much work the whole server finishes in a set time. Sharing more requests in one batch raises throughput but usually makes each user wait longer, so teams pick a setting for live chat or for batch jobs.
10 min readIntermediateCommon · estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
Latency is how long one user waits. Throughput is how much work the whole server gets done. They pull against each other: when the server groups more requests into each run, it finishes more in total, but each user waits longer. So for a live chat I keep latency low, and for a big overnight job I push throughput up and accept the wait, using the batch option the provider offers.
Latency is the time one person waits for an answer. Throughput is the total work the system finishes in a set time, across everyone. A chat assistant cares most about latency, because a support agent is watching the screen. A nightly job that tags two hundred thousand claim notes cares about throughput, because nobody is waiting and the job just has to finish by morning.
The two pull against each other. A GPU, the chip that runs AI models, works more efficiently when it runs many requests together in one batch, where each step gives one new token to every request in it. Total output rises, but each step takes a little longer, so each user sees fewer tokens a second. In my made-up example, one user gets about 25 tokens a second alone, and about 14 when 64 share the server. The server's total goes from about 25 to about 890.
So I split the work. Chat goes to its own low-latency lane with a small batch. I watch the time to first word, and its 95th percentile, which is how long one chat in twenty waits at least. The nightly job goes to a batch queue. OpenAI's Batch API gives a 50% cost discount, and each batch completes within 24 hours. Anthropic's batches can take up to 24 hours too, though many finish sooner.
I'd be honest that there is no free setting. Pick the target that matters, measure it on real traffic, and say which users pay for the other.
What are latency and throughput, in plain words?
Both are measures of speed, but they look at different things. Latency is about one person: how long they wait. Throughput is about the whole queue: how much work gets finished in a set time.
A hospital lab is a good picture. A technician who runs one blood test at a time gets each result fast. A machine that runs 200 samples in one cycle finishes far more tests per hour, but every sample waits for the cycle to end. An AI server works the same way, and the shared run is where the trade-off comes from. In an AI server, a chat reply and a nightly job share the same batch run.
Key words
- Latency
- How long one request takes, from sending it to receiving the complete answer.
- Time to first token (TTFT)
- How long until the first word appears. This is the wait a chat user feels most.
- Throughput
- Total tokens the whole server makes per second, across all its users.
- Batch
- Several requests that the server runs together in one step.
- Token
- A small piece of text, about a word or part of one, that the model reads or writes one at a time.
Why do they pull against each other?
A batch is shared. When the server adds more requests to it, the server makes more tokens in total each second. But every step now carries more work, so each request gets its next token a little later.
One server, two batch settings
Requests arrive
from chat users and batch jobs
Small batch
Few requests per step
each step is quick
Large batch
Many requests per step
each step takes longer
Shorter waits per user
more tokens a second each
Longer waits per user
fewer tokens a second each
More total output
the server finishes more work
- 1Some requests land on the small batch, which runs a few at a time.
- 2Other requests join the large batch, which runs many at once.
- 3Each step is quick, so every user sees more tokens a second.
- 4Each step is slower, so every user sees fewer tokens a second.
- 5The same work adds up across users: total output rises.
A queue adds a second effect. Once more requests arrive than the batch can hold, the extra ones wait for a free slot, and their first words come later still. NVIDIA's benchmarking guide says throughput saturates around the maximum batch size.
“Therefore, the throughput of the system generally saturates around the maximum batch size while the latency will continue to steadily increase.”
NVIDIA, LLM inference benchmarking
“High throughput serving of large language models (LLMs) requires batching sufficiently many requests at a time.”
Kwon et al., PagedAttention paper (2023)
The paper explains why servers batch at all: high throughput needs many requests in one run. NVIDIA's guide shows the cost: past a point, more load adds almost no throughput and only adds delay.
What does batching do to a server's numbers?
Here is a made-up server with invented numbers. Each step costs 40 ms, plus 0.5 ms for every request in the batch. The script prints what one user sees, and what the whole server makes.
# A made-up GPU server. Each step gives one new token to every request in the batch.
# Assumed numbers (made up): a step takes 40 ms, plus 0.5 ms for each request in it.
BASE_MS = 40.0
PER_REQUEST_MS = 0.5
def step_ms(batch):
return BASE_MS + PER_REQUEST_MS * batch
print("batch per-user tok/s total tok/s")
for batch in (1, 8, 32, 64):
per_user = 1000 / step_ms(batch) # tokens one user sees each second
total = per_user * batch # tokens the whole server makes each second
print(f"{batch:>5} {per_user:>15.1f} {total:>11.1f}")Output
batch per-user tok/s total tok/s
1 24.7 24.7
8 22.7 181.8
32 17.9 571.4
64 13.9 888.9- 1
Read the top row
One user on its own gets 24.7 tokens a second, and the server makes 24.7 in total.
- 2
Read the bottom row
With 64 users, each one drops to 13.9 tokens a second, but the server makes 888.9. That is about 36 times the total.
- 3
Ask who is waiting
A chat user sits near the top rows. A batch job can sit near the bottom, because nobody is typing.
Real numbers depend on your model and hardware, so you measure the base cost and the per-request cost yourself. The shape of the trade-off is what carries over.
How do you choose: live chat or a batch job?
Decide by who is waiting. If a person is watching the screen, optimise for latency. If nobody is waiting, optimise for cost and total work. OpenAI's and Anthropic's batch options are built for the second case.
Chat and batch jobs take different paths
Chat reply
a person is watching
Nightly tagging job
200,000 made-up notes, nobody waiting
Live endpoint
answers as it goes
Batch queue
runs in groups, half the price
Reply in seconds
the person keeps working
Results when batch ends
up to 24 hours, often sooner
- 1The question goes straight to the live path.
- 2The job is queued with the other batch work.
- 3The answer streams back in seconds.
- 4Results arrive when the whole batch finishes.
OpenAI's Batch API sends groups of requests asynchronously. It gives a 50% cost discount and completes each batch within 24 hours, often sooner. The price is the wait, so a batch queue never suits someone typing a question.
“Batches might take up to 24 hours for processing, but many complete sooner.”
Anthropic, batch processing
Tip
In an interview, state the rule first: if a person is waiting, you optimise latency; if nobody is, you batch for throughput and cost.
How would you run chat and a nightly job on one set of GPUs?
Give them separate lanes. A small-batch pool keeps chat latency steady, and the batch lane fills the spare capacity overnight. Mixing both in one queue lets a big job hold the batch and make chat replies wait.
- Mixed in one queue
Chat waits behind the job
The big job fills the batch, so each chat user's first word arrives late.
- Two lanes
Each lane keeps its target
Chat keeps a small batch and a latency target. The nightly job runs on spare capacity and has a deadline.
Measure both lanes separately: time to first token for chat, and whether the job finishes before the deadline.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: latency is one user's wait, throughput is total work per second.
- Why they trade off: a shared batch adds total output but slows each step for every user.
- Which numbers to watch: time to first token and its 95th percentile for chat, jobs finished by the deadline for batch.
- The choice depends on who is waiting, and the answer names a setting you would change.
- Batch options trade time for price, so they never suit live replies.
Common traps
Trap"Bigger batches are always faster."
BetterBigger batches raise total output, but each user waits longer. Faster depends on which number you mean.
Trap"Throughput is just another word for speed."
BetterThroughput counts the work of all users; latency counts one user's wait. A fast total can hide slow replies.
Trap"Put everything in one queue to save money."
BetterOne queue makes chat wait behind the big job. Split the lanes so each keeps its own target.
Can you spot the slow tail?
Spot the problem
Your support dashboard looks healthy overall. Which line shows a user still waiting too long?
Quick check
A chat assistant feels slow, and the same server also runs a nightly job. What is the best first change?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Building a chat product that must answer fast and still run big jobs?
I design and build AI products and agents, the UI and the system behind it. Book a short call and tell me what your users wait for.