• 一种基于容器负载预测的主动式弹性伸缩策略

    An active elastic scaling strategy based on container load prediction

    • 随着云计算的快速发展,容器化应用的资源管理面临提升性能和降低运维成本的挑战。传统的容器资源管理往往依赖静态或者基于简单规则的伸缩策略,难以适应复杂动态的负载变化。提出了一种基于容器负载预测的主动式弹性伸缩策略,以下简称PDES策略,该策略通过精确的负载预测和提前的扩缩容操作实现对容器资源的高效管理。为提高负载预测的准确性,采用了长短期记忆(Long Short-Term Memory, LSTM)网络与Transformer相结合的LSTM-Transformer模型,该模型将Transformer编码器的位置编码部分与LSTM结合。PDES策略以容器编排系统Kubernetes作为实验平台,借助LSTM-Transformer模型开展负载预测,并依据预测结果主动实施弹性伸缩机制。为了验证所提出模型的有效性,将其与常见的预测模型(如LSTM、Transformer和ARIMA-LSTM)进行了对比。实验结果表明:LSTM-Transformer模型在负载预测的准确性和稳定性上明显优于其他模型。此外,将提出的PDES策略与Kubernetes内置的水平自动伸缩机制进行对比,结果表明:PDES策略能够提前进行扩缩容操作,缩短容器响应时间,提高了资源利用率,相比传统的Kubernetes内置策略具有更优的性能。

       

      Abstract: With the rapid development of cloud computing, the resource management of containerized applications is facing the challenge of improving performance and reducing operation and maintenance costs. Traditional container resource management often relies on static or simple rule-based scaling strategies, which is difficult to adapt to complex dynamic load changes. To this end, this paper proposes an active elastic scaling strategy based on container load prediction, hereinafter referred to as PDES strategy. This strategy achieves efficient management of container resources through accurate load prediction and early scaling operations. In order to improve the accuracy of load prediction, this paper adopts the LSTM-Transformer model which combines the long short-term memory(LSTM)network with the Transformer. The model combines the position coding part of the Transformer encoder with the LSTM. The PDES strategy uses the container orchestration system Kubernetes as the experimental platform, uses the LSTM-Transformer model to carry out load prediction, and actively implements the elastic scaling mechanism based on the prediction results. In order to verify the effectiveness of the proposed model, this paper compares it with common prediction models (such as LSTM, Transformer and ARIMA-LSTM). The experimental results show that the LSTM-Transformer model is superior to other models in the accuracy and stability of load prediction. In addition, this paper also compares the proposed PDES strategy with the horizontal automatic scaling mechanism built in Kubernetes. The results show that the PDES strategy can expand and shrink the capacity in advance, shorten the response time of the container, and improve the resource utilization rate. Compared with the traditional Kubernetes built-in strategy, it has better performance.

       

    /

    返回文章
    返回