| The emergence of containers to achieve application isolation,encapsulation,easy maintenance,etc.The emergence of container orchestration system provides an abstraction layer to manage the entire container lifecycle,enabling automatic container scheduling,automatic deployment,health checks,etc.However,with the increasing complexity and business volume of the application,certain measures are needed to ensure the stability and reliability of the application.In this thesis,we study and optimize the elastic scaling mechanism in container orchestration system Kubernetes based on carrier billing system application,and point out that the traditional elastic scaling method is passive elastic scaling,which will lead to the quality of service degradation of the application due to untimely scaling.Optimization is carried out to ensure the stable operation of the application and effective allocation of system resources,and the research content of this thesis is mainly as follows:First,through the study of prediction models,a DALSTM prediction model is proposed to predict the value of a dimension by multidimensional time series data.The model is based on the Seq2Seq structure,which combines Attention with LSTM at encoding and decoding,respectively,and achieves adaptive selection of the dimension related to the target dimension as input at encoding and the relevant hidden state in the encoder as input at decoding through the two-stage ATTENTION mechanism,and the LSTM as the encoding and decoding algorithm can effectively capture the long-term dependency problem in the sequence.This model can better handle multivariate prediction problems,adapt to different time series lengths and frequencies,and have better prediction effects on complex as well as nonlinear time series data.Secondly,the prediction-based elastic scaling system PHPA is designed and implemented.On the one hand,the resources are predicted by the DALSTM model,and the elastic scaling is performed according to the predicted value to avoid the application from responding to the user’s request in time or even causing the application to crash;on the other hand,the TOPSIS algorithm is used to optimize the preferred policy in scheduling to achieve a balanced resource allocation in the whole cluster.The PHPA system mainly includes resource monitoring,resource prediction,elastic scaling and resource scheduling modules,which can regularly collect the resource usage of the application,calculate the expected number of copies according to the resource prediction value,and select the optimal working node for scheduling when expanding capacity.By integrating the PHPA system into the application management cloud platform,users can easily manage resources,configure PHPA,and view application information.Finally,the DALSTM model and the PHPA system are experimented separately and tested for the applications in the operator’s billing system.The resource data of the billing system application is collected to compare the DALSTM model with other prediction models,and the results show that the DALSTM model reduces the prediction error by about 6%-9%compared to the ALSTM and DARNN models.The PHPA system is compared with the built-in HPA policy and the default scheduling policy of Kubernetes,and the results prove that PHPA can adjust the number of replicas in advance when the application load changes are predicted,so that the response time of user requests becomes smaller,and it can effectively improve the resource utilization and make the overall load of the system balanced. |