Application autoscaling method and system

By building a full-link topology and preset load model, the elastic scaling rules of microservice components are uniformly configured, and the problems of elastic scaling strategies of microservice components are solved, and the coordination problems in multi-AZ deployment scenarios are improved, and application capacity and resource utilization are improved efficiency.

WO2024235296A1PCT designated stage expired Publication Date: 2024-11-21HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/093744
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-18
Filing Date
2024-05-16
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

In the prior art, the elastic scaling strategies of microservice components are difficult to configure uniformly, resulting in applications being unable to cope with sudden business loads or waste of resources, and the elastic scaling and disaster recovery flow are inconsistent in multiple AZ deployment scenarios.

Method used

By building a full-link topology and preset load model, the elastic scaling rules of each microservice component are determined, and the unified elastic scaling between microservice components is achieved, and the synchronous elastic scaling and disaster recovery flow are supported in multiple AZ disaster recovery scenarios.

Benefits of technology

It improves the overall capacity of the application, avoids elastic scaling abnormalities, ensures elastic scaling coordination of multiple AZ deployment applications when load changes, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024093744_21112024_PF_FP_ABST
    Figure CN2024093744_21112024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of computers, and disclose an application autoscaling method and a system. The method comprises: on the basis of calling relationships of each micro-service component in an application comprising multiple micro-service components, determining at least one full-link topology of the application; acquiring first resource occupation information of at least one service request for each called micro-service component; according to each full-link topology, a preset load model of each micro-service component in each full-link topology and the first resource occupation information, determining an autoscaling rule for each micro-service component in each full-link topology; and according to the autoscaling rule for each micro-service component in each full-link topology, performing autoscaling processing on each micro-service component in each full-link topology. According to the embodiments of the present application, it is possible to achieve unified autoscaling of multiple micro-service components, avoiding autoscaling abnormalities caused by manual blind configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Application elastic scaling method and system

[0001] This application claims priority to the Chinese patent application filed with the Patent Office of China on May 18, 2023, with application number 202310564658.4 and invention name “A method for elastic scaling of an application”, and the Chinese patent application filed with the Patent Office of China on August 18, 2023, with application number 202311047202.7 and invention name “A method and system for elastic scaling of an application”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a method and system for elastically scaling an application. Background Art

[0003] Microservices is a software architectural style that implements a single application by developing a set of small services. These small services, or microservice components, can be independently deployed in production environments. Each microservice component focuses on a specific business function. An application typically consists of multiple microservice components, which communicate with each other through middleware or application programming interfaces (APIs). A microservice component can include one or more microservice instances, with multiple microservice instances acting as replicas of each other.

[0004] In related technologies, individual microservice components can be elastically scaled to cope with sudden business loads, thereby increasing application capacity and reducing overload risks. Elastic scaling refers to adjusting the number of replicas of microservice instances within a microservice component according to elastic scaling policies based on elastic infrastructure, such as virtual machines and container orchestration, to achieve elastic scaling of application capacity. For example, an elastic scaling policy can be a manually configured strategy for adjusting the number of replicas for each microservice component in the application.

[0005] However, manually configuring the elastic scaling policy for each microservice component can easily lead to inconsistent elastic scaling policy configuration across different microservice components due to limited experience and insufficient analysis. In other words, if elastic scaling policies aren't configured consistently, the lowest-performing microservice component (i.e., the performance bottleneck) within the application can't be accurately identified. This can lead to the application being unable to cope with sudden increases in workload or resulting in wasted resources, often causing elastic scaling anomalies.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide an application elastic scaling method and system. Based on the full-link topology formed by the calls between different microservice components of the application, it can ensure that the elastic scaling rules of each microservice component in the full-link topology are determined based on the overall call performance of different microservices in the scheduling link. This also ensures that each microservice component of the application can be uniformly elastically scaled, thereby improving the overall capacity of the application and avoiding the problem of application elastic scaling anomalies. To achieve the above purpose, the embodiments of the present application adopt the following technical solutions:

[0008] In a first aspect, an embodiment of the present application provides an application elastic scaling method, the method comprising: determining at least one full-link topology of the application based on the calling relationship of each microservice component in an application comprising multiple microservice components; at least one full-link topology is respectively used to indicate the calling path of one service request among multiple service requests to each microservice component of the application; obtaining first resource occupancy information of each microservice component called by at least one service request; determining the elastic scaling rules of each microservice component in each full-link topology according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information; wherein the preset load model of each microservice component is used to indicate the scaling upper limit of the microservice component and the processing upper limit of the service request, and the scaling upper limit is used to indicate the amount of running resources utilized by the microservice component to support the processing upper limit; elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0009] In the embodiments of the present application, the full-link topology of the application and the preset load model are used to ensure that the elastic scaling rules of each microservice component in the full-link topology are determined based on the overall call performance of different microservice components in the full-link topology. Then, according to the elastic scaling rules of each microservice component in each full-link topology, elastic scaling processing is performed on each microservice component in each full-link topology. This can achieve unified elastic scaling between different microservice components, thereby improving the overall capacity of the application and avoiding elastic scaling anomalies caused by inconsistent elastic scaling without considering the overall call performance of the microservice components.

[0010] According to the first aspect, based on the calling relationship of each microservice component in an application containing multiple microservice components, at least one full-link topology of the application is determined, including: obtaining the calling information of each microservice component for each service request in the process of the application processing at least one service request, and obtaining the calling relationship between the microservice components called by the service request; according to the calling relationship corresponding to each service request, respectively, constructing a directed acyclic graph with the microservice components in the calling relationship as nodes and the calling relationship as edges, to obtain at least one full-link topology of the application.

[0011] The embodiment of the present application uses a full-link topology in the form of a directed acyclic graph to comprehensively, accurately and concisely reflect the call status of each service request to each microservice component, which can further improve the accuracy and efficiency of elastic scaling.

[0012] According to the first aspect, or any implementation of the first aspect above, the first resource occupancy information of each microservice component under each service request includes at least one of the following: a current sub-traffic size and a predicted sub-traffic size; wherein the current sub-traffic size is used to indicate the scale of service requests currently received by the microservice component; the predicted sub-traffic size is used to indicate the scale of service requests planned to be allocated to the microservice component in the service requests received by the application.

[0013] In an embodiment of the present application, the first resource occupancy information includes at least one of the current sub-traffic size and the predicted sub-traffic size, thereby ensuring that the subsequent scaling rules determined based on the first resource occupancy information can be applied to at least one of the current load and future load of the microservice component in the application, further improving the accuracy of elastic scaling.

[0014] According to the first aspect, or any implementation of the first aspect above, the elastic scaling rules include at least the predicted replica expansion number, scaling upper limit and traffic threshold of each microservice component in each full-link topology; according to each full-link topology, the preset load model of each microservice component in each full-link topology and the first resource occupancy information, the elastic scaling rules of each microservice component in each full-link topology are determined, including executing the following steps for each full-link topology: based on the service request corresponding to the full-link topology and the current time, determining the predicted sub-traffic maximum value of each microservice component in the full-link topology in the future time; according to the predicted sub-traffic of each microservice component in the full-link topology The predicted number of replica expansions for each microservice component in the full-link topology is determined based on the maximum sub-traffic value and the scaling upper limit indicated by the preset load model of each microservice component in the full-link topology; at least one microservice component with the same input and output in the full-link topology is determined as a processing layer of the full-link topology, thereby obtaining multiple processing layers of the full-link topology; for each of the multiple processing layers of the full-link topology, the following steps are performed: based on the first resource occupancy information of each microservice component in the processing layer, the first resource occupancy information of each microservice component in the upper-level processing layer of the processing layer, and the preset traffic margin, the traffic threshold of each microservice component in the processing layer is determined.

[0015] In the embodiment of the present application, by layering the full-link topology of the application and then determining elastic scaling rules for the microservice components of each processing layer, the traffic bottleneck in the entire application can be accurately determined, thereby further improving the accuracy of the elastic scaling strategy and ensuring the accuracy of subsequent elastic scaling.

[0016] According to the first aspect, or any implementation method of the first aspect above, elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, including executing the following steps for each full-link topology: when the processing volume upper limit indicated by the preset load model of any microservice component in each processing layer of the full-link topology is greater than the traffic threshold of any microservice component, the full-link topology is determined as the target topology; with the predicted replica expansion number in the elastic scaling rules of each microservice component in the target topology not exceeding the scaling upper limit in the elastic scaling rules as a constraint, the predicted replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component are determined; according to the target replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, the number of replicas and the amount of running resources of the microservice instance in each microservice component in the full-link topology are adjusted.

[0017] In this embodiment, elastic scaling is performed based on the traffic bottleneck in the application, i.e., the topology of the microservice component in the target topology where the processing capacity exceeds the traffic threshold, and the upper limit of the scaling capacity, thereby ensuring the implementation of elastic scaling. This can avoid insufficient resources required for elastic scaling and abnormal elastic scaling effects.

[0018] According to the first aspect, or any implementation method of the first aspect above, after elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, the method also includes performing the following steps for each microservice component in each full-link topology: obtaining the scaling performance indicators generated by executing the elastic scaling rules of the microservice component on the microservice component, and the processing data of the service request processed by the microservice component after the elastic scaling processing; based on the scaling performance data and the processing data, or based on the processing data, evaluating the elastic scaling performance of the microservice component to obtain evaluation data; based on the evaluation data, adjusting the elastic scaling rules of the microservice component and / or the amount of the second resource utilized.

[0019] In the embodiments of the present application, the elastic scaling strategy is evaluated and optimized in real time, ensuring that the load flow can be handled while avoiding resource waste. In other words, the embodiments of the present application can improve the effectiveness of the elastic scaling strategy and reduce the resource waste caused by ineffective elastic scaling.

[0020] According to the first aspect, or any implementation of the first aspect above, the scaling performance indicator includes at least one of the following: the effective time of the elastic scaling rule and the predicted sub-traffic size; wherein the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component in the service requests received by the application; the processing data includes at least one of the following: the reception time, reception scale and processing success rate of the service request by the microservice component after elastic scaling processing; the evaluation data includes at least one of the following: a first size relationship between the effective time and the reception time, a second size relationship between the predicted sub-traffic size and the reception scale, and a third size relationship between the processing success rate and the success rate threshold.

