Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

Launch price

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansStart free instead

Module 05 · System Design · Deeper than the interview

Watch: API design: the contract other people's code stands on
▶ Video

One request, forty services (distributed tracing)

The Contract at the Counter
The Contract at the Counter · Open board

Two services meeting at a counter across a written list of what you may ask. This lesson goes one step past it: what happens when a single request crosses forty such counters, and how to follow it from the front door to the last one.

Before you start. You need Thirty stalls on one order (availability, the nines, and the tail at scale), where one request fanned out to many parts, the slowest part set the pace, and a 1% tail became the usual case. You also need The Contract at the Counter (API design), where services meet only across a written list of what you may send, and adding a new line to that list breaks nobody who ignores it.

Lesson 28 of 73 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • June 2012: Twitter publishes a tool for finding where a request went
  • One request, forty services: nobody can see the whole trip
  • The trace: one label stuck on at the front door
  • The span: one service’s slice, with a parent
  • Trace id propagation: the label must be handed on
  • The critical path: the only chain whose speed matters
  • Sampling: you cannot keep every trace

Terms it explains: trace, trace id, span, trace id propagation, critical path, sampling, head sampling, Tail sampling, Retries and hedges, Run the code above.

Review System Design