Since the pandemic,the real economy has been hit hard,but the "cloud" economy has made rapid progress.All industries have simultaneously completed the migration from "offline" to "cloud".With the deepening of enterprise digital transformation,cloud native technology has become the infrastructure of enterprise digital transformation.In the development of containerization technology,container orchestration and scheduling schemes including Kubernetes,Mesos,Swarm and so on have appeared in the industry.Among them,Kubernetes has become the de facto standard of container orchestration scheduling schemes with a vigorous ecosystem and excellent performance.Based on Kubernetes as the research object,combined with the current problems of uneven resource allocation,low resource utilization and unstable service during peak periods in the cloud application of enterprises,this paper analyzes the existing resource scheduling mechanism and elastic scaling strategy,and puts forward an optimization strategy for the shortcomings.The main work is as follows:(1)The native scheduling optimization algorithm of Kubernetes platform considers insufficient resource indicators,and the weight of each resource indicator in the scoring model is the same.When dealing with the requirements of resource-oriented applications such as network and disk,the native scheduler is difficult to maintain the balanced allocation of various resources during Pod scheduling,resulting in cluster imbalance.In this paper,considering the influence of multiple resource types and Weight on scheduling,a subjective and objective combination weighting algorithm based on AHP(Analytic Hierarchy Process)and EWM(Entropy Weight Method)is proposed.The network and disk resource indicators are extended to the model,the node scoring model in the preferred stage of Pod scheduling is optimized,and the plug-in is developed to embed the native scheduler.The experimental test environment verifies that the improved optimal scheduling scoring model in this paper makes the overall load more balanced in a variety of scenarios.(2)Aiming at the problem of response lag in the native scaling and capacity mechanism in the enterprise cluster,this paper proposes A load prediction elastic scheduling algorithm based on A-Bi-LSTM.Based on the existing reactive scaling strategy,the model deployed the monitoring component for application data collection,used the Bi-LSTM algorithm for load prediction to optimize elastic scaling,and introduced an attention mechanism to reduce the adverse impact on the prediction results.The model is used to reasonably predict the changes of resources in the future,and the predicted results are fed back to the elastic scaling mechanism.The capacity is expanded and scaled in advance during peak and valley periods,which avoids service anomalies caused by delayed expansion during peak periods,ensures the stability of applications,and improves the quality of user experience.Through the internal test cluster verification,the load prediction elastic scheduling algorithm model designed in this paper can trigger the resource scheduling in advance before the peak flow,so that the system can adjust resources more flexibly according to the actual needs of the application,and improve the stability of the service. |