WO2022028157A1 - Procédé et système de mise à l'échelle élastique pour système de microservice dans un environnement en nuage, support et dispositif - Google Patents

Procédé et système de mise à l'échelle élastique pour système de microservice dans un environnement en nuage, support et dispositif Download PDF

Info

Publication number
WO2022028157A1
WO2022028157A1 PCT/CN2021/103502 CN2021103502W WO2022028157A1 WO 2022028157 A1 WO2022028157 A1 WO 2022028157A1 CN 2021103502 W CN2021103502 W CN 2021103502W WO 2022028157 A1 WO2022028157 A1 WO 2022028157A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
task
instance
cloud environment
virtual machine
Prior art date
Application number
PCT/CN2021/103502
Other languages
English (en)
Chinese (zh)
Inventor
蒋昌俊
闫春钢
丁志军
张亚英
王晟
Original Assignee
同济大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 同济大学 filed Critical 同济大学
Publication of WO2022028157A1 publication Critical patent/WO2022028157A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention belongs to the technical field of software, and relates to a scaling method and system, in particular to an elastic scaling method, system, medium and device for a microservice system in a cloud environment.
  • the software system based on microservices splits high-coupling large-scale software into a series of service sets with independent life cycle, high cohesion and low coupling, thereby reducing the internal complexity of the software, improving the scalability of the system, and More flexible scaling is achieved by reducing service granularity.
  • the independence between microservices also brings a large performance loss, which needs to be compensated by the task scheduling method.
  • the containerized deployment method and the automatic scaling of many microservice instances also require the support of scaling methods.
  • Task scheduling in the cloud environment focuses on how to arrange the execution of tasks in the workflow in the cloud environment, and use a large number of pay-as-you-go computing resources in the cloud environment to scale resources to achieve a trade-off between performance and cost; however, most studies are limited For the scheduling of a single workflow, the simultaneous scheduling of multiple workflows and the continuous workload are ignored.
  • Automatic scaling in the cloud environment focuses on the management of computing resources, predicting the response time of requests and predicting the amount of resources required to meet performance requirements through modeling and analysis; however, this modeling and estimation method cannot accurately reflect the actual demand for resources.
  • microservices are mainly based on containers, and the strategy of "one microservice instance and one container" is usually used for deployment, which makes the scaling of microservices actually the scaling of containers loaded with service instances, and needs to consider containers and virtual machines. Simultaneous scaling, and container-to-VM placement issues.
  • the purpose of the present invention is to provide an elastic scaling method, system, medium and device for a micro-service system in a cloud environment, so as to solve the problem that the prior art cannot accurately reflect the actual demand of resources, and It does not involve a specific task scheduling method, and the scheduling method also affects the resource demand, and does not consider the simultaneous scaling of the container and the virtual machine, and the placement of the container to the virtual machine.
  • the present invention provides an elastic scaling method of a microservice system in a cloud environment, wherein the microservice system in the cloud environment includes a microservice instance layer and a virtual machine layer, and each microservice instance packaged in a container and deployed on a virtual machine;
  • the elastic scaling method of the microservice system in the cloud environment includes: monitoring the work attribute information of each microservice instance in the microservice system in the cloud environment; Before and during the operation of the microservice system, determine the optimal cost-effective container type for each microservice instance; form the task scheduling scheme based on the task workflow and the optimal cost-effective container type for each microservice instance; read The scheduling scheme of the task is obtained to obtain the type and quantity of the newly added microservice instance, and the newly added microservice instance is deployed on the leased or newly added virtual machine.
  • the work attribute information of each microservice instance includes the actual response time of the microservice instance and/or the end-to-end response time of the workflow.
  • the step of monitoring the work attribute information of each microservice instance in the microservice system in the cloud environment further includes: judging whether the task times out according to the deadline defined by the workflow, If it times out, store the delay time.
  • the method for elastic scaling of the microservice system in the cloud environment further includes: calculating the average value of each microservice instance. Execution time, average data transfer volume and communication latency between microservice instances.
  • the step of determining the optimal cost-effective container type for each microservice instance includes: initializing container types corresponding to all types of microservice instances; calculating the expected completion of the workflow under the current container type. time; when the expected completion time is greater than the deadline of the workflow, calculate the benefit ratio when the container type corresponding to the i-th microservice instance is replaced with a type with more resources and a higher price.
  • the step of forming the task scheduling scheme based on the task workflow and the optimal cost-effective container type for each microservice instance includes: extracting the optimal value corresponding to each microservice instance.
  • the running speed of the cost-effective container type calculates the ranking of each task in the workflow, and calculates the sub-deadline time of each task based on the ranking of the tasks; when multiple workflows need to be scheduled in one scheduling cycle, and many
  • there is competition for microservice instances among the workflows by adding unified entry tasks and exit tasks, multiple workflows are integrated into a single workflow; the expected completion time of each ready task in the workflow is calculated; the A ready task is a task that has been executed and completed by all predecessor tasks; based on the sub-deadline of each task, the expected completion time of each ready task and the number of subsequent tasks, the scheduling urgency of the ready task is calculated, and the scheduling urgency is selected.
  • the elastic scaling method of the microservice system in the cloud environment further includes: when the rented virtual machine is not enough to deploy all newly added microservice instances, renting a new virtual machine for deploying the remaining unused virtual machines.
  • the deployed microservice instance; the type and quantity of the leased new virtual machine and the mapping method to the virtual machine are solved by means of a pre-stored variable size packing problem.
  • the microservice system in the cloud environment includes a microservice instance layer and a virtual machine layer. Each microservice instance is encapsulated in a container and deployed. on a virtual machine;
  • the elastic scaling system of the microservice system in the cloud environment includes: a monitoring module for monitoring the work attribute information of each microservice instance in the microservice system in the cloud environment; a container type determination module, It is used to determine the optimal cost-effective container type for each microservice instance before and during the operation of the microservice system; the scheduling scheme forms a module for the workflow of tasks and the optimal cost-effective container for each microservice instance Based on the type, the scheduling scheme of the task is formed; the deployment module is used to read the scheduling scheme of the task to obtain the type and quantity of the newly added microservice instance, and deploy the newly added microservice instance in the leased or added to the virtual machine.
  • Another aspect of the present invention provides a medium on which a computer program is stored, and when the computer program is executed by a processor, implements the elastic scaling method of the microservice system in the cloud environment.
  • a final aspect of the present invention provides an apparatus, comprising: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory, so that the apparatus executes the cloud environment
  • the elastic scaling method of the microservice system comprising: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory, so that the apparatus executes the cloud environment The elastic scaling method of the microservice system.
  • the elastic scaling method, system, medium and device of a microservice system in a cloud environment have the following beneficial effects:
  • the present invention combines the task scheduling algorithm and the resource scaling algorithm, uses the task scheduling algorithm to obtain the scheduling scheme and accurately calculates the amount of resources required for system scaling, thereby reducing system operation costs while ensuring system performance.
  • the present invention proposes a combined scaling problem of containers and virtual machines for the resource provisioning mode mainly based on virtual machines in cloud environments, and uses the VSBPP solution method to obtain a cost-optimized solution for virtual machine expansion and container deployment.
  • the present invention comprehensively considers the overall structure of the workflow, calculates the optimal cost-effective container type for each microservice, and divides the deadline based on this, which improves the reliability of deadline division and improves the performance of the algorithm.
  • FIG. 1 is a schematic diagram showing the principle structure of the microservice system in the cloud environment of the present invention.
  • FIG. 2A is a schematic flowchart of an elastic scaling method of a microservice system in a cloud environment according to an embodiment of the present invention.
  • FIG. 2B is a schematic flowchart of S22 in the elastic scaling method of the microservice system in the cloud environment of the present invention.
  • FIG. 2C is a schematic flowchart of S23 in the elastic scaling method of the microservice system in the cloud environment of the present invention.
  • FIG. 3 is a schematic diagram showing the principle structure of an elastic scaling system of a microservice system in a cloud environment according to an embodiment of the present invention.
  • the invention includes the optimal cost-effective container type solution, heterogeneous workflow scheduling based on task urgency, and VSBPP-based container virtual machine combination scaling; wherein, the optimal cost-effective container type solution is based on the workflow describing the structure of the microservice system, Starting from the container type with the least amount of resources, replace the container type for each microservice in turn, and calculate the revenue ratio caused by the replacement of the container type, that is, the ratio of the performance improvement and the price increase, and select the microservice container type with the highest revenue ratio. Actual replacement, repeat this process until the performance of the microservice system meets the requirements under a certain container type scheme, which is the optimal cost-effective container type; heterogeneous workflow scheduling based on task urgency to describe the structure of user requests.
  • Cost increase and select the service instance with the smallest cost increase for task allocation; if not satisfied, create a new container that conforms to the optimal cost-effective container type, deploy the service instance in it, and assign tasks to the new service instance; based on VSBPP's container virtual machine combination scaling obtains the type and quantity of newly added containers from the scheduling scheme obtained by the scheduling algorithm, and tries to deploy it on the leased virtual machine. If the resources of the leased virtual machine are not enough to deploy all the new containers, Then a batch of new virtual machines are leased to deploy the remaining un-deployed containers. The type and quantity of newly leased virtual machines and the mapping scheme from containers to virtual machines are solved by the VSBPP solution method.
  • the invention comprehensively considers the task scheduling algorithm and the resource scaling algorithm, accurately determines the number of resources to be expanded through the task scheduling algorithm, and then solves the cost-optimized scaling scheme through the resource scaling algorithm, ensures the performance of the micro-service system, and minimizes the cost of cloud resource rental. .
  • This embodiment provides an elastic scaling method for a microservice system in a cloud environment.
  • the microservice system in the cloud environment includes a microservice instance layer and a virtual machine layer, and each microservice instance is packaged in a container and deployed in a On the virtual machine;
  • the elastic scaling method of the microservice system in the cloud environment includes:
  • the task scheduling scheme is formed
  • the scheduling scheme of the task is read to obtain the type and quantity of the newly added microservice instance, and the newly added microservice instance is deployed on the leased or newly added virtual machine.
  • FIG. 1 shows a schematic diagram of the principle structure of a microservice system in a cloud environment.
  • the microservice system 1 in the cloud environment includes a microservice instance layer and a virtual machine layer, and each microservice instance is encapsulated in a container and deployed in a virtual machine.
  • the microservice system is represented in the form of workflow and described by a Directed Acyclic Graph (DAG), and multiple user requests will be cached in the workload queue, as shown in the figure
  • DAG Directed Acyclic Graph
  • a user when a user requests to enter the system, it will trigger the execution of a function in the system.
  • the user request can be represented by the workflow and DAG corresponding to the function, and each vertex in the DAG represents a task in the request , an edge between two vertices represents a dependency between tasks.
  • FIG. 2A is a schematic flowchart of an embodiment of an elastic scaling method of a microservice system in a cloud environment.
  • the elastic scaling method of the microservice system in the cloud environment specifically includes the following steps:
  • S21 Monitor the work attribute information of each microservice instance in the microservice system in the cloud environment, and determine whether the task (in this embodiment, the task) times out according to the deadline defined by the workflow, and if Timeout, storage delay time.
  • the work attribute information of each microservice instance includes information such as the actual response time of the microservice instance and/or the end-to-end response time of the workflow. Compare the deadline defined by the workflow with the actual response time of the microservice instance to determine whether the user request timed out.
  • the optimal cost-effective container type for each microservice instance.
  • the corresponding container type is preferentially selected to ensure the optimization of performance and cost.
  • the average execution time of each type of microservice instance (the average execution time of each type of microservice instance is equal to the sum of the execution times of multiple executions of each type of microservice instance divided by execution times) and the average data transfer volume between microservice instances (the average data transfer volume between microservice instances is equal to the sum of the time consumed by multiple data transfers between microservice instances divided by the number of transfers) and communication delays, And make real-time updates when the microservice system is running.
  • FIG. 2B is a schematic flowchart of S22 .
  • the S22 specifically includes the following steps:
  • t p is the predecessor task of task t c , and currently t c can be executed only when all predecessor tasks of t c are completed.
  • data p,c is the average data transmission amount between tasks t p and t c
  • b is the network bandwidth
  • TT p,c represents the data transmission time between tasks t p and t c , that is, the communication delay
  • FT p represents t
  • ET c represents the average execution time of t c .
  • duration i is the running time of the i-th container
  • interval is the charging time unit of the cloud service provider
  • the value is the virtual machine charging unit time provided by the cloud service provider
  • price i is the unit price of the i-th container
  • the unit price varies with the amount of resources in the container.
  • makespan before , cost before , makespan after , and cost after represent the expected completion time and total container price before and after replacement, respectively.
  • the i corresponding to the maximum revenue ratio is selected, the container type corresponding to the i-th microservice is actually replaced, and the process returns to step S222.
  • the total cost of the container depends on the unit price of the container and the running time of the container. After the replacement, the unit price of the container increases, but the running time of the container decreases, so the following situations may exist:
  • cost is reduced after replacement, then select cost difference as gain i ;
  • the algorithm stops, and the container type corresponding to each microservice is the optimal cost-effective container type.
  • a task scheduling scheme is formed based on the task workflow and the best cost-effective container type for each microservice instance.
  • FIG. 2C is a schematic flowchart of S23 .
  • the S23 includes the following steps:
  • the rank of each task in the workflow is calculated according to formula (6).
  • task t j is the successor task of task t i
  • ET * i is the execution time of t i on the optimal cost-effective container type
  • TT i,j is the data transmission time between t i and t j .
  • the physical meaning of rank is: in the absence of task queuing time, the expected time from the start of task t i to the completion of the entire workflow.
  • the sub-deadline of each task is calculated, that is, the latest allowed completion time of each task. If a task cannot be executed before its child deadlines, it can be considered that the workflow to which this task belongs will time out:
  • subdeadline i is the sub-deadline of task t i
  • cpLength is the critical path length of the workflow, that is, the expected time to complete the execution of the entire workflow
  • deadline is the deadline of the entire workflow.
  • S233 Calculate the expected completion time of each ready task in the workflow; the ready task is a task that has been executed and completed by all predecessor tasks. In particular, an entry task without a predecessor task must be the first task executed in each workflow.
  • the formula for calculating the expected completion time is as follows:
  • XFT(t c ) is the expected completion time of the ready task t c
  • I i,j represents the jth microservice instance of the ith microservice
  • EFT(t c ,I i,j ) and ET(t c , I i,j ) represent the earliest completion time and execution time of the task t c on the microservice instance I i, j , respectively
  • w c is the calculation amount of the task t c
  • si j is the microservice instance I i, j
  • the processing speed of , avail(I i,j ) is the available time of the microservice instance I i,j
  • AFT(t p ) is the actual completion time of the task t p .
  • the expected completion time is the minimum value of the earliest completion time among all microservice instances. It should be noted that the task t c can only be executed on the service instance of its corresponding type of microservice.
  • the scheduling urgency of the ready task is calculated according to formula (11):
  • hop(t i ) is the number of subsequent tasks to be scheduled for task t i
  • the number of subsequent tasks to be scheduled for a ready task is defined as the maximum path length from the task to the exit task.
  • S235 For the scheduled task, traverse all microservice instances that can execute the task, and determine whether the task can meet the sub-deadline; and determine whether the task can meet the sub-deadline by calculating the task slack.
  • the task slack is calculated according to formula (12):
  • Laxity(t c ,I i,j ) when the task t c is scheduled to the instance I i,j , the difference between its sub-deadline time and the earliest completion time.
  • the task laxity Laxity(t c , I i, j ) is a non-negative number, it means that there are some microservice instances that can complete the task before the sub-deadline, then the task is calculated and scheduled to the microservice
  • the cost increase caused by the instance incrCost i, j schedule the task to the microservice instance corresponding to the minimum cost increase.
  • cost and cost' represent the cost before and after the task t c is scheduled to the service instance I i,j respectively
  • duration x is the rental duration of the xth virtual machine
  • interval is the charging time unit of the cloud service provider
  • price x is the unit price of the xth virtual machine.
  • the task slack is a negative number, it means that all some microservice instances meet the sub-deadline, and then calculate the minimum microservice instance computing speed minSpeed required to complete the task before the sub-deadline, so as to calculate the minimum microservice instance calculation speed minSpeed according to the minimum microservice Instance computing speed, create a new microservice instance.
  • the minimum microservice instance computing speed minSpeed required to complete the task before the sub-deadline is calculated according to formula (15):
  • IT(I * i,j ) is the creation time of a new service instance, and is selected according to the following strategies:
  • minSpeed is between the maximum processing speed of the available virtual machine type and the processing speed of the optimal cost-effective container type of the microservice corresponding to the task, create a new container with a processing speed slightly higher than minSpeed and deploy the service instance, Schedule tasks to this instance.
  • S236 if a new microservice instance is created, traverse the leased virtual machines, select the virtual machine loaded with the container image required by the microservice instance, and select the one with the smallest difference between the remaining resources of the virtual machine and the resources required by the container. virtual machine, and deploy the new microservice instance to the virtual machine; at the same time, readjust the expected completion time of the task. If there is no container image required by the service instance in the rented virtual machine, the service instance is added to the set newIns and deployed by the container virtual machine combined with the scaling module (in this embodiment, the new service instance deployed in advance is no longer Participate in the deployment of the container virtual machine combination scaling module). Returning to S233, that is, returning to the step of calculating the expected completion time of each ready task in the workflow.
  • S24 Read the scheduling scheme of the task to obtain the type and quantity of the newly added microservice instance therefrom, and deploy the newly added microservice instance on the leased or newly added virtual machine.
  • the scheduling scheme of the task is read, the undeployed new service instance set newIns is obtained, the newly added service instances and their corresponding container types are obtained therefrom, and they are arranged in ascending order according to the amount of resources required by the containers. According to the sorting results, new service instances are added to the leased virtual machines in turn.
  • the selection is based on the Best Fit principle, that is, the virtual machine with the smallest difference between the remaining resources of the virtual machine and the resources required by the container is selected.
  • the new virtual machines are leased to deploy the remaining undeployed microservice instances; the type and quantity of the leased new virtual machines and the mapping method to the virtual machines are determined by The pre-stored variable-sized bin pack problem (VSBPP) is solved.
  • VSBPP variable-sized bin pack problem
  • the newly added service instances are items in VSBPP, and the types of virtual machines that can be rented are boxes of different capacities.
  • a VSBPP solving algorithm such as the FFDLS algorithm and the IFFD algorithm is used to solve the type and quantity of the leased new virtual machine and the mapping method to the virtual machine.
  • the objective function in the VSBPP solution algorithm is to minimize the rental cost of the newly added virtual machine.
  • the virtual machines provided in the cloud environment are often based on the number of time units leased. For example, the virtual machine of Amazon EC2 is charged by the hour, and the part less than one hour is charged by one hour. Therefore, the rental fee calculation formula is shown in formula (16):
  • duration i is the rental duration of the ith virtual machine
  • interval is the charging time unit of the cloud service provider
  • price i is the unit price of the ith virtual machine.
  • the remaining resource amount for each newly leased virtual machine that is, the total amount of resources owned by the virtual machine minus the amount of resources occupied by the service instance, and according to this The proportion of the required resources of the newly added service instances on the virtual machine, and the remaining resources are allocated to the newly added service instances in proportion.
  • this embodiment combines the task scheduling algorithm and the resource scaling algorithm, uses the task scheduling algorithm to obtain the scheduling scheme and accurately calculates the amount of resources required for system scaling, which reduces system operation costs while ensuring system performance.
  • this embodiment proposes a combined scaling problem of containers and virtual machines for the resource provisioning method based on virtual machines in a cloud environment, and uses the VSBPP solution method to obtain a cost-optimized solution for virtual machine expansion and container deployment.
  • this embodiment comprehensively considers the overall structure of the workflow, calculates the optimal cost-effective container type for each microservice, and divides the deadline based on this, which improves the reliability of deadline division and improves the performance of the algorithm. .
  • This embodiment also provides a medium (also referred to as a computer-readable storage medium) on which a computer program is stored, and when the computer program is executed by a processor, implements the above-mentioned elastic scaling method of a microservice system in a cloud environment.
  • a medium also referred to as a computer-readable storage medium
  • the computer-readable storage medium means that all or part of the steps of implementing the above method embodiments can be completed by hardware related to computer programs.
  • the aforementioned computer program may be stored in a computer-readable storage medium.
  • the steps including the above method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
  • This embodiment further provides an elastic scaling system for a microservice system in a cloud environment.
  • the microservice system in the cloud environment includes a microservice instance layer and a virtual machine layer. Each microservice instance is encapsulated in a container and deployed on On a virtual machine; the elastic scaling system of the microservice system in the cloud environment includes:
  • a monitoring module for monitoring the work attribute information of each microservice instance in the microservice system in the cloud environment
  • a container type determination module used to determine the optimal cost-effective container type for each microservice instance before and during the operation of the microservice system
  • the scheduling scheme forming module is used to form the scheduling scheme of the task based on the workflow of the task and the best cost-effective container type for each microservice instance;
  • the deployment module is used for reading the scheduling scheme of the task, so as to obtain the type and quantity of the newly added microservice instance, and deploy the newly added microservice instance on the leased or newly added virtual machine.
  • FIG. 3 is a schematic diagram showing the principle structure of an elastic scaling system of a microservice system in a cloud environment in an embodiment.
  • the elastic scaling system 3 of the microservice system in the cloud environment includes a monitoring module 31 , a container type determination module 32 , a scheduling scheme forming module 33 and a deployment module 34 .
  • the monitoring module 31 is used to monitor the work attribute information of each microservice instance in the microservice system in the cloud environment, and judge the task according to the deadline defined by the workflow (in this embodiment, the task ) whether it times out, if it times out, store the delay time.
  • the work attribute information of each microservice instance includes information such as the actual response time of the microservice instance and/or the end-to-end response time of the workflow. Compare the deadline defined by the workflow with the actual response time of the microservice instance to determine whether the user request timed out.
  • the container type determination module 32 coupled with the monitoring module 31 is configured to determine the optimal cost-effective container type for each microservice instance before and during the operation of the microservice system.
  • the container type determination module 32 obtains the average execution time of each type of microservice instance through the data monitored by the monitoring module 31 (the average execution time of each type of microservice instance is equal to the average execution time of each type of microservice instance). The sum of the execution time of multiple executions of the instance divided by the number of executions) and the average data transfer volume between microservice instances (the average data transfer volume between microservice instances is equal to the time it takes to transfer data multiple times between microservice instances) The sum divided by the number of transfers) and communication latency, and updated in real-time as the microservice system runs.
  • the container type determination module 32 is used to initialize the container types corresponding to all types of microservice instances; calculate the expected completion time of the workflow under the current container type; when the expected completion time is greater than the expiration time of the workflow, Calculate the revenue ratio when the container type corresponding to the i-th microservice instance is replaced with a type with more resources and a higher price. If the expected completion time meets the deadline of the workflow, the container type determination module 32 stops, and the container type corresponding to each microservice currently is the optimal cost-effective container type.
  • the scheduling scheme forming module 33 coupled with the monitoring module 31 and the container type determining module 32 is configured to form the scheduling scheme of the task based on the workflow of the task and the best cost-effective container type for each microservice instance.
  • the scheduling scheme forming module 33 is used to extract the running speed of the optimal cost-effective container type corresponding to each microservice instance, calculate the ranking of each task in the workflow, and calculate the ranking of each task based on the ranking of the tasks.
  • the sub-deadline of the task when multiple workflows need to be scheduled in a scheduling cycle and there is competition for microservice instances among multiple workflows, the multiple workflows can be integrated by adding unified entry tasks and exit tasks into a single workflow; calculate the expected completion time of each ready task in the workflow; the ready task is the completed task of all predecessor tasks; based on the sub-deadline of each task, the expected completion time of each ready task time and the number of subsequent tasks, calculate the scheduling urgency of the ready task, and select the ready task corresponding to the minimum value of the scheduling urgency as the object of subsequent scheduling; traverse all microservice instances that can execute the task, and determine the Whether the task can meet the sub-deadline; determine whether the task can meet the sub-deadline by calculating the task slack
  • Service instance if a new microservice instance is created, traverse the leased virtual machine, select the virtual machine loaded with the container image required by the microservice instance, and select the smallest difference between the remaining resources of the virtual machine and the resources required by the container. and deploys the newly created microservice instance on the virtual machine; returns and calculates the expected completion time of each ready task in the workflow.
  • the deployment module 34 which is respectively coupled with the container type determination module 32 and the scheduling scheme forming module 33, is used to read the scheduling scheme of the task, so as to obtain the type and number of newly added microservice instances from it, and to add the newly added microservices.
  • Service instances are deployed on leased virtual machines. When the leased virtual machines are not enough to deploy all the newly added microservice instances, the new virtual machines are leased to deploy the remaining undeployed microservice instances; the type and quantity of the leased new virtual machines and the mapping method to the virtual machines are determined by The pre-stored variable-sized bin pack problem (VSBPP) is solved. Among them, the newly added service instances are items in VSBPP, and the types of virtual machines that can be rented are boxes of different capacities.
  • VSBPP variable-sized bin pack problem
  • the deployment module 34 uses VSBPP solving algorithms such as the FFDLS algorithm and the IFFD algorithm to solve the type and quantity of the leased new virtual machine and the mapping method to the virtual machine. After obtaining the solution of the pre-stored variable-size bin packing problem, calculate the remaining resource amount for each newly leased virtual machine, that is, the total amount of resources owned by the virtual machine minus the amount of resources occupied by the service instance, and according to this The proportion of the required resources of the newly added service instances on the virtual machine, and the remaining resources are allocated to the newly added service instances in proportion.
  • the specific computing processes in the monitoring module 31 , the container type determination module 32 , the scheduling scheme forming module 33 and the deployment module 34 in the elastic scaling system 3 of the microservice system in the cloud environment are as in the microservice system in the cloud environment. It is the same as that described in the elastic scaling method of , and will not be repeated here.
  • each module of the above system is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements, or all of them can be implemented in hardware, and some modules can be implemented in the form of calling software through processing elements, and some modules can be implemented in hardware.
  • the x module may be a separately established processing element, or may be integrated in a certain chip of the above-mentioned system to be implemented.
  • the x module can also be stored in the memory of the above-mentioned system in the form of program code, and is called by a certain processing element of the above-mentioned system to execute the function of the above-mentioned x module.
  • the implementation of other modules is similar. All or part of these modules can be integrated together or implemented independently.
  • the processing element described here may be an integrated circuit with signal processing capability.
  • each step of the above-mentioned method or each of the above-mentioned modules can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), one or more microprocessors (Digital Singnal Processor, DSP for short), one or more Field Programmable Gate Arrays (FPGA for short), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Arrays
  • the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU for short) or other processors that can call program codes.
  • CPU Central Processing Unit
  • These modules can be integrated together and implemented in the form of a System-on-a-chip (SOC for short).
  • SOC System-on-a-chip
  • This embodiment provides a device, the device includes: a processor, a memory, a transceiver, a communication interface or/and a system bus; the memory and the communication interface are connected to the processor and the transceiver through the system bus and complete mutual communication,
  • the memory is used to store the computer program
  • the communication interface is used to communicate with other devices
  • the processor and the transceiver are used to run the computer program, so that the device executes each step of the elastic scaling method of the microservice system in the cloud environment as described above.
  • the system bus mentioned above may be a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the system bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used to realize the communication between the database access device and other devices (such as client, read-write library and read-only library).
  • the memory may include random access memory (Random Access Memory, RAM for short), and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.
  • the above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; may also be a digital signal processor (Digital Signal Processing, referred to as DSP) , Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the protection scope of the elastic scaling method of the microservice system in the cloud environment according to the present invention is not limited to the execution sequence of the steps listed in this embodiment. All solutions are included in the protection scope of the present invention.
  • the present invention also provides an elastic scaling system for a microservice system in a cloud environment.
  • the elastic scaling system for a microservice system in a cloud environment can implement the elastic scaling method for a microservice system in a cloud environment described in the present invention.
  • the implementation device of the elastic scaling method of the microservice system in the cloud environment includes but is not limited to the structure of the elastic scaling system of the microservice system in the cloud environment enumerated in this embodiment. The structural deformation and replacement are all included in the protection scope of the present invention.
  • the elastic scaling method, system, medium and device of a microservice system in a cloud environment have the following beneficial effects:
  • the present invention combines the task scheduling algorithm and the resource scaling algorithm, uses the task scheduling algorithm to obtain the scheduling scheme and accurately calculates the amount of resources required for system scaling, thereby reducing system operation costs while ensuring system performance.
  • the present invention proposes a combined scaling problem of containers and virtual machines for the resource provisioning mode mainly based on virtual machines in cloud environments, and uses the VSBPP solution method to obtain a cost-optimized solution for virtual machine expansion and container deployment.
  • the present invention comprehensively considers the overall structure of the workflow, calculates the optimal cost-effective container type for each microservice, and divides the deadline based on this, which improves the reliability of deadline division and improves the performance of the algorithm.
  • the invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