[0021] In the embodiment of the present application, by determining at least one of the first size relationship between the effective time and the receiving time, the second size relationship between the predicted sub-traffic size and the receiving scale, and the third size relationship between the processing success rate and the success rate threshold, it is possible to more comprehensively and accurately evaluate the effect of elastic scaling from at least one of the dimensions of the effective duration of elastic scaling, whether there is resource waste, and whether there is overload, thereby further improving the accuracy of elastic scaling.

[0022] According to the first aspect, or any implementation method of the first aspect above, the elastic scaling rule includes at least one of the following: the acquisition period of the first resource occupancy information, the traffic margin and traffic allocation ratio for determining the scaling trigger condition; the second resource amount includes at least one of the following: the number of copies of the microservice instance in the microservice component and the minimum running resource amount; based on the evaluation data, the elastic scaling rule of the microservice component and / or the second resource amount utilized are adjusted, including at least one of the following steps: when the first size relationship is that the effective time is not equal to the receiving time and the time difference is greater than the time difference threshold, the acquisition period is adjusted based on the time difference; when the second size relationship is that the predicted sub-traffic size is not equal to the receiving scale, the traffic is updated based on the receiving scale and the receiving scale of the application's service request to the receiving scale. allocation ratio; when the third size relationship is that the processing success rate is less than the success rate threshold, reduce the traffic margin and / or traffic allocation ratio; when the third size relationship is that the processing success rate is greater than or equal to the success rate threshold: based on the processing volume upper limit of the microservice component and the predicted sub-traffic minimum value, determine the predicted minimum number of copies of the microservice component; wherein the predicted sub-traffic minimum value is used to indicate the sub-traffic size that appears most frequently among the sub-traffic sizes of the microservice component in the historical time; according to the predicted minimum number of copies and the scale of service requests currently received by the microservice component, reduce the number of copies of the microservice instance in the microservice component, and when reducing the number of copies of the microservice instance in the microservice component, reduce the running resources of the microservice component based on the minimum running resources and the number of copies of the reduced microservice.

[0023] In the embodiments of the present application, the elastic scaling strategy is evaluated and optimized in real time, ensuring that the load flow can be handled while avoiding resource waste. In other words, the embodiments of the present application can improve the effectiveness of the elastic scaling strategy and reduce the resource waste caused by ineffective elastic scaling.

[0024] According to the first aspect, or any implementation method of the first aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each availability zone of the multiple availability zones; the multiple availability zones include active zones and standby zones; for the application deployed in the active zone, a step of determining at least one full-link topology of the application based on the call relationship of each microservice component in the application containing multiple microservice components is executed; after determining the elastic scaling rules of each microservice component in each full-link topology for the application deployed in the active zone, the elastic scaling rules of each microservice component in each full-link topology are also sent to the standby zone; for the application deployed in the standby zone, elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0025] This embodiment supports the generation of elastic scaling policies in a multi-AZ disaster recovery master-slave mode. When an application microservice in one AZ is elastically scaled, the elastic scaling rules for each microservice component in the full-link topology are sent to the standby zone, ensuring simultaneous elastic scaling of applications in other AZs. This solves the problem of coordinating elastic scaling and disaster recovery traffic switching when deploying applications in multiple AZs, preventing application overload.

[0026] According to the first aspect, or any implementation method of the first aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each availability zone of the multiple availability zones; the multiple availability zones include active areas and standby areas; for the application deployed in each availability zone, the calling relationship of each microservice component in the application containing multiple microservice components is respectively executed to determine at least one full-link topology of the application; for the application deployed in the active area, the first resource occupancy information of each microservice component called by at least one service request is obtained, and the first resource occupancy information is sent to the standby area; for the application deployed in each availability zone, the elastic scaling rules of each microservice component in each full-link topology are determined based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information.

[0027] This embodiment supports the generation of elastic scaling policies in a multi-AZ disaster recovery master-slave mode scenario. By sending first resource occupancy information to the standby zone when the application microservices in the primary AZ are elastically scaled, the elastic scaling of applications in the standby zone is synchronized with that of the primary AZ. This solves the problem of coordinating elastic scaling and disaster recovery traffic switching in multi-AZ deployments, preventing application overload.

[0028] According to the first aspect, or any implementation of the first aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones; for the application deployed in each availability zone, the call relationship of each microservice component in the application containing multiple microservice components is executed separately to determine at least one full-link topology of the application.

[0029] In this embodiment, in scenarios where multiple AZs are supporting disaster recovery and traffic is carried across multiple availability zones, elastic scaling policies are generated and executed for applications in each AZ. This solves the problem of coordinating elastic scaling and disaster recovery traffic switching when deploying applications in multiple AZs, thus avoiding application overload.

[0030] According to the first aspect, or any implementation method of the first aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones and include a first zone and a second zone; for the application deployed in the first zone, a step of determining at least one full-link topology of the application based on the call relationship of each microservice component in the application containing multiple microservice components is executed; after determining the elastic scaling rules of each microservice component in each full-link topology for the application deployed in the first zone, the elastic scaling rules of each microservice component in each full-link topology are also sent to the second zone; for the application deployed in the second zone, elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0031] In this embodiment, we support the generation of elastic scaling policies that enable multi-AZ disaster recovery and traffic handling across multiple availability zones. When an application microservice in one AZ is elastically scaled, the elastic scaling rules for each microservice component in the full-link topology are sent to the standby zone, ensuring simultaneous elastic scaling of applications in other AZs. This solves the problem of coordinating elastic scaling and traffic switching for disaster recovery when deploying applications in multiple AZs, thus preventing application overload.

[0032] According to the first aspect, or any implementation method of the first aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each availability zone of the multiple availability zones; the multiple availability zones are all active areas and include a first area and a second area; for the application deployed in each availability zone, the calling relationship of each microservice component in the application containing multiple microservice components is respectively executed to determine at least one full-link topology of the application; for the application deployed in the first area, the first resource occupancy information of each microservice component called by at least one service request is obtained, and the first resource occupancy information is sent to the second area; for the application deployed in each availability zone, the elastic scaling rules of each microservice component in each full-link topology are determined based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information.

[0033] In this embodiment, we support the generation of elastic scaling policies that allow multiple AZs to carry traffic across multiple availability zones for disaster recovery. By sending first resource occupancy information to the standby zone when an application microservice in one AZ is elastically scaled, we ensure that the elastic scaling of applications in other AZs is synchronized with the elastic scaling of applications in the first AZ. This solves the problem of coordinating elastic scaling and traffic switching for disaster recovery when deploying applications in multiple AZs, thus avoiding application overload.

[0034] According to the first aspect, or any implementation method of the first aspect above, the application in each availability zone receives at least one service request respectively; based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information, the elastic scaling rules of each microservice component in each full-link topology are determined, including: obtaining the total scale of service requests received by applications in multiple availability zones; based on each full-link topology, the preset load model, the total scale, and the first resource occupancy information of each microservice component in each full-link topology, the elastic scaling rules of each microservice component in each full-link topology are determined.

[0035] In an embodiment of the present application, in a scenario where an elastic scaling policy is generated for multi-AZ disaster recovery and multiple availability zones all carry traffic, elastic scaling rules are generated based on the total scale of service requests received by applications in multiple availability zones, which can ensure the accuracy of the elastic scaling rules in this scenario and further improve the accuracy of elastic scaling.

[0036] In the second aspect, an embodiment of the present application provides an application elastic scaling system, which includes: a topology detection module for determining at least one full-link topology of an application based on the calling relationship of each microservice component in an application containing multiple microservice components; at least one full-link topology is used to indicate the calling path of one service request among multiple service requests to each microservice component of the application; a traffic perception module for obtaining first resource occupancy information of each microservice component called by at least one service request; a policy determination module for determining the elastic scaling rules of each microservice component in each full-link topology based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information; wherein the preset load model of each microservice component is used to indicate the scaling upper limit of the microservice component and the processing upper limit of the service request, and the scaling upper limit is used to indicate the amount of running resources used by the microservice component to support the processing upper limit; an elastic scaling module for performing elastic scaling processing on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0037] According to the second aspect, the topology detection module is specifically used to: obtain the call information of each microservice component for each service request in the process of the application processing at least one service request, and obtain the call relationship between the microservice components called by the service request; according to the call relationship corresponding to each service request, construct a directed acyclic graph with the microservice components in the call relationship as nodes and the call relationship as edges, to obtain at least one full-link topology of the application.

[0038] According to the second aspect, or any implementation of the second aspect above, the first resource occupancy information of each microservice component under each service request includes at least one of the following: the current sub-traffic size and the predicted sub-traffic size; wherein the current sub-traffic size is used to indicate the scale of service requests currently received by the microservice component; the predicted sub-traffic size is used to indicate the scale of service requests planned to be allocated to the microservice component in the service requests received by the application.

[0039] According to the second aspect, or any implementation of the second aspect above, the elastic scaling rules include at least the predicted number of replica expansions, the scaling upper limit, and the traffic threshold of each microservice component in each full-link topology; a policy determination module is specifically used to execute, for each full-link topology: based on the service request corresponding to the full-link topology and the current time, determine the predicted sub-traffic maximum value of each microservice component in the full-link topology in the future time; determine the predicted number of replica expansions for each microservice component in the full-link topology based on the predicted sub-traffic maximum value of each microservice component in the full-link topology and the scaling upper limit indicated by the preset load model of each microservice component in the full-link topology; determine at least one microservice component with the same input and output in the full-link topology as a processing layer of the full-link topology, and obtain multiple processing layers of the full-link topology; for each processing layer of the multiple processing layers of the full-link topology, execute the following steps: based on the first resource occupancy information of each microservice component in the processing layer, the first resource occupancy information of each microservice component in the upper-level processing layer of the processing layer, and the preset traffic margin, determine the traffic threshold of each microservice component in the processing layer.

[0040] According to the second aspect, or any implementation method of the second aspect above, the elastic scaling module is specifically used to execute, for each full-link topology: when the processing volume upper limit indicated by the preset load model of any microservice component in each processing layer of the full-link topology is greater than the traffic threshold of any microservice component, determine the full-link topology as the target topology; with the predicted replica expansion number in the elastic scaling rule of each microservice component in the target topology not exceeding the scaling upper limit in the elastic scaling rule as a constraint, determine the predicted replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component; according to the target replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, adjust the number of replicas and the amount of running resources of the microservice instance in each microservice component in the full-link topology.

