TL;DR
This paper introduces OptScaler, a novel collaborative autoscaling framework that integrates proactive and reactive scaling modules through an optimization layer. By leveraging Model Predictive Control (MPC) and chance constraints, OptScaler significantly reduces Service Level Objective (SLO) violations and resource waste in cloud environments, outperforming existing autoscaling solutions.
What Problem Does This Paper Address?
Cloud computing's rapid growth necessitates efficient resource management to balance cost and performance. Autoscaling is crucial for dynamically adjusting resources to meet fluctuating workloads and Service Level Objectives (SLOs). However, existing autoscaling approaches face challenges:
- Reactive autoscalers: Respond to issues after they occur, leading to potential SLO violations due to their inherent delay and hysteretic nature.
- Proactive autoscalers: Predict future workloads but can suffer from prediction errors, especially with complex and dynamic cloud workloads, leading to resource wastage or under-provisioning.
- Hybrid autoscalers: Often combine proactive and reactive modules that operate independently, leading to conflicting decisions and reduced overall effectiveness.
The paper addresses the need for a robust autoscaling solution that can effectively handle diverse and dynamic workloads, minimize SLO violations, and optimize resource utilization by fostering true collaboration between proactive and reactive components.
Methods
OptScaler is built upon three core components:
- Proactive Module: Employs a workload prediction model that combines a "Long-term Periodic Block" (using Fourier series to capture recurring patterns) and a "Short-term Local Block" (using a Seq2seq structure with Flow-Attention for local trends and influences). This module provides multi-timestep workload predictions.
- Reactive Module: Implements a self-tuning linear estimator for CPU utilization. This estimator is initialized with historical data and continuously fine-tuned with real-time system feedback. It models the uncertainty in CPU utilization as a function of workload.
- Optimization Module: This is the core innovation. It integrates inputs from both proactive and reactive modules and uses Model Predictive Control (MPC) with chance constraints to generate an optimal scaling plan. MPC allows for planning over a sliding window of future time intervals, considering potential workload bursts and practical constraints like scaling speed limitations. Chance constraints ensure that SLOs are met with a certain probability, enhancing robustness against uncertainty.
Datasets
The paper utilizes two datasets:
- Azure Functions Trace: A public dataset used for workloads in sets SA and SC.
- Alipay Applets Trace: An internal dataset used for workloads in set SB.
These datasets span two weeks with minute-level resolution and are categorized into three sets (SA, SB, SC) based on workload complexity, serving as a benchmark for evaluating autoscaling performance.
Key Insights and Ideas
- True Collaboration is Key: The paper strongly advocates for a collaborative approach where proactive and reactive modules work in tandem, orchestrated by an optimization layer, rather than operating independently.
- MPC for Robustness: Integrating Model Predictive Control into the optimization module is crucial for anticipating future workload changes and making more informed scaling decisions, especially in the face of limited scaling speed.
- Chance Constraints for SLO Guarantees: Using chance constraints in the optimization problem provides probabilistic guarantees for meeting SLOs, making the autoscaling more reliable under uncertainty.
- Hybrid Nature of Workloads: The study highlights that real-world cloud workloads are complex and exhibit diverse patterns (daily, weekly, spikes), necessitating sophisticated prediction and adaptation mechanisms.
- Interpretability Matters: The model-based nature of OptScaler offers interpretability, allowing users to understand scaling decisions, which builds trust and facilitates debugging.
Key Results
- SLO Violation Reduction: OptScaler achieved over a 36% reduction in SLO violations compared to prevalent reactive, proactive, or hybrid autoscalers in offline experiments.
- Workload Prediction Accuracy: OptScaler's prediction model outperformed traditional (ARIMA) and state-of-the-art neural network models (Autoformer, DEPTS, NBEATS) in terms of Weighted Absolute Percentage Error (WAPE) for both minute-level and interval-peak accuracy.
- Resource Cost Optimization: While achieving superior SLO satisfaction, OptScaler maintained relatively low resource costs. In some cases, it incurred slightly higher costs than hybrid approaches but with significantly better SLO performance.
- Online Deployment: OptScaler has been successfully deployed at Alipay, supporting the autoscaling of over 100 online LRAs and demonstrating significant cloud resource savings (up to 19.5% in one experiment).
- Robustness to Unpredictable Workloads: OptScaler showed better resilience to sudden workload spikes compared to reactive autoscalers like Autopilot.
Limitations and Future Work
- Parameter Tuning: The paper acknowledges that parameters like the feedback strength (η) in the reactive module require fine-tuning based on specific local policies for SLOs and resource budgets.
- Scaling Frequency Impact: While explored, the full implications of varying scaling frequencies (h) on all autoscalers were not exhaustively detailed in the paper.
- Future Work: The authors suggest further investigation into the impact of different prediction models and autoscaling frameworks, as well as exploring more advanced optimization techniques for even greater robustness and efficiency. The paper also implies that extending this collaborative framework to other cloud resource management tasks could be a promising direction.
Summary updated