基于注意力机制的Seq2Seq微服务容器负载预测

SEQ2SEQ MICROSERVICE CONTAINER LOAD PREDICTION BASED ON ATTENTION MECHANISM

  • 摘要: 微服务的按需伸缩对提高集群的资源利用率至关重要,而按需伸缩的前提是集群能够对资源需求进行精准预测。当前基于规则响应式的资源管理策略仍是产业界的主流方式,学术界结合机器学习的资源负载预测方法仍存在预测不够精准等问题。因此,提出一种基于微服务依赖程度的负载预测模型。通过基于DTW (Dynamic Time Warping)改进的容器依赖程度检测算法,对容器进行依赖程度评估。分析存在强依赖关系的容器之间指标的相关性,选择相关性较高的指标作为模型的输入特征变量。预测模型采用Seq2Seq (Sequence to Sequence)编解码模型,并结合注意力机制和残差LSTM来提升模型预测的精准性和稳定性。实验表明,该模型预测效果显著,误差评价指标MAE、RMSE、MAPE相较于另外两个深度学习模型平均降低了48%、35%、51%,能够有效预测出存在强依赖关系容器的短时负载。

     

    Abstract: On-demand scaling of microservice containers improves resource utilization of clusters, but it requires accurate resource prediction. Current rule-based strategies are prevalent in industry, but academic research has combined machine learning for load prediction, but still have issues like inaccuracy and overfitting. A new model for load prediction based on microservice dependency is proposed. It used a container dependency detection algorithm based on DTW and analyzed the correlation of indicators between containers with strong dependency relationships. The core prediction model used a Seq2Seq encoding-decoding model and combined the attention mechanism and residual LSTM to enhance the stability and accuracy of the model's prediction. The experiment results demonstrate that the proposed model has a significant prediction performance, with an average decrease of 48%, 35% and 51% in MAE, RMSE, and MAPE compared with the other two deep learning models. It effectively forecasts the short-term load of containers with strong dependency relationships.

     

/

返回文章
返回