Search

CN-122018924-A - Micro-service deployment method, system, equipment, medium and product

CN122018924ACN 122018924 ACN122018924 ACN 122018924ACN-122018924-A

Abstract

The invention discloses a micro-service deployment method, a system, equipment, a medium and a product, wherein the method firstly carries out load test on an application program of a target micro-service, acquires performance index data, determines an initial container deployment scale of the application program according to the performance index data and a preset service level target, then adopts an improved genetic algorithm to optimize a node resource allocation scheme required by the micro-service for deploying the initial container deployment scale, wherein the improved genetic algorithm selects an order for executing cross operation or mutation operation on an individual in a population according to the fitness value of the individual, and finally executes container deployment of the target micro-service based on the optimized node resource allocation scheme. The invention can improve the utilization rate of the container resources and the performance stability of the micro service deployment, thereby ensuring the efficiency and the reliability of the micro service deployment.

Inventors

  • YU WEIZHONG
  • JIANG WEN
  • YANG WEIWEI

Assignees

  • 中移(苏州)软件技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20260128

Claims (10)

  1. 1. A method of micro-service deployment, comprising: load testing is carried out on the application program of the target micro-service, and performance index data are collected; Determining the initial container deployment scale of the application program according to the performance index data and a preset service level target; optimizing a node resource allocation scheme required by a micro-service for deploying the initial container deployment scale by adopting an improved genetic algorithm, wherein the improved genetic algorithm selects an order for executing cross operation or mutation operation on individuals in a population according to fitness values of the individuals; and executing container deployment of the target micro service based on the optimized node resource allocation scheme.
  2. 2. The micro-service deployment method of claim 1 wherein the improved genetic algorithm selects an order of performing crossover operations or mutation operations on individuals in a population based on fitness values of the individuals, comprising: Calculating the normalized relative position of the fitness value of the current individual in the whole fitness range of the current population; If the normalized relative position is less than or equal to one half, determining that the current individual is a relatively low fitness individual, and performing mutation operation on the current individual; and if the normalized relative position is greater than one half, judging that the current individual is a relatively high-adaptability individual, and executing cross operation on the current individual.
  3. 3. The micro-service deployment method of claim 2, further comprising, prior to said employing the improved genetic algorithm, optimizing a node resource allocation scheme required for deploying the initial container deployment-scale micro-service: predicting future costs of different types of nodes based on historical cost data of the nodes by using a time sequence prediction algorithm; the predicted future cost of the node is taken as one of the input parameters of the improved genetic algorithm.
  4. 4. The micro-service deployment method according to claim 1, wherein after the container deployment of the target micro-service is performed based on the optimized node resource allocation scheme, further comprising: Monitoring the running state of the application program in the cluster; when the monitored running state change exceeds a preset change threshold, re-adopting the improved genetic algorithm, and generating a new node resource allocation scheme based on the current running state; and adjusting cluster resource allocation according to the new node resource allocation scheme.
  5. 5. The micro-service deployment method according to claim 1, wherein determining the initial container deployment scale of the application program according to the performance index data and a preset service level target comprises: Determining the maximum request load which can be processed by a single container example according to the performance index data; And calculating to obtain the initial container deployment scale according to the maximum request load and a preset service level target.
  6. 6. The method for deploying micro-services according to claim 1, wherein the load testing of the application program of the target micro-service, collecting performance index data, comprises: simulating user behavior using a programmable load testing tool to perform load testing; and adjusting the test load according to the performance index acquired in the load test through the automatic script until the failure rate of the application program of the target micro-service reaches a preset threshold value, so as to obtain the performance index data.
  7. 7. A micro-service deployment system, comprising: The load test module is used for carrying out load test on the application program of the target micro-service and collecting performance index data; the container deployment scale analysis module is used for determining the initial container deployment scale of the application program according to the performance index data and a preset service level target; The resource optimization scheme generation module is used for optimizing a node resource allocation scheme required by the micro-service for deploying the initial container deployment scale by adopting an improved genetic algorithm, wherein the improved genetic algorithm selects the sequence for executing cross operation or mutation operation on individuals in a population according to the fitness value of the individuals; and the deployment module is used for executing container deployment of the target micro-service based on the optimized node resource allocation scheme.
  8. 8. A micro service deployment device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the micro service deployment method according to any one of claims 1 to 6 when executing the computer program.
  9. 9. A computer readable storage medium, wherein the computer readable storage medium stores a computer program, and wherein the computer program when executed controls a device in which the computer readable storage medium is located to perform the micro service deployment method according to any one of claims 1 to 6.
  10. 10. A computer program product comprising computer programs/instructions which when executed by a processor implement the method of micro-service deployment according to any of claims 1 to 6.

