Analyze end-to-end request latency
Company: Adobe
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
##### Question
Provide a detailed approach to analyze and improve the end-to-end latency of a web request. The request flows from a browser through a CDN, load balancer / API gateway, microservices, caches, databases, and third-party services. Address the following:
1. Build a latency model: decompose end-to-end latency into client-side, network, and server-side contributors, and define which steps lie on the critical path (sequential) versus run in parallel.
2. Instrument both the client (RUM) and the server to capture metrics such as TTFB, total blocking time, network RTT, DNS/TCP/TLS time, queueing time, per-service processing time, database query latency, cache hit/miss rates, and external dependency latency.
3. Attribute latency to frontend vs. backend components (correlate client RUM with backend traces, e.g. via W3C Trace Context and the `Server-Timing` header), and reconcile client-observed totals against backend + network + client-compute.
4. Investigate p50/p95/p99 outliers: slice by geo, network type, device, endpoint, and deploy version; identify common tail-latency bottlenecks.
5. Propose concrete optimizations across every layer (client/browser, network/CDN, application/services, datastore, third-party).
6. Define SLIs/SLOs, dashboards, and alerts, and describe the changes/experiments you would run to reduce latency without regressing error rate or throughput.
Walk through a concrete numeric example showing baseline latency and the expected impact of your optimizations.
Quick Answer: An Adobe software-engineer system-design screen on analyzing and optimizing end-to-end web request latency. The strong answer builds a client/network/server latency model, instruments both client (RUM) and server (OpenTelemetry, Server-Timing) with correlated traces, attributes frontend vs. backend time, investigates p95/p99 outliers, and ships layered optimizations behind SLO guardrails.