Design Distributed Tracing Across Thousands of Microservices

Last updated: November 29, 2026

Quick Overview

Design a tracing system like Jaeger (which originated at Uber) that records how a single rider request flows through hundreds of services, lets engineers find slow spans, and keeps overhead and storage under control.

Uber
System Design
Software Engineer
Uber
November 29, 2026
Software Engineer
Onsite
System Design
Hard

0

0

0 solved


Design a tracing system like Jaeger (which originated at Uber) that records how a single rider request flows through hundreds of services, lets engineers find slow spans, and keeps overhead and storage under control.

Uber's microservice architecture made request-level debugging hard enough that it built Jaeger in-house. Interviewers ask this to probe context propagation, sampling strategy, high-volume ingestion, and how traces are stored and queried, with attention to the overhead budget.

What the Interviewer Expects
  • Explain trace and span ids and context propagation across RPC, queues, and async work
  • Choose a sampling strategy (head-based, adaptive, tail-based) and justify it
  • Keep instrumentation overhead low with local agents and batching
  • Design a write-heavy storage layout and the lookup paths
  • Support search by service, operation, tags, and latency
  • Derive service dependency graphs and aggregates from spans
Key Topics to Cover
Context propagation
Sampling
Span ingestion
Trace storage
Dependency graphs
Overhead
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Head-based sampling at 0.1% misses the rare slow requests. How would you capture them?
  • How do you propagate context through a Kafka message processed hours later?
  • What do you do when one service emits 10x more spans than everyone else?
  • How do you join traces with logs and metrics during an incident?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Every request gets a trace id; services record spans (operation, start, duration, tags, parent span id). Engineers search traces by service and latency and view the full tree within seconds of the req...

High-Level Design
  • Client libraries (OpenTelemetry style) create spans and propagate trace_id, span_id, and sampling flag in RPC headers and message metadata.
  • Local agent on each host receives spans over...

Submit Your Answer
Markdown supported