Latency Analysis & Optimization Questions

Understanding and reducing response time across the request path: where latency accumulates (compute, I/O, serialization, network hops, queuing), percentile-based reasoning (p50/p95/p99/p999), tail-latency behavior (why the tail diverges from the median, fan-out amplification across dependencies, hedged/speculative requests and other targeted mitigations), latency budgets and SLOs, and critical-path or distributed-trace span analysis that pinpoints where a request's wall-clock time actually goes. Focuses on end-to-end latency as a measured, engineered property rather than an incidental one. This is distinct from profiling a codebase to find CPU or memory hotspots with flame graphs, sampling, or instrumentation tooling (that is performance-optimization-and-bottleneck-analysis), and distinct from the reactive process of triaging, mitigating, and running the postmortem for a live production incident (that is performance-optimization-and-incident-response).

HardTechnical
24 practiced

You reduced median latency by 50% but p99 didn't move at all. Walk through why an optimization that clearly helped the typical request might do nothing for the tail, and what you would do differently if your goal was specifically to bring p99 down.

EasyTechnical
33 practiced

Describe what p50, p95 and p99 percentiles mean for request latency and why p99 is often more important for user experience. Given latency samples (ms): [10, 20, 30, 1000, 1100], show how you'd compute p50, p95 and p99 approximately from the ordered list and interpret each result in terms of user impact.

EasyTechnical
30 practiced

Define latency and throughput in the context of a REST API. Provide examples of design decisions that improve latency and those that improve throughput. How would you prioritize changes when customers complain about slow page load times but overall CPU utilization is low?

EasyTechnical
44 practiced

Describe how you would determine whether a production service is CPU-bound or I/O-bound. List the metrics, tools, and signals you would check (e.g., CPU utilization, iowait, disk/network metrics, syscall tracing, flamegraphs) and describe the actions you'd take for each diagnosis (e.g., optimize code path vs increase concurrency vs tune disk/network).

EasyTechnical
31 practiced

Explain the basics of distributed tracing for latency engineering: define trace and span, explain parent-child relationships, why context propagation matters, common sampling strategies, and the kinds of latency questions tracing helps answer. Discuss trade-offs associated with high sampling rates and high-cardinality trace data (storage and query cost).

Unlock Full Question Bank

Get access to all 9 Latency Analysis & Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.