| As the current mainstream development architecture of distributed systems in large and medium-sized enterprises,the microservice architecture is characterized by individualization and refinement of services,making application functions independent and resource boundaries clear.Compared with the monolithic architecture,it can independently expand the capacity of the load bottleneck service,which reduces the resource contention problem caused by the vertical expansion of the single architecture,however,the existing resource optimization scheduling technology for microservices,on the basis of ensuring the performance of microservices,lacks quantitative analysis of the resource requirements of microservices,which is prone to redundant resource fragments and waste of resources.Therefore,it is of great significance to study the optimization and scheduling technology of microservice resources for ensuring system performance and rational utilization of computing resources.Aiming at the resource optimal scheduling technology of microservices,the following three aspects are studied:(1)A performance monitoring mechanism based on microservice architecture is designedExisting microservice monitoring systems mostly use one or two monitoring mechanisms to complete abnormal data location or daily monitoring operation and maintenance,but to optimize microservice resource scheduling,it is necessary to collect performance metrics such as microservice invocation indicators,system load,and resource usage,the currently constructed microservice monitoring system cannot meet the data requirements of microservice performance monitoring in terms of monitoring dimensions and data collection.Therefore,on the basis of the deployment architecture of typical microservices,in view of many problems in the microservice system,such as complex calling relationships,huge access traffic,and diverse service types,a set of comprehensive performance monitoring mechanisms for microservice invocation relationship,system traffic and microservice resource utilization have been designed,which can monitor microservice performance indicators in real time,to provide data support for the next step of resource optimization scheduling of microservice containers and microservice clusters.(2)A resource optimization scheduling technology for microservice containers is proposedIn view of the fact that the current resource allocation of microservices depends on the analysis of service types,and there is a lack of quantitative assessment of resource requirements,therefore,based on the model of curve inflection point,the function fitting of the CPU and memory resource utilization samples,by designing a microservice resource utilization balance similarity metric algorithm,the two-stage resource balance optimization strategy is used to gradually adjust the resource ratio,the microservice resource utilization can maintain a certain similarity under the conditions of different concurrent users.Carry out the vertical expansion of resources at the microservice container level,the optimal scheduling of resources for the microservice container can be realized,provide a balanced container unit for the dynamic expansion of the number of microservice cluster containers in the next step.(3)A resource optimization scheduling technology for microservice clusters is proposedIn view of the current microservice cluster horizontal dynamic scaling strategy,which lacks quantitative analysis of the number of scaling resources,the method of container horizontal dynamic scaling based on the load change trend in the production environment is studied,Autoregressive Integrated Moving Average model(hereinafter referred to as the ARIMA model)is introduced to predict the change in the number of load in the microservice cluster,and define a high-performance interval based on the model of curve inflection point to quantitatively evaluate the required or redundant resources of the cluster,so that computing resources can be reasonably optimally scheduled at the level of the number of microservice cluster containers.The horizontal scaling of the microservice cluster container realizes the optimal scheduling of resources for the microservice cluster.The validity of the prediction of the load trend of the microservice cluster is proved by experiments.The defined high-performance interval can ensure high resource utilization and low service anomalies.At the same time,the overall design is based on the Kubernetes horizontal Pod autoscaler(hereinafter referred to as the HPA)to conduct simulation tests,and the comparison with passive response strategies such as CPU and QPS is verified through the boost test,which can expand the capacity in advance and reduce the generation of resource bottlenecks. |