La présente invention concerne un procédé et un système de mise à l'échelle élastique pour un système de microservice dans un environnement en nuage, un support et un dispositif. Le procédé de mise à l'échelle élastique comprend les étapes suivantes : surveillance d'informations d'attribut de travail de chaque instance de microservice dans le système de microservice dans l'environnement en nuage ; avant et pendant le fonctionnement du système de microservice, détermination d'un type de conteneur à rentabilité optimale de chaque type d'instances de microservice ; formation d'un schéma de planification d'une tâche sur la base du flux de travail de la tâche et du type de conteneur à rentabilité optimale de chaque type d'instances de microservice ; lecture du schéma de planification de la tâche pour obtenir le type et la quantité d'instances de microservice nouvellement ajoutées de celle-ci, et déploiement des instances de microservice nouvellement ajoutées sur une machine virtuelle louée ou nouvellement ajoutée. La présente invention considère globalement un algorithme de planification de tâches et un algorithme de mise à l'échelle de ressources, détermine avec précision au moyen de l'algorithme de planification de tâches la quantité de ressources qui doivent être étendues, et résout ensuite un schéma de mise à l'échelle à coût optimisé au moyen de l'algorithme de mise à l'échelle de ressources, garantissant ainsi les performances du système de microservice et réduisant au minimum le coût de location de ressources en nuage.
PCT/CN2021/103502 2020-08-03 2021-06-30 Procédé et système de mise à l'échelle élastique pour système de microservice dans un environnement en nuage, support et dispositif WO2022028157A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010768451.5A CN112084002B (zh) 2020-08-03 2020-08-03 云环境下微服务系统的弹性伸缩方法、系统、介质及设备
CN202010768451.5 2020-08-03

