Code Room
System designHardsd-g166
Subject Distributed tracingLevel Senior–Staff~40 minCommon in Concurrency · Distributed systems interviewsIndustries Technology, Software development

Question

Design trace context propagation for a heterogeneous architecture where a single request flows through synchronous HTTP/gRPC calls, then drops onto a Kafka topic consumed asynchronously by a batch worker that fans one message out into 200 downstream jobs, and finally hits a third-party API you don't control. You need a single coherent trace per original request, correct parent/child relationships across the async boundary, and graceful behavior where context can't propagate. Design the propagation model, the async stitching, and the data model.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.