Description

Micro-service deployment method, system, equipment, medium and product Technical Field The invention relates to the technical field of cloud computing and distributed systems, in particular to a micro-service deployment method, a micro-service deployment system, micro-service deployment equipment, a micro-service deployment medium and a micro-service deployment product. Background The micro-service (Microservices) is a software architecture design model that breaks down applications into small, autonomous service units that can be deployed, extended, and maintained independently, where each service unit is also a micro-service that forms a style of software architecture called a micro-service architecture. The micro-service architecture enables independent development and deployment of services by splitting complex and cumbersome legacy applications into smaller and more manageable service units. In the containerized micro-service process, a large number of operational tasks can be automatically processed simultaneously by adopting container arrangement. Therefore, to achieve optimal resource utilization, it is critical to find an optimal container orchestration solution in a micro-service deployment. The existing solution is to optimize the container utilization mainly through greedy algorithm, cost modeling and other aspects. However, the solution using the greedy algorithm cannot guarantee the globally optimal solution, because the greedy algorithm expects to reach the globally optimal solution by the locally optimal solution of each step, but in many cases, the greedy algorithm easily falls into the locally optimal solution, and cannot find the globally optimal solution. In the training process, the cost modeling scheme can lead to unstable behaviors, so that fluctuation of resource allocation is caused, and the service performance is influenced. In summary, in the existing micro-service deployment scheme, it is difficult to ensure that a globally optimal solution of container arrangement is found, which easily causes resource waste or performance failure to reach standards, and efficiency and reliability of micro-service deployment cannot be ensured. Disclosure of Invention The invention aims to provide a micro-service deployment method, a system, equipment, a medium and a product, which improve the utilization rate of container resources and performance stability of micro-service deployment, thereby ensuring the efficiency and reliability of micro-service deployment. In order to achieve the above object, the present invention provides a micro-service deployment method, including: load testing is carried out on the application program of the target micro-service, and performance index data are collected; Determining the initial container deployment scale of the application program according to the performance index data and a preset service level target; optimizing a node resource allocation scheme required by a micro-service for deploying the initial container deployment scale by adopting an improved genetic algorithm, wherein the improved genetic algorithm selects an order for executing cross operation or mutation operation on individuals in a population according to fitness values of the individuals; and executing container deployment of the target micro service based on the optimized node resource allocation scheme. Optionally, the improved genetic algorithm selects an order of performing crossover or mutation operations on individuals in the population according to fitness values of the individuals, including: Calculating the normalized relative position of the fitness value of the current individual in the whole fitness range of the current population; If the normalized relative position is less than or equal to one half, determining that the current individual is a relatively low fitness individual, and performing mutation operation on the current individual; and if the normalized relative position is greater than one half, judging that the current individual is a relatively high-adaptability individual, and executing cross operation on the current individual. Optionally, before said optimizing the node resource allocation scheme required for deploying said initial container deployment-scale micro-services using an improved genetic algorithm, further comprising: predicting future costs of different types of nodes based on historical cost data of the nodes by using a time sequence prediction algorithm; the predicted future cost of the node is taken as one of the input parameters of the improved genetic algorithm. Optionally, after the container deployment based on the optimized node resource allocation scheme and performing the target micro service, the method further includes: Monitoring the running state of the application program in the cluster; when the monitored running state change exceeds a preset change threshold, re-adopting the improved genetic algorithm, and generating a new node resou