[0041] According to the second aspect, or any implementation of the second aspect above, the system also includes a scaling evaluation module, which is used to perform, for each microservice component in each full-link topology: obtaining the scaling performance indicators generated by executing the elastic scaling rules of the microservice component on the microservice component, and the processing data of the microservice component processing the service request after the elastic scaling processing; based on the scaling performance data and the processing data, or based on the processing data, evaluating the elastic scaling performance of the microservice component to obtain evaluation data; and adjusting the elastic scaling rules of the microservice component and / or the amount of second resources utilized based on the evaluation data.

[0042] According to the second aspect, or any implementation of the second aspect above, the scaling performance indicator includes at least one of the following: the effective time of the elastic scaling rule and the predicted sub-traffic size; wherein the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component in the service requests received by the application; the processing data includes at least one of the following: the reception time, reception scale and processing success rate of the service request by the microservice component after elastic scaling processing; the evaluation data includes at least one of the following: a first size relationship between the effective time and the reception time, a second size relationship between the predicted sub-traffic size and the reception scale, and a third size relationship between the processing success rate and the success rate threshold.

[0043] According to the second aspect, or any implementation of the second aspect above, the elastic scaling rule includes at least one of the following: the acquisition period of the first resource occupancy information, the traffic margin and traffic allocation ratio for determining the scaling trigger condition; the second resource amount includes at least one of the following: the number of copies of the microservice instance in the microservice component and the minimum running resource amount; the scaling evaluation module is used to perform at least one of the following steps: when the first size relationship is that the effective time is not equal to the receiving time and the time difference is greater than the time difference threshold, the acquisition period is adjusted based on the time difference; when the second size relationship is that the predicted sub-traffic size is not equal to the receiving scale, the traffic allocation ratio is updated based on the receiving scale and the receiving scale of the application for the service request to which the receiving scale belongs; when the third size relationship is for processing When the success rate is less than the success rate threshold, reduce the traffic margin and / or traffic allocation ratio; when the third size relationship is that the processing success rate is greater than or equal to the success rate threshold: determine the predicted minimum number of copies of the microservice component based on the processing volume upper limit of the microservice component and the predicted minimum sub-traffic; wherein the predicted minimum sub-traffic is used to indicate the sub-traffic size that appears most frequently among the sub-traffic sizes of the microservice component in the historical time; based on the predicted minimum number of copies and the scale of service requests currently received by the microservice component, reduce the number of copies of the microservice instance in the microservice component, and when reducing the number of copies of the microservice instance in the microservice component, reduce the running resources of the microservice component based on the minimum running resources and the number of copies of the reduced microservice.

[0044] According to the second aspect, or any implementation method of the second aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each availability zone of the multiple availability zones; the multiple availability zones include active zones and standby zones; the topology detection module is specifically used to execute, for the application deployed in the active zone, the step of determining at least one full-link topology of the application based on the call relationship of each microservice component in the application containing multiple microservice components; the policy determination module is also used to, for the application deployed in the active zone, execute the elastic scaling rules of each microservice component in each full-link topology, and then send the elastic scaling rules of each microservice component in each full-link topology to the standby zone; the elastic scaling module is specifically used to execute, for the application deployed in the standby zone, the elastic scaling processing of each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0045] According to the second aspect, or any implementation method of the second aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each availability zone of the multiple availability zones; the multiple availability zones include active areas and standby areas; a topology detection module is specifically used to, for the application deployed in each availability zone, respectively execute the call relationship of each microservice component in the application containing multiple microservice components, and determine at least one full-link topology of the application; a traffic perception module is specifically used to, for the application deployed in the active area, execute to obtain the first resource occupancy information of each microservice component called by at least one service request, and send the first resource occupancy information to the standby area; a policy determination module is specifically used to, for the application deployed in each availability zone, respectively execute according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information, and determine the elastic scaling rules of each microservice component in each full-link topology.

[0046] According to the second aspect, or any implementation of the second aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active areas; the topology detection module is specifically used to execute the call relationship of each microservice component in the application containing multiple microservice components for the application deployed in each availability zone, and determine at least one full-link topology of the application.

[0047] According to the second aspect, or any implementation method of the second aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones and include a first zone and a second zone; the topology detection module is specifically used to execute, for the application deployed in the first zone, a step of determining at least one full-link topology of the application based on the call relationship of each microservice component in the application containing multiple microservice components; the policy determination module is also used to, for the application deployed in the first zone, execute the elastic scaling rules for each microservice component in each full-link topology, and then send the elastic scaling rules of each microservice component in each full-link topology to the second zone; the elastic scaling module is specifically used to execute, for the application deployed in the second zone, elastic scaling processing for each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0048] According to the second aspect, or any implementation of the second aspect above, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones and include a first zone and a second zone;

[0049] The topology detection module is specifically used to determine at least one full-link topology of the application deployed in each availability zone based on the calling relationship of each microservice component in the application containing multiple microservice components; the traffic perception module is specifically used to obtain the first resource occupancy information of each microservice component called by at least one service request for the application deployed in the first area, and send the first resource occupancy information to the second area; the policy determination module is specifically used to determine the elastic scaling rules of each microservice component in each full-link topology based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information for the application deployed in each availability zone.

[0050] According to the second aspect, or any implementation method of the above second aspect, the application in each availability zone receives at least one service request respectively; the policy determination module is specifically used to: obtain the total scale of service requests received by applications in multiple availability zones; determine the elastic scaling rules of each microservice component in each full-link topology based on each full-link topology, the preset load model, the total scale and the first resource occupancy information of each microservice component in each full-link topology. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0052] FIG1 is an example of an application scenario of an application elastic scaling method provided in an embodiment of the present application;

[0053] FIG2 is an architecture of an application elastic scaling system provided in an embodiment of the present application;

[0054] FIG3 is a schematic diagram of a flow chart of an application elastic scaling method provided in an embodiment of the present application;

[0055] FIG4 is a diagram illustrating an example of a service architecture of an application including multiple microservices provided in an embodiment of the present application;

[0056] FIG5 is a diagram illustrating an implementation scenario of an application elastic scaling method provided in an embodiment of the present application;

[0057] FIG6 is a diagram illustrating another implementation scenario of an application elastic scaling method provided in an embodiment of the present application;

[0058] FIG7 is a diagram illustrating another implementation scenario of an application elastic scaling method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the embodiments of this application.

[0060] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0061] The terms "first" and "second" and so on in the description and drawings of the embodiments of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0062] Furthermore, the terms "including," "having," and any variations thereof, mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.

[0063] It should be noted that in the description of the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0064] In the description of the embodiments of the present application, unless otherwise specified, “plurality” means two or more.

[0065] First, the terms involved in the embodiments of the present application are explained.

[0066] Replication: A microservice component can include multiple microservice instances, that is, multiple replicas. Multiple microservice instances jointly carry the application load to ensure that even if one microservice instance fails, other microservice instances can still provide services.

[0067] High Availability: The ability of a system to execute logic without interruption. Generally, a higher HA value indicates a more stable and robust system.

[0068] Overload: For an application or microservice component, service requests exceed the number of requests it can handle, causing it to become unavailable.

[0069] Auto scaling (AS): When a microservice component meets certain scaling conditions, the number of replicas of the microservice instance in the microservice component or the resource specifications allocated to the microservice component are changed to cope with load changes.

[0070] Disaster Tolerance: When natural disasters, equipment failures, human intervention, and other disasters occur, the system maintains uninterrupted business operations while minimizing data loss in the production system (for example, a system running an application containing multiple microservice components).

[0071] Containers are used to carry the processes corresponding to tasks. They are a virtualization device similar to virtual machines, except that containers are used to implement process-level resource isolation.

[0072] Availability Zone (AZ): An AZ is a collection of one or more physical data centers with independent cooling, heating, water, and electricity. Within an AZ, computing, networking, storage, and other resources can be logically divided into multiple clusters. Multiple AZs within a region can be connected via high-speed fiber optic cables to meet users' needs for building high-availability systems across AZs.

[0073] Java agent: A programmable method provided by the Java platform that can dynamically monitor and modify the running behavior of Java applications. A Java agent, also called an agent, is loaded when the Java virtual machine starts up. This agent intercepts and modifies the application's bytecode, enabling monitoring and control of the application's running behavior.

[0074] In one example, in a scenario where an application is deployed in multiple availability zones (AZs), each availability zone needs to separately configure an elastic scaling policy for the same microservice component. For microservice components of the same application deployed in multiple availability zones, deployment in multiple availability zones is usually for disaster recovery. That is, after all business deployments in one availability zone are damaged, the business load, that is, all business service requests, need to be switched to an application deployed in another availability zone. In this scenario, deploying the microservice components of the two availability zones to achieve the same deployment specifications after scaling can ensure that after a single availability zone fails, the other availability zone can carry all traffic. However, the relevant technology only performs elastic scaling for one availability zone and does not achieve elastic scaling for applications deployed in multiple availability zones.

[0075] In one example, elastic scaling of virtual machines and containers can include setting elastic scaling policies for virtual machines or containers. However, the microservice components of applications deployed on cloud computing platforms can be deployed in different configurations, such as all virtual machines or all containers. For example, some microservice components can be virtual machines and some can be containers. This lacks unified elastic scaling for both virtual machines and containers, limiting the applicable scenarios for elastic scaling and potentially causing scaling anomalies in these limited scenarios.

[0076] To this end, an embodiment of the present application provides an application elastic scaling method, which ensures that the elastic scaling rules of each microservice component in the full-link topology of the application and the preset load model are determined based on the overall call performance of different microservice components in the full-link topology, and then elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, which can achieve unified elastic scaling between different microservice components, thereby improving the overall capacity of the application and avoiding elastic scaling anomalies caused by inconsistent elastic scaling without considering the overall call performance of the microservice components. In other words, through the newly added topology detection mechanism, based on the upstream and downstream topologies of multiple microservice components of the application, full-link load detection indicators and business performance baselines (such as thresholds for service requests, thresholds for computing resources, etc.), elastic scaling strategies that can be applied to multiple microservice components are generated to ensure that multiple microservice components are uniformly elastically scaled when the business load changes, thereby improving the overall capacity of the application.

[0077] For example, Figure 1 is an example of an application scenario of an application elastic scaling method provided in an embodiment of the present application. As shown in Figure 1, the application elastic scaling method provided in an embodiment of the present application can be applied to the elastic scaling of a business cluster in a single AZ (such as an application deployed in AZ1 or an application deployed in AZ2) or multiple AZs (such as the same application deployed in both AZ1 and AZ2). In Figure 1:

