CausIL: Causal Graph for Instance Level Microservice Data

Sarthak Chakraborty, Shaddy Garg, Shubham Agarwal, Ayush Chauhan, Shiv Kumar Saini · DOI

Abstract

Causal discovery is essential for root-cause analysis in microservice architectures. However, traditional methods often aggregate metrics at the service level, losing critical instance-specific information. We introduce CausIL (Causal Structure Detection using Instance Level Simulation), a framework that utilizes instance-level data to build more accurate causal dependency graphs. By treating individual pods as independent samples and incorporating architectural domain knowledge, CausIL improves accuracy by 25% and reduces discovery time by 70x.

Introduction

In modern cloud-native environments, microservices are typically deployed as multiple auto-scaled instances (pods). Monitoring these systems usually involves analyzing "golden signals"—Workload, CPU, Memory, Latency, and Errors. To perform effective root-cause analysis, engineers build causal graphs to map dependencies between these signals. However, the standard practice of averaging metrics across all instances of a service before analysis introduces significant noise and loses structural information.

The Flaw of Averages

Averaging metrics hides the granular behavior of individual pods. If a single instance fails while others remain healthy, the service-wide average may appear normal, masking the underlying degradation. Furthermore, non-linear relationships between metrics, such as the quadratic link between CPU utilization and latency, are often "smeared" when data is aggregated.

Comparison of Averaged (a) vs. Instance-Level (b) data distributions showing how averaging obscures metric relationships.

As shown in the figure above, averaging results in a loss of the distinct clusters and trends visible in the instance-level data, making it difficult for causal discovery algorithms to identify true dependencies.

The CausIL Framework

CausIL addresses these issues through several key innovations:

  1. Instances as IID Samples: Instead of temporal averaging, CausIL treats metrics from every active instance as an independent and identically distributed (IID) sample. This approach significantly increases the dataset size and preserves feature richness.
  2. Fast Greedy Equivalent Search (fGES): The framework employs fGES with a Bayesian Information Criterion (BIC) score to efficiently search for the optimal Directed Acyclic Graph (DAG).
  3. Domain Knowledge Integration: By defining "prohibited edges" (e.g., Latency cannot cause Workload), CausIL prunes the search space based on known microservice architectural constraints.
  4. Structural Decomposition: CausIL constructs causal graphs for individual services and stitches them together using the service call graph, ensuring linear scalability.
Hierarchical causal graph structure across microservices, illustrating how local service graphs are stitched together.

Evaluation and Results

The authors evaluated CausIL using synthetic, semi-synthetic, and real-world telemetry data from Adobe.

  • Accuracy: CausIL achieved a 25% improvement in accuracy over baselines like FCI and Avg-fGES.
  • Efficiency: The inclusion of domain knowledge reduced the Structural Hamming Distance (SHD) by 3.5x and improved computation speed by 70x.
  • Real-World Performance: On production data, CausIL-Poly2 demonstrated superior performance in identifying dependencies within complex, live systems.

Conclusion

CausIL demonstrates that shifting from service-level averages to instance-level data is crucial for accurate causal modeling in microservices. By combining granular data with architectural domain knowledge, the framework provides a scalable and precise solution for system monitoring and root-cause analysis.

Summary updated

BibTeX
@inproceedings{chakraborty2023causil,
  author = {Sarthak Chakraborty and Shaddy Garg and Shubham Agarwal and Ayush Chauhan and Shiv Kumar Saini},
  title = {{CausIL: Causal Graph for Instance Level Microservice Data}},
  booktitle = {The Web Conference},
  year = {2023},
  doi = {10.1145/3543507.3583274},
}
Figure