Publications (1)

Publication Number Publication Date
WO2022028157A1 true WO2022028157A1 (fr) 2022-02-10

Family

ID=73735927

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103502 WO2022028157A1 (fr) 2020-08-03 2021-06-30 Procédé et système de mise à l'échelle élastique pour système de microservice dans un environnement en nuage, support et dispositif

Country Status (2)

Country Link
CN (1) CN112084002B (fr)
WO (1) WO2022028157A1 (fr)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708358A (zh) * 2022-05-25 2022-07-05 腾讯科技(深圳)有限公司 对象处理方法、装置、设备及计算机可读存储介质
CN115328667A (zh) * 2022-10-18 2022-11-11 杭州比智科技有限公司 基于flink任务指标监控实现任务资源弹性伸缩系统及方法
CN115412449A (zh) * 2022-08-31 2022-11-29 西安交通大学 一种基于负载预测的容器动态伸缩方法及系统
CN116302404A (zh) * 2023-02-16 2023-06-23 北京大学 面向资源解耦合数据中心的服务器无感知计算调度方法
CN116382923A (zh) * 2023-06-01 2023-07-04 苏州浪潮智能科技有限公司 云主机弹性伸缩调度方法、装置、电子设备和存储介质
CN116627660A (zh) * 2023-07-24 2023-08-22 湖北省楚天云有限公司 一种基于云数据中心的微服务资源配置方法
CN117349036A (zh) * 2023-12-06 2024-01-05 湖北省楚天云有限公司 微服务实例部署方法、系统、设备及存储介质
CN118193175A (zh) * 2024-05-17 2024-06-14 江西锦路科技开发有限公司 一种面向云际计算的异构工作流任务协同资源调度方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084002B (zh) * 2020-08-03 2022-09-02 同济大学 云环境下微服务系统的弹性伸缩方法、系统、介质及设备
CN112698878A (zh) * 2020-12-18 2021-04-23 浙江中控技术股份有限公司 基于算法微服务的计算方法及系统
CN117290083A (zh) * 2022-06-20 2023-12-26 华为云计算技术有限公司 资源调整方法、装置、计算设备集群及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN109804352A (zh) * 2016-09-29 2019-05-24 亚马逊技术有限公司 受管理的容器实例
CN109901922A (zh) * 2019-03-05 2019-06-18 北京工业大学 一种面向多层服务的容器云资源调度优化方法
CN112084002A (zh) * 2020-08-03 2020-12-15 同济大学 云环境下微服务系统的弹性伸缩方法、系统、介质及设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180211271A1 (en) * 2015-07-29 2018-07-26 Nokia Technologies Oy Apparatus, method and computer program product for budget allocation in data collection
CN106775932B (zh) * 2016-11-29 2020-01-17 中国人民解放军国防科学技术大学 一种云计算系统中随机事件触发的实时工作流调度方法
US10466990B1 (en) * 2018-01-29 2019-11-05 Intuit Inc. Method and system for auto stacking and launching base and extended patterns using an automatic launch and restack engine
US10956388B2 (en) * 2018-07-10 2021-03-23 EMC IP Holding Company LLC Eventual consistency in a deduplicated cloud storage system
CN109408200A (zh) * 2018-11-12 2019-03-01 国网信息通信产业集团有限公司 一种基于资源请求特征的微服务资源管理方法及系统
US10824462B2 (en) * 2018-11-15 2020-11-03 Netapp, Inc. Methods and systems for providing cloud based micro-services
CN109743199A (zh) * 2018-12-25 2019-05-10 中国联合网络通信集团有限公司 基于微服务的容器化管理系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN109804352A (zh) * 2016-09-29 2019-05-24 亚马逊技术有限公司 受管理的容器实例
CN109901922A (zh) * 2019-03-05 2019-06-18 北京工业大学 一种面向多层服务的容器云资源调度优化方法
CN112084002A (zh) * 2020-08-03 2020-12-15 同济大学 云环境下微服务系统的弹性伸缩方法、系统、介质及设备

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BAO LIANG; WU CHASE; BU XIAOXUAN; REN NANA; SHEN MENGQING: "Performance Modeling and Workflow Scheduling of Microservice-Based Applications in Clouds", IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, IEEE, USA, vol. 30, no. 9, 1 September 2019 (2019-09-01), USA, pages 2114 - 2129, XP011739368, ISSN: 1045-9219, DOI: 10.1109/TPDS.2019.2901467 *
SARKAR SANTONU; VENKATESWARAN SREEKRISHNAN: "Best-Fit Containerization as a Brokered Service", 2018 IEEE INTL CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, UBIQUITOUS COMPUTING & COMMUNICATIONS, BIG DATA & CLOUD COMPUTING, SOCIAL COMPUTING & NETWORKING, SUSTAINABLE COMPUTING & COMMUNICATIONS (ISPA/IUCC/BDCLOU, 11 December 2018 (2018-12-11), pages 940 - 947, XP033531076, DOI: 10.1109/BDCloud.2018.00138 *
WANG SHENG; DING ZHIJUN; JIANG CHANGJUN: "Elastic Scheduling for Microservice Applications in Clouds", IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, IEEE, USA, vol. 32, no. 1, 25 July 2020 (2020-07-25), USA, pages 98 - 115, XP011802285, ISSN: 1045-9219, DOI: 10.1109/TPDS.2020.3011979 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708358A (zh) * 2022-05-25 2022-07-05 腾讯科技(深圳)有限公司 对象处理方法、装置、设备及计算机可读存储介质
CN114708358B (zh) * 2022-05-25 2022-09-02 腾讯科技(深圳)有限公司 对象处理方法、装置、设备及计算机可读存储介质
CN115412449A (zh) * 2022-08-31 2022-11-29 西安交通大学 一种基于负载预测的容器动态伸缩方法及系统
CN115412449B (zh) * 2022-08-31 2024-02-27 西安交通大学 一种基于负载预测的容器动态伸缩方法及系统
CN115328667A (zh) * 2022-10-18 2022-11-11 杭州比智科技有限公司 基于flink任务指标监控实现任务资源弹性伸缩系统及方法
CN116302404A (zh) * 2023-02-16 2023-06-23 北京大学 面向资源解耦合数据中心的服务器无感知计算调度方法
CN116302404B (zh) * 2023-02-16 2023-10-03 北京大学 面向资源解耦合数据中心的服务器无感知计算调度方法
CN116382923A (zh) * 2023-06-01 2023-07-04 苏州浪潮智能科技有限公司 云主机弹性伸缩调度方法、装置、电子设备和存储介质
CN116627660A (zh) * 2023-07-24 2023-08-22 湖北省楚天云有限公司 一种基于云数据中心的微服务资源配置方法
CN117349036A (zh) * 2023-12-06 2024-01-05 湖北省楚天云有限公司 微服务实例部署方法、系统、设备及存储介质
CN117349036B (zh) * 2023-12-06 2024-04-05 湖北省楚天云有限公司 微服务实例部署方法、系统、设备及存储介质
CN118193175A (zh) * 2024-05-17 2024-06-14 江西锦路科技开发有限公司 一种面向云际计算的异构工作流任务协同资源调度方法

Also Published As

Publication number Publication date
CN112084002B (zh) 2022-09-02
CN112084002A (zh) 2020-12-15

Similar Documents

Publication Publication Date Title
WO2022028157A1 (fr) Procédé et système de mise à l'échelle élastique pour système de microservice dans un environnement en nuage, support et dispositif
CN107038069B (zh) Hadoop平台下动态标签匹配DLMS调度方法
Glushkova et al. Mapreduce performance model for Hadoop 2. x
Zhu et al. A cost-effective scheduling algorithm for scientific workflows in clouds
CN110990154B (zh) 一种大数据应用优化方法、装置及存储介质
Arabnejad et al. Multi-QoS constrained and profit-aware scheduling approach for concurrent workflows on heterogeneous systems
Yao et al. Cutting your cloud computing cost for deadline-constrained batch jobs
CN114217966A (zh) 基于资源调整的深度学习模型动态批处理调度方法和系统
CN112905317A (zh) 快速可重构信号处理异构平台下任务调度方法和系统
Mascitti et al. Dynamic partitioned scheduling of real-time dag tasks on arm big. little architectures
US20130212584A1 (en) Method for distributed caching and scheduling for shared nothing computer frameworks
Saeedizade et al. DDBWS: a dynamic deadline and budget-aware workflow scheduling algorithm in workflow-as-a-service environments
Chien et al. Market-oriented multiple resource scheduling in grid computing environments
Fathalla et al. Best-KFF: a multi-objective preemptive resource allocation policy for cloud computing systems
CN105740249B (zh) 一种大数据作业并行调度过程中的处理方法及其系统
Deldari et al. A survey on preemptible IaaS cloud instances: challenges, issues, opportunities, and advantages
CN117608760A (zh) 应用于Kubernetes的云上应用混合部署方法
CN114860417B (zh) 多核神经网络处理器及用于该处理器多任务分配调度方法
Tran et al. Efficient contention-aware scheduling of SDF graphs on shared multi-bank memory
Yang et al. Tear up the bubble boom: Lessons learned from a deep learning research and development cluster
CN112988363B (zh) 资源调度方法、装置、服务器和存储介质
US20210406777A1 (en) Autonomous allocation of deep neural network inference requests in a cluster with heterogeneous devices
CN109324886A (zh) 集群资源调度方法和装置
Dziurzanski et al. Hard real-time guarantee of automotive applications during mode changes
CN109828837B (zh) 基于最长路径优先的关联性任务调度方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21854414

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21854414

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21854414

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 30.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21854414

Country of ref document: EP

Kind code of ref document: A1