Sinan: Data-Driven, QoS-Aware Cluster Management for Microservices

Yanqi Zhang, Weizhe Hua, Zhuangzhuang Zhou, G. Edward Suh, Christina DelimitrouarXiv 2021

TL;DR

This paper introduces Sinan, a novel data-driven cluster manager for microservice-based applications. Sinan uses machine learning to predict the impact of resource allocations on end-to-end Quality of Service (QoS), specifically tail latency, and dynamically adjusts resources to meet QoS targets while maximizing efficiency. This approach tackles the complexity of microservice dependencies, which often lead to unpredictable performance and resource wastage in traditional systems.

What Problem Does This Paper Address?

Modern cloud applications are increasingly adopting a microservices architecture, breaking down monolithic applications into many small, independent services. While this offers benefits like faster development and easier deployment, it introduces significant challenges for resource management. The intricate web of dependencies between these services can create "backpressure effects" and cascading Quality of Service (QoS) violations, making it difficult to predict and maintain performance, especially tail latency. Existing cluster managers, often designed for simpler, monolithic applications, struggle to cope with this complexity. They may lead to either unpredictable performance or inefficient resource over-provisioning.

Methods

Sinan employs a two-stage machine learning approach to address these challenges:

  • Short-Term Latency Prediction (CNN): A Convolutional Neural Network (CNN) is used to predict the immediate end-to-end tail latency. This model considers the application's topology and historical time-series data of resource usage and performance.
  • Long-Term QoS Violation Prediction (Boosted Trees): A Boosted Trees (BT) model takes the latent representation from the CNN and predicts the probability of a QoS violation further into the future. This accounts for the "delayed queueing effect" inherent in microservice systems, where the impact of resource changes isn't always immediate.

A key innovation is Sinan's data collection algorithm, which uses a multi-armed bandit approach to efficiently explore the resource allocation space. It prioritizes exploring "boundary regions" where QoS is met with minimal resources, aiming to gather informative data without excessive exploration. This data is then used to train the ML models. Sinan operates online, continuously adjusting resource allocations based on real-time predictions.

Datasets

The paper evaluates Sinan using two end-to-end microservice applications from the DeathStarBench [27] benchmark suite:

  • Hotel Reservation: A service for searching hotels, making reservations, and getting recommendations.
  • Social Network: A broadcast-style social network with features like creating posts and reading timelines.

These benchmarks are representative of real-world microservice architectures. The authors collected data from these applications running on both a local cluster and Google Compute Engine (GCE).

Key Insights and Ideas

  • Microservice Dependencies are Key: The core challenge isn't just individual service performance, but how their interdependencies create complex, cascading effects on end-to-end QoS.
  • Delayed Queueing Effect: Resource changes don't immediately impact QoS. Violations can be delayed, and recovery can be slow, necessitating proactive resource management.
  • Data-Driven Exploration is Crucial: Simply relying on historical logs or random exploration is insufficient. Sinan's intelligent data collection actively seeks out critical resource allocation boundaries.
  • Hybrid ML for Robustness: Combining a CNN for immediate predictions with a Boosted Trees model for longer-term risk assessment provides a more comprehensive and robust approach than a single model.
  • Explainability Matters: Sinan's ML models can provide insights into which tiers and resources are most critical for QoS, aiding operators in application design and debugging.

Key Results

  • QoS Guarantee: Sinan consistently meets end-to-end tail latency QoS targets across diverse load patterns for both the Hotel Reservation and Social Network applications.
  • Resource Efficiency:
    • For the Hotel Reservation application, Sinan saves 25.9% on average and up to 46.0% of resources compared to other QoS-meeting methods.
  • For the more complex Social Network application, Sinan saves 59.0% on average and up to 68.1% of resources, effectively doubling throughput for the same resource footprint.
  • Scalability: Sinan demonstrated scalability on a large GCE cluster, showing that models trained locally could be reused on GCE with minor adjustments.
  • Explainability: Sinan's models helped identify a specific performance bottleneck in the Social Network application (Redis log synchronization) that was not obvious through traditional debugging, leading to significant performance improvements.

Limitations and Future Work

  • Model Retraining: While Sinan supports incremental retraining, significant changes to application topology (e.g., adding/removing tiers) might require more substantial model adjustments.
  • Resource Types: The current focus is primarily on CPU allocation. The paper mentions extending Sinan to other system resources like network bandwidth and memory capacity as future work.
  • Generalizability of ML Models: The paper notes that while models can be fine-tuned, the effectiveness of transfer learning depends on the similarity of the new environment to the training environment.
  • Trust in ML: The authors acknowledge the importance of explainability for user trust, which is addressed through methods like LIME, but further work in this area is always beneficial.

Summary updated

BibTeX
@misc{zhang2021sinan,
  author = {Yanqi Zhang and Weizhe Hua and Zhuangzhuang Zhou and G. Edward Suh and Christina Delimitrou},
  title = {{Sinan: Data-Driven, QoS-Aware Cluster Management for Microservices}},
  year = {2021},
  eprint = {2105.13424},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.13424},
}

Loading related content...

Figure