GAMMA: Graph Neural Network-Based Multi-Bottleneck Localization for Microservices Applications

Gagan Somashekar, Anurag Dutt, Mainak Adak, Tania Lorido Botran, Anshul GandhiWWW 2024

TL;DR

GAMMA is a novel graph-based learning framework designed to detect and localize multiple simultaneous performance bottlenecks in microservices architectures. By combining Graph Attention Networks (GATs) with a "mixture of experts" approach, it achieves a 46% higher F1 score than state-of-the-art methods while maintaining negligible operational overhead.

What Problem Does This Paper Address?

Modern web applications have shifted from monolithic "all-in-one" codebases to Microservices Architectures (MSA), where hundreds of small, independent services communicate over a network. While this allows for massive scalability, it creates a debugging nightmare.

When an application slows down, the culprit isn't always a single service. You might face multiple independent bottlenecks (e.g., a login service spike and a database disk error happening at once), dependent bottlenecks (a failing VM affecting all services hosted on it), or cascading bottlenecks (a slow database causing request queues to back up into upstream services).

Existing tools often struggle because they either focus on finding a single "root cause" or fail to account for the complex, non-linear interactions between services. This paper introduces GAMMA to fill this gap, specifically targeting the "multi-bottleneck" scenario that is common in production but often ignored in academic research.

Methods

GAMMA (Graph Neural Network-Based Multi-Bottleneck Localization) uses a four-stage pipeline to turn raw system metrics into actionable insights:

  1. Multi-Source Temporal Embeddings: Instead of looking at individual request traces, GAMMA analyzes "windows" of time. It uses Dilated Causal Convolution (DCC) and self-attention to capture how metrics like CPU usage and latency evolve over time.
  2. Graph Representation Learning: The system builds a dependency graph of the microservices. It uses a Graph Attention Network (GAT) to learn the relationships between services. This allows the model to "understand" that a spike in Service A might be the reason Service B is struggling.
  3. Anomaly Classifier: A binary detector first determines if the system is behaving normally or if an anomaly is present.
  4. Bottleneck Localizer (Mixture of Experts): This is the "secret sauce." GAMMA assigns a dedicated "expert" (a small neural network) to every microservice in the graph. These experts work in tandem to predict—for every single service—whether it is currently a bottleneck.

By training the detector and localizer together using a joint loss function, the model learns to leverage the inter-related nature of these tasks.

Datasets

The authors argue that existing public datasets are too "easy" because they often feature massive, unrealistic 100x latency spikes. To test GAMMA, they created and open-sourced a more realistic dataset:

  • DeathStarBench: A popular social networking benchmark (28 microservices) deployed on a 17-node Kubernetes cluster.
  • Scale: Approximately 40 million request traces.
  • Complexity: They induced various interferences (CPU, Memory, Network) at different intensities and durations, often overlapping them to create true multi-bottleneck scenarios.

Key Insights and Ideas

  • Graphs > Sequences: Traditional deep learning (like CNNs or LSTMs) treats service data as a simple sequence. GAMMA proves that treating the system as a graph is essential for capturing the "topology" of failures.
  • Windows > Traces: By analyzing temporal windows rather than isolated traces, GAMMA can see macroscopic trends and correlations that are invisible at the micro-level.
  • Explainability via Omission: One of the most practical features of GAMMA is its explainability. By omitting specific features (like CPU metrics) and seeing how much the F1 score drops, engineers can identify not just which service is failing, but why (e.g., "The performance drop is 27% when I ignore CPU data, so this is likely a CPU saturation issue").
  • Efficiency: Despite its complexity, GAMMA’s inference time is only ~38.7 microseconds per 1-second window, making it highly suitable for real-time production monitoring.

Key Results

GAMMA was evaluated against several baselines, including FIRM (SVM-based), $\epsilon$-diagnosis (statistical), and Seer (CNN/LSTM-based).

  • Anomaly Detection: GAMMA achieved an F1 score of 0.92, significantly outperforming $\epsilon$-diagnosis, which struggled with the complexity of multiple bottlenecks.
  • Localization: In the most complex scenarios (Compose requests), GAMMA achieved an F1 score of 0.83, a 46% improvement over the next best baseline (FIRM).
  • Robustness: While other models' performance plummeted when moving from single to multiple bottlenecks, GAMMA remained consistent, proving its ability to handle "interference" between different failure sources.

Limitations and Future Work

While GAMMA is a significant step forward, the authors note a few areas for growth:

  • Domain Knowledge: While GAMMA learns dependencies from traces, some systems (like Groot) use hard-coded domain knowledge. Integrating human-in-the-loop insights could potentially refine GAMMA's accuracy further.
  • Generalization: The current evaluation is focused on the DeathStarBench suite. Testing GAMMA on even larger, more heterogeneous industrial "megagraphs" (thousands of services) would be the ultimate stress test.
  • Mitigation: Currently, GAMMA localizes the problem. The logical next step is an automated mitigation system that uses GAMMA's output to trigger auto-scaling or traffic rerouting.

Summary updated

BibTeX
@inproceedings{somashekar2024gamma,
  author = {Gagan Somashekar and Anurag Dutt and Mainak Adak and Tania Lorido Botran and Anshul Gandhi},
  title = {{GAMMA: Graph Neural Network-Based Multi-Bottleneck Localization for Microservices Applications}},
  booktitle = {WWW},
  year = {2024},
  url = {https://openreview.net/forum?id=pVMA9y45tU},
}
Figure