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).

MediumTechnical
33 practiced

Discuss serialization formats (JSON, Protobuf, MessagePack, Avro) and their impact on latency and throughput. When should you change serialization format and what trade-offs matter (CPU cost, payload size, schema evolution, developer ergonomics)?

EasyTechnical
25 practiced

Explain what a Content Delivery Network (CDN) is, how it reduces latency for static and cacheable assets, and describe situations where a CDN could hurt performance or correctness, including cache-control headers, dynamic content, and cache purging scenarios.

HardTechnical
24 practiced

You own the login flow which directly impacts conversion: current p99 login latency is 3s and there is a measurable drop in conversions when latency increases. Create an end-to-end optimization plan: what instrumentation you would add, how you'd run A/B tests and experiments, prioritize fixes (quick wins vs architectural), propose rollout and rollback strategies, and estimate how to quantify business impact (e.g., conversions gained per ms improved).

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?

MediumTechnical
47 practiced

You are given a single distributed trace for a user request that shows the total end-to-end latency is 1.2s. Spans (parent->child) with durations:

  • A (frontend): total 1.2s, calls B
  • A->B network: 0.1s
  • B (service): total 0.8s, internal CPU work 0.5s, B->C network 0.05s, waiting for DB 0.25s
  • C (downstream): total 0.1s
    Based on these spans, where is the largest portion of time spent and what initial remediation steps would you take to reduce p99 latency for this flow?

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.