Graph-based root cause analysis for service-oriented and microservice architectures

Álvaro Brandón, Marc Solé, Alberto Huélamo, David Solans, María S. Pérez, Victor Muntés-Mulero

Abstract

Modern microservice architectures present significant challenges for root cause analysis (RCA) due to their dynamic nature and complex interdependencies. This paper presents a framework that models system state as a multi-attributed graph, enabling the detection of failure patterns through inexact graph matching. By focusing on local anomalous subgraphs and incorporating expert domain knowledge, the system achieves a precision of 83.89%, significantly outperforming traditional machine learning approaches.

1. Introduction

The shift toward Service-Oriented Architectures (SOA) and microservices has accelerated development cycles but complicated troubleshooting. When performance degradation occurs, the resulting cascade of alerts often obscures the primary failure. Traditional RCA methods, which rely on manual log analysis or "flat" machine learning models treating metrics in isolation, frequently fail to account for the structural context of the system. This research proposes a graph-based approach to capture the logical and physical relationships between components, facilitating more accurate root cause identification.

2. Methodology

The proposed framework operates through a multi-stage pipeline designed to transform raw monitoring data into actionable insights.

The multi-stage pipeline of the proposed root cause analysis framework.

2.1 System Graph Construction

Using tools like Sysdig and Prometheus, the framework constructs a "snapshot" graph of the environment. Nodes represent containers or hosts, while edges denote network traffic or hosting relationships. Each node is enriched with real-time metrics such as CPU usage, Disk I/O, and network throughput, creating a multi-attributed representation of the system state.

Example of a system graph snapshot showing nodes (services) and their associated performance metrics.

2.2 Anomalous Region Extraction and Matching

Upon detecting an anomaly, the system extracts a localized subgraph—the "anomalous region"—comprising the suspect node and its immediate neighbors (typically within 1–2 hops). This "blast radius" approach ensures scalability by avoiding global graph analysis. This region is then compared against a Pattern Library of known failure signatures using an inexact graph matching algorithm based on hill-climbing optimization.

2.3 Semantic Context and Expert Weighting

To improve generalization, the system utilizes ontological contexts, allowing it to recognize functional similarities between different technologies (e.g., treating HAProxy and Nginx both as "Frontend Servers"). Furthermore, human operators can assign weights to specific attributes, enabling the system to prioritize critical metrics like Disk I/O for database-related failures.

3. Experimental Evaluation

The framework was evaluated on the Grid’5000 infrastructure across three industrial scenarios: a Loadbalancer stack (WordPress/MySQL), a Kafka cluster, and a Big Data stack (Spark/HDFS). Anomalies were injected using stress-ng and tc to simulate CPU/Disk stress and network delays.

The graph-based approach achieved a precision of 83.89%, outperforming a standard Boosted Decision Tree model by 19.41%. The inclusion of expert weighting was a critical factor, raising precision from approximately 70% to the final 84%. Notably, the system maintained high performance, with comparison times under 0.64 seconds for 30-node graphs, supporting near-real-time monitoring.

4. Conclusion

This research demonstrates that system topology is a vital signal for RCA in microservice environments. By treating failures as structural patterns rather than isolated metric spikes, the framework provides a robust decision-support tool for system administrators. Future work will focus on addressing the "cold start" problem for novel failures and incorporating temporal analysis to track the evolution of anomalies over time.

Summary updated

BibTeX
@article{brandon2020graph,
  author = {Álvaro Brandón and Marc Solé and Alberto Huélamo and David Solans and María S. Pérez and Victor Muntés-Mulero},
  title = {{Graph-based root cause analysis for service-oriented and microservice architectures}},
  journal = {J. Syst. Softw.},
  year = {2020},
  doi = {10.1016/j.jss.2019.110432},
}
Figure