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.