Font Size: a A A

Research On Load Balancing And Rate Limiting Under Microservice Architecture

Posted on:2020-11-16Degree:MasterType:Thesis
Country:ChinaCandidate:Z TongFull Text:PDF
GTID:2428330596478884Subject:Computer technology
Abstract/Summary:
With the widely development of the Internet,the greater demands are being placed on the concurrency and quality of service for software applications,driving the evolution of the system architecture.In recent years,the microservice architecture has been widely favored for its excellent organizational structure and agile development.However,due to the change of the cluster structure and working mechanism of the microservice architecture,it is particularly important to design an improved scheme that is more suitable for the microservice system in order to maintain the efficiency and reliability of the system under high concurrency.After observation and research,based on the Wulingshan agricultural management project that I participated in,combined with regression analysis and rate limit algorithm,this dissertation proposes and designs two improved schemes for high efficiency and reliability microservices based on load balancing and traffic limitation.In view of efficient request scheduling of microservice system,this thesis proposed a dynamic load balancing scheme,which is based on Ribbon load balancing and regression prediction model.In the system based on microservice architecture,the number of nodes is large and the type of hardware is uneven.In the case of high concurrency,the system load pressure increases,it is difficult to make full use of the utilization of system resource,and the requests can't response in time,which requires an efficient load balancing algorithm.The strategies of load balancing such as the minimum response time strategie which are widely used and performance well at present,is based on the principle that a probe packet is sent to a node,and the request is scheduled according to the feedback situation.However,in the case of high concurrency,these strategies may cause a large network overhead of the system.Therefore,after making a study on the load balancing mechanism of microservice architecture,this thesis proposed an efficient load balancing algorithm for microservice system.The algorithm combines the Ribbon load balancing scheduling mechanism and uses regression analysis to perform regression training on historical request data and node performance monitoring data to obtain a request response time prediction model.This prediction model is applied to calculate the predicted response time of each microservice node request,and the request is forwarded to the node with the smallest prediction result.The algorithm reduces the large-scale request detection overhead and improves the efficiency of load balancing scheduling of the microservice system.The results of experiments show that the proposed algorithm is applicable to small and medium-sized microservice clusters with high concurrency,which can reduce the average response time of the system and improve the overall resource utilization and operation efficiency.In order to improve the reliability of microservice system,a set of rate limiting service based on Zuul gateway and token bucket algorithm is designed.The routing gateway is the data boundary of the microservice system.When high-concurrency occurs,a large amount of data enters the system through the gateway,causing the system load pressure to be too large,and an efficient rate limiting service is needed to solve the problem.The existing gateway software such as Nginx provides a more elaborate API rate limiting service,but when used in a microservice system,the rate limiting policy is single and the personalized policy configuration is difficult;and in the case of non-high concurrent situations,the overhead of the lower-flow service significantly increases the load pressure.Therefore,using the filter mechanism of Zuul gateway,combined with the token bucket algorithm,a high-performance rate limiting service is designed and implemented.The rate limiting service provides multiple rate limiting policies,and the configuration center independently configures the personalized rate limiting policy of each API interface.In addition,the dynamic monitoring of the service monitoring mechanism automatically shuts down the rate limiting service when the system load pressure is small,reducing the overhead.Through the performance test comparison experiment,the implementation of various rate limiting policies is verified,and the reliability of the microservice system is improved under high concurrency.
Keywords/Search Tags:microservice architecture, load balancing, regression analysis, rate limiting, token bucket
Related items