Micro-service resource automatic telescoping system and method based on multi-dimensional state evaluation
The microservice resource auto-scaling system, which utilizes multidimensional state evaluation and genetic algorithm optimization, solves the problems of long training time and model coupling in existing technologies. It achieves lightweight, responsive, and adaptive resource management, improving the system's rapid response and resource utilization.
Patent Information
- Application Number
- CN202511302356.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies for microservice resource management in cloud-native environments suffer from problems such as long training times, high computational resource consumption, high coupling between models and the environment, and untimely or erroneous resource adjustments due to inaccurate load predictions, making it difficult to achieve efficient and intelligent resource scheduling under dynamic loads.
A microservice resource auto-scaling system based on multi-dimensional state assessment is adopted. Real-time resource adjustment is performed through a data collection module, a decision engine module, and a decision execution module. Dynamic weight optimization is performed by combining an event detection engine and a genetic algorithm optimizer to achieve lightweight, responsive, and adaptive resource management.
It enables rapid response and accurate evaluation of microservice systems, avoiding high training costs and response delays. It can adjust resources in a timely manner when the load fluctuates drastically, ensuring system resilience and resource utilization, and improving the system's adaptability and stability.
Smart Images

Figure CN121000600A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud native and automated operation, and in particular to a microservice resource automatic scaling system based on multi-dimensional state evaluation.
[0002] The present application also relates to a microservice resource automatic scaling method based on multi-dimensional state evaluation. BACKGROUND
[0003] As its core concept, microservice architecture decouples a single application into multiple lightweight, independent services and integrates them in a containerized manner, greatly improving the agility of development, flexibility of deployment, and scalability of the system. This architecture is widely adopted in cloud computing scenarios, and it plays a crucial role in improving performance and optimizing energy efficiency by offloading computing tasks to the cloud. However, the high flexibility of this architecture also brings unprecedented complexity to automated operation. In actual deployment, the complex interdependence and data call relationship between microservices make it extremely difficult to locate performance bottlenecks and manage resources. A user's request often needs to traverse a call chain composed of multiple microservices, and any resource shortage at any link can cause the end-to-end performance of the entire application to deteriorate sharply. Therefore, in a resource-constrained cloud native environment, how to efficiently perform dynamic resource allocation for this complex system composed of numerous services has become a core technical problem that needs to be solved. The essence of this problem is how to achieve the best dynamic balance between guaranteeing service quality (QoS) and optimizing resource utilization (reducing cost) when facing changing user demands and traffic fluctuations. Therefore, designing an intelligent automatic scaling mechanism that can understand the internal state of the application and make quick and reasonable decisions has become a research focus and key requirement in the field of cloud computing and automated operation.
[0004] Prior art solutions: 202210526299.9 discloses a microservice resource allocation method based on a combination of neural networks. By combining neural network prediction with clustering and Mahalanobis distance comparison diagnosis methods, it can accurately predict and locate microservices that will cause performance violations in complex cloud environments, and lock specific bottleneck resources, thereby achieving the purpose of targeted resource allocation. Ultimately, it can improve resource utilization as much as possible while reducing online service violation rates. The main drawback of this method is that the training time is relatively long, especially when using a combination of CNN and LSTM for online training, which may cause delays in real-time prediction and resource allocation. In addition, this method requires a large amount of computing resources for online training and updating. Furthermore, the complex dependency relationship between microservices is not fully considered, which may result in less-than-expected resource allocation effects when facing complex dependent microservices.
[0005] 202411712535.1 discloses a microservice resource intelligent scheduling strategy based on load prediction. Through the accurate prediction of the load prediction model, resource scheduling can be performed in advance, avoiding the problems of resource shortage and waste in the case of load surge or sudden drop. At the same time, combined with SLO violation prediction, the system can ensure the stable operation of microservices under the quality of service requirements, avoiding the occurrence of SLO violation. The main disadvantage of this method is that the training process may be inefficient, especially in the training process of multi-agent reinforcement learning. As the system size expands, the training time may increase significantly. This method relies on prediction data to adjust resources, but in the case of large load fluctuations or unstable service behavior, the prediction may be inaccurate, affecting the effectiveness of resource allocation.
[0006] 202411937909.X discloses a microservice resource adaptive adjustment method based on super heuristic algorithm. It uses generative adversarial network to enhance data generation, solving the problem of difficult microservice resource-performance data annotation and inconsistent data. Through the combination of self-training and semi-supervised learning, the cost of manual data annotation is reduced, and the precision and adaptability of the model are improved. In addition, the resource adjustment mechanism based on super heuristic algorithm combines low-level heuristic algorithm and ant colony algorithm to effectively adjust resource allocation and ensure the best performance of microservices under dynamic load. The main limitation of this method is the complexity of the model, especially the long training time required by GAN and self-training semi-supervised learning process. This may result in slower system response in the case of large load changes. In addition, when GAN is used for data generation and enhancement, it may introduce data consistency and quality problems, which will affect the accuracy of prediction and adjustment. This method also assumes that QoS requirements can be fully captured through training, but in actual application, load and system behavior may be very unpredictable, which may result in unsatisfactory results.
[0007] In summary, the above prior art has made many explorations in the aspect of intelligence, but it faces great challenges when applied to real-time, dynamic, and high-demand production environments: the above solutions all rely on complex deep learning or machine learning models, which often need a large amount of high-quality labeled data for training in order to achieve ideal prediction or decision accuracy. The training process itself consumes huge computing resources and is time-consuming. The microservice code, architecture, dependency relationships, and underlying hardware in the production environment may change frequently. The model trained by the prior art is highly coupled with a specific environment, and once the environment changes, the model performance will decrease, requiring expensive and time-consuming retraining to adapt again. This is contrary to the concept of agile development and rapid iteration pursued by cloud native. Reliance on prediction is questionable in terms of reliability when the load fluctuates dramatically: the core of most solutions is to "predict the future" (predict future load, predict SLO violation probability). However, in reality, user access behavior, especially sudden traffic pulses, is often highly unpredictable. Over-reliance on prediction accuracy may lead to incorrect resource adjustments due to prediction failure when the load changes suddenly, or a decrease in service quality due to a delayed response. SUMMARY
[0008] The present application aims to address the shortcomings of the above prior art in terms of model complexity, real-time adaptability, and over-reliance on prediction. The present application provides a microservice resource automatic scaling system and method based on multi-dimensional state evaluation, specifically including a lightweight, responsive, and highly adaptive microservice real-time automatic scaling method and system.
[0009] The technical solutions adopted by the present application are as follows: A microservice resource automatic scaling system based on multi-dimensional state evaluation, the system comprising: a data collection module for real-time acquisition of service indicators; a decision engine module receiving service indicators from the data module and generating resource adjustment strategies after multi-dimensional state evaluation of each microservice; a decision execution module receiving resource adjustment strategies from the decision engine module and performing adaptive adjustment of microservice resources.
[0010] Further, the system further comprises: an event detection engine module and a genetic algorithm optimizer for identifying microservice load patterns and dynamically optimizing the weights of the decision engine module through the genetic algorithm optimizer; a dynamic threshold management module for dynamic learning and resetting of thresholds during multi-dimensional state evaluation by the decision engine module.
[0011] The second technical solution adopted by the application is a micro-service resource automatic scaling method based on multi-dimensional state evaluation, which adopts a micro-service resource automatic scaling system based on multi-dimensional state evaluation, and the method is implemented according to the following steps: Obtaining service indicators of the micro-service; Building a multi-dimensional dynamic evaluation model integrating service quality and resource health degree, receiving the service indicators, and adjusting the resources of each micro-service after evaluation by the built multi-dimensional dynamic evaluation model.
[0012] Further, for each micro-service, multi-dimensional state evaluation is performed, to represent the service at time The multi-dimensional state health degree is as follows: (1) In the formula, is the service at time Service quality, is the resource usage of the service s at time t, respectively, the dynamic weights of service quality and resource score, the multi-dimensional state score of the micro-service is obtained by weighted summation of service quality and service resource, and the quantitative evaluation result of the micro-service is obtained.
[0013] Further, the service quality specifically includes delay points and application performance index Apdex, specifically as follows: (2) In the formula, is the delay point, which measures whether the service response time reaches the preset target, specifically as follows: (3) In the formula, is the 95th percentile response time of the service, is the quality target set for the service, and the unit is millisecond; is the Apdex score, as follows: (4) In the formula, is the number of requests completed within the ideal time, is the number of requests that respond slowly but are still within the acceptable range, is the total number of requests.
[0014] Further, is the service sThe resource usage at time t, specifically including the comparison of CPU utilization and CPU throttling with dynamically learned thresholds, to assess system resource pressure, specifically as follows: (5) In the formula, is the observed service CPU utilization, is the observed CPU throttling time, respectively, the dynamic thresholds of CPU utilization and throttling.
[0015] Further, based on the obtained multi-dimensional state evaluation degree Resource adjustment, including CPU quota adjustment, is performed, as follows: (6) In the formula, is the new CPU quota to be applied, is the current CPU quota of the service, is the amplitude factor, specifically as follows: (7) In the adjustment of the amplitude factor, the quality of service, resource utilization and CPU throttling are integrated, to obtain the scaling pressure index, specifically as follows: (8) (9) (10) In the formula, is the service quality pressure, measuring the deviation of the current service delay from the SLO; is the resource pressure, measuring the state of CPU utilization relative to its dynamic safety threshold, while guiding the scaling up and scaling down; is the CPU throttling penalty term, used to deal with the emergency resource depletion, is a set ideal utilization ratio, is a strong emergency intervention term, if the CPU throttling exceeds the dynamically learned safety threshold, the penalty term will be activated, to ensure that the adjustment factor Obtains a large positive gain, so as to force a significant CPU scaling up.
[0016] Further, the safety threshold is dynamically learned and adjusted, specifically including: using opportunistic threshold learning, dynamically learning the safety threshold used in the resource health score, if the service state is good, the system will opportunistically raise the utilization and throttling thresholds to the newly observed maximum value, specifically as follows: (11) If the service is not healthy, the system resets the threshold of the service under the resource quota to a safe default value.
[0017] Further, the event-driven genetic algorithm is adopted to optimize the multi-dimensional state evaluation weight The fitness function of the genetic algorithm is as follows: (12) In the formula, is the service weight of service i, is the current and the calculated multi-dimensional health degree of service i, is the punishment factor of service i, as follows: (13) If a service is a key service, that is, the service weight and the quality of service score is not good , the above formula will punish the score of the service in the fitness function, and the punishment is proportional to , that is, if the weight of the test is higher and causes the user experience of the key service to decrease, then this set of weights will be severely punished in the fitness calculation, thereby reducing the probability of being selected as the optimal solution.
[0018] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present application are: The present application proposes an evaluation model based on multi-dimensional state, which discards heavy machine learning models. The model does not require any offline training and can directly complete accurate evaluation and decision of system state in a high-frequency decision cycle according to the current collected core indicators, thereby avoiding the defects of high training cost and slow response of the prior art. The present application realizes fast response to the real state, rather than relying on uncertain prediction. The system of the present application does not attempt to predict how much the load will be in the next minute, but focuses on making the fastest and most reasonable response to the current system health condition of this second. Through high-frequency early detection and layered decision optimization, it can intervene at the budding stage of performance problems, ensuring system resilience during load fluctuations. By realizing a layered adaptive control, a strategy optimization module based on event-driven and adaptive genetic algorithm is used to intelligently optimize the core decision weight. This makes the system not only have the ability to quickly respond to micro changes, but also has the ability to dynamically find the best balance point between performance and cost according to the macro environment, solves the problem of fixed decision strategy of the prior art, and effectively improves system resilience and resource utilization. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 This is an architecture diagram of a microservice resource auto-scaling system based on multi-dimensional state assessment according to the present invention. Figure 2 This is a diagram of the SockShop microservice architecture in the verification example of this invention; Figure 3 This is a comparison chart of CPU resource consumption under different loads in the verification examples of this invention; Figure 4 This is an experiment demonstrating the dynamic response capability and QoS guarantee in the verification examples of this invention; Figure 5 This is a diagram showing the ablation experiment results of the genetic algorithm in the verification example of this invention; Figure 6 This is a diagram showing the experimental results of dynamic threshold ablation in the verification example of this invention. Detailed Implementation
[0020] The present invention will now be described in detail with reference to the accompanying drawings.
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0022] Example 1 This embodiment proposes a microservice resource autoscaling system based on multi-dimensional state assessment. For example... Figure 1 As shown, the system in this embodiment is a closed-loop intelligent control system. Its core architecture includes a data collector responsible for acquiring service metrics in real time, a decision engine for performing multi-dimensional state evaluation to generate resource adjustment strategies, and a decision executor for executing adjustment decisions. To achieve a high degree of intelligence and adaptability, this core control loop also works in conjunction with three key auxiliary modules: a dynamic threshold management module responsible for dynamic learning and resetting of thresholds, an event detection engine for identifying load patterns (such as sudden changes or stability), and a genetic algorithm optimizer that can dynamically optimize the weights of the decision model.
[0023] This embodiment of the system specifically constructs a multi-dimensional state assessment model. This model abandons the traditional simple rule based on a single resource threshold (e.g., "CPU utilization > 80%)", and instead systematically quantifies and organically combines service quality (QoS) indicators directly related to user experience (such as response latency, error rate, etc.) with resource utilization indicators reflecting internal system pressure. The resource utilization indicators used are CPU utilization and CPU throttling rate. When resources approach a bottleneck, CPU utilization changes gradually. At the same time, the utilization of different microservices at the bottleneck point is also different. Relying on a fixed utilization threshold to judge the bottleneck is unreliable. Unlike CPU utilization, CPU throttling time changes rapidly when reaching the bottleneck resource point, making it a more explicit bottleneck indicator. Through multi-dimensional state assessment, the decision engine can accurately and comprehensively assess the overall health status of microservices, thereby finding the optimal balance between service quality and resource cost in resource adjustment decisions.
[0024] Secondly, the microservice auto-scaling provided in this embodiment involves resources including but not limited to CPU, memory, and network bandwidth. Managing the dynamic scaling of multiple heterogeneous resources (CPU, memory, I / O, etc.) is an extremely complex NP-hard problem. To ensure the practicality, stability, and efficiency of the solution in this embodiment, this embodiment strategically focuses the problem domain on the most critical and most elastic CPU resource in most cloud-native applications. Therefore, this embodiment mainly concerns the intelligent adjustment and allocation of CPU resources. This focused strategy enables this embodiment to provide a stable, efficient, and easy-to-implement solution in complex microservice environments, effectively addressing performance bottlenecks in most scenarios.
[0025] Example 2 This embodiment provides a method for automatic scaling of microservice resources based on multidimensional state assessment. The method specifically includes: Perform multi-dimensional state assessment for each microservice. Serving as representatives At any moment The multidimensional state health status is expressed as follows: (1) In the formula, For service At any moment service quality For service s Resource usage at time t Dynamic weights of service quality and resource score, which are not fixed but optimized by genetic algorithm based on event-driven (load mutation or long-term in the same load interval) to adapt to changing workloads and system states, calculate the multi-dimensional state score of the service by weighted sum of service quality and service resources, which is used to quantify the real-time state of each service.
[0026] In order to avoid the problem of decision strategy solidification and inability to adapt to environmental changes in the prior art under variable load conditions, the embodiment adopts genetic algorithm based on event-driven to optimize the evaluation weight of multi-dimensional state evaluation formula The fitness function of genetic algorithm is as follows, which evaluates the "good or bad" of a given set of weights by calculating the weighted average of all service scores, and imposes a penalty on key services that perform poorly: (12) In the formula, is the business weight of service i, is the current and the calculated multi-dimensional health degree of service i, is the punishment factor of service i, as follows: (13) If a service is a key service, i.e. the business weight and its service quality score is poor , the above formula will punish the score of the service in the fitness function, and the penalty is proportional to , i.e. if the weight of the trial is high and leads to a decrease in user experience of the key service, then this set of weights will be severely punished in the fitness calculation, thereby reducing the probability of being selected as the optimal solution. The embodiment uses the strong global search capability of genetic algorithm to change the weight optimization process from a static, manually set process to a dynamic, target-driven adaptive process. It can continuously optimize and adjust its core evaluation model according to real-time system feedback with business priority, thereby ensuring the long-term effectiveness and intelligence of automatic scaling decisions.
[0027] Traditional automatic scaling algorithms often rely too much on resource indicators such as CPU and memory. The fundamental flaw of this approach is that low resource utilization does not mean good user experience, and high resource utilization does not mean poor user experience. To solve this problem, the design of QoS health degree completely takes the perspective of end users and quantifies user experience through two key dimensions: response speed and satisfaction. is the service at time The service quality score is calculated by multiplying the latency score and the application performance index (Apdex) to comprehensively reflect the end-user's actual experience, as shown in the following formula: (2) In the formula, The latency score measures whether the service response time meets the preset target, as shown in the following formula: (3) In the formula, The 95th percentile response time for the service is a key performance metric that effectively reflects the latency experience for most users. The quality targets set for the service are in milliseconds. The Apdex score is calculated as follows: (4) In the formula, It's the Apdex score, an industry-standard formula used to measure user satisfaction with an application's responsiveness. It converts large amounts of performance measurement data into a simple score between 0 and 1. This refers to the number of requests that are completed within an ideal timeframe, such as the number of requests that are completed within the SLO (Solution Time Limit). For the number of requests that are slow to respond but still within an acceptable range, This represents the total number of requests.
[0028] For service s Resource usage at time t is specifically assessed by comparing CPU utilization and CPU throttling with dynamically learned thresholds to evaluate system resource pressure, as shown in the following formula: (5) In the formula, For the observed service CPU utilization, The observed CPU throttling time is a very critical metric; significant throttling indicates that CPU resources are severely insufficient. These are dynamic thresholds for CPU utilization and throttling, respectively. They are not static, fixed values, but rather derived by an algorithm through learning for a specific service(s) within a specific CPU quota (bucket). The threshold adjustments are as follows: Static thresholds (such as "expand capacity when CPU usage exceeds 80%) are ineffective under varying loads. To achieve adaptive capabilities, this embodiment employs opportunistic threshold learning: this is used in the system's dynamic learning of resource health scoring. The core mechanism of value. If the service is in good condition ( ), the system opportunistically raises the utilization and throttling thresholds to the newly observed maximum, which enables the system to learn the true performance limit of the service under the specific CPU quota. And this value also affects the adjustment of the CPU quota The dynamic learning and adjustment of the safety threshold specifically includes: using opportunistic threshold learning to dynamically learn the safety threshold used in the resource health score, if the service is in good condition, the system opportunistically raises the utilization and throttling thresholds to the newly observed maximum, as follows: (11) If the service is not healthy, the system resets the threshold of the service under the resource quota to a safe default value, which enables the threshold to automatically adapt to a reasonable range under different resource bases, and the decision is more accurate.
[0029] Based on the obtained multi-dimensional state evaluation Resource adjustment, the system uses the following method to adjust the resource and learn from the historical performance of the service, including the adjustment of the CPU quota, as follows: (6) In the formula, is the new CPU quota to be applied, is the current CPU quota of the service, is the amplitude factor, specifically as follows: (7) In calculating the adjustment amplitude factor of the CPU, the embodiment integrates the quality of service, resource utilization and CPU throttling three core dimensions to obtain the scaling pressure index, and the pressure value clearly reflects the degree of urgency of the system due to the decline in service quality or resource shortage and needs to be adjusted, as follows: (8) (9) (10) In the formula, is the service quality pressure, which measures the deviation of the current service delay from the SLO; is the resource pressure, which measures the state of the CPU utilization relative to its dynamic safety threshold, and also guides the scaling up and scaling down; is the CPU throttling penalty term, which is a strong scaling up signal to deal with the emergency resource depletion, is a set ideal utilization ratio, for example 0.6, which means that the CPU utilization is expected to be maintained at about 60% of the dynamic upper limit, As a strong emergency intervention item, if the CPU throttling is detected to exceed the dynamically learned safety threshold, the penalty term is activated to ensure the adjustment factor A sufficient positive gain is obtained to enforce a significant CPU expansion once to quickly relieve the resource exhaustion situation.
[0030] In summary, the two embodiments above, the present application combines real-time decision module and strategy optimization module to achieve intelligent adaptive scaling of microservice resources. Specifically, the real-time decision module works in a high-frequency, minute-level decision cycle. It quickly assesses the current state of the service based on a multi-dimensional state model. This stage takes advantage of its high timeliness and sensitivity to real-time data to quickly make immediate and tactical resource adjustments in response to performance fluctuations such as increased latency or CPU saturation. Its primary goal is to ensure the current service level objective (SLO) and provide a solid foundation for system stability. The strategy optimization module is independently run by event-driven intelligence. In this stage, an adaptive genetic algorithm uses the running data of the online decision module as a reference to optimize a higher-level decision strategy weight that balances the conflicting goals of "high performance (high QoS)" and "low cost (high resource health)" . In this way, the genetic algorithm not only takes advantage of the stable operating environment provided by the real-time decision module for evaluation, but also weighs and optimizes multiple macro goals.
[0031] The advantage of this combination is that it uses the real-time decision module's quick response capability to solve the current performance problem, while the strategy optimization module's deep learning and global search capability further enhances the decision strategy's environmental adaptability and global optimality. Existing methods struggle to balance dynamic environmental changes and resource efficiency. The layered architecture of the present application effectively solves this problem. This method is particularly suitable for complex microservice systems with continuous load fluctuations and dynamic changes in business priorities, and can effectively improve system resilience and resource utilization.
[0032] Verification example The experimental environment is based on a Kubernetes (k8s) cluster deployed on Ubuntu. The cluster consists of one master node (16GB of memory) and two worker nodes (each with 8GB of memory). As shown in Figure 2 , all experiments use the industry-standard microservice benchmark application SockShop for testing and evaluation.
[0033] To verify the effectiveness of the present application in terms of resource efficiency and to clarify its advantages over the prior art, the resource consumption is compared with the theoretical optimal OPTM and the rule-based strategy RULE. The OPTM data is not generated by a real-time running auto-scaling algorithm, but is obtained through offline, large-scale, and manual trial and error experiments; the specific acquisition process is as follows: under a fixed workload, a set of initial resources is configured for the system. The resources of a certain microservice are constantly and slightly reduced (by 0.1 CPU core each time), and it is continuously observed whether the SLO is violated. Repeat this process to explore all possible resource combinations until a point is found: any slight resource reduction of any microservice will immediately cause SLO violation. The resource configuration of this critical point is defined as the "theoretical optimal (OPTM)" solution under this load. The data of the RULE strategy comes from configuring a standard rule-based auto-scaler, the built-in Horizontal Pod Autoscaler (HPA) in Kubernetes, which is configured to trigger scaling actions when the average CPU utilization exceeds a certain preset threshold. This strategy represents the current commonly used commercial solution, which is used as a benchmark to measure the actual improvement of the present application over the existing general technology. Through repeated testing of the three algorithms under different workloads (200-600 RPS), the average CPU allocation when the delay remains stable under different load conditions is collected.
[0034] Based on the consumption of the theoretical optimal strategy (OPTM), the normalized results show that the CPU resource required by the method of the present application is very close to the theoretical optimal value OPTM. Compared with the RULE strategy representing the traditional method, MMASA exhibits significant resource saving advantage under all loads. As the load increases, the resource redundancy of the RULE strategy seems to increase, while MMASA can better control resource consumption, keeping a small and stable gap with the optimal value.
[0035] To verify the dynamic response speed, decision accuracy, and stability of the service quality QoS of the algorithm of the present application when facing workload Workload mutation, this experiment simulates the common traffic pulse or load burst scenario in the production environment. The specific design is as follows: in a long time span, such as 75min as shown in Figure 4 most of the time, the system runs in a relatively stable low load interval. During this period, three short (about 10min) but intense load surges are artificially and periodically introduced, which instantaneously increase the request rate (RPS) to a peak.
[0036] As shown in Figure 4(a) At the moment of every sudden load surge, the CPU resource allocation of the present application can quickly and synchronously follow up, immediately increase the total CPU supply to cope with the pressure, and when the load falls, the CPU resource can be recovered in time to avoid waste of resources. For example Figure 4 (b) The blue dashed line represents the preset service level objective SLO, which is 200 ms. During the entire experiment, although the load fluctuates sharply, the end-to-end response time of the system is successfully maintained below the SLO target line most of the time. During the load peak and after the load falls, although the CPU allocation and response time curve fluctuates, there is no sustained, large-scale, and irregular "oscillation" phenomenon. After a successful response, the system can quickly recover to a stable state that matches the current load. The experiment proves that the automatic scaling method proposed by the present application has excellent dynamic response capability and system resilience. It can quickly and accurately adjust resources in a complex environment with severe load changes to successfully guarantee the stability of service quality.
[0037] Genetic algorithm (GA) module ablation experiment: This experiment compares the complete version of the algorithm containing the GA module with the simplified version of the algorithm without the GA module to verify whether the introduction of the genetic algorithm module can find a more intelligent and efficient resource and performance balance point through dynamic optimization of weights.
[0038] For example Figure 5 (a) shows the normalized CPU consumption of the two versions under different loads (100-300 RPS). It can be clearly seen that under all test loads, the CPU consumption of the complete version (GA) is significantly lower than that of the ablation version (NO-GA). It is proved that the introduction of the GA module saves more CPU resources and improves resource utilization efficiency in the low load interval while meeting the quality of service compared to the fixed weight strategy.
[0039] For example Figure 5 (b) compares the P95 delay standard deviation of the two versions under high load (600-700 RPS). The delay standard deviation is a key indicator of performance volatility, and the smaller the value, the more stable the performance. The results show that the delay standard deviation of the complete version (GA) is much lower than that of the ablation version (NO-GA). It is explained that by dynamically adjusting the decision strategy, the system avoids the decision rigidity and severe performance fluctuations caused by fixed weights in complex working conditions, providing users with a more predictable and reliable service experience.
[0040] For example Figure 5 (c) compares the average P95 delay of the two versions, and the results show that the average delay of the complete version (GA) is slightly lower than or equal to that of the ablation version (NO-GA).
[0041] The ablation experiment this time proves that the genetic algorithm (GA) optimization module makes the automatic scaling system superior to the traditional method using a fixed strategy in terms of resource efficiency, performance stability and overall performance through three-dimensional quantitative comparison.
[0042] Dynamic threshold module ablation experiment: The purpose of this ablation experiment is to verify the superiority of the dynamic threshold learning mechanism based on resource quota in the present invention over the traditional static threshold strategy, especially in terms of system stability and resource efficiency when facing drastic load changes.
[0043] The experiment evaluates the performance of the two versions of algorithms by simulating two typical non-steady-state scenarios: "load sudden drop" (such as Figure 6 a) and "load sudden increase" (such as Figure 6 b). Figure 6 (a) shows the final CPU resource consumption under the load sudden drop scenario. The results show that the CPU total consumption of the version using dynamic threshold is slightly higher than that of the version using static threshold. Figure 6 (b) shows the "normalized SLO violation time" under the load sudden increase scenario (such as from 200RPS to 700RPS). This is a key negative indicator of system stability and user experience. The results show that the SLO violation time of the version using static threshold is several times that of the dynamic threshold version.
[0044] Combining the results of Figure 6 (a) and Figure 6 (b), it is found that the static threshold strategy has lower CPU consumption after load sudden drop, which is due to excessive resource recovery according to the fixed threshold. The dynamic threshold strategy is more conservative, as it maintains resources at a more reasonable and flexible level based on learned knowledge. Although this seems to consume more resources in the short term and static perspective, it is this reasonable resource retention that enables the system to cope with the next load impact, avoiding the large SLO violation shown in Figure 6 (b). The experiment verifies that high CPU utilization under different resource bases has different meanings. When resources approach the bottleneck, CPU utilization changes gradually, and different microservices reach the bottleneck at different utilization rates. Relying on a fixed utilization threshold to determine the bottleneck is unreliable. The dynamic threshold learning mechanism is crucial for ensuring system stability and reliability in real dynamic environments. The dynamic threshold mechanism of the present invention successfully balances resource efficiency and system stability through its intelligent and context-aware learning approach.
[0045] The principles and implementation manners of the present application are described by using specific examples in the present application, and the above examples are only used for helping to understand the method of the present application and its core idea. It should be pointed out that, for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A multi-dimensional state evaluation based microservice resource automatic scaling system, characterized in that, The system comprises: a data collection module for acquiring service indicators in real time; a decision engine module receiving the service indicators in the data collection module, generating resource adjustment strategies after multi-dimensional state evaluation of each microservice; a decision execution module receiving the resource adjustment strategies of the decision engine module, and performing adaptive adjustment on microservice resources. 2.The micro-service resource automatic scaling system based on multi-dimensional state evaluation according to claim 1, wherein, The system further comprises: an event detection engine module and a genetic algorithm optimizer for identifying microservice load patterns and dynamically optimizing the weights of the decision engine module through the genetic algorithm optimizer; a dynamic threshold management module for dynamic learning and resetting of thresholds when the decision engine module performs multi-dimensional state evaluation.
3. A method for automatic scaling of microservice resources based on multi-dimensional state evaluation, the method employing the system for automatic scaling of microservice resources based on multi-dimensional state evaluation according to any one of claims 1-2, characterized in that, The method is implemented according to the following steps: acquiring service indicators of microservices; building a multi-dimensional dynamic evaluation model integrating service quality and resource health, receiving the service indicators, and performing resource adjustment after evaluation of each microservice through the built multi-dimensional dynamic evaluation model.
4. The method of claim 3, wherein, Multi-dimensional state assessment is performed for each microservice, for the representative service at the time of the multi-dimensional state health, as follows: (1) In the formula, is a service At time Quality of service, is a service s Resource usage at time t, respectively, the dynamic weights of quality of service and resource score, by weighted sum of quality of service and service resources, obtain the multi-dimensional state score of micro service, obtain the quantitative evaluation result of micro service.
5. The method of claim 4, wherein, The service quality specifically includes delay and application performance index Apdex, specifically as follows: (2) In the formula, To delay, measure whether the service response time reaches the preset target, as follows: (3) In the formula, 95th percentile response time for the service, Quality target set for the service in milliseconds; For the Apdex score, as follows: (4) wherein is the number of requests completed in an ideal time, is the number of requests that are responded to more slowly but are still within an acceptable range, is the total number of requests.
6. The method of claim 4, wherein, for service s The resource usage at time t, specifically including evaluating system resource pressure by comparing CPU utilization and CPU throttling condition with dynamically learned threshold, specifically as follows: (5) wherein is the observed service CPU utilization, is the observed CPU throttling time, are the dynamic thresholds for CPU utilization and throttling, respectively.
7. The method of claim 6, wherein, based on the obtained multi-dimensional state evaluation degree Resource adjustment is performed, including CPU quota adjustment, as follows: (6) wherein is the new CPU quota to be applied, is the current CPU quota for the service, is the magnitude factor, specifically as follows: (7) In the adjustment amplitude factor process, three core dimensions of service quality, resource utilization and CPU throttling are integrated to obtain scaling pressure indicators, specifically as follows: (8) (9) (10) wherein, is the service quality pressure, measuring the deviation of the current service latency from the SLO; is the resource pressure, measuring the state of CPU utilization relative to its dynamic safety threshold, while guiding scaling up and down; is the CPU throttling penalty term, used to cope with an emergency resource exhaustion, is a set ideal utilization ratio, is a strong emergency intervention term, which will be activated if the CPU throttling exceeds the dynamically learned safety threshold, ensuring the adjustment factor gets a large enough positive gain, thus enforcing a significant CPU scaling up.
8. The method of claim 7, wherein, The security threshold is dynamically learned and adjusted, specifically including: adopting opportunistic threshold learning to dynamically learn the security threshold used in the resource health score, if the service state is good, the system will opportunistically improve the utilization rate and throttling threshold to the maximum value observed, specifically as follows: (11) If the service is not healthy, the system will reset the threshold of the service under the resource quota to a safe default value. 9.The method of claim 4, wherein, Optimizing multi-dimensional state evaluation weights using event-driven genetic algorithm The fitness function of the genetic algorithm is as follows: (12) wherein, the service weight for service i, the current and the calculated multi-dimensional health of service i, the penalty factor for service i, as follows: (13) If a service is a critical service, i.e. the business weight and its quality of service score is not good , the above formula will penalize the score of this service in the fitness function, the penalty being proportional to , i.e. if the weight of the trial is high and leads to a degradation of the user experience of a critical service, this set of weights will be heavily penalized in the fitness calculation, thus reducing the probability of being selected as the optimal solution.
Citation Information
Patent Citations
Micro-service resource allocation method based on combined neural network
CN114968563A
Cited By
Artificial intelligence reasoning service method and system of high-density interconnection structure
CN121387559A
