Multivariate Log-based Anomaly Detection for Distributed Database

Lingzhe Zhang, Tong Jia, Mengxi Jia, Ying Li, Yong Yang, Zhonghai Wu · DOI

Distributed databases serve as the backbone of modern cloud infrastructure. However, detecting failures within these systems using logs has traditionally relied on models designed for standalone environments. This paper introduces MultiLog, a multivariate approach that aggregates logs across a database cluster to detect anomalies with significantly higher accuracy. This work is supported by a new, massive open-source dataset specifically tailored for distributed database logs.

The Challenge of Distributed Databases

Distributed databases (DDBs), such as Google Spanner or Apache IoTDB, are inherently complex. Unlike standalone systems, they utilize a network of interconnected nodes (Leaders and Followers) to maintain data consistency. When faults occur—such as "Slow Queries" or "Resource-Intensive Compactions"—the evidence may not manifest clearly on the originating node.

Current state-of-the-art (SOTA) anomaly detection models face two primary hurdles:

  1. Data Scarcity: Existing benchmarks like Loghub lack datasets representing the unique, multi-node anomalies found in distributed environments.
  2. The "Single-Point" Trap: Many methods flag an entire cluster as anomalous if any single node shows irregularities. This often results in high false-positive rates, as normal background tasks on one node can be misinterpreted as errors without broader cluster context.

The MultiLog Framework

MultiLog shifts the focus from "single-node" monitoring to "cluster-wide" analysis. The framework operates in two distinct stages:

1. Standalone Estimation (Node Level)

For each node, MultiLog extracts three critical features from the logs:

  • Sequential: The chronological order of events.
  • Quantitative: The frequency of specific event occurrences.
  • Semantic: The natural language meaning of log text, using NLP techniques like FastText and TF-IDF to identify keywords like "error" or "timeout."
The log parsing and grouping pipeline used to generate sequential data for analysis.

These features are processed by an LSTM with Self-Attention to calculate an anomaly probability for that specific node.

2. Cluster Classifier (Global Level)

To handle varying log volumes across nodes, MultiLog employs a global classification strategy. It uses an AutoEncoder to standardize the probability sequences from different nodes into a fixed-size latent representation. A Meta-Classifier (a neural network) then analyzes these standardized representations from all nodes simultaneously to determine the overall health of the cluster.

Overview of the MultiLog framework for cluster-wide anomaly detection.

Dataset and Experimental Setup

The researchers developed and open-sourced a landmark dataset based on Apache IoTDB, featuring:

  • Scale: 900 million log records (216 GB).
  • Complexity: 11 types of injected anomalies, including system-level issues (CPU/IO saturation) and database-specific faults (Export/Import bottlenecks).
  • Scenarios: Four injection patterns (Single2Single, Single2Multi, Multi2Single, Multi2Multi) to evaluate how models handle anomalies across varying node counts.

Key Insights

A significant finding was the Observer Effect: the node directly affected by an anomaly often detects it less effectively than its peers. For instance, during an export fault, the affected node's logs might appear normal, while performance lags cause neighboring nodes to report issues. This underscores the necessity of multi-node visibility. Furthermore, MultiLog's strength lies in its precision; while SOTA models like RobustLog are effective at finding anomalies (high recall), they often struggle with false alarms. MultiLog significantly reduces these false positives by standardizing log patterns before final classification.

Performance Results

MultiLog was evaluated against SOTA models including PLELog, RobustLog, and LogAnomaly:

  • Overall Superiority: MultiLog outperformed existing methods by approximately 12% in multi-node classification.
  • Node-Level Improvement: Even in standalone node analysis, MultiLog improved classification effectiveness by over 16%.
  • F1-Score: In complex "Multi2Multi" scenarios, MultiLog achieved an F1-score of 99.82%, whereas some SOTA models saw precision drop as low as 24-49%.

Limitations and Future Directions

Currently, MultiLog relies on supervised learning, requiring labeled data for training. Future iterations could explore unsupervised adaptations using clustering. Additionally, the overhead of collecting and processing logs from every node increases computational and network costs. While the injected anomalies are comprehensive, real-world production environments may still harbor unique "wild" anomalies not yet captured in the current dataset.

Summary updated

BibTeX
@inproceedings{zhang2024multivariate,
  author = {Lingzhe Zhang and Tong Jia and Mengxi Jia and Ying Li and Yong Yang and Zhonghai Wu},
  title = {{Multivariate Log-based Anomaly Detection for Distributed Database}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  doi = {10.1145/3637528.3671725},
}
Figure