Font Size: a A A

Research On Microservice Deployment Based On The Genetic Algorithm

Posted on:2021-08-22Degree:MasterType:Thesis
Country:ChinaCandidate:C DaFull Text:PDF
GTID:2518306308493624Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
In modern society,online shopping has became an indispensable part of people's lives.Along with the explosive requests on the mobile and PC devices,a single server node has been unable to support the high-concurrency scenarios,some companies often build server clusters to deal with this situation.In production environment,there are often uneven server loads.Some high-load servers may still receive a large number of HTTP requests while Low-load servers only process simple logical tasks,leading an imbalance in server hardware resources.This paper proposes an improved load balance strategy based on the Genetic Algorithm(GA)to balance the load between server nodes.First,disassemble the existing server nodes physically,then use the improved Knapsack Algorithm to configure the most cost-effective server cluster.Secondly,this paper analyzes the deficiencies in traditional simulation software and builds a complete e-commerce platform based on the microservices framework for project testing.Carry out detailed research on e-commerce projects from the aspects of demand analysis,database design,program selection,and automated deployment.Use various tools to test the function and performance parameters of each module under different nodes.Finally,the improved GA is used to deploy the microservice modules to the server nodes reasonably.Analyze the process of the genetic algorithm.First,a rule coding the chromosome with the server nodes and the service modules is presented.Secondly,the load rate and response time in the results of the service modules are used as the dual fitness function of the GA to evaluate the advantages and disadvantages of the individual population.Then the dynamic adaptive genetic probability can be used to ensure that the population can evolve reasonably with the increase of genetic iteration.Finally,the simulated annealing algorithm is used as the selection criterion of the GA to make up for the lack of the algorithm.Based on the Knapsack,the GA and the SAA,this paper proposes a new algorithm named KGSA.This algorithm can make full use of existing available hardware resources and recombine to an optimal server cluster,which can reduce the response time of modules and balance the load between server nodes when deploying microservice projects.Testing the KGSA algorithm in a real e-commerce project is more convincing than the Cloud Sim software.Experiments show that this algorithm can effectively solve the shortcomings of the Nginx's own load balancing algorithm in the e-commerce project.Compared with the greedy algorithm,the KGSA reduces the average load rate of the node by 18% and the system response time is reduced by 6%.Compared with the traditional GA,the load rate of the node is reduced by 15%,which has practical application reference value for enterprise project deployment.
Keywords/Search Tags:server cluster, load balancing, genetic algorithm, microservice
PDF Full Text Request
Related items