Font Size: a A A

Research And Application Of Active Scaling And Load Balancing Algorithm For Micro-Services Based On Kubernetes

Posted on:2024-01-01Degree:MasterType:Thesis
Country:ChinaCandidate:P S CaoFull Text:PDF
GTID:2558307070451894Subject:Electronic information
Abstract/Summary:
In recent years,microservices architecture is widely used.The current container management systems represented by Kubernetes all use reactive methods to scale up and down the containers of microservices,and these reactive methods can easily lead to high service load due to untimely scaling;and the load balancing algorithms of current microservice architectures can easily generate uneven load under high load situations.Both of these problems can lead to service quality degradation and thus SLA(Service Level Agreement)violation.For these two problems,the main research of this thesis is as follows.(1)Build a service load prediction model based on Informer model to achieve active scaling of microservices in Kubernetes environment.In this thesis,the load prediction model in a community-type project are optimized by coding and adding the active events in the project into the model to improve the accuracy of load prediction;the business-related metric of the number of service invocations per minute is chosen as the metric for load prediction to avoid the problem of other system-level metrics causing prediction errors due to service configuration changes;the automatic scaling algorithm is optimized and the retry task queue is introduced to improve the reliability of active scaling.(2)A client-side phased dynamic weight load balancing algorithm is proposed by improving the entropy value method.This thesis introduces weight calculation service and Redis to calculate and transfer weight data,and adds the tolerability of different indicators to weight the indicator weight coefficients,so that the calculated indicator weights are more applicable to the load balancing.The algorithm effectively solves the problem that the existing client-side load balancing algorithm in microservice architecture tends to generate uneven load.The test results show that the load prediction model in this thesis has higher prediction accuracy than other models under community type projects,and the active scaling in this thesis largely alleviates the problem of reactive scaling.Meanwhile the load balancing algorithm in this thesis can significantly improve the service throughput and reduce the response time of service requests compared with other algorithms.The above work effectively reduces the service SLA violation and makes the service operation more stable.
Keywords/Search Tags:Microservice, Kubernetes, Active Scaling, Informer, Load Balance
Related items