Abstract
In modern cloud-native architectures, identifying the root cause of failures is challenging due to complex inter-service dependencies and latent confounders, such as unobserved user flows. This paper presents a novel framework that leverages intentional fault injection in a controlled staging environment to learn the causal structure of error propagation. By treating these injections as interventions, the framework can accurately map dependencies and localize faults in production. Experimental results on benchmarks like DayTrader and TrainTicket demonstrate high accuracy in both graph recovery and fault localization.
Introduction
Modern applications are increasingly built as a web of hundreds of interdependent microservices. When a single service fails, it often triggers a cascade of errors across the entire system, making it difficult for platform providers to identify the original source of the failure—the "patient zero." Traditional machine learning approaches often fail in this context because they rely on observational data, which is frequently confounded by unobserved "user flows" (the specific paths users take through the application). These latent confounders create correlations in error logs that do not necessarily represent direct causal relationships.
Methodology: Learning from Interventions
To overcome the limitations of observational data, the proposed framework utilizes the "power of intervention." By intentionally injecting faults into specific services within a staging environment, the system can observe how errors propagate without the noise of unobserved user flows.
Structural Causal Model (SCM)
The framework maps error log counts to endogenous variables and unobserved user flows to exogenous variables. A key insight is that the "error propagation graph" is essentially the reverse of the "communication graph," as errors typically flow backward from the callee to the caller.
Causal Learning and Localization
The learning process involves two primary algorithms:
- Causal Learning: Faults are injected into microservices one by one in staging. The system measures correlations and applies Transitive Reduction (TR) to find the minimal set of paths that explain the observed dependencies.
- Fault Localization: In production, when a fault occurs, the observed error pattern is compared against the catalog of patterns predicted by the learned TR graph. Structural Hamming Distance (SHD) is used to identify the closest match and pinpoint the root cause.
Experimental Evaluation
The framework was evaluated using two open-source microservice benchmarks:
- DayTrader: A small-scale application with 5 microservices simulating an online stock trading system.
- TrainTicket: A complex application featuring 41 microservices simulating a railway reservation system.
Traffic was generated using simulated user flows to mimic production environments. The researchers also investigated the impact of log granularity (time binning) on the system's performance.
Results and Discussion
The framework demonstrated exceptional performance in recovering the underlying causal graphs. On the DayTrader application, it achieved perfect scores across several metrics. For the more complex TrainTicket application, the system maintained robust performance, though results were sensitive to the time binning threshold ($\tau$).
Key findings include:
- Graph Recovery: The algorithm perfectly recovered the dependency graph for DayTrader and achieved an F1-score of 0.62 for the complex TrainTicket system.
- Localization Accuracy: The system achieved a 93.75% accuracy in identifying root causes in TrainTicket, with an informativeness score of 86.93%, indicating highly specific results.
- Impact of Time Binning: The granularity of logs significantly affects accuracy. The paper notes that a 1,000ms window generally performed better than smaller windows (10ms or 100ms), likely because it provides sufficient time for errors to propagate and be recorded across the network.
Conclusion
By utilizing intentional interventions in a staging environment, this framework solves causal discovery problems that are intractable with observational data alone. The use of Transitive Reduction allows for a minimalist yet robust representation of service dependencies, enabling highly accurate and specific fault localization in complex distributed systems. Future work will explore more diverse fault types and adaptive intervention strategies to further optimize the learning process.
Summary updated