Build a distributed tracing system (Jaeger / Zipkin style)

About Build a distributed tracing system (Jaeger / Zipkin style)

Metrics tell you that checkout is slow and logs tell you what one service printed; neither can say which hop of one request consumed the time. Build the third pillar: one record per hop tied together by one id — span propagation, sampling that doesn't lie, an export path that never blocks a customer, storage keyed by trace id, and the waterfall that finally answers 'where did the latency go?'

Difficulty
intermediate
Time
about 102 minutes
Stages
9
Topic
Observability: Metrics, Logs & Traces

How this problem is worked

Nine stages, from what the thing is for to how it compares with the real implementations. Each asks one question, and the simulator runs the architecture you draw against the requirements you wrote.

  1. 01Purpose & invariantsWhat is this for, and what must always be true of it?
  2. 02Workload characterizationWho writes, who reads, and in what shapes?
  3. 03Data model & on-disk formatWhat does the data look like at rest?
  4. 04Core algorithmsHow do the write path and the read path actually work?
  5. 05Distribution & replicationHow does this scale out and survive losing a machine?
  6. 06Consistency & correctnessUnder concurrency and failure, what is guaranteed?
  7. 07Failure modes & recoveryWhat actually happens when each part fails?
  8. 08Operational characteristicsCan a human run this at three in the morning?
  9. 09Trade-offs & comparisonWhere does this sit against the alternatives?

Primary sources for this problem

  • Sigelman et al. — Dapper, a Large-Scale Distributed Systems Tracing Infrastructure (Google 2010)
  • W3C Trace Context Recommendation — traceparent, tracestate, and the flags byte
  • OpenTelemetry specification — trace API/SDK, samplers, propagators, OTLP
  • OpenTelemetry Collector — tail_sampling processor, loadbalancing exporter, spanmetrics connector
  • Jaeger documentation — architecture, sampling, storage backends, clock-skew adjustment
  • Grafana Tempo documentation — Parquet block format, TraceQL, backend search
  • Dean & Barroso — The Tail at Scale (CACM 2013)
  • Uber Engineering — CRISP: critical-path analysis for microservice architectures

Browse the full problem catalog, or see what the simulator does and does not model.