Uber Automates Dependency Analysis Across Its Service Mesh
Leela Kumili · rss · 2026-10 Reader 🖥️
Cascading Failure & System Resilience PatternsModularity & CouplingSRE & Incident ResponseVendor Self-Reported Metrics
Because sampled distributed tracing is statistically too slow to observe rare failures, Uber instead instruments its RPC framework (YARPC middleware) to emit caller/callee failure metrics and classifies every dependency as fail-close, fail-open or unknown by failure correlation, trading request-level detail for broad, fast coverage of how failures propagate through the service mesh.
practical · expository — InfoQ news report of an Uber engineering blog post. Reports a design decision (infer failure dependencies from RPC-middleware metrics rather than distributed tracing) with a quantitative motivation; the underlying claims are Uber's, relayed secondhand.
Structure
| Part | Role |
|---|---|
| Headline claim: automated mapping and classification of service dependencies, with reported coverage of critical APIs and most fail-close anomalies | context / result claim |
| Problem framing: in deeply nested, async microservice call graphs it is hard to know which dependency caused a failure; defines fail-close / fail-open / unknown | context and vocabulary |
| Why not distributed tracing: sampling arithmetic (0.01% sampling x 99.9% availability = 1 in 10M; at 500 rps about 5h33m to catch one failure) | evidence / motivating argument |
| Mechanism: Muttley proxy lacks caller endpoint context, so YARPC inbound/outbound middleware tracks request IDs via Go context and emits caller and callee failure metrics | solution description |
| Classification rule: failure correlation probability thresholds (>=0.8 fail-close, <=0.2 fail-open, else unknown), retries handled separately; explicit trade-off vs OpenTelemetry tail sampling | solution detail and trade-off conclusion |
Key terms
- fail-close dependency
A downstream dependency whose failure consistently causes its caller to fail; operationalized as failure correlation probability >= 0.8. - fail-open dependency
A dependency that can fail without causing its caller to fail (correlation <= 0.2), i.e. the caller degrades gracefully. - unknown dependency
A dependency with insufficient evidence or intermediate correlation (0.2-0.8); an explicit 'don't know' bucket rather than a forced guess. - failure correlation probability
Per caller-dependency estimate of how often a caller failure co-occurs with a callee failure across observed production requests, computed from middleware-emitted metrics. - middleware-based dependency inference
Recording caller/callee endpoint and outcome inside the RPC framework's inbound/outbound middleware, emitting metrics instead of storing per-request traces.
Propositions
- explicitUber's approach automatically maps service dependencies and classifies how downstream failures propagate, and has catalogued dependencies for critical APIs and indexed most fail-close anomalies across the mesh.conf: high
- explicitIn deeply nested, asynchronous microservice call paths, determining which dependency contributed to a failure is hard, and traditional tracing cannot always give engineers the full picture quickly enough at thousands-of-services scale.conf: highextendsPresentation: Understanding Progressive Collapse: How To Avoid A Cascading Failure · p1 — Uber's fail-close edges are the concrete channels through which a small localized failure cascades; the article supplies a detection mechanism for the interconnection Newman warns about.extendsScaling Uber with Thuan Pham (Uber's first CTO) · p3 — Follows the consequence of Uber's survival-driven proliferation of thousands of microservices: at that scale tracing alone cannot explain failures and dependency semantics must be inferred automatically.
- explicitSampled distributed tracing is too slow to observe rare failures: at 0.01% sampling and 99.9% availability an erroneous request has a 1-in-10-million chance of being sampled, so at 500 rps capturing one failure takes about 5h33m.conf: high
- explicitIdentifying dependencies from logs/metrics gives faster feedback than tracing because it observes all requests, at the cost of individual request visibility.conf: highsupportsArticle: Modular Edge Computing at Multi-Tenant SaaS Scale on Cloudflare Workers · p17 — Both show that splitting systems into many services degrades whole-request visibility and requires deliberate instrumentation to recover it (Cloudflare via response headers, Uber via RPC middleware metrics).supportsSession Traces and Cost Controls Help Diagnose AI Agent Failures · p10 — Both treat metrics and traces as distinct instruments with different coverage/cost profiles; Uber chooses aggregate metrics over stored traces for rare-event coverage.
- explicitA dependency can be classified by whether its failure consistently propagates to its caller: fail-close if correlation >= 0.8, fail-open if <= 0.2, unknown otherwise; the classification can be chained along call paths to trace propagation toward an originating API.conf: highextendsPresentation: Understanding Progressive Collapse: How To Avoid A Cascading Failure · p4 — Classifying edges as fail-open reveals where protective mechanisms (retries, circuit breakers) actually contain failure versus add interconnection; Uber's approach can empirically test that claim.
- explicitThe RPC framework (YARPC), not the service-mesh proxy (Muttley), is the right instrumentation point because the proxy lacks caller endpoint context needed for precise dependency correlation.conf: high
- explicitUber's middleware-metrics approach avoids the overhead of storing and evaluating individual traces, whereas OpenTelemetry tail sampling can retain error/latency traces but only at that storage and evaluation cost.conf: medium
- explicitRetries must be handled separately, otherwise repeated attempts would be counted as independent dependencies and distort the correlation estimate.conf: high
- implicitFailure correlation between caller and callee outcomes is an adequate proxy for a causal fail-close relationship.conf: medium
- implicitKnowing which edges are fail-close is operationally valuable because it lets engineers focus reliability work and incident diagnosis on the edges that actually propagate failure.conf: medium
- implicitThe practical dependency structure of a mesh is stable enough for a probability learned from past traffic to remain valid for future failures.conf: medium
Arguments
Uber should infer dependency failure semantics from RPC middleware metrics rather than from sampled distributed traces. strength: high
Explicit premises:
- More than 99.9% of requests succeed, so errors are rare
- At 0.01% sampling an erroneous request has a 1-in-10M chance of being sampled; capturing one failure at 500 rps takes ~5.5 hours
- Middleware metrics cover every production request without storing individual traces
Implicit premises:
- Tracing at Uber is head-based (uniform) sampling, not error-biased tail sampling
- Per-request detail is not needed to classify an edge, aggregate outcomes suffice
- Sampling rate cannot economically be raised for rare-failure capture
Inferences:
- The same argument applies to any rare-event diagnosis (security anomalies, long-tail latency): uniform sampling is structurally blind to what matters most
- Metrics-first, trace-on-demand is a general pattern: use aggregate counters to find where to look, then selectively retain traces
A caller-callee failure correlation threshold is sufficient to classify dependencies as fail-close or fail-open.
Explicit premises:
- Fail-close = failure consistently causes caller failure
- Correlation >= 0.8 means fail-close; <= 0.2 means fail-open
Implicit premises:
- Co-occurrence of failure implies causation along that edge
- Thresholds 0.8/0.2 are appropriately calibrated for the mesh
- Retry handling removes the main source of correlation inflation
Inferences:
- Common-cause failures (a shared database failing both caller and callee) would be misclassified as fail-close edges
- Edges rarely exercised in failure may stay 'unknown' indefinitely, biasing the catalogue toward noisy, frequently failing paths
Narratives
- Thought experiment of waiting 5 hours 33 minutes to catch one failed request at 500 rps under sampled tracing.
→ Makes the statistical argument against sampled tracing visceral and motivates the metrics-based redesign. - Request-flow walkthrough: inbound middleware mints request ID and records caller; ID travels via Go context; outbound middleware records downstream call result; metrics emitted at completion.
→ Shows concretely how correlation is possible without a central trace store, supporting the middleware-inference argument.
Questions addressed
- ✅ When a request fails in a mesh of thousands of services, how can engineers quickly know which dependency caused it and how the failure propagates?
Classify each dependency edge as fail-close/fail-open/unknown from middleware-emitted failure correlation and chain classifications along call paths. - ✅ How do you observe rare failures when sampling makes tracing too slow?
Collect aggregate caller/callee outcome metrics on all requests rather than sampled traces. - ⭕ How accurate is the classification, and how does it hold up as the mesh changes?
Not addressed in the report.
Gaps
- incompleteNo accuracy evidence for the classifier: no precision/recall against known incidents or chaos/fault-injection ground truth, no rationale for the 0.8/0.2 thresholds, and no treatment of common-cause failures that make caller and callee fail together without a true fail-close edge. Correlation is treated as causation.
Read next: Fault-injection validation of inferred dependencies (chaos engineering literature, e.g. Netflix/Gremlin lineage, 'Lineage-driven fault injection') and causal inference for microservice root-cause analysis. - incompleteThe tracing comparison is only against uniform head sampling. Error- and latency-biased tail sampling (which the article acknowledges exists in OpenTelemetry) would capture rare failures with high probability; the claimed overhead advantage of middleware metrics is asserted, not quantified, and the metrics approach cannot distinguish which branch of a request caused a failure.
Read next: Benchmarks and cost studies of tail-based sampling at scale (OpenTelemetry collector tail sampling, Honeycomb/Lightstep refinery write-ups) versus metrics-based inference. - uninformedAll outcome claims (dependencies catalogued for critical APIs, 'most' fail-close anomalies indexed) are Uber's own, relayed by InfoQ without numbers, baselines, or any downstream effect on incidents, MTTR or fixes made. It is unclear what operators do once a fail-close edge is found.
Read next: Uber's original blog post and any follow-up on incident-response outcomes; comparable service-dependency analysis reports from Netflix, Google (SRE), Meta. - incompleteFreshness and drift are not discussed: the dependency graph and fail-close/fail-open properties change with every deploy and retry-policy or circuit-breaker change, yet the article gives no re-classification cadence, coverage limits (async/queue-mediated calls, non-YARPC services), or how 'unknown' edges are resolved.
Read next: Continuous service-dependency discovery and configuration-drift work; resilience pattern reviews (circuit breakers, bulkheads) that change failure semantics.
Related documents
- Scaling Uber with Thuan Pham (Uber's first CTO)
- Session Traces and Cost Controls Help Diagnose AI Agent Failures
- Article: Modular Edge Computing at Multi-Tenant SaaS Scale on Cloudflare Workers
- Presentation: Understanding Progressive Collapse: How To Avoid A Cascading Failure
- AI Is Changing Software Engineering. The Fundamentals Still Matter.
- Article: Implementing Chaos Engineering in Financial Payment Systems: Lessons from Enterprise ECS Deployments
- DoorDash Uses Envoy and Valkey for a 1.5M RPS Proxy Cache with 99.99999% Availability
- How Figma Uses AI Agents for Security
- Presentation: How To Run on Three Clouds at Once, and When Not To
- Article: Implementing Durable Workflows on Postgres Without an External Orchestrator