Design Fault Localization for a Large Function Graph
Design an observable, low-overhead path to isolate and mitigate a bug hidden among hundreds of functions.
Problem statement
For this exercise, assume a production request follows a deterministic graph of roughly 300 instrumentable functions inside one service. A privacy-safe correctness check labels some request executions as failing without revealing the business payload or exact user-visible symptom, but the faulty function is unknown.
Design a fault-localization and safe-mitigation system that lets an engineer narrow the culprit without recording sensitive payloads or imposing prohibitive overhead.
The system should correlate a request with function and deployment versions, compare labeled failing and non-failing cohorts, support controlled replay or shadow experiments, and record a mitigation plus verification evidence.
Assume 10,000 requests per second, no more than 2 percent steady-state instrumentation overhead, detection and initial isolation within 10 minutes, and seven days of detailed diagnostic retention. Missing telemetry must be shown as unknown rather than non-failing, and diagnostic actions must not mutate production data.
What to build
- Capture a privacy-safe request path with stable function and deployment-version identities.
- Compare labeled failing and non-failing cohorts and narrow the suspect function or change.
- Run bounded replay or shadow diagnostics without changing production state.
- Record a rollback, quarantine, or routing mitigation and verify that the labeled failure rate and relevant service health recover.
At scale
- For this exercise, assume 10,000 production requests per second through a graph of roughly 300 functions.
- For this exercise, keep steady-state diagnostic overhead below 2 percent and produce an initial suspect set within 10 minutes.
- For this exercise, retain detailed correlated traces for seven days while excluding raw payloads, credentials, and personal data.