[0078] The elastic scaling policy is used to define the trigger conditions for elastic scaling, such as central processing unit (CPU) utilization, query time for resource occupancy information, and the threshold for the number of service requests. It also defines elastic scaling rules, such as the number of replicas. For example, the number of replicas can include a minimum number of replicas and a maximum number of replicas.

[0079] VM (Virtual Machine) cluster orchestration is used for lifecycle management, such as creating and deleting VMs. VM cluster orchestration can create or delete VMs based on elastic scaling policies. For example, VM cluster orchestration can be based on OpenStack (OpenStack is an open source cloud computing management platform project, a combination of a series of open source software projects).

[0080] Container cluster orchestration is used for lifecycle management, such as creating and deleting containers. Container cluster orchestration can create or delete containers based on elastic scaling policies. For example, container cluster orchestration can be Kubernetes (abbreviated as K8s, an abbreviation formed by replacing the eight characters in the name "ubernete" with "8"). It is an open source platform for managing containerized applications across multiple hosts in a cloud platform. Kubernetes aims to make deploying containerized applications simple and powerful, and provides a mechanism for application deployment, planning, updating, and maintenance).

[0081] Typically, when an application's ingress load, or business load, suddenly increases, an application overload can occur if the existing application cannot handle the ingress load. There are two common approaches to this problem. One is rate limiting, which limits the ingress load to ensure that the application's microservices are not overwhelmed by the ingress load. The other approach is to configure an autoscaling policy, which dynamically increases the number of microservice replicas based on the load to support a larger ingress load. Autoscaling policies are implemented by VM cluster orchestration or container cluster orchestration. If the application meets the scaling conditions in the autoscaling policy, the VM or container is scaled up or down.

[0082] Still referring to Figure 1, the elastic scaling scenario of an application containing multiple microservice components: when the application's entry load suddenly increases, the microservice components and middleware contained in the application (for example, in AZ1 of Figure 1, the application contains microservices 1A to microservice 1C, middleware 1A, middleware 1B, microservice 2A, and microservice 2C) should all be elastically scaled if they are unable to carry the traffic. The elastic scaling of each microservice component needs to consider the performance specifications of the microservice component (the scalability and the amount of traffic that can be carried, that is, the upper limit of the scale of service requests), the expansion timeliness (the length of time the expanded state is maintained), and the capacity bottleneck on the service request processing link. In one example, elastic scaling can be achieved by coordinating with front-end flow control rules.

[0083] Elastic scaling in disaster recovery scenarios: In multi-AZ disaster recovery scenarios, applications have the same deployment in multiple AZs. Usually, the business load of an application is carried by the deployment of a single AZ, namely the primary AZ (such as the various service components of the application deployed in AZ1 in Figure 1), and the other AZ is in standby state, namely the backup AZ (such as the various service components of the application deployed in AZ2 in Figure 1). When the business load of the primary AZ increases suddenly, the cluster orchestration of the application (such as VM cluster orchestration and container cluster orchestration) can expand the application based on the elastic scaling strategy. At this time, in the embodiment of the present application, in order to prevent the business load from switching to the backup AZ after a failure of the primary AZ and the backup AZ cannot bear the sudden increase in business load, the application of the backup AZ can be elastically expanded synchronously.

[0084] Scenarios for evaluating and dynamically optimizing elastic scaling policies: When an application consists of multiple microservice components and the load at the application entry point changes, all of these microservice components are scaled based on elastic scaling policies. After scaling is executed, the application may be unable to cope with sudden traffic surges or over-scale microservices, leading to resource waste. Therefore, elastic scaling policies can be evaluated and dynamically optimized based on the evaluation results, adjusting the executed elastic scaling policies while the application is running.

[0085] In one example, an embodiment of the present application can generate elastic scaling strategies for the microservice components of any application that adopts an embodiment of the present application through script execution, thread execution, or in the form of independent microservice components, or evaluate the effectiveness of the elastic scaling strategies, dynamically optimize, and update them.

[0086] In one example, an embodiment of the present application can provide services to applications in the form of cloud services of public clouds and / or private clouds to achieve automatic generation and online real-time optimization of elastic scaling strategies for applications containing multiple microservice components.

[0087] In one example, an embodiment of the present application can be applied to multi-AZ disaster recovery scenarios through script execution, thread execution, or independent microservice components, providing elastic scaling strategies for microservice components of the same application deployed in different AZs to ensure synchronous scaling of applications deployed in multiple AZs.

[0088] In one example, an embodiment of the present application can provide services in the form of cloud services of public clouds and / or private clouds to support unified elastic scaling between different AZs when applications are deployed in multiple AZs, so as to meet the elastic scaling requirements of applications deployed in multi-AZ disaster recovery scenarios.

[0089] In order to facilitate understanding and reasonable layout, the implementation method of the above-mentioned embodiment of the present application in the above-mentioned application scenarios will be specifically described in the embodiment of Figure 3.

[0090] For example, Figure 2 illustrates the architecture of an application elastic scaling system provided in an embodiment of the present application. As shown in Figure 2, the application elastic scaling system may include: a topology detection module, a load sensing module, a policy evaluation module, a policy calculation module, and a policy distribution module. The application elastic scaling system, or the modules within the application elastic scaling system, may be deployed on one or more electronic devices, such as servers, computers, portable computers, and the like.

[0091] The topology detection module is used to detect the upstream and downstream microservice components and middleware information of the deployed application and generate a topology description of the application, that is, the full-link topology.

[0092] The load perception module is used to detect the resource consumption of the application's microservice components under different business loads. It can dynamically calculate the performance specification upper limit of the microservice components based on the historical load, and can also dynamically determine whether to scale the microservice components based on the current and predicted load dynamics.

[0093] The policy evaluation module is used to evaluate the effectiveness of the elastic scaling policy based on the business load after elastic scaling is executed and the execution status of elastic scaling, combined with the full-link topology to ensure that the elastic scaling policy's control strategy for replicas and resources is consistent with the trend of business load changes. The evaluation results of the elastic scaling policy are fed back to the policy calculation module for adjustment of the elastic scaling policy.

[0094] The policy calculation module determines the elastic scaling policy, or the elastic scaling rules for microservice components. For example, based on the data output by the policy evaluation module and the load sensing module, it can determine the elastic scaling policy for each microservice in different zones and at different operating stages.

[0095] The policy distribution module is used to distribute auto-scaling policies to the container orchestrations (e.g., the VM / container orchestration deployed in the cluster in AZ1 and the VM / container orchestration deployed in the cluster in AZ2) in different availability zones (e.g., the cluster in AZ1 and the cluster in AZ2, as shown in Figure 2). For example, clusters in an availability zone can be computer clusters, storage clusters, etc.

[0096] Policy Storage Module: Used to store elastic scaling policies. In one example, after the policy calculation module determines an elastic scaling policy, it can store the elastic scaling policy in the policy storage module for evaluation by the policy evaluation module and to prevent loss of the elastic scaling policy. Specifically, the policy storage module can be a storage cluster within an availability zone, the storage medium of an electronic device where the policy storage module is deployed, or the storage medium of an electronic device where the elastic scaling system is deployed.

[0097] In one example, the application elastic scaling system may further include a detection module for collecting the operating data of the application as a whole and the operating data of each microservice component in the application. For example, the overall operating data may be the scale of service requests received by the application (e.g., the number of service requests, the amount of data in the service requests, etc.), the number of replicas used by the microservice component to process the received service requests, the amount of operating resources (e.g., memory usage), the effective time of the elastic scaling rules of the microservice component, etc. It is understandable that the detection module can receive the operating data reported by the microservice component, or collect the operating data of the microservice component through an agent (e.g., a Java agent).

[0098] The application elastic scaling system provided in the embodiment of the present application provides a topology detection mechanism for newly added applications. Based on the full-link topology structure of the detected application and the microservice performance baseline, load detection indicators, and multi-AZ disaster recovery deployment switching requirements, it automatically generates elastic scaling rules for the microservice components (including middleware) contained in the application, connects to the virtual machine and container orchestration system, and dynamically configures the elastic scaling strategy of multi-AZ virtual machines and containers. The embodiment of the present application dynamically evaluates the effectiveness of the elastic scaling strategy based on the service topology, microservice resource specifications, and traffic detection data, and implements adjustments to the elastic scaling strategy to better cope with future traffic bursts.

[0099] For ease of understanding, the application elastic scaling method provided in the embodiment of the present application is specifically described below with reference to Figures 3 to 6.

[0100] FIG3 is a flow chart of an application elastic scaling method provided in an embodiment of the present application. As shown in FIG3 , the method includes:

[0101] S301, determine description information of the full-link topology structure of the application, where the description information is used to describe the traffic path of each load of the application, wherein the application includes multiple microservice components.

[0102] The load flow path is the path along which service requests from an application flow between the various microservice components within the application. S301, or topology detection, involves determining at least one full-link topology for the application based on the call relationships between each microservice component in an application containing multiple microservice components. The at least one full-link topology is used to indicate the call path of one of the multiple service requests to each microservice component of the application.

[0103] A microservice component can include one or more microservice instances, and multiple microservice instances are replicas of each other. In other words, the number of replicas of a microservice component is the same as the number of microservice instances in the microservice component.

[0104] In an optional example, determining at least one full-link topology of an application based on a call relationship between each microservice component in an application including multiple microservice components may specifically include the following steps:

[0105] Obtaining the call information of each microservice component for each service request during the process of the application processing at least one service request, and obtaining the call relationship between the microservice components called by the service request;

[0106] Based on the call relationship corresponding to each service request, a directed acyclic graph is constructed with the microservice components in the call relationship as nodes and the call relationship as edges to obtain at least one full-link topology of the application.

[0107] For example, by means of application logs, proxy detection, and other means, the upstream and downstream microservice component information and middleware call information of the deployed application are detected, that is, the microservice architecture information of the application is obtained, and then based on the call information of the upstream and downstream microservice components and middleware of the deployed application, a description of the application topology is generated, for example, a directed acyclic graph (DAG) of the full-link topology structure (in mathematics, especially graph theory and computer science, a directed acyclic graph refers to a directed graph without loops).

[0108] For example, Figure 4 is an example diagram of the service architecture of an application including multiple microservices provided in an embodiment of the present application. As shown in Figure 4, the description information of the full-link topology structure of the application, for example, can be a full-link topology in the form of a directed acyclic graph, which can describe the traffic paths of different types of loads. Among them, different types of loads are service requests for applications divided according to business differences. For example, login requests and payment requests are different types of loads. Each microservice is a node ni of the directed acyclic graph, and the call between microservice i and microservice j is an edge of the directed acyclic graph.<ni,nj> In this example, traffic paths can include: Load Path 1: LB->A1->A3->DB; and Load Path 2: LB->A1->A2->DB. Each load path represents a service load. Microservice components LB, A1, and DB carry all traffic as a service requests for the common component. Microservice components A2 and A3 each carry a portion of the traffic.

[0109] The embodiment of the present application uses a full-link topology in the form of a directed acyclic graph to comprehensively, accurately and concisely reflect the call status of each service request to each microservice component, which can further improve the accuracy and efficiency of elastic scaling.

[0110] S302: Obtain load flow data and resource information of each microservice component in the multiple microservice components based on the description information of the full-link topology structure.

[0111] S302, namely load perception: obtaining the first resource occupancy information of each microservice component called by at least one service request. The first resource occupancy information includes load traffic data and resource information. In an optional example, the first resource occupancy information of each microservice component under each service request includes at least one of the following: the current sub-traffic size and the predicted sub-traffic size; wherein the current sub-traffic size is used to indicate the scale of the service requests currently received by the microservice component; the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component in the service requests received by the application. That is to say, obtaining the first resource occupancy information of each microservice component called by at least one service request may specifically include the following steps:

[0112] Get the number of each service request received by each microservice component respectively, and get the current sub-flow size of the microservice component under the service request;

[0113] Get the number of each service request received by the application and the total traffic size corresponding to each service request;

[0114] According to the preset load model of each microservice component and the total traffic size corresponding to each service request, the traffic size under each service request is allocated to each microservice component, and the predicted sub-traffic size of the microservice component under each service request is obtained.

[0115] Exemplarily, link detection data is data obtained by the load sensing module from each microservice component in the full link topology, namely, first resource occupancy information, indicating the load flow data and resource specification information of each microservice component. The first resource occupancy information may include historical first resource occupancy information, current first resource occupancy information, and predicted first resource occupancy information (i.e., first resource occupancy information for the future). For example, the first resource occupancy information may take the form of {time, total application load distribution, total application load, microservice entry load distribution, microservice component entry load, microservice component CPU utilization, memory utilization, bandwidth usage, and other resource specifications}, where time indicates whether the first resource occupancy information is historical, current, or predicted. Load refers to the scale of service requests, i.e., the number / number / data volume of traffic, while distribution refers to the type of load, which is categorized by the service type of the service request, such as login type, download type, payment type, etc. The total application load and the microservice component entry load have a certain proportional relationship, such as Rn, where n may include the identifier of the microservice component, such as identifier a of microservice component A.

[0116] In an embodiment of the present application, the first resource occupancy information includes at least one of the current sub-traffic size and the predicted sub-traffic size, thereby ensuring that the subsequent scaling strategy determined based on the first resource occupancy information can be applicable to at least one of the current load and future load of the microservice component in the application, further improving the accuracy of elastic scaling.

[0117] S303: Determine the load model of each microservice component based on the load flow data and resource information of each microservice component, and perform scaling processing on each microservice component based on the load model of the microservice component.

[0118] S303, namely, strategy calculation, is to calculate the load model of each microservice component, obtain the preset load model of each microservice component, and perform the following steps:

[0119] Determine, based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information, an elastic scaling rule for each microservice component in each full-link topology; wherein the preset load model of each microservice component is used to indicate the upper limit of the processing volume and the upper limit of the scaling volume for processing service requests by the microservice component, and the upper limit of the scaling volume is used to indicate the amount of operating resources used by the microservice component to support the upper limit of the processing volume;

[0120] Perform elastic scaling on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0121] Referring to Figure 1, taking the various microservice components in the application in AZ1 as an example: the flow path of the service request received by the application is shown in Figure 1. Assume that microservice 1A, microservice 1B, and microservice 1C belong to full-link topology 1, middleware 1A and middleware 1B belong to full-link topology 2, and microservice 2A and microservice 2B belong to full-link topology 3. Then, the embodiment of the present application determines the scaling strategy 3 of the full-link topology 1, the scaling strategy 1 of the full-link topology 2, and the scaling strategy 2 of the full-link topology 3 through the above S303. The scaling strategy of each full-link topology is applied to each microservice component of the full-link topology. For example, scaling strategy 3 can be applied to microservice 1A, microservice 1B, and microservice 1C.

[0122] In one example, the preset load model can also be used to indicate at least one of the following: elastic scaling type, the amount of running resources that the microservice component can run (such as CPU usage, memory usage, etc.), and the ingress load mapping ratio Rn. Among them, the elastic scaling type can be, for example, at least one of horizontal, vertical, VM and container. Among them, horizontal is used to indicate scaling the number of replicas, vertical is used to indicate scaling the running resources of the microservice component, and VM and container are used to indicate sending the elastic scaling policy to the VM cluster orchestration interface and the container cluster orchestration interface, respectively. In this way, the embodiment of the present application can perform elastic scaling more accurately according to the preset load model. The ingress load mapping ratio Rn can be a ratio set based on experience, or determined based on the result of clustering the historical first resource occupancy information of all microservice components based on an unsupervised neural network model (such as a clustering algorithm k-means algorithm, etc.).

[0123] In an example, in a non-multi-AZ disaster recovery scenario, that is, a single-AZ scenario:

[0124] The elastic scaling rules include at least the predicted number of replicas to be expanded, the upper limit of the scaling, and the traffic threshold for each microservice component in each full-link topology.

[0125] Determine elastic scaling rules for each microservice component in each full-link topology based on each full-link topology, a preset load model of each microservice component in each full-link topology, and the first resource occupancy information, including performing the following steps for each full-link topology:

[0126] Based on the service requests corresponding to the full-link topology and the current time, determine the predicted maximum sub-traffic of each microservice component in the full-link topology in the future;

[0127] Determine the predicted number of replicas to be expanded for each microservice component in the full-link topology based on the predicted maximum sub-traffic of each microservice component in the full-link topology and the upper limit of the processing volume indicated by the preset load model of each microservice component in the full-link topology;

[0128] Determine at least one microservice component with the same input and output in the full-link topology as a processing layer of the full-link topology, thereby obtaining multiple processing layers of the full-link topology.

[0129] For each of the multiple processing layers in the full-link topology, perform the following steps:

[0130] Based on the first resource occupancy information of each microservice component in the processing layer, the first resource occupancy information of each microservice component in the upper-level processing layer of the processing layer, and the preset traffic margin, the traffic threshold of each microservice component in the processing layer is determined.

[0131] Exemplarily, the form of an elastic scaling rule may be, for example, <maximum number of replicas of a microservice component, maximum resource specifications, scaling conditions>. The maximum number of replicas of a microservice component is the predicted number of replicas of the microservice component, and the scaling conditions may include a scaling threshold, i.e., a traffic threshold. The maximum resource specifications are the amount of running resources corresponding to the maximum supported load. In one example, the form of an elastic scaling rule may be, for example, <minimum number of replicas of a microservice component, maximum number of replicas of a microservice component, maximum resource specifications, minimum resource specifications, scaling conditions>, which will be specifically explained in the subsequent example of adjusting the scaling policy. In one example, the form of an elastic scaling rule may be, for example, <minimum number of replicas of a microservice component, maximum number of replicas of a microservice component, maximum resource specifications, minimum resource specifications, detection indicator query interval, scaling conditions>, which will be specifically explained in the subsequent example of adjusting the scaling policy.

[0132] Assuming the application ingress load is Q, and the load of microservice component a is mapped to the ingress load in a ratio of Ra, the load of microservice component a is Q × Ra. Based on the application's full-link topology, each processing layer should support 100% of the application ingress load. As shown in Figure 4, this example is divided into four processing layers: the LB processing layer, the A1 processing layer, the A2 and A3 processing layers, and the DB processing layer.

[0133] In one example, the policy calculation module can determine the scaling threshold for the microservice components included in the processing layer based on the predicted load scale, current load scale, current sub-load scale of the microservice components included in the upper-level processing layer of the processing layer, and a preset threshold margin. For example, the scaling condition is when the interface load exceeds the scaling threshold, i.e., capacity expansion. Assuming that the upstream microservice component a is microservice component b, the scaling threshold for microservice component a is related to the predicted value (Q × Ra) based on the total ingress load, the upstream load value (Qb), i.e., the sub-traffic of the microservice component in the upper-level processing layer, and the current sub-traffic of the microservice component (Qa). The scaling threshold is calculated as: Min(Q × Ra, Qa, Qb) × (1 - threshold margin). Q × Ra is the predicted ingress load of the microservice component in the first resource usage information of microservice component a. Qa is the current ingress load of the microservice component in the first resource usage information of microservice component a. Qb is the current ingress load of the microservice component in the first resource usage information of microservice component b. The threshold margin is also known as the traffic margin.

[0134] In the embodiment of the present application, by layering the full-link topology of the application and then determining elastic scaling rules for the microservice components of each processing layer, the traffic bottleneck in the entire application can be accurately determined, thereby further improving the accuracy of the elastic scaling strategy and ensuring the accuracy of subsequent elastic scaling.

[0135] In an optional example, elastic scaling is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, including executing the following steps for each full-link topology:

[0136] If the processing volume upper limit indicated by the preset load model of any microservice component in each processing layer of the full-link topology is greater than the traffic threshold of any microservice component, the full-link topology is determined to be the target topology;

[0137] The predicted number of replicas to be expanded in the elastic scaling rules for each microservice component in the target topology and the amount of running resources required to run the expanded microservice component are determined, with the constraint that the predicted number of replicas to be expanded in the elastic scaling rules for each microservice component in the target topology does not exceed the upper limit of the elastic scaling rules.

[0138] Adjust the number of replicas and running resources of the microservice instances in each microservice component in the full-link topology based on the target replica expansion number of each microservice component in the target topology and the running resources required to run the expanded microservice component.

[0139] Exemplarily, when the traffic threshold of any microservice component in any processing layer exceeds the upper limit of the processing volume indicated by the preset load model of the microservice component, it indicates that the microservice component needs to be expanded, and the processing layer is the full-link topology in which it is located, that is, the target topology. In this way, the elastic strategy of each microservice component on the link of the target topology is also configured to the maximum load that the system can support, that is: the predicted number of replica expansions, that is, the maximum number of replicas of the microservice component = the predicted traffic of the microservice component ÷ the maximum load of the microservice instance. Moreover, this configuration does not exceed the upper limit of the elastic scaling amount in the elastic scaling rule (such as the maximum supportable load and the amount of running resources corresponding to the maximum supportable load). Among them, the predicted traffic of the microservice component is the predicted entry load of the microservice component in the first resource occupancy information of the microservice component, such as Q×Ra. In this embodiment of the present application, based on the full-link topology of the application, the elastic scaling strategy of the full-link microservice of the application is automatically generated, which improves the ease of elastic scaling and avoids system failures caused by blind configuration by customers.

[0140] In this embodiment, elastic scaling is performed based on the traffic bottleneck in the application, i.e., the topology of the microservice component in the target topology where the processing capacity exceeds the traffic threshold, and the upper limit of the scaling capacity, thereby ensuring the implementation of elastic scaling. This can avoid insufficient resources required for elastic scaling and abnormal elastic scaling effects.

[0141] In one example, an application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone;

[0142] For an application deployed in an active zone, performing a step of determining at least one full-link topology of the application based on a call relationship between each microservice component in the application comprising multiple microservice components;

[0143] After determining the elastic scaling rules for each microservice component in each full-link topology for applications deployed in the active region, the elastic scaling rules for each microservice component in each full-link topology are also sent to the standby region.

[0144] For applications deployed in the standby area, elastic scaling is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0145] For example, Figure 5 is an implementation example diagram of an application elastic scaling method provided in an embodiment of the present application. As shown in Figure 5, in a multi-AZ disaster recovery scenario, if the multi-AZ is in master-slave mode, that is, multiple availability zones include active areas and standby areas, it can be implemented based on the following method: execute the elastic scaling method provided in the embodiment of Figure 3 of this application for the application deployed in AZ1, and synchronize the elastic scaling actions in the elastic scaling method to AZ2 in real time and execute them in AZ2. AZ1 is the active site of the application, and AZ2 is the standby site of the application. In this way, the coordination problem of multi-AZ deployment of applications, elastic scaling and disaster recovery flow switching is solved, and application overload is avoided.

[0146] In one example, an application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone;

[0147] For the application deployed in each availability zone, determine at least one full-link topology of the application based on the call relationship of each microservice component in the application containing multiple microservice components.

[0148] For an application deployed in the active area, obtaining first resource occupancy information of each microservice component called by at least one service request, and sending the first resource occupancy information to the standby area;

[0149] For the applications deployed in each availability zone, the elastic scaling rules of each microservice component in each full-link topology are determined based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information.

[0150] For example, Figure 6 is an implementation example diagram of another application elastic scaling method provided in an embodiment of the present application. As shown in Figure 6, the disaster recovery scenario of multiple AZs can be implemented based on the following method: the microservice components of the application deployed in AZ2 configure the elastic scaling policy of the corresponding microservice configuration of AZ1, and perform elastic scaling based on the traffic detection data of AZ1. In other words, the elastic scaling method provided in the embodiment of Figure 3 of the present application is executed for the application deployed in AZ1 and AZ2, and the data generated by the application running in AZ1 is used when executing on AZ2. Among them, AZ1 is the active site of the application, and AZ2 is the standby site of the application.

[0151] This embodiment supports the generation of elastic scaling policies in a multi-AZ disaster recovery master-slave mode scenario. By sending first resource occupancy information to the standby zone when the application microservices in the primary AZ are elastically scaled, the elastic scaling of applications in the standby zone is synchronized with that of the primary AZ. This solves the problem of coordinating elastic scaling and disaster recovery traffic switching in multi-AZ deployments, preventing application overload.

[0152] In one example, an application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; and the multiple availability zones are all active zones;

[0153] For applications deployed in each availability zone, the call relationship of each microservice component in the application containing multiple microservice components is executed separately to determine at least one full-link topology of the application.

[0154] In an optional example, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones and include a first zone and a second zone;

[0155] For an application deployed in the first region, performing a step of determining at least one full-link topology of the application based on a call relationship between each microservice component in the application including multiple microservice components;

[0156] After determining the elastic scaling rules for each microservice component in each full-link topology for the application deployed in the first region, the elastic scaling rules for each microservice component in each full-link topology are also sent to the second region;

[0157] For applications deployed in the second area, elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

[0158] In an optional example, the application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones are all active zones and include a first zone and a second zone;

[0159] For applications deployed in each availability zone, determine at least one full-link topology for the application based on the call relationship of each microservice component in the application containing multiple microservice components.

[0160] For an application deployed in the first region, obtaining first resource occupancy information of each microservice component called by at least one service request, and sending the first resource occupancy information to the second region;

[0161] For the applications deployed in each availability zone, the elastic scaling rules of each microservice component in each full-link topology are determined based on each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information.

[0162] In an optional example, the application in each availability zone receives at least one service request;

[0163] Determine, based on each full-link topology, a preset load model of each microservice component in each full-link topology, and the first resource occupancy information, an elastic scaling rule for each microservice component in each full-link topology, including:

[0164] Get the total scale of service requests received by applications in multiple availability zones;

[0165] Determine the elastic scaling rules of each microservice component in each full-link topology based on each full-link topology, the preset load model, the total scale, and the first resource occupancy information of each microservice component in each full-link topology.

[0166] For example, Figure 7 is an example diagram of another implementation scenario of the application elastic scaling method provided in an embodiment of the present application. As shown in Figure 7, when AZ1 and AZ2 are in active-active disaster recovery mode, AZ1 and AZ2 carry traffic simultaneously. The scaling strategy calculation may include:

[0167] Maximum number of microservice replicas = Maximum traffic predicted for multi-AZ microservices / Maximum load of microservice instances;

[0168] Minimum number of microservice replicas = predicted daily traffic for multi-AZ microservices / maximum load of microservice instances;

[0169] The scaling threshold is set as: Min(Q × Ra, Qa, Qb) × (1-threshold margin), where Q is the total traffic volume of the microservices corresponding to the two AZs, that is, the total scale of service requests received by applications in multiple availability zones, rather than the load scale of a single AZ.

[0170] In this embodiment, we support the generation of multi-AZ disaster recovery and elastic scaling policies. When the application microservices in one AZ are elastically scaled, the applications in another AZ are also elastically scaled. This solves the problem of coordinating elastic scaling and disaster recovery traffic switching when deploying applications in multiple AZs, thus avoiding application overload.

[0171] In an optional embodiment, after the above S303, that is, the policy calculation, the application elastic scaling method provided in the embodiment of the present application may further include policy evaluation. That is, after elastic scaling processing is performed on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, the application elastic scaling method further includes performing the following steps for each microservice component in each full-link topology:

[0172] Obtaining scaling performance indicators generated by executing elastic scaling rules on microservice components, as well as processing data of service requests processed by the microservice components after elastic scaling processing;

[0173] Evaluate the elastic scalability of the microservice component based on the scalability performance data and the processing data, or based on the processing data, to obtain evaluation data.

[0174] Based on the evaluation data, adjustments are made to the elastic scaling rules of the microservice component and / or the amount of the second resource utilized.

[0175] In an optional embodiment, the scaling performance indicator includes at least one of the following: the effective time of the elastic scaling rule and the predicted sub-traffic size; wherein the predicted sub-traffic size is used to indicate the scale of service requests received by the application that are planned to be allocated to the microservice component;

[0176] The processing data includes at least one of the following: the reception time, reception scale, and processing success rate of the service request by the microservice component after elastic scaling processing;

[0177] The evaluation data includes at least one of the following: a first size relationship between the effectiveness time and the reception time, a second size relationship between the predicted sub-flow size and the reception scale, and a third size relationship between the processing success rate and the success rate threshold.

[0178] In the embodiment of the present application, by determining at least one of the first size relationship between the effective time and the receiving time, the second size relationship between the predicted sub-traffic size and the receiving scale, and the third size relationship between the processing success rate and the success rate threshold, it is possible to more comprehensively and accurately evaluate the effect of elastic scaling from at least one of the dimensions of the effective duration of elastic scaling, whether there is resource waste, and whether there is overload, thereby further improving the accuracy of elastic scaling.

[0179] In an optional embodiment, the elastic scaling rule includes at least one of the following: a first resource occupancy information acquisition period, a traffic margin and a traffic allocation ratio for determining a scaling trigger condition; the second resource amount includes at least one of the following: the number of replicas of the microservice instance in the microservice component and the minimum running resource amount;

[0180] Adjusting the elastic scaling rules of the microservice component and / or the amount of the second resource utilized based on the evaluation data includes at least one of the following steps:

[0181] When the first size relationship is that the effective time is not equal to the receiving time and the time difference is greater than the time difference threshold, adjusting the acquisition period based on the time difference;

[0182] When the second size relationship is that the predicted sub-flow size is not equal to the receiving scale, updating the flow allocation ratio based on the receiving scale and the receiving scale of the application request for the service to which the receiving scale belongs;

[0183] When the third magnitude relationship is that the processing success rate is less than the success rate threshold, reducing the flow margin and / or the flow allocation ratio;

[0184] When the third magnitude relationship is that the processing success rate is greater than or equal to the success rate threshold:

[0185] Determine the predicted minimum number of replicas of the microservice component based on the microservice component's processing capacity upper limit and the predicted minimum sub-flow value; wherein the predicted minimum sub-flow value is used to indicate the sub-flow size that appears most frequently among the sub-flow sizes of the microservice component in the historical time;

[0186] Based on the predicted minimum number of replicas and the scale of service requests currently received by the microservice component, the number of replicas of the microservice instances in the microservice component is reduced. When the number of replicas of the microservice instances in the microservice component is reduced, the running resources of the microservice component are reduced based on the minimum running resources and the number of reduced replicas of the microservice.

[0187] For example, based on the evaluation results, existing elastic scaling rules are adjusted to ensure timely scaling (time lead). This means adjusting the interval for checking metrics. The actual traffic volume of each microservice matches the ingress load mapping ratio Rn. If not, the Rn value is adjusted and the elasticity policy for each microservice is recalculated.

[0188] If a microservice still experiences overload after elastic scaling, the scaling threshold is too high. Recalculate the scaling threshold parameters, such as the threshold margin and Rn value, and adjust them to meet the business load while maintaining a lower resource margin.

[0189] After the microservices are elastically scaled, no overload occurs. Then, determine whether the number of replicas popped up for each microservice in the application, and whether the resource specifications of each microservice component can be reduced under the application ingress load. If so, make adjustments to meet the business load while maintaining a smaller resource margin.

[0190] In this example, the elastic scaling rule can be in the form of <minimum number of replicas of the microservice component, maximum number of replicas of the microservice component, maximum resource specification, minimum resource specification, query interval for first resource usage information, scaling condition>.

[0191] In an optional example, the preset load model can also be used to indicate, that is, define the maximum load that the microservice component can support after expansion, that is, the upper limit of the processing volume after expansion. In this way, when the microservice component is elastically scaled and the load scale exceeds the upper limit of the processing volume after expansion, or, in the process of determining the elastic scaling strategy, the load scale of the microservice component exceeds the upper limit of the processing volume after expansion, it indicates that the processing layer where the microservice component is located cannot reach the capacity to support 100% of the inlet traffic, then the bottleneck of the entire application is at this layer or in this microservice component. At this time, the embodiment of the present application can execute the front-end current limiting strategy: limit the inlet load of the processing layer or the microservice component to the maximum value that the system can support. For example, when the number of service requests received is equal to the upper limit of the processing volume after expansion, the service requests that exceed the upper limit of the processing volume after expansion are directly discarded. In this way, overload can be avoided, thereby further ensuring the stability of the application.

[0192] In the embodiments of the present application, the elastic scaling strategy is evaluated and optimized in real time, ensuring that the load flow can be handled while avoiding resource waste. In other words, the embodiments of the present application can improve the effectiveness of the elastic scaling strategy and reduce the resource waste caused by ineffective elastic scaling.

[0193] In addition, the embodiments of the present application are applicable to public cloud, private cloud, and hybrid cloud scenarios. During elastic scaling, the application topology, i.e., the full-link topology, can be user input rather than automatically detected. Based on different microservice component types, elastic scaling of the number of replicas and elastic scaling of the resource specifications (CPU, memory) of the microservice components can be supported simultaneously. In the embodiments of the present application, a neural network model can be established for the load of each microservice component based on an AI algorithm to intelligently output an elastic scaling strategy.

[0194] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0195] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0196] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0197] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0198] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0199] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0200] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above methods of each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0201] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An application elastic scaling method, characterized in that: The method comprises: Based on the call relationship of each microservice component in an application including multiple microservice components, at least one full-link topology of the application is determined; the at least one full-link topology is used to indicate the call path of one service request among multiple service requests to each microservice component of the application; Obtaining first resource occupancy information of each microservice component called by the at least one service request; Determine the elastic scaling rules of each microservice component in each full-link topology according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information; wherein the preset load model of each microservice component is used to indicate the upper limit of the scaling amount of the microservice component and the upper limit of the processing amount of processing service requests, and the upper limit of the scaling amount is used to indicate the amount of running resources used by the microservice component to support the upper limit of the processing amount; According to the elastic scaling rules of each microservice component in each full-link topology, elastic scaling processing is performed on each microservice component in each full-link topology.

2. The method according to claim 1, characterized in that The determining at least one full-link topology of the application based on the calling relationship of each microservice component in the application including multiple microservice components includes: Acquire the calling information of each microservice component for each service request in the process of the application processing the at least one service request, and obtain the calling relationship between the microservice components called by the service request; According to the call relationship corresponding to each service request, a directed acyclic graph is constructed with the microservice components in the call relationship as nodes and the call relationship as edges to obtain at least one full-link topology of the application.

3. The method according to claim 1 or 2, characterized in that: The first resource occupancy information of each microservice component under each service request includes at least one of the following: current sub-flow size and predicted sub-flow size; Among them, the current sub-traffic size is used to indicate the scale of the service requests currently received by the microservice component; the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component among the service requests received by the application.

4. The method according to any one of claims 1 to 3, characterized in that The elastic scaling rules include at least the predicted number of replica expansions of each microservice component in each full-link topology, the scaling upper limit, and the traffic threshold; Determining the elastic scaling rule of each microservice component in each full-link topology according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information includes executing the following steps for each full-link topology: Based on the service request corresponding to the full-link topology and the current time, determine the predicted sub-flow maximum value of each microservice component in the full-link topology in the future time; Determine the predicted replica expansion number of each microservice component in the full-link topology according to the predicted sub-flow maximum value of each microservice component in the full-link topology and the upper limit of the scaling indicated by the preset load model of each microservice component in the full-link topology; Determine at least one microservice component with the same input and output in the full-link topology as a processing layer of the full-link topology, and obtain multiple processing layers of the full-link topology; For each processing layer in the multiple processing layers of the full-link topology, perform the following steps: Based on the first resource occupancy information of each microservice component in the processing layer, the first resource occupancy information of each microservice component in the upper-level processing layer of the processing layer, and the preset traffic margin, the traffic threshold of each microservice component in the processing layer is determined.

5. The method according to claim 4, characterized in that The elastic scaling process of each microservice component in each full-link topology is performed according to the elastic scaling rule of each microservice component in each full-link topology, including executing the following steps for each full-link topology: When the processing volume upper limit indicated by the preset load model of any microservice component in each processing layer of the full-link topology is greater than the traffic threshold of any microservice component, determine that the full-link topology is the target topology; Determine the predicted number of replica expansions for each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, with the constraint that the predicted number of replica expansions in the elastic scaling rule of each microservice component in the target topology does not exceed the upper limit of the scaling in the elastic scaling rule; According to the target replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, adjust the number of replicas and the amount of running resources of the microservice instance in each microservice component in the full-link topology.

6. The method according to any one of claims 1 to 5, characterized in that After performing elastic scaling processing on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology, the method further includes performing the following steps for each microservice component in each full-link topology: Acquire a scaling performance indicator generated by executing the elastic scaling rule of the microservice component on the microservice component, and processing data of the service request processed by the microservice component after the elastic scaling process; Based on the scalability performance data and the processing data, or based on the processing data, evaluating the elastic scalability performance of the microservice component to obtain evaluation data; According to the evaluation data, the elastic scaling rule of the microservice component and / or the amount of the second resource utilized are adjusted.

7. The method according to claim 6, characterized in that The scaling performance indicator includes at least one of the following: the effective time of the elastic scaling rule and the predicted sub-traffic size; wherein the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component in the service requests received by the application; The processing data includes at least one of the following: the reception time, reception scale and processing success rate of the service request by the microservice component after the elastic scaling processing; the evaluation data includes at least one of the following: a first size relationship between the effective time and the reception time, a second size relationship between the predicted sub-traffic size and the reception scale, and a third size relationship between the processing success rate and the success rate threshold.

8. The method according to claim 7, characterized in that The elastic scaling rule includes at least one of the following: the acquisition period of the first resource occupancy information, the traffic margin and traffic allocation ratio used to determine the scaling trigger condition; the second resource amount includes at least one of the following: the number of copies of the microservice instance in the microservice component and the minimum running resource amount; The adjusting the elastic scaling rule of the microservice component and / or the amount of the second resource used according to the evaluation data comprises at least one of the following steps: When the first size relationship is that the effective time is not equal to the receiving time and the time difference is greater than a time difference threshold, adjusting the acquisition period based on the time difference; When the second size relationship is that the predicted sub-flow size is not equal to the receiving scale, updating the flow allocation ratio based on the receiving scale and the receiving scale of the service request of the application to which the receiving scale belongs; When the third magnitude relationship is that the processing success rate is less than the success rate threshold, reducing the flow margin and / or the flow allocation ratio; When the third magnitude relationship is that the processing success rate is greater than or equal to the success rate threshold: Determine the predicted minimum number of copies of the microservice component based on the processing volume upper limit and the predicted sub-flow minimum value of the microservice component; wherein the predicted sub-flow minimum value is used to indicate the sub-flow size with the highest frequency among the sub-flow sizes of the microservice component in the historical time; According to the predicted minimum number of replicas and the scale of service requests currently received by the microservice component, the number of replicas of the microservice instance in the microservice component is reduced, and when the number of replicas of the microservice instance in the microservice component is reduced, the operating resources of the microservice component are reduced based on the minimum amount of operating resources and the reduced number of replicas of the microservice.

9. The method according to any one of claims 1 to 8, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone; For the application deployed in the active area, executing the step of determining at least one full-link topology of the application based on the calling relationship of each microservice component in the application including multiple microservice components; After executing the determination of the elastic scaling rule of each microservice component in each full-link topology for the application deployed in the active area, the elastic scaling rule of each microservice component in each full-link topology is also sent to the standby area; For the application deployed in the standby area, the elastic scaling rules of each microservice component in each full-link topology are respectively executed to perform elastic scaling processing on each microservice component in each full-link topology.

10. The method according to any one of claims 1 to 8, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone; For the application deployed in each of the available zones, respectively executing the call relationship of each microservice component in the application based on the multiple microservice components, and determining at least one full-link topology of the application; For the application deployed in the active area, obtaining first resource occupancy information of each microservice component called by the at least one service request, and sending the first resource occupancy information to the standby area; For the application deployed in each available zone, the steps of: The preset load model of each microservice component and the first resource occupancy information are used to determine the elastic scaling rules of each microservice component in each full-link topology.

11. The method according to any one of claims 1 to 8, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; and the multiple availability zones are all active zones; For the application deployed in each of the available zones, the calling relationship of each microservice component in the application based on the multiple microservice components is respectively executed to determine at least one full-link topology of the application.

12. The method according to any one of claims 1 to 8, characterized in that The application is deployed in multiple availability zones, wherein each of the multiple availability zones deploys one application; the multiple availability zones are all active zones and include a first zone and a second zone; For the application deployed in the first area, executing the step of determining at least one full-link topology of the application based on the calling relationship of each microservice component in the application including multiple microservice components; After determining the elastic scaling rule of each microservice component in each full-link topology for the application deployed in the first area, the elastic scaling rule of each microservice component in each full-link topology is also sent to the second area; For the application deployed in the second area, the elastic scaling rules of each microservice component in each full-link topology are respectively executed to perform elastic scaling processing on each microservice component in each full-link topology.

13. The method according to any one of claims 1 to 8, characterized in that The application is deployed in multiple availability zones, wherein each of the multiple availability zones deploys one application; the multiple availability zones are all active zones and include a first zone and a second zone; For the application deployed in each of the available zones, respectively executing the call relationship of each microservice component in the application based on the multiple microservice components, and determining at least one full-link topology of the application; For the application deployed in the first area, performing the step of obtaining first resource occupancy information of each microservice component called by the at least one service request, and sending the first resource occupancy information to the second area; For the application deployed in each availability zone, the elastic scaling rules of each microservice component in each full-link topology are determined according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information.

