Proactive autoscaling for edge computing systems with kubernetes

Li Ju, Prashant Singh, Salman Toor

TL;DR

This paper introduces a proactive autoscaling system for Kubernetes-based edge computing applications. It addresses the limitations of reactive autoscalers by predicting future workloads and scaling resources in advance, leading to improved resource utilization and application performance.

What Problem Does This Paper Address?

Cloud computing has revolutionized many applications, but its inherent latency due to geographical distance makes it unsuitable for latency-sensitive applications like real-time data analysis or video game streaming. Edge computing aims to solve this by moving computation closer to the user. However, existing autoscaling tools, like Kubernetes' Horizontal Pod Autoscaler (HPA), are often reactive and not well-suited for the heterogeneous and constrained nature of edge environments. HPA primarily relies on CPU utilization and lacks the ability to predict future demands or adapt to diverse edge resource constraints. This paper tackles the challenge of developing a more intelligent and proactive autoscaling solution specifically for edge computing on Kubernetes.

Methods

The core of this work is the Proactive Pod Autoscaler (PPA). The PPA operates in two main loops:

  • Control Loop: This loop runs frequently (every 20 seconds) and is responsible for making scaling decisions. It involves:
  • Formulator: Gathers raw metrics (CPU, RAM, I/O, custom metrics) from the system.
  • Evaluator: Uses a pre-trained predictive model (loaded from a model file) to forecast future workloads based on the formulated metrics. It then determines the number of desired replicas based on a defined policy and system resource limitations.
  • Model Update Loop: This loop runs less frequently (e.g., hourly) and focuses on improving the predictive model.
  • Updater: Uses historical metrics from a metrics history file to retrain or update the predictive model. The paper explores three update policies: "do not retrain," "retrain from scratch," and "update the model" (incremental retraining).

The PPA is designed to be model-agnostic, allowing users to inject custom time-series models (like ARMA or LSTM) and define their own scaling policies. It also incorporates limitation-awareness to prevent overscaling beyond physical resource constraints.

Datasets

  • Random Access: A synthetic workload generator designed to emulate various patterns of light, medium, and heavy loads. It randomly assigns tasks (Sort or Eigen) with different computational costs to simulate typical CPU-intensive applications.
  • NASA Dataset: A subset of real-world HTTP request logs from the NASA Kennedy Space Center WWW server. This dataset was preprocessed to represent workload patterns over time, scaled to fit the experimental environment.

Key Insights and Ideas

  • Proactive vs. Reactive: The fundamental insight is that predicting future demand and scaling before the load hits is crucial for efficient edge computing, unlike reactive methods that scale after the load has already impacted performance.
  • Heterogeneity Matters: Edge environments are diverse. A one-size-fits-all autoscaling approach (like HPA's CPU-only metric) is insufficient. The PPA's support for multiple metrics and customizability is key to adapting to this heterogeneity.
  • LSTM Outperforms ARMA for Prediction: In their experiments, the LSTM model demonstrated significantly better prediction accuracy (lower Mean Squared Error) for CPU utilization compared to the ARMA model, despite ARMA appearing to fit the data visually better. This highlights the importance of quantitative evaluation over visual inspection.
  • Model Update Policy is Crucial: The "update the model" policy (incremental retraining) provided the best prediction accuracy and performance, suggesting that continuously refining the model with recent data is more effective than static models or complete retraining for typical workload patterns.
  • CPU Utilization as a Key Metric: For the tested CPU-intensive application, using CPU utilization as the key metric for autoscaling resulted in more efficient resource usage and a more stable system compared to using request rate as the key metric.

Key Results

  • Improved Response Time: The PPA achieved significantly lower response times for both edge (Sort tasks) and cloud (Eigen tasks) services compared to HPA. For edge tasks, the average response time was 0.508s (PPA) vs. 0.592s (HPA). For cloud tasks, it was 13.646s (PPA) vs. 14.206s (HPA).
  • Reduced Idle Resources: The PPA demonstrated more efficient resource utilization, leading to lower relative idle CPU usage on both edge workers (0.2988 for PPA vs. 0.3209 for HPA) and cloud workers (0.3098 for PPA vs. 0.3373 for HPA).
  • Enhanced Stability: The PPA provided a smaller standard deviation in response times, indicating a more stable and predictable user experience.

Limitations and Future Work

  • Manual Configuration: The proposed PPA still requires developers to manually define optimal key metrics, models, and policies.
  • Hyperparameter Optimization Automation: The authors suggest future work to automate the hyperparameter optimization process. This could involve automatically exploring different metrics, models, and policies, and using validation techniques to select the best combination. This would make the PPA easier to deploy and use.

Summary updated

BibTeX
@inproceedings{ju2021proactive,
  author = {Li Ju and Prashant Singh and Salman Toor},
  title = {{Proactive autoscaling for edge computing systems with kubernetes}},
  booktitle = {Ucc Companion},
  year = {2021},
  doi = {10.1145/3492323.3495588},
}
Figure