CrackML by @ml.with.umang
Interview questions / ML System Design
ML System Design interview question

How do throughput and tail latency trade off in model serving?

How do throughput and tail latency trade off in model serving?

hardsystem designEvidence 41/1001 source reportNVIDIA

The 60-second answer

Break end-to-end latency into queueing, preprocessing, host/device transfer, kernel execution, synchronization, decoding, and post-processing before optimizing. Profile utilization, memory bandwidth, occupancy, batch shape, cache behavior, and p50/p95/p99 latency to identify whether the bottleneck is compute, memory, launch overhead, or scheduling.

Build the answer in this order

1
Frame the problem

Break end-to-end latency into queueing, preprocessing, host/device transfer, kernel execution, synchronization, decoding, and post-processing before optimizing.

2
Design the data path

Profile utilization, memory bandwidth, occupancy, batch shape, cache behavior, and p50/p95/p99 latency to identify whether the bottleneck is compute, memory, launch overhead, or scheduling.

3
Choose the modeling stack

Apply batching, kernel fusion, mixed precision, caching, layout changes, or paged/continuous-batching techniques only when profiling supports them.

4
Serve, evaluate, iterate

Validate under realistic concurrency and sequence-length distributions while tracking throughput, tail latency, memory headroom, and failure rate.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Requirements
02Data
03Model / Retrieval
04Serving
05Monitor

Senior-level signal

  • Design admission control and backpressure so throughput gains do not create OOMs or catastrophic tail latency.
  • Tie kernel-level wins to end-to-end request performance; microbenchmarks alone are not a production success metric.

What the interviewer is really testing

Product framing, data design, modeling choices, serving constraints, reliability, evaluation, and explicit trade-offs.

Likely follow-up questions

What changes at 10× traffic or data volume?
Which failure mode would you monitor first in production?
How would you evaluate this offline and online before rollout?

Common weak-answer patterns

  • Jumping to a model before defining the product contract.
  • Listing components without bottlenecks, metrics, or failure handling.
  • Ignoring data quality, serving latency, monitoring, and iteration.