14. The method according to any one of claims 11 to 13, characterized in that The application in each available zone receives at least one service request respectively; The determining, according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information, an elastic scaling rule for each microservice component in each full-link topology includes: Obtain a total scale of service requests received by the application in the multiple available zones; Determine elastic scaling rules for each microservice component in each full-link topology based on each full-link topology, a preset load model of each microservice component in each full-link topology, the total scale, and the first resource occupancy information.

15. An application elastic scaling system, characterized in that: The system comprises: A topology detection module, configured to determine at least one full-link topology of the application based on the call relationship of each microservice component in the application including multiple microservice components; the at least one full-link topology is respectively used to indicate the call path of one service request among multiple service requests to each microservice component of the application; A traffic perception module, used to obtain first resource occupancy information of each microservice component called by the at least one service request; A policy determination module, configured to determine elastic scaling rules for each microservice component in each full-link topology according to each full-link topology, a preset load model of each microservice component in each full-link topology, and the first resource occupancy information; wherein the preset load model of each microservice component is used to indicate an upper limit of the scaling amount of the microservice component and an upper limit of the processing amount of processing service requests, and the upper limit of the scaling amount is used to indicate the amount of running resources used by the microservice component to support the upper limit of the processing amount; The elastic scaling module is used to perform elastic scaling processing on each microservice component in each full-link topology according to the elastic scaling rules of each microservice component in each full-link topology.

16. The system according to claim 15, characterized in that The topology detection module is specifically used for: Acquire the calling information of each microservice component for each service request in the process of the application processing the at least one service request, and obtain the calling relationship between the microservice components called by the service request; According to the call relationship corresponding to each service request, a microservice component in the call relationship is constructed as a node, and a A directed acyclic graph whose call relationship is an edge is used to obtain at least one full-link topology of the application.

17. The system according to claim 15 or 16, characterized in that The first resource occupancy information of each microservice component under each service request includes at least one of the following: current sub-flow size and predicted sub-flow size; Among them, the current sub-traffic size is used to indicate the scale of the service requests currently received by the microservice component; the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component among the service requests received by the application.

18. The system according to any one of claims 15 to 17, characterized in that: The elastic scaling rules include at least the predicted number of replica expansions of each microservice component in each full-link topology, the scaling upper limit, and the traffic threshold; The strategy determination module is specifically used to execute, for each full-link topology: Based on the service request corresponding to the full-link topology and the current time, determine the predicted sub-flow maximum value of each microservice component in the full-link topology in the future time; Determine the predicted replica expansion number of each microservice component in the full-link topology according to the predicted sub-flow maximum value of each microservice component in the full-link topology and the upper limit of the scaling indicated by the preset load model of each microservice component in the full-link topology; Determine at least one microservice component with the same input and output in the full-link topology as a processing layer of the full-link topology, and obtain multiple processing layers of the full-link topology; For each processing layer in the multiple processing layers of the full-link topology, perform the following steps: Based on the first resource occupancy information of each microservice component in the processing layer, the first resource occupancy information of each microservice component in the upper-level processing layer of the processing layer, and the preset traffic margin, the traffic threshold of each microservice component in the processing layer is determined.

19. The system according to claim 18, characterized in that The elastic scaling module is specifically used to execute, for each full-link topology: When the processing volume upper limit indicated by the preset load model of any microservice component in each processing layer of the full-link topology is greater than the traffic threshold of any microservice component, determine that the full-link topology is the target topology; Determine the predicted number of replica expansions for each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, with the constraint that the predicted number of replica expansions in the elastic scaling rule of each microservice component in the target topology does not exceed the upper limit of the scaling in the elastic scaling rule; According to the target replica expansion number of each microservice component in the target topology and the amount of running resources required to run the expanded microservice component, adjust the number of replicas and the amount of running resources of the microservice instance in each microservice component in the full-link topology.

20. The system according to any one of claims 15 to 19, characterized in that The system also includes a scaling evaluation module, which is used to perform, for each microservice component in each full-link topology: Acquire a scaling performance indicator generated by executing the elastic scaling rule of the microservice component on the microservice component, and processing data of the service request processed by the microservice component after the elastic scaling process; Based on the scalability performance data and the processing data, or based on the processing data, evaluating the elastic scalability performance of the microservice component to obtain evaluation data; According to the evaluation data, the elastic scaling rule of the microservice component and / or the amount of the second resource utilized are adjusted.

21. The system according to claim 20, characterized in that The scaling performance indicator includes at least one of the following: the effective time of the elastic scaling rule and the predicted sub-traffic size; wherein the predicted sub-traffic size is used to indicate the scale of the service requests planned to be allocated to the microservice component in the service requests received by the application; The processing data includes at least one of the following: the reception time, reception scale and processing success rate of the service request by the microservice component after the elastic scaling process; The evaluation data includes at least one of the following: a first size relationship between the effective time and the receiving time, a second size relationship between the predicted sub-traffic size and the receiving scale, and a third size relationship between the processing success rate and a success rate threshold.

22. The system according to claim 21, characterized in that The elastic scaling rule includes at least one of the following: the acquisition period of the first resource occupancy information, the traffic margin and traffic allocation ratio used to determine the scaling trigger condition; the second resource amount includes at least one of the following: the number of copies of the microservice instance in the microservice component and the minimum running resource amount; The telescoping assessment module is configured to perform at least one of the following steps: When the first size relationship is that the effective time is not equal to the receiving time and the time difference is greater than a time difference threshold, adjusting the acquisition period based on the time difference; In the case where the second size relationship is that the predicted sub-flow size is not equal to the receiving scale, based on the receiving scale and the The application updates the traffic allocation ratio according to the receiving scale of the service request to which the receiving scale belongs; When the third magnitude relationship is that the processing success rate is less than the success rate threshold, reducing the flow margin and / or the flow allocation ratio; When the third magnitude relationship is that the processing success rate is greater than or equal to the success rate threshold: Determine the predicted minimum number of copies of the microservice component based on the processing volume upper limit and the predicted sub-flow minimum value of the microservice component; wherein the predicted sub-flow minimum value is used to indicate the sub-flow size with the highest frequency among the sub-flow sizes of the microservice component in the historical time; According to the predicted minimum number of replicas and the scale of service requests currently received by the microservice component, the number of replicas of the microservice instance in the microservice component is reduced, and when the number of replicas of the microservice instance in the microservice component is reduced, the operating resources of the microservice component are reduced based on the minimum amount of operating resources and the reduced number of replicas of the microservice.

23. The system according to any one of claims 15 to 22, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone; The topology detection module is specifically used to perform the step of determining at least one full-link topology of the application based on the calling relationship of each microservice component in the application including multiple microservice components for the application deployed in the active area; The policy determination module is further configured to send the elastic scaling rules of each microservice component in each full-link topology to the standby area after executing the elastic scaling rules of each microservice component in each full-link topology for the application deployed in the active area; The elastic scaling module is specifically used to execute the elastic scaling rules of each microservice component in each full-link topology for the application deployed in the standby area, and perform elastic scaling processing on each microservice component in each full-link topology.

24. The system according to any one of claims 15 to 22, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; the multiple availability zones include an active zone and a standby zone; The topology detection module is specifically used to respectively execute the call relationship of each microservice component in the application based on the multiple microservice components for the application deployed in each available zone, and determine at least one full-link topology of the application; The traffic perception module is specifically configured to execute the step of obtaining the first resource occupancy information of each microservice component called by the at least one service request for the application deployed in the active area, and send the first resource occupancy information to the standby area; The policy determination module is specifically used to execute the elastic scaling rules of each microservice component in each full-link topology according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information for the application deployed in each availability zone.

25. The system according to any one of claims 15 to 22, characterized in that The application is deployed in multiple availability zones, wherein one application is deployed in each of the multiple availability zones; and the multiple availability zones are all active zones; The topology detection module is specifically used to execute the calling relationship of each microservice component in the application containing multiple microservice components for the application deployed in each available zone, and determine at least one full-link topology of the application.

26. The system according to any one of claims 15 to 22, characterized in that The application is deployed in multiple availability zones, wherein each of the multiple availability zones deploys one application; the multiple availability zones are all active zones and include a first zone and a second zone; The topology detection module is specifically configured to execute, for the application deployed in the first area, the step of determining at least one full-link topology of the application based on the calling relationship of each microservice component in the application including multiple microservice components; The policy determination module is further configured to, after executing the determination of the elastic scaling rule of each microservice component in each full-link topology for the application deployed in the first area, send the elastic scaling rule of each microservice component in each full-link topology to the second area; The elastic scaling module is specifically used to execute the elastic scaling rules of each microservice component in each full-link topology for the application deployed in the second area, and perform elastic scaling processing on each microservice component in each full-link topology.

27. The system according to any one of claims 15 to 22, characterized in that The application is deployed in multiple availability zones, wherein each of the multiple availability zones deploys one application; the multiple availability zones are all active zones and include a first zone and a second zone; The topology detection module is specifically used to respectively execute the call relationship of each microservice component in the application based on the multiple microservice components for the application deployed in each available zone, and determine at least one full-link topology of the application; The traffic perception module is specifically used to execute the acquisition of first resource occupancy information of each microservice component called by the at least one service request for the application deployed in the first area, and send the first resource occupancy information to the second area; The policy determination module is specifically used to execute the elastic scaling rules of each microservice component in each full-link topology according to each full-link topology, the preset load model of each microservice component in each full-link topology, and the first resource occupancy information for the application deployed in each availability zone.

28. The system according to any one of claims 25 to 27, characterized in that The application in each available zone receives at least one service request respectively; The strategy determination module is specifically used to: Obtain the total scale of service requests received by the application in the multiple availability zones; determine the elastic scaling rules for each microservice component in each full-link topology based on each full-link topology, the preset load model of each microservice component in each full-link topology, the total scale, and the first resource occupancy information.

29. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.

30. A computer-readable storage medium, characterized in that: The method comprises a computer program, wherein when the computer program is run on an electronic device, the electronic device executes the method according to any one of claims 1 to 14.

31. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal including a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 14.

32. A computer program product, characterized in that The invention comprises a computer program, which, when executed by an electronic device, enables the electronic device to execute the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Micro-service dynamic aggregation splitting system based on call flow analysis and prediction

    CN111130908A

  • Distributed and container virtualization-based elastic micro-service system and implementation method

    CN114422371A

  • Container management device and storage medium storing container management program

    US20220374268A1

  • Elastic scaling method and system for microservice system in cloud environment, medium and device

    WO2022028157A1