Cluster application service expansion and contraction method, system, product, device and medium
By using predictive models and business carrying strategies on the cloud computing platform, the time lag problem of capacity expansion and contraction operations in the existing technology is solved, the response speed and efficiency are improved, and the requirements of different architectural scenarios are adapted.
Patent Information
- Application Number
- CN202410853492.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The existing technology has a time lag in capacity expansion and contraction operations and cannot respond quickly to business changes, resulting in low efficiency in capacity expansion and contraction.
By obtaining the historical data of the cloud computing platform, artificial intelligence models and time series models are used to predict business indicator data, determine peak indicator data, formulate business carrying strategies based on chip architecture types, calculate unit resource carrying capacity, and then determine expansion and contraction processing strategies. .
It is possible to determine the processing operations in advance before the expansion and contraction signals occur, improve the speed of response to business changes and the efficiency of expansion and contraction, improve the initiative and accuracy of the expansion and contraction strategy, and meet the business needs of different architecture scenarios.
Smart Images

Figure CN118394534B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, system, product, device and medium for scaling up and down cluster application services. Background Art
[0002] In actual production environments, we often encounter scenarios where a service needs to be scaled up or down. The main scaling factor is the number of Pod replicas. Pod is the smallest working unit of Kubernetes, and each Pod contains one or more containers. For example, if a device service has tight resources and needs to be scaled up, the load of service requests suddenly increases, and the original Pod replica begins to be unable to cope, so it is necessary to expand several Pod replicas to share the sudden load; if the workload of a device service decreases, it is necessary to reduce the number of service instances. After the peak period of service request load, in order to reduce unnecessary resource overhead, the replica resources of the service are scaled down.
[0003] There are two traditional Pod scaling operations. One is the manual mode, which uses the command line kubectlscale and other commands to set and adjust the number of Pod replicas. During manual operation, it is uncertain when the business request volume is large, and adjustments can only be made based on the staff's experience and ability, resulting in inaccurate adjustment time and scaling quantity. The other is the automatic mode, which requires specifying the range of the number of Pod replicas based on a certain performance indicator or a custom business indicator. The system automatically adjusts dynamically within the range of the Pod replicas based on changes in relevant performance indicators. The above two operation methods have obvious time lags in scaling. Both operations are performed after the scaling signal occurs, and they cannot respond quickly to business changes, further reducing the efficiency of scaling operations.
[0004] Therefore, how to improve the response to business changes to improve the operational efficiency of expansion and contraction is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system, product, device and medium for scaling up and down of cluster application services, so as to solve the technical problem that there is an obvious time lag in scaling up, and the corresponding operations are performed after the scaling up and down signals occur, which cannot respond quickly to business changes, further resulting in reduced scaling up and down operation efficiency.
[0006] In order to solve the above technical problems, the present invention provides a method for scaling up and down cluster application services, which is applied to a cloud computing platform and includes:
[0007] Acquire historical data of application services in the cloud computing platform; wherein the historical data at least includes business indicator data for quantifying application service efficiency and performance indicator data for reflecting system hardware resource utilization;
[0008] Predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; wherein the predicted peak strategy includes at least one or more strategies determined by an artificial intelligence model and / or a strategy determined by a time series model;
[0009] Determine the corresponding service carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service;
[0010] The expansion and contraction processing strategy of the application service is determined according to the relationship between the peak indicator data and the unit resource carrying capacity.
[0011] On the one hand, when the predicted peak strategy is a strategy determined by a time series model and the business indicator data is a data type, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes:
[0012] Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time;
[0013] calling the time series model;
[0014] Input the business indicator data and the preset time as input parameters into the time series model;
[0015] Obtaining a prediction sequence corresponding to the output parameters of the time series model;
[0016] The largest sequence data in the predicted sequence is determined as the peak indicator data corresponding to the application service.
[0017] On the other hand, when the predicted peak strategy is a strategy determined by a time series model and the business indicator data is of multiple data types, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes:
[0018] Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time;
[0019] calling the time series model;
[0020] Taking each of the business indicator data and the preset time as input parameters, inputting them into the time series model respectively;
[0021] Obtaining a prediction sequence corresponding to each of the business indicator data in the output parameters of the time series model;
[0022] Determining the largest sequence data in each of the prediction sequences as the initial peak indicator data of each of the business indicator data;
[0023] The smallest initial peak indicator data is selected from each initial peak indicator data as the peak indicator data corresponding to the application service.
[0024] On the other hand, the time series model includes at least one of a differential integrated moving average autoregressive model, a time series decomposition model using robust local weighted regression as a smoothing method, or a long short-term memory network model.
[0025] On the other hand, when the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is a data type, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes:
[0026] Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time;
[0027] Calling the artificial intelligence model;
[0028] Input the business indicator data as input parameters into the artificial intelligence model;
[0029] The output parameters of the artificial intelligence model are obtained as the peak indicator data corresponding to the application service.
[0030] On the other hand, when the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is of multiple data types, the business indicator data is predicted according to the predicted peak strategy of the application service to obtain corresponding peak indicator data, including:
[0031] Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time;
[0032] Calling the artificial intelligence model;
[0033] Input each of the business indicator data as an input parameter into the artificial intelligence model;
[0034] Obtaining output parameters of the artificial intelligence model as the peak indicator data corresponding to the application service;
[0035] The process of determining the artificial intelligence model includes:
[0036] Obtain historical business indicators corresponding to multiple data types in the first historical data;
[0037] Extract features from each historical business indicator data to determine corresponding feature indicator data;
[0038] Classify each characteristic indicator data to determine the initial peak indicator data corresponding to each historical business indicator data;
[0039] The smallest initial peak index data is selected from each of the initial peak index data as the peak index data corresponding to the application service to complete the processing of the artificial intelligence model.
[0040] On the other hand, the corresponding service carrying strategy is determined according to the chip architecture type corresponding to the cloud computing platform, including:
[0041] Get the chip architecture type corresponding to the cloud computing platform;
[0042] If the chip architecture type is one type, the determined service carrying strategy is a first service carrying strategy;
[0043] If the chip architecture type is multiple types, the determined service bearer strategy is the second service bearer strategy;
[0044] If the chip architecture type is multiple types, and the application service is migrated from one type of architecture to another type of architecture, the determined service bearing strategy is the third service bearing strategy.
[0045] On the other hand, according to the first service carrying strategy, the resource load, the number of instances corresponding to the chip architecture and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service, including:
[0046] Taking the current time as a reference, obtaining the second historical data of the application service within a set time period reversed from the current time;
[0047] The business indicator data in the second historical data is averaged to determine first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the chip architecture;
[0048] The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
[0049] On the other hand, according to the second service carrying strategy, the resource load, the number of instances corresponding to the chip architecture and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service, including:
[0050] Obtaining the resource load corresponding to the application service and the total number of instances of the cloud computing platform; wherein the total number of instances of the cloud computing platform is the sum of the number of instances corresponding to each chip architecture;
[0051] Obtaining first ratio data corresponding to the number of instances corresponding to each chip architecture and the total number of instances of the cloud computing platform;
[0052] Determine the load corresponding to each chip architecture according to the relationship between the resource load and each of the first ratio data;
[0053] Determine corresponding third data according to the load capacity corresponding to each chip architecture and the number of instances corresponding to each chip architecture;
[0054] Dividing each third data by the performance indicator data to obtain corresponding fourth data;
[0055] Multiply each fourth data by the resource usage threshold to obtain a corresponding initial unit resource carrying capacity;
[0056] A minimum initial unit resource carrying capacity is selected from among the initial unit resource carrying capacities as the unit resource carrying capacity.
[0057] On the other hand, according to the third service carrying strategy, the resource load, the number of instances corresponding to the chip architecture and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service, including:
[0058] Taking the current time as a reference, obtaining the second historical data of the application service within a set time period reversed from the current time;
[0059] The business indicator data in the second historical data is averaged to determine first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the target chip architecture; the target chip architecture is the chip architecture determined by the application service through migration of one type of architecture;
[0060] The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
[0061] On the other hand, determining the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity includes:
[0062] Rounding up the peak indicator data and the unit resource carrying capacity to obtain the number of instances to be adjusted;
[0063] Obtain the instance number corresponding to the chip architecture;
[0064] If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded;
[0065] If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
[0066] On the other hand, determining the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity includes:
[0067] Obtain performance information corresponding to each chip architecture;
[0068] Determine whether the performance information corresponding to each chip architecture meets the computing power equivalence condition;
[0069] If so, it is determined that the difference between the unit resource carrying capacities corresponding to each chip architecture is within a preset range; the unit resource carrying capacities corresponding to each chip architecture are added together to obtain a first unit resource carrying capacity; the first unit resource carrying capacity is divided by the architecture number of the chip architecture to determine the final unit resource carrying capacity;
[0070] If not, determining that the difference between the unit resource carrying capacities corresponding to each chip architecture respectively exceeds the preset range; selecting the minimum unit resource carrying capacity among the unit resource carrying capacities corresponding to each chip architecture respectively as the final unit resource carrying capacity;
[0071] Rounding up the peak indicator data and the final unit resource carrying capacity to obtain the number of instances to be adjusted;
[0072] Obtain the instance number corresponding to the chip architecture;
[0073] If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded;
[0074] If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
[0075] To solve the above technical problems, the present invention further provides a cluster system, including cluster nodes and a cloud computing platform; each of the cluster nodes corresponds to a chip architecture;
[0076] The cloud computing platform is used to obtain historical data of application services in the cloud computing platform; predict business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; determine the corresponding business carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined business carrying strategy to obtain the unit resource carrying capacity corresponding to the application service; determine the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity; wherein the historical data at least includes business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization rate of the system hardware resources; the predicted peak strategy at least includes one or more strategies determined by the artificial intelligence model and / or the strategy determined by the time series model;
[0077] The cluster node is used to perform capacity expansion and contraction processing on the application service of the cluster node according to the capacity expansion and contraction processing strategy.
[0078] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned method for scaling up and down the cluster application service when executed by a processor.
[0079] In order to solve the above technical problems, the present invention further provides a device for scaling up and down cluster application services, comprising:
[0080] Memory for storing computer programs;
[0081] The processor is used to implement the steps of the method for scaling up and down the cluster application service as described above when executing the computer program.
[0082] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for scaling up and down cluster application services as described above are implemented.
[0083] The present invention provides a method for scaling up and down a cluster application service, which is applied to a cloud computing platform, and includes obtaining historical data of application services in the cloud computing platform; wherein the historical data at least includes business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization rate of system hardware resources; predicting the business indicator data according to a predicted peak strategy of the application service to obtain corresponding peak indicator data; wherein the predicted peak strategy at least includes one or more strategies determined by an artificial intelligence model and / or a time series model; determining a corresponding business carrying strategy according to a chip architecture type corresponding to the cloud computing platform; processing resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined business carrying strategy to obtain a unit resource carrying capacity corresponding to the application service; and determining a scaling up and down processing strategy for the application service according to the relationship between the peak indicator data and the unit resource carrying capacity.
[0084] The beneficial effect of the present invention is that the peak indicator data is obtained by predicting the business indicator data based on the historical data of the application service in the cloud computing platform (at least including business indicator data and performance indicator data) according to the predicted peak strategy. Compared with the time lag of the traditional Pod expansion and contraction operation mode, the present invention predicts the peak indicator data based on the historical data, so that the data can be predicted in advance. The corresponding expansion and contraction processing operation is pre-determined in advance before the expansion and contraction signal occurs, which improves the speed of responding to business changes and the efficiency of expansion and contraction operations. In addition, after the present invention processes the resource load, the number of instances corresponding to the chip architecture and the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service through the business carrying strategy, the expansion and contraction processing strategy of the application service is determined based on the relationship between the peak indicator data and the unit resource carrying capacity, and the expansion and contraction conditions are accurately determined in combination with the historical data of the business indicator data and the performance indicator data, so as to improve the initiative of the expansion and contraction strategy. At the same time, based on the application scenarios under various different architectures or the same architecture of the cloud computing platform, the business development needs are met.
[0085] Secondly, the peak indicator data obtained by predicting based on the time series model corresponding to one or more business indicator data improves the accuracy of the prediction. In the latter embodiment, the prediction of multiple business indicator data is considered to improve the diversity prediction method in the business indicator data processing process and the stable operation of the system while taking into account multiple business indicator data. The peak indicator data obtained by predicting based on the artificial intelligence model corresponding to one or more business indicator data improves the accuracy of the prediction. For various chip architecture scenarios of the cloud computing platform, different business carrying strategies are formulated respectively, so that the processing capacity of the system can be improved under different architectures, ensuring that application task requests are responded to in a timely manner. The process of determining the unit resource carrying capacity based on the first business carrying strategy is obtained by averaging to improve the business carrying capacity under the current framework. In the one-cloud multi-core scenario, the process of determining the unit resource carrying capacity, under multiple architectures, takes into account multiple initial unit resource carrying capacities, and obtains the final unit resource carrying capacity, thereby improving the reliability of the overall application service. Cross-architecture business migration improves the diversity of architecture perception selection and ensures the reliability of application service operation.
[0086] In addition, the present invention also provides a cluster system, a computer program product, a device for scaling up and down cluster application services, and a medium, which have the same beneficial effects as the above-mentioned method for scaling up and down cluster application services. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0088] Figure 1 A flow chart of a method for scaling up and down a cluster application service provided by an embodiment of the present invention;
[0089] Figure 2 A schematic diagram of the expansion and contraction processing of a cluster application service provided by an embodiment of the present invention;
[0090] Figure 3 A structural diagram of a device for scaling up and down a cluster application service provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0092] The core of the present invention is to provide a method, system, product, device and medium for scaling up and down of cluster application services to solve the technical problem that there is an obvious time lag in scaling up, and the corresponding operations are performed after the scaling up and down signals occur, which cannot respond quickly to business changes, further resulting in reduced scaling up and down operation efficiency.
[0093] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0094] Cloud computing platform refers to services based on hardware resources and software resources, providing computing, network and storage capabilities. The cloud platform monitoring system continuously collects a large number of time-series key performance indicators (KPIs) from the platform, such as central processing unit (CPU) usage, network throughput, etc., to determine the operating status of the platform. As the cloud platform becomes more and more mature, the scale of the platform has also increased from the initial few or dozens of units to hundreds or even thousands of units. At the same time, the platform's own services are increasing and the calls are becoming more and more complex.
[0095] In cloud computing clusters, you often encounter scenarios where a service needs to be expanded (for example, testing service stress tests, e-commerce platform flash sales, promotional activities, or because of resource shortages, reduced workloads, etc., all of which require scaling the number of service instances). There are generally two ways to achieve Pod-level scaling. The first is the manual mode, which uses commands such as kubectl scale to adjust the number of Pod replicas and resource constraints. This requires manual operations every time, and it is uncertain when the business request volume will be large. Therefore, if you cannot achieve automated scaling, it will be very troublesome. Another way is to use the Horizontal Pod Autoscaling (HPA) technology on the cloud to automatically expand or shrink the number of Pods in the service based on monitoring indicators (CPU usage, disk, custom, etc.). When business demand increases, the system will automatically and seamlessly add an appropriate amount of Pod containers to improve system stability. The calculation method is to use the average CPU usage of existing Pods (the calculation method is the recent Pod usage (the average value of the last minute, obtained from metrics-server) divided by the set CPU usage limit for each Pod) to compare with the target usage, and when expanding, it is also necessary to follow the pre-set number of replicas: MinReplicas<=Replicas<=MaxReplicas. Therefore, the essence of this automatic expansion and contraction operation is a threshold-based operation, which is triggered when resource usage exceeds the threshold and only targets the number of Pod replicas. In the current one-cloud-multiple-core situation or cross-architecture migration situation, when one architecture needs to be used to calculate another architecture, the corresponding efficiency is slow and cannot respond quickly. In addition, the expansion standard of one architecture is not based on the corresponding entire computing resources, but the memory occupied by each structure is different, resulting in expansion errors. The cluster application service expansion and contraction method provided by the present invention can solve the above technical problems.
[0096] Figure 1 A flow chart of a method for scaling up and down a cluster application service provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method is applied to a cloud computing platform, including:
[0097] S11: Obtain historical data of application services in the cloud computing platform;
[0098] The historical data includes at least business indicator data for quantifying application service efficiency and performance indicator data for reflecting system hardware resource utilization;
[0099] S12: predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data;
[0100] Wherein, the prediction peak strategy includes at least one or more of the strategies determined by the artificial intelligence model and / or the strategies determined by the time series model;
[0101] S13: Determine a corresponding service carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data according to the determined service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service;
[0102] S14: Determine the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity.
[0103] Specifically, the application service in step S11 is usually a variety of software applications and tools provided to users in a cloud computing environment. These services enable users to develop, deploy, run and manage applications more conveniently. The historical data of the application service includes at least business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization of the system hardware resources. The monitoring data is cleaned and sorted and stored in a database. The database here is not limited and can be a Prometheus database or other databases. The business indicator data contains a series of quantitative indicators related to business performance and efficiency, which are closely related to the monitoring data. By collecting and analyzing the monitoring data, business indicator data can be obtained to evaluate the performance and efficiency of the system. The business indicator data specifically includes system response time, throughput, error rate, transactions per second (TPS), queries per second (QPS), etc., which can reflect the performance of the system in different aspects. The performance indicator data reflects the utilization of the system hardware resources, such as CPU utilization, memory utilization, etc.
[0104] In step S12, the business indicator data is predicted according to the predicted peak strategy of the application service to determine the peak indicator data, and then the target resource capacity required by the application service can be further calculated, which is mainly determined by one or more predicted peak strategies including at least one strategy determined by the artificial intelligence model to obtain the time series model. Here, the close relationship between application services and resources is mainly established, which not only improves the accuracy of prediction, but also enhances the generalization ability in various scenarios, and provides a strong guarantee for the stable operation and resource optimization of the system. In the prediction process, there is no limitation on the data type of the business indicator data. It can be one data type or multiple data types. When multiple data types are used, the peak value corresponding to each business indicator data can be determined by the time series model, and the minimum peak value among the multiple peak values can be determined as the final peak indicator data. The artificial intelligence model can also be used to extract and determine the feature data, which is not limited here.
[0105] The corresponding service carrying strategy is determined according to the chip architecture type in step S13, mainly considering that there are multiple chip architectures corresponding to the cloud computing platform, that is, one cloud with multiple cores, or a service carrying strategy for transferring application services between different architectures, and corresponding service carrying strategies are formulated for different application scenarios. And according to the determined service carrying strategy, the resource load, the number of Pod instances corresponding to the chip architecture, and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service, expressed as the service carrying capacity of the unit CPU or memory resource. Taking into account the different application operating environments, the CPU architecture in the host machine (such as X86, microprocessors based on the reduced instruction set computer (Reduced Instruction Set Computer, RISC) instruction set architecture (Advanced RISC Machine, ARM), etc.), computer architecture (such as traditional von Neumann architecture and parallel computing architecture), etc., the service carrying capacity is different under different computing frameworks. The service carrying capacity under the unit resource is identified by the relationship between the service indicator data and the performance indicator data.
[0106] In step S14, the expansion and contraction processing strategy is determined according to the relationship between the peak index data and the unit resource carrying capacity. It should be noted that this embodiment determines whether the application service currently needs to be expanded or reduced by comparing the two data. There is no limitation on how to implement the expansion and contraction strategy step, and it can be processed according to the actual situation.
[0107] The embodiment of the present invention provides a method for scaling up and down a cluster application service, which is applied to a cloud computing platform, including obtaining historical data of application services in the cloud computing platform; wherein the historical data at least includes business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization rate of system hardware resources; predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; wherein the predicted peak strategy at least includes one or more strategies determined by an artificial intelligence model and / or a time series model; determining the corresponding business carrying strategy according to the chip architecture type corresponding to the cloud computing platform; processing the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined business carrying strategy to obtain the unit resource carrying capacity corresponding to the application service; determining the scaling up and down processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity. By using the historical data of the application service in the cloud computing platform (at least including business indicator data and performance indicator data), and predicting the business indicator data according to the predicted peak strategy to obtain the peak indicator data, compared with the time lag of the traditional Pod scaling up and down operation mode, the present invention obtains the peak indicator data based on the prediction of the historical data, so that the data can be predicted in advance. The corresponding expansion and contraction processing operations are all determined in advance before the expansion and contraction signal occurs, so as to improve the speed of responding to business changes and the efficiency of expansion and contraction operations. In addition, after the present invention processes the resource load, the number of instances corresponding to the chip architecture and the performance indicator data through the business carrying strategy to obtain the unit resource carrying capacity corresponding to the application service, the expansion and contraction processing strategy of the application service is determined based on the relationship between the peak indicator data and the unit resource carrying capacity, and the expansion and contraction conditions are accurately determined in combination with the historical data of the business indicator data and the performance indicator data, so as to improve the initiative of the expansion and contraction strategy. At the same time, the application scenarios under various different architectures or the same architecture of the cloud computing platform can meet the needs of business development.
[0108] In some embodiments, when the predicted peak strategy is a strategy determined by a time series model and the business indicator data is a data type, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes:
[0109] Taking the current time as the benchmark, obtain the business indicator data within the preset time period reversed from the current time;
[0110] Calling a time series model;
[0111] The business indicator data and the preset time are input into the time series model as input parameters;
[0112] Get the forecast sequence corresponding to the output parameters of the time series model;
[0113] The largest sequence data in the prediction sequence is determined as the peak indicator data corresponding to the application service.
[0114] Specifically, since it is historical data, the corresponding business indicator data within the range of the current time is reversed according to the preset time, and the business indicator data and the preset time are used as input parameters through the time series model to obtain the prediction sequence corresponding to the output parameters of the model. Here, the mapping relationship between the business indicator data and the preset time is established, and the largest sequence data in the obtained prediction sequence is determined as the peak indicator data.
[0115] In other embodiments, when the prediction peak strategy is a strategy determined by a time series model and the business indicator data is of multiple data types, the business indicator data is predicted according to the prediction peak strategy of the application service to obtain corresponding peak indicator data, including:
[0116] Taking the current time as the benchmark, obtain the business indicator data within the preset time reversed from the current time;
[0117] Calling a time series model;
[0118] Each business indicator data and preset time are used as input parameters and input into the time series model respectively;
[0119] Obtain the forecast sequence corresponding to each business indicator data in the output parameters of the time series model;
[0120] Determine the largest sequence data in each prediction sequence as the initial peak indicator data of each business indicator data;
[0121] The smallest initial peak indicator data is selected from each initial peak indicator data as the peak indicator data corresponding to the application service.
[0122] Based on the business indicator data of each type of data, a time series model is predicted to obtain respective prediction sequences, and the largest sequence data is found in respective prediction sequences as the peak indicator data determined by respective data types, i.e., as the initial peak indicator data. Among the business indicator data of different data types, the minimum initial peak indicator data is found in respective prediction sequences as the peak indicator data corresponding to the finally determined application service. It should be noted that the time series model of this embodiment and the previous embodiment may be the same or different, and is not limited here. However, in this embodiment, the time series models for multiple business indicator data need to be the same, so that the accuracy of the peak indicator data determined in this way is higher.
[0123] For example, for the Redis application, the business indicator QPS reflects the business performance indicator data. QPS represents the number of requests that the Redis server can process per second. The higher the QPS, the better the performance of the Redis server, and the more requests it can process. Therefore, the QPS indicator of Redis is selected as its business carrying capacity. The QPS time series data curve of the last hour is selected as the input of the trend prediction algorithm, with a value interval of 1 minute, and the peak and valley values of the last 5 minutes are predicted by the trend prediction algorithm.
[0124] In some embodiments, the time series model includes at least one of a differential integrated moving average autoregressive model, a time series decomposition model with robust local weighted regression as a smoothing method, or a long short-term memory network model.
[0125] Specifically, the trend prediction algorithm for Redis uses an integrated trend prediction algorithm (time series model), which can be an Auto Regressive Integrated Moving Average model (ARIMA), a Seasonal-Trend decomposition procedure based on Loess (STL) or a Long Short-Term Memory (LSTM) network model with robust local weighted regression as a smoothing method. The load prediction value is obtained by accurately calculating the symmetric mean absolute percentage error (SMAPE) evaluation method as the evaluation criterion. It can be expressed as follows: if the time series composed of the QPS indicator is e and the prediction result sequence is Y, then Y=f(e), where f() represents the trend prediction algorithm, and the peak value after prediction is Ymax=max(Y).
[0126] The peak indicator data obtained by prediction based on a time series model corresponding to one or more business indicator data provided in this embodiment improves the accuracy of the prediction. In the latter embodiment, the prediction is made taking into account multiple business indicator data, thereby improving the diversity of prediction methods in the process of business indicator data processing and taking into account multiple business indicator data, thereby improving the stable operation of the system.
[0127] In some embodiments, when the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is a data type, the business indicator data is predicted according to the predicted peak strategy of the application service to obtain corresponding peak indicator data, including:
[0128] Taking the current time as the benchmark, obtain the business indicator data within the preset time period reversed from the current time;
[0129] Calling artificial intelligence models;
[0130] Use business indicator data as input parameters to the artificial intelligence model;
[0131] Obtain the output parameters of the artificial intelligence model as the peak indicator data corresponding to the application service.
[0132] Specifically, an artificial intelligence model is adopted, and the collected business indicator data is used as an input parameter to output the peak indicator data of the artificial intelligence model. Compared with the time series model, the processing of the corresponding previous input parameters by the artificial intelligence model is relatively simple. The collected business indicator data can be directly input, and feature parameters can be extracted in the model to obtain the corresponding peak indicator data.
[0133] In other embodiments, when the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is of multiple data types, the business indicator data is predicted according to the predicted peak strategy of the application service to obtain corresponding peak indicator data, including:
[0134] Taking the current time as the benchmark, obtain the business indicator data within the preset time reversed from the current time;
[0135] Calling artificial intelligence models;
[0136] Input each business indicator data as input parameter into the artificial intelligence model;
[0137] Obtain the output parameters of the artificial intelligence model as the peak indicator data corresponding to the application service;
[0138] The process of determining the artificial intelligence model includes:
[0139] Obtain historical business indicators corresponding to multiple data types in the first historical data;
[0140] Extract features from each historical business indicator data to determine corresponding feature indicator data;
[0141] Classify each characteristic indicator data to determine the initial peak indicator data corresponding to each historical business indicator data;
[0142] The smallest initial peak indicator data is selected from each initial peak indicator data as the peak indicator data corresponding to the application service to complete the processing of the artificial intelligence model.
[0143] Specifically, the collection method of the business indicator data is the same as that of the above-mentioned embodiments. Here, multiple business indicator data are simply input and the final peak indicator data is directly output. The determination process of the artificial intelligence model performs feature extraction processing on the historical business indicator data of multiple data types of the first historical data for this embodiment to determine the corresponding feature indicator data. The feature extraction here is not limited and may be the same as or different from the extraction processing of the conventional artificial intelligence model. Based on each feature indicator data, classification processing is performed to determine the initial peak indicator data corresponding to each historical business indicator data; the smallest initial peak indicator data is selected from each initial peak indicator data as the peak indicator data corresponding to the application service to complete the processing of the artificial intelligence model. The classification processing in this embodiment may be the same as or different from that of a conventional artificial intelligence model and is not limited here.
[0144] It should be noted that the corresponding artificial intelligence model processing process in the previous embodiment is similar to the processing process in this embodiment, except that only one type of historical business indicator data is used for feature extraction and finally classification processing to obtain peak indicator data, without the need to select the minimum peak indicator data process.
[0145] The peak indicator data obtained by prediction based on an artificial intelligence model corresponding to one or more business indicator data provided in this embodiment improves the accuracy of the prediction.
[0146] In some embodiments, determining a corresponding service carrying strategy according to a chip architecture type corresponding to a cloud computing platform includes:
[0147] Get the chip architecture type corresponding to the cloud computing platform;
[0148] If the chip architecture type is one type, the determined service bearer strategy is the first service bearer strategy;
[0149] If the chip architecture type is multiple types, the determined service bearer strategy is the second service bearer strategy;
[0150] If there are multiple chip architecture types, and the application service is migrated from one type of architecture to another type of architecture, the determined service bearer strategy is the third service bearer strategy.
[0151] Specifically, under one chip architecture type, it is the first business carrying strategy; under multiple chip architecture types, it is the second business carrying strategy; under multiple chip architecture types and when the application service is migrated from one type of architecture to another type of architecture, it is the third business carrying strategy.
[0152] This embodiment provides different business carrying strategies for various chip architecture scenarios of cloud computing platforms, so that the system processing capability can be improved under different architectures, ensuring that application task requests are responded to in a timely manner.
[0153] In some embodiments, the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data are processed according to the first service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service, including:
[0154] Taking the current time as a reference, obtaining the second historical data of the application service within a set time period reversed from the current time;
[0155] The business indicator data in the second historical data is averaged to determine the first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the chip architecture;
[0156] The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
[0157] Specifically, the business indicator data of the collected second historical data is averaged to obtain the first average data, and the first average data is the data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the chip architecture. It should be noted that this embodiment is only an application scenario of a chip architecture, and its corresponding resource load and number of instances only correspond to one chip architecture. The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
[0158] Take Redis's business indicator QPS as an example, and the key performance indicators that affect its performance are CPU and memory. Then, we can select the average QPS value X within 10 minutes from the monitoring history data, and allocate the CPU amount C and memory amount M to the Redis application. The business volume that can be carried by a unit CPU resource is c=X / C, and the business volume that can be carried by a unit memory is m=X / M.
[0159] The process of determining the unit resource carrying capacity based on the first service carrying strategy provided in this embodiment is obtained through averaging, thereby improving the service carrying capacity under the current framework.
[0160] In some embodiments, the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data are processed according to the second service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service, including:
[0161] Obtain resource loads corresponding to the application service and the total number of instances of the cloud computing platform; wherein the total number of instances of the cloud computing platform is the sum of the number of instances corresponding to each chip architecture;
[0162] Obtain first ratio data corresponding to the number of instances corresponding to each chip architecture and the total number of instances of the cloud computing platform;
[0163] Determine the load corresponding to each chip architecture according to the relationship between the resource load and each first ratio data;
[0164] Determine corresponding third data according to the load capacity corresponding to each chip architecture and the number of instances corresponding to each chip architecture;
[0165] Dividing each third data by the performance indicator data to obtain corresponding fourth data;
[0166] Multiply each fourth data by the resource usage threshold to obtain a corresponding initial unit resource carrying capacity;
[0167] The minimum initial unit resource carrying capacity is selected from among the initial unit resource carrying capacities as the unit resource carrying capacity.
[0168] Specifically, in a one-cloud-multiple-core environment, the unit Pod business carrying capacity under different architectures obtains the resource load corresponding to the application service and the total number of instances of the cloud computing platform. Resource load refers to the ability of a system, device, or network to process tasks within a specific time in computer science and information technology. It is usually related to the resource usage of the system, including CPU, memory, disk input / output system (Input / Output system, I / O), network bandwidth, etc. The level of resource load directly affects the performance and response time of the system. The resource load is A, the total number of instances is B, and the sum of the number of instances corresponding to each chip architecture is the total number of instances B. The first ratio data corresponding to the number of instances corresponding to each chip architecture and the total number of instances of the cloud computing platform, according to the relationship between the resource load and each first ratio data, respectively determine the load capacity corresponding to each chip architecture. For example, taking the number of X86 instances as K x86 , ARM instance number K ARM , the load carried by its X86 platform is A x86 =A*K x86 / B; The load carried by the ARM platform is A ARM =A*K ARM / B.
[0169] The corresponding third data is determined according to the load capacity corresponding to each chip architecture and the number of instances corresponding to each chip architecture. The corresponding fourth data is obtained by dividing each third data with the performance indicator data. The corresponding initial unit resource load capacity is obtained by multiplying each fourth data with the resource usage threshold, and the formula is as follows:
[0170] x=A n / K n / C cpu_util* Resource usage threshold;
[0171] Where n represents the corresponding chip architecture type, A represents the load carried by the chip architecture type n platform, Kn represents the number of instances corresponding to the chip architecture type n platform, and C cpu_util Indicates performance indicator data, here it is CPU usage; for memory-sensitive applications, the CPU usage can be adjusted to memory usage.
[0172] Taking the X86 platform and ARM platform as examples, the initial unit resource carrying capacity of the unit Pod corresponding to the X86 platform is:
[0173] x x86 =A x86 / K x86 / C cpu_util * Resource usage threshold;
[0174] The initial unit resource carrying capacity of the unit Pod corresponding to the X86 platform is:
[0175] x ARM =A ARM / K ARM / C cpu_util *Resource usage threshold.
[0176] There is no limitation on the specific data of the resource usage threshold, which can be set according to the actual situation, such as 0.8. It should be noted that in order not to occupy too much resource usage, the resource usage threshold is less than 1.
[0177] The minimum initial unit resource carrying capacity is selected from each initial unit resource carrying capacity as the unit resource carrying capacity, similar to the barrel effect. Multiple carrying capacities can be calculated simultaneously, and the minimum value is taken as the unit resource carrying capacity.
[0178] The present embodiment provides a process for determining the unit resource carrying capacity in a one-cloud, multi-core scenario. Under various architectures, the process takes into account multiple initial unit resource carrying capacities while obtaining the final unit resource carrying capacity, thereby improving the reliability of the overall application service.
[0179] In some embodiments, the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data are processed according to the third service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service, including:
[0180] Taking the current time as a reference, obtaining the second historical data of the application service within a set time period reversed from the current time;
[0181] The business indicator data in the second historical data is averaged to determine the first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the target chip architecture; the target chip architecture is the chip architecture determined by the application service from one type of architecture migration;
[0182] The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
[0183] Specifically, in the case of cross-architecture business migration, for example, migration from architecture C to architecture D, it is only necessary to combine the data of architecture D, that is, the target chip architecture is the destination chip architecture for migration. Apart from this, the process of determining the unit resource carrying capacity is the same as that in the above-mentioned chip architecture scenario, and is not limited here.
[0184] The cross-architecture business migration provided by this embodiment improves the diversity of architecture-aware selections and ensures the reliability of application service operation.
[0185] In some embodiments, taking a chip architecture scenario of the same architecture and a cross-architecture business migration scenario as examples, determining the scaling processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity includes:
[0186] The peak index data and the unit resource carrying capacity are rounded up to obtain the number of instances to be adjusted;
[0187] Get the instance number corresponding to the chip architecture;
[0188] If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded;
[0189] If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
[0190] Specifically, the peak index data and the unit resource carrying capacity determined in the above embodiment are rounded up to obtain the number of instances to be adjusted, that is, the number of instances ultimately required. The actual number of instances of the chip architecture is obtained, and the number of instances to be adjusted is compared with the actual number of instances. If it is greater than, it means that the application service needs to be expanded; if it is less than, it means that the application service needs to be reduced.
[0191] In other embodiments, based on a one-cloud-multiple-core scenario, the scaling processing strategy of the application service is determined according to the relationship between the peak indicator data and the unit resource carrying capacity, including:
[0192] Obtain performance information corresponding to each chip architecture;
[0193] Determine whether the performance information corresponding to each chip architecture meets the computing power equivalence condition;
[0194] If so, determine that the difference between the unit resource carrying capacities corresponding to each chip architecture is within a preset range; sum the unit resource carrying capacities corresponding to each chip architecture to obtain a first unit resource carrying capacity; divide the first unit resource carrying capacity by the number of chip architectures to determine a final unit resource carrying capacity;
[0195] If not, it is determined that the difference between the unit resource carrying capacities corresponding to each chip architecture exceeds a preset range; the minimum unit resource carrying capacity is selected from the unit resource carrying capacities corresponding to each chip architecture as the final unit resource carrying capacity;
[0196] The peak index data and the final unit resource carrying capacity are rounded up to obtain the number of instances to be adjusted;
[0197] Get the instance number corresponding to the chip architecture;
[0198] If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded;
[0199] If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
[0200] Specifically, the performance information corresponding to each chip architecture is obtained, which mainly refers to the cross-architecture configuration information, such as the information of the QPS reaching a certain value. Determine whether each performance information satisfies the computing power equivalence condition. The computing power equivalence condition here is that the two configuration information under the same architecture or different architectures are different, but have similar performance in processing the same business scenario, such as processing the Redis service, and its performance is QPS greater than 3000.
[0201] If all of them are satisfied, it means that the difference between the unit resource carrying capacity corresponding to each chip architecture is within the preset range, and the difference is not large. According to the computing power equivalence, the unit resource carrying capacity corresponding to each chip architecture is added to obtain the first unit resource carrying capacity; the first unit resource carrying capacity is divided by the number of architectures of the chip architecture to determine the final unit resource carrying capacity. The carrying capacity of all Pods is determined by dividing it by the number of architectures.
[0202] If not, it is determined that the difference between the unit resource carrying capacity corresponding to each chip architecture exceeds the preset range, the difference is large, and the computing power equivalence is not followed. The minimum unit resource carrying capacity is selected as the final unit resource carrying capacity within the unit resource carrying capacity corresponding to each chip architecture.
[0203] In this case, the final unit resource carrying capacity is determined, and the peak index data and the final unit resource carrying capacity are rounded up to obtain the number of instances to be adjusted; the number of instances corresponding to the chip architecture is obtained; if the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded; if the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be reduced. The expansion and reduction processing at this time is the same as the above embodiment, and is not limited here.
[0204] The expansion and contraction under the one-cloud multi-core heterogeneity provided in this embodiment is based on the influence of load balancing, and the final system service carrying capacity is obtained for expansion and contraction processing, thereby improving the balance of various chip architectures.
[0205] In some embodiments, when the number of instances to be adjusted is less than the number of instances, the method further includes:
[0206] Obtain the difference data between the number of instances to be adjusted and the number of instances and the setting range;
[0207] Determine whether the difference data is less than the set range;
[0208] If it is less than, it is determined that the application service does not process it;
[0209] If it is greater, the application service is determined to be scaled down.
[0210] Specifically, when the number of instances to be adjusted is less than the number of instances, the downscaling process will be performed. In other words, as long as it is less than, the corresponding downscaling process will be performed. In order to reduce the frequency of processing, the actual difference data and the set range between the two are checked in this embodiment. If the difference data is less than the set range, it means that the difference between the current number of instances to be adjusted and the number of instances is small, and the corresponding downscaling process will not be reduced too much in actual situations, but will increase frequent processing operations. Therefore, the application service can be processed. If the difference data is less than the set range, it means that the difference between the current number of instances to be adjusted and the number of instances is small, and the corresponding downscaling process will be performed.
[0211] This embodiment provides that the scaling-down process is performed only when there is a large difference between the current number of instances to be adjusted and the number of instances, thereby avoiding frequent operations.
[0212] Figure 2 A schematic diagram of a cluster application service expansion and contraction processing method provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, real-time monitoring data mainly monitors historical data, peak index data is predicted through the predicted peak index strategy of application services, unit resource carrying capacity is determined through the application quality model, and architecture perception and expansion and contraction strategies are determined based on the predicted peak index data and unit resource carrying capacity for processing by the resource scheduling engine.
[0213] It should be noted that the application quality model is based on determining the corresponding business carrying strategy according to the chip architecture type corresponding to the cloud computing platform; according to the determined business carrying strategy, the resource load, the number of instances corresponding to the chip architecture and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service.
[0214] For an introduction to the capacity expansion and contraction processing of a cluster application service provided by the present invention, please refer to the above method embodiment, which will not be repeated herein. It has the same beneficial effects as the above cluster application service capacity expansion and contraction method.
[0215] Furthermore, the present invention also provides a cluster system, including cluster nodes and a cloud computing platform; each cluster node corresponds to a chip architecture;
[0216] The cloud computing platform is used to obtain historical data of application services in the cloud computing platform; predict business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; determine the corresponding business carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined business carrying strategy to obtain the unit resource carrying capacity corresponding to the application service; determine the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity; wherein the historical data at least includes business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization rate of the system hardware resources; the predicted peak strategy at least includes one or more strategies determined by the artificial intelligence model and / or the strategy determined by the time series model;
[0217] Cluster nodes are used to scale the application services of cluster nodes according to the scaling policy.
[0218] For an introduction to a cluster system provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The cluster system has the same beneficial effects as the above cluster application service expansion and contraction method.
[0219] The above describes in detail various embodiments corresponding to the method for scaling up and down a cluster application service. On this basis, the present invention further discloses a device for scaling up and down a cluster application service corresponding to the above method. The device for scaling up and down a cluster application service includes:
[0220] An acquisition module is used to acquire historical data of application services in the cloud computing platform; wherein the historical data at least includes business indicator data for quantifying application service efficiency and performance indicator data for reflecting system hardware resource utilization;
[0221] A prediction module, used to predict the business indicator data according to the prediction peak strategy of the application service to obtain the corresponding peak indicator data; wherein the prediction peak strategy includes at least one or more strategies determined by the artificial intelligence model and / or the time series model;
[0222] The first determination module is used to determine the corresponding service carrying strategy according to the chip architecture type corresponding to the cloud computing platform; according to the determined service carrying strategy, the resource load, the number of instances corresponding to the chip architecture and the performance indicator data are processed to obtain the unit resource carrying capacity corresponding to the application service;
[0223] The second determination module is used to determine the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity.
[0224] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0225] For an introduction to a capacity expansion and contraction device for a cluster application service provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above cluster application service capacity expansion and contraction method.
[0226] Figure 3 A structural diagram of a cluster application service expansion and contraction device provided by an embodiment of the present invention, such as Figure 3 As shown, the device comprises:
[0227] A memory 21, used for storing computer programs;
[0228] The processor 22 is used to implement the steps of the method for scaling up and down the cluster application service when executing the computer program.
[0229] The device for scaling up and down the cluster application service provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0230] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0231] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the method for scaling the cluster application service disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, data involved in the method for scaling the cluster application service, etc.
[0232] In some embodiments, the device for scaling up and down the cluster application service may further include a display screen 23 , an input and output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0233] Those skilled in the art can understand that Figure 3 The structure shown in the figure does not constitute a limitation on the device for scaling up and down cluster application services, and may include more or fewer components than those shown in the figure.
[0234] The processor 22 implements the method for scaling up and down the cluster application service provided by any of the above embodiments by calling the instructions stored in the memory 21 .
[0235] For an introduction to a device for scaling up and down a cluster application service provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The device has the same beneficial effects as the above method for scaling up and down a cluster application service.
[0236] Furthermore, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 22, the steps of the method for scaling up and down the cluster application service as described above are implemented.
[0237] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0238] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The present invention has the same beneficial effects as the above cluster application service expansion and contraction method.
[0239] Furthermore, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the method for scaling up and down cluster application services when executed by a processor.
[0240] For an introduction to a computer program product provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The computer program product has the same beneficial effects as the above cluster application service expansion and contraction method.
[0241] The above is a detailed introduction to the method, system, product, device and medium for scaling up and down a cluster application service provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0242] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for scaling up and down a cluster application service, characterized in that: Applied to cloud computing platforms, including: Acquire historical data of application services in the cloud computing platform; wherein the historical data at least includes business indicator data for quantifying application service efficiency and performance indicator data for reflecting system hardware resource utilization; Predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; wherein the predicted peak strategy includes at least one or more strategies determined by an artificial intelligence model and / or a strategy determined by a time series model; Determine the corresponding service carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service; wherein, obtain the chip architecture type corresponding to the cloud computing platform; if the chip architecture type is one type, the determined service carrying strategy is the first service carrying strategy; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the first service carrying strategy to obtain the unit resource carrying capacity corresponding to the application service, including: taking the current time as a reference, obtaining the second historical data of the application service within a set time reversed from the current time; averaging the service indicator data in the second historical data to determine the first average data; wherein the first average data is the data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the chip architecture; dividing the first average data by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service; The expansion and contraction processing strategy of the application service is determined according to the relationship between the peak indicator data and the unit resource carrying capacity.
2. The method for scaling up and down cluster application services according to claim 1, characterized in that: When the predicted peak strategy is a strategy determined by a time series model and the business indicator data is a data type, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes: Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time; calling the time series model; Input the business indicator data and the preset time as input parameters into the time series model; Obtaining a prediction sequence corresponding to the output parameters of the time series model; The largest sequence data in the predicted sequence is determined as the peak indicator data corresponding to the application service.
3. The method for scaling up and down cluster application services according to claim 1, characterized in that: When the predicted peak strategy is a strategy determined by a time series model and the business indicator data is of multiple data types, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes: Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time; calling the time series model; Taking each of the business indicator data and the preset time as input parameters, inputting them into the time series model respectively; Obtaining a prediction sequence corresponding to each of the business indicator data in the output parameters of the time series model; Determining the largest sequence data in each of the prediction sequences as the initial peak indicator data of each of the business indicator data; The smallest initial peak indicator data is selected from each initial peak indicator data as the peak indicator data corresponding to the application service.
4. The method for scaling up and down cluster application services according to claim 2 or 3, characterized in that: The time series model at least includes a differential integrated moving average autoregressive model, a time series decomposition model using robust local weighted regression as a smoothing method, or a long short-term memory network model.
5. The method for scaling up and down cluster application services according to claim 1, characterized in that: When the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is a data type, predicting the business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data includes: Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time; Calling the artificial intelligence model; Input the business indicator data as input parameters into the artificial intelligence model; The output parameters of the artificial intelligence model are obtained as the peak indicator data corresponding to the application service.
6. The method for scaling up and down cluster application services according to claim 1, characterized in that: When the predicted peak strategy is a strategy determined by an artificial intelligence model and the business indicator data is of multiple data types, the business indicator data is predicted according to the predicted peak strategy of the application service to obtain corresponding peak indicator data, including: Taking the current time as a reference, obtaining the business indicator data within a preset time period reversed from the current time; Calling the artificial intelligence model; Input each of the business indicator data as an input parameter into the artificial intelligence model; Obtaining output parameters of the artificial intelligence model as the peak indicator data corresponding to the application service; The process of determining the artificial intelligence model includes: Obtain historical business indicators corresponding to multiple data types in the first historical data; Extract features from each historical business indicator data to determine corresponding feature indicator data; Classify each characteristic indicator data to determine the initial peak indicator data corresponding to each historical business indicator data; The smallest initial peak index data is selected from each of the initial peak index data as the peak index data corresponding to the application service to complete the processing of the artificial intelligence model.
7. The method for scaling up and down cluster application services according to claim 1, characterized in that: Determine the corresponding service carrying strategy based on the chip architecture type corresponding to the cloud computing platform, including: Get the chip architecture type corresponding to the cloud computing platform; If the chip architecture type is multiple types, the determined service bearer strategy is the second service bearer strategy; If the chip architecture type is multiple types, and the application service is migrated from one type of architecture to another type of architecture, the determined service bearing strategy is the third service bearing strategy.
8. The method for scaling up and down cluster application services according to claim 7, characterized in that: Processing the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data according to the second service carrying strategy to obtain a unit resource carrying capacity corresponding to the application service, including: Obtaining the resource load corresponding to the application service and the total number of instances of the cloud computing platform; wherein the total number of instances of the cloud computing platform is the sum of the number of instances corresponding to each chip architecture; Obtaining first ratio data corresponding to the number of instances corresponding to each chip architecture and the total number of instances of the cloud computing platform; Determine the load corresponding to each chip architecture according to the relationship between the resource load and each of the first ratio data; Determine corresponding third data according to the load capacity corresponding to each chip architecture and the number of instances corresponding to each chip architecture; Dividing each third data by the performance indicator data to obtain corresponding fourth data; Multiplying each fourth data by the resource usage threshold value to obtain a corresponding initial unit resource carrying capacity; A minimum initial unit resource carrying capacity is selected from among the initial unit resource carrying capacities as the unit resource carrying capacity.
9. The method for scaling up and down cluster application services according to claim 7, characterized in that: Processing the resource load, the number of instances corresponding to the chip architecture, and the performance indicator data according to the third service bearing strategy to obtain a unit resource bearing capacity corresponding to the application service, including: Taking the current time as a reference, obtaining the second historical data of the application service within a set time period reversed from the current time; The business indicator data in the second historical data is averaged to determine first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the target chip architecture; the target chip architecture is the chip architecture determined by the application service through migration of one type of architecture; The first average data is divided by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service.
10. The method for scaling up and down cluster application services according to claim 1 or 9, characterized in that: Determining the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity includes: Rounding up the peak indicator data and the unit resource carrying capacity to obtain the number of instances to be adjusted; Obtain the instance number corresponding to the chip architecture; If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded; If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
11. The method for scaling up and down cluster application services according to claim 8, characterized in that: Determining the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity includes: Obtain performance information corresponding to each chip architecture; Determine whether the performance information corresponding to each chip architecture meets the computing power equivalence condition; If so, it is determined that the difference between the unit resource carrying capacities corresponding to each chip architecture is within a preset range; the unit resource carrying capacities corresponding to each chip architecture are added together to obtain a first unit resource carrying capacity; the first unit resource carrying capacity is divided by the architecture number of the chip architecture to determine the final unit resource carrying capacity; If not, determining that the difference between the unit resource carrying capacities corresponding to each chip architecture respectively exceeds the preset range; selecting the minimum unit resource carrying capacity among the unit resource carrying capacities corresponding to each chip architecture respectively as the final unit resource carrying capacity; Rounding up the peak indicator data and the final unit resource carrying capacity to obtain the number of instances to be adjusted; Obtain the instance number corresponding to the chip architecture; If the number of instances to be adjusted is greater than the number of instances, it is determined that the application service needs to be expanded; If the number of instances to be adjusted is less than the number of instances, it is determined that the application service needs to be scaled down.
12. A cluster system, characterized in that: It includes cluster nodes and a cloud computing platform; each cluster node corresponds to a chip architecture; The cloud computing platform is used to obtain historical data of application services in the cloud computing platform; predict business indicator data according to the predicted peak strategy of the application service to obtain corresponding peak indicator data; determine the corresponding business carrying strategy according to the chip architecture type corresponding to the cloud computing platform; process the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the determined business carrying strategy to obtain the unit resource carrying capacity corresponding to the application service; determine the expansion and contraction processing strategy of the application service according to the relationship between the peak indicator data and the unit resource carrying capacity; wherein the historical data at least includes business indicator data for quantifying the efficiency of the application service and performance indicator data for reflecting the utilization rate of the system hardware resources; the predicted peak strategy at least includes a strategy determined by an artificial intelligence model and / or a strategy determined by a time series model or more; obtaining a chip architecture type corresponding to a cloud computing platform; if the chip architecture type is one type, the determined business carrying strategy is a first business carrying strategy; processing the resource load, the number of instances corresponding to the chip architecture and the performance indicator data according to the first business carrying strategy to obtain a unit resource carrying capacity corresponding to the application service, including: taking the current time as a reference, obtaining second historical data of the application service within a set time reversed from the current time; averaging the business indicator data in the second historical data to determine first average data; wherein the first average data is data obtained by dividing the resource load of the application service and the number of instances that can be allocated by the chip architecture; dividing the first average data by the performance indicator data to obtain the unit resource carrying capacity corresponding to the application service; The cluster node is used to perform capacity expansion and contraction processing on the application service of the cluster node according to the capacity expansion and contraction processing strategy.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method for scaling up and down the cluster application service described in any one of claims 1 to 11 are implemented.
14. A device for scaling up and down cluster application services, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for scaling up and down the cluster application service as described in any one of claims 1 to 11 when executing the computer program.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for scaling up and down a cluster application service as claimed in any one of claims 1 to 11 are implemented.
