A microservice dynamic expansion method for burst traffic scenarios
By collecting operating indicators and establishing an expansion decision tree, automatic expansion of the microservice system is realized, which solves the problems of uneven expansion and cost waste in sudden traffic scenarios, and improves response speed and efficiency.
Patent Information
- Application Number
- CN202311729560.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-12-15
AI Technical Summary
Existing technologies are difficult to effectively deal with the expansion problem of microservice systems in burst traffic scenarios, leading to problems such as uneven expansion, waste of costs, and system unavailability.
Adopt the microservice follow-up expansion method for burst traffic scenarios, select the appropriate expansion quantity and path by collecting operating indicators, establish expansion decision trees and follow-up expansion evaluation strategies, use the kmeans algorithm to infer application scenarios, optimize the expansion matrix, and achieve Automated capacity expansion.
It improves the response speed and efficiency of capacity expansion, reduces the uncertainty caused by manual intervention, avoids waste of resources, and ensures rapid response and cost optimization of the system in sudden hot spots.
Smart Images

Figure CN117896313B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of microservice system adaptation and cost optimization, and in particular relates to a microservice dynamic expansion method for burst traffic scenarios. Background Art
[0002] The existing common expansion and contraction solutions are mainly suitable for daily moderately changing traffic. For burst traffic, which is several times or even dozens of times the traffic in a short period of time, it is difficult to cope with the daily average to the upper limit of the standing capacity in minutes. In particular, the request volume at the beginning and end of the star broadcast can be several times or even dozens of times higher than usual. If you don't prepare in advance, it is difficult to control the timeliness, efficiency and cost of expansion for traditional expansion methods. In addition, under burst traffic, the path of hot traffic may only pass through a few nodes. If the cluster is expanded according to the template as a whole, it will be a waste of cost. For a cluster of thousands of machines, it may be necessary to expand thousands more. The most dangerous situation is that a service area may exceed the upper limit provided by the cloud service provider. In addition, the expansion time will be longer due to the large expansion of servers. If the expansion is carried out according to some conventional expansion capabilities deployed by the platform, it is easy to expand unevenly. After the gateway is expanded, the access layer service is paralyzed again. After the access layer service is expanded, the microservices of the outer layer of the business layer are paralyzed again. The above situations will cause the system to be unavailable for a relatively long time.
[0003] In addition, the expansion and contraction of existing complex systems for sudden traffic basically relies on manual intervention and advance capacity estimation to leave enough redundancy. Because it is impossible to accurately predict which specific path the traffic peak will pass through, resources are relatively wasted. For example, the nearly 100 microservices of the live broadcast system need to be expanded from a thousand standing machines to nearly 10,000. When there are more such activities, labor costs will surge. When certain unplanned hot events occur, the system business is prone to paralysis or even collapse of individual functional modules because it does not have sufficient standing redundancy and follow-up expansion capabilities. Summary of the invention
[0004] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a microservice dynamic expansion method for burst traffic scenarios.
[0005] The present invention provides a microservice dynamic expansion method for burst traffic scenarios, comprising:
[0006] S1: collecting operating indicators of multiple applications in the system and preprocessing the operating indicators, and taking the preprocessed operating indicators, the increments of the operating indicators, and the increment speed of the operating indicators as input vectors;
[0007] S2: Based on the input vector, a control strategy set including a capacity expansion decision tree, a capacity expansion template, and a follow-up capacity expansion evaluation strategy is established;
[0008] S3: Select the control strategy set through the expansion plan selection strategy to obtain the expansion quantity;
[0009] S4: generating an expansion matrix according to the expansion quantity, and selecting a hotspot path according to the node data in the expansion matrix;
[0010] S5: inferring the current application scenario of the system through the kmeans algorithm, and modifying the expansion matrix according to the application scenario to obtain an optimized expansion matrix;
[0011] S6: Expand the system according to the hotspot path and the optimized expansion matrix.
[0012] Furthermore, the operating indicators in step S1 include:
[0013] System-level indicators, including CPU indicators, memory indicators, IO indicators and bandwidth indicators;
[0014] Application-level indicators, including QPS indicators and delay indicators.
[0015] Furthermore, the expression of the input vector in step S1 is:
[0016] x = (α, β, γ);
[0017] α=(cpu, memory, io, bandwidth, qps, latency);
[0018] β = Δα;
[0019] γ = Δβ;
[0020] Among them, x is the input vector, α is the running indicator, β is the increment of the running indicator, γ is the increment speed of the running indicator, cpu is the CPU indicator, memory is the memory indicator, io is the IO indicator, bandwidth is the bandwidth indicator, qps is the QPS indicator, and latency is the delay indicator.
[0021] Furthermore, the input vector in step S1 is used to represent the incremental speed and incremental acceleration of the operating index.
[0022] Furthermore, in step S1, the preprocessing of the operation index is to perform fitting filtering of the operation index in the time domain based on the local polynomial least squares method through the SG smoothing algorithm.
[0023] Furthermore, the expression of the dynamic expansion evaluation strategy in step S2 is:
[0024] Δφ(k)=Kp Δe(k)+K i e(k)+K d [Δe(k)-Δe(k-1)];
[0025] Among them, Δφ(k) is the obtained dynamic expansion evaluation strategy, K p is the debugging parameter corresponding to the proportional unit in the controller, K i is the debugging parameter corresponding to the integral unit in the controller, K d is the debugging parameter corresponding to the differential unit in the controller, e(k) is the difference between the flow input and output monitored by the controller at time k, Δe(k) is the change in the difference between the flow input and output monitored by the controller at time k, and Δe(k-1) is the change in the difference between the flow input and output monitored by the controller at time k-1.
[0026] Furthermore, the expression of the expansion quantity in step S3 is:
[0027] σ=H(Ω1,Ω2,Ω3);
[0028] Among them, σ is the number of expansions obtained, H is the expansion plan selection strategy, Ω1 is the number of expansions corresponding to the expansion template, Ω2 is the number of expansions corresponding to the expansion decision tree, and Ω3 is the number of expansions corresponding to the follow-up expansion evaluation strategy.
[0029] Furthermore, the rule dimensions of the expansion solution selection strategy in step S3 include:
[0030] Expansion constraints;
[0031] According to the scenario configuration of the system operation, the flow situation monitored by the system operation is divided into multiple operation intervals by presetting the division boundary through the input vector, and the control strategy set is selected according to the operation intervals;
[0032] The redundant computing power of the next expansion cycle is calculated according to the input vector, and the control strategy set is selected according to the redundant computing power.
[0033] Furthermore, the capacity expansion constraints include cost constraints and capacity expansion upper limit constraints.
[0034] Furthermore, the operating range includes normal traffic, daily peak period, sudden hot spot traffic and capacity peak warning.
[0035] The beneficial effects of the present invention are as follows:
[0036] The present invention provides a microservice follow-up expansion method for burst traffic scenarios, analyzes the speed of microservice groups and user influx, and the accuracy of expansion and contraction, and automatically expands and contracts according to the prediction results of burst traffic. On the basis of traditional monitoring thresholds, the present invention introduces indicators such as traffic growth rate and traffic acceleration, combines automatic control algorithms, and ensures the expansion speed of the system through a certain overshoot design, and ensures that the cost can quickly converge to the optimal number through a steady-state integral link, thereby achieving a balance between experience and cost. The present invention models traffic and capacity, and improves the system's expansion response capability through follow-up tracking. While avoiding the uncertainty caused by manual intervention and the accuracy of expansion, it also solves the efficiency problem of expansion, and can respond to sudden hotspots in a timely and rapid manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0038] Figure 1 A flow chart of a method for dynamic expansion of microservices for burst traffic scenarios provided by an embodiment of the present invention;
[0039] Figure 2 It is a schematic diagram of a stress test of a capacity expansion decision tree in a microservice dynamic capacity expansion method for a burst traffic scenario provided by an embodiment of the present invention;
[0040] Figure 3 It is a schematic diagram of the macro-level principle of a microservice dynamic expansion method for burst traffic scenarios provided by an embodiment of the present invention;
[0041] Figure 4 It is a schematic diagram of the micro-level principle of a microservice dynamic expansion method for burst traffic scenarios provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0043] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0044] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0046] In order to better understand the present invention, the terms appearing in the present invention are explained below.
[0047] Follow-up control: A professional term in the field of automated control, which makes the controlled quantity change according to the same rules and keep the error with the input signal within the specified range.
[0048] PID (Proportional-Integral-Derivative Control) control: The control deviation is formed according to the given value and the actual output value, and the deviation is linearly combined into a control quantity according to the proportion, integration and differentiation to control the controlled object.
[0049] Combine the following Figure 1 Embodiments of the present invention are described.
[0050] The present invention provides a microservice dynamic expansion method for burst traffic scenarios, comprising:
[0051] S1: collecting operating indicators of multiple applications in the system and preprocessing the operating indicators, and taking the preprocessed operating indicators, the increments of the operating indicators, and the increment speed of the operating indicators as input vectors;
[0052] Furthermore, this stage is mainly divided into two parts, sampling and filtering part and feature vector extraction part.
[0053] The sampling and filtering stage mainly covers system-level and application-level indicators, system-level indicators such as CPU, memory, IO, bandwidth, application-level indicators such as QPS and latency, and preprocessing of these indicators to reduce the impact of noise on system decisions.
[0054] The operating indicators in step S1 include:
[0055] System-level indicators, including CPU indicators, memory indicators, IO indicators and bandwidth indicators;
[0056] Application-level indicators, including QPS indicators and delay indicators.
[0057] The expression of the input vector in step S1 is:
[0058] x = (α, β, γ);
[0059] α=(cpu, memory, io, bandwidth, qps, latency);
[0060] β = Δα;
[0061] γ = Δβ;
[0062] Among them, x is the input vector, α is the running indicator, β is the increment of the running indicator, γ is the increment speed of the running indicator, cpu is the CPU indicator, memory is the memory indicator, io is the IO indicator, bandwidth is the bandwidth indicator, qps is the QPS indicator, and latency is the delay indicator.
[0063] The input vector in step S1 is used to represent the incremental speed and incremental acceleration of the operating index.
[0064] Furthermore, based on the preprocessing, the feature vector selects basic input features (CPU, memory, IO, bandwidth, QPS, latency) and the corresponding changes to characterize the speed and acceleration of the changes.
[0065] Among them, in step S1, the preprocessing of the operating index is to use the SG smoothing algorithm to perform fitting filtering on the operating index in the time domain based on the local polynomial least squares method.
[0066] Furthermore, the preprocessing mainly adopts the SG smoothing algorithm (Savitzky-Golay), a filtering method based on local polynomial least squares fitting in the time domain, which can ensure that the shape and width of the signal remain unchanged while filtering out noise. After filtering by this method, the influence of system noise and occasional disturbances on subsequent decisions can be effectively eliminated.
[0067] S2: Based on the input vector, a control strategy set including a capacity expansion decision tree, a capacity expansion template, and a follow-up capacity expansion evaluation strategy is established;
[0068] Furthermore, this stage is the core of the expansion of a single application, which mainly includes the following parts: expansion decision tree, expansion template and follow-up expansion evaluation module. The three solutions are evaluated through calculation, and then the optimal solution is selected for execution.
[0069] The expansion template mainly solves the problem of standing redundant water level and is a system-level indicator that applications follow, such as the 5wQps and 20wQps expansion templates.
[0070] The expansion decision tree is mainly for the key node indicator settings of a single application input vector. It may distinguish dozens or even hundreds of configurations and describe the expansion strategies and quantities within different input vector ranges. The decision tree can be set based on the system's historical experience and stress test verification.
[0071] The expression of the dynamic expansion evaluation strategy in step S2 is:
[0072] Δφ(k)=K p Δe(k)+K i e(k)+K d [Δe(k)-Δe(k-1)];
[0073] Among them, Δφ(k) is the obtained dynamic expansion evaluation strategy, K p is the debugging parameter corresponding to the proportional unit in the controller, K i is the debugging parameter corresponding to the integral unit in the controller, K d is the debugging parameter corresponding to the differential unit in the controller, e(k) is the difference between the flow input and output monitored by the controller at time k, Δe(k) is the change in the difference between the flow input and output monitored by the controller at time k, and Δe(k-1) is the change in the difference between the flow input and output monitored by the controller at time k-1.
[0074] The dynamic expansion evaluation strategy is mainly to establish a control model and find the relationship between input and output through mathematical modeling. The model is mainly good at tracking rapidly changing flow, responding promptly, and can converge well when the system flow tends to a steady state, so as to achieve a better balance between cost and capacity. Here, the classic PID control method is mainly used. The controller includes a proportional unit K p , integration unit K i , differential unit K d Corresponding to the three debugging parameters, the integral characteristic introduced by dynamic expansion mainly solves the convergence problem in steady state, and the differential solves the tracking speed problem.
[0075] S3: Select the control strategy set through the expansion plan selection strategy to obtain the expansion quantity;
[0076] The expression of the expansion quantity in step S3 is:
[0077] σ=H(Ω1,Ω2,Ω3);
[0078] Among them, σ is the number of expansions obtained, H is the expansion plan selection strategy, Ω1 is the number of expansions corresponding to the expansion template, Ω2 is the number of expansions corresponding to the expansion decision tree, and Ω3 is the number of expansions corresponding to the follow-up expansion evaluation strategy.
[0079] The rule dimensions of the expansion solution selection strategy in step S3 include:
[0080] Expansion constraints;
[0081] According to the scenario configuration of the system operation, the flow situation monitored by the system operation is divided into multiple operation intervals by presetting the division boundary through the input vector, and the control strategy set is selected according to the operation intervals;
[0082] The redundant computing power of the next expansion cycle is calculated according to the input vector, and the control strategy set is selected according to the redundant computing power.
[0083] The capacity expansion constraints include cost constraints and capacity expansion upper limit constraints.
[0084] Among them, the operating range includes normal traffic, daily peak period, sudden hot spot traffic and capacity peak warning.
[0085] Furthermore, the strategy selection is mainly based on the rule configuration, and the rules are mainly based on the following three dimensions:
[0086] 1) Using incremental speed and acceleration as demarcations, the system can be divided into four zones: normal traffic, daily peak, sudden hotspot traffic, and capacity peak warning according to the actual system scenario configuration;
[0087] 2) Use the incremental speed and acceleration to predict whether the application has sufficient redundancy level in the next expansion cycle;
[0088] 3) Expansion constraints: cost constraints and expansion limit constraints, such as the inability to expand capacity without limit due to resource limitations.
[0089] S4: generating an expansion matrix according to the expansion quantity, and selecting a hotspot path according to the node data in the expansion matrix;
[0090] Furthermore, this stage mainly generates the expansion matrix based on the expansion data feedback of the single application itself. First, the input vector coefficient matrix of the single application is obtained, and then the overall expansion sparse matrix of the system is generated through the expansion quantity.
[0091] S5: inferring the current application scenario of the system through the kmeans algorithm, and modifying the expansion matrix according to the application scenario to obtain an optimized expansion matrix;
[0092] Furthermore, this stage mainly makes inferences based on the distribution of relevant nodes in the expansion matrix, and in some embodiments, inferences are made based on some fixed scenario rules preset in advance.
[0093] After inferring the specific scenario through the kmeans algorithm, the expansion strategy will be supplemented and revised according to the scenario to prevent inaccurate expansion caused by the failure to pass on the circuit-breaker traffic of some applications.
[0094] For example, suppose the maximum expansion speed of the cloud service provider is M, and the average expansion completion time is T. For example, if 1,000 units are expanded every 5 minutes, it will take 10 minutes to expand 2,000 units. When the actual number of expansions exceeds the expansion limit, it will be corrected to expand according to the maximum limit. The expansion resources are preferentially allocated to the core services of the critical path, and other non-core paths will trigger degradation.
[0095] S6: Expand the system according to the hotspot path and the optimized expansion matrix.
[0096] The following describes the dynamic capacity expansion method for burst traffic scenarios in other embodiments.
[0097] First, complex system application sparse matrix orchestration arranges the applications of existing complex systems according to the actual call link relationship to form a sparse matrix. The left side of the matrix is the traffic entrance, and most of the right side of the matrix is the traffic terminal. The elements in the matrix correspond to a single application or an empty element. This part can be generated by the code through the actual traffic analysis business of the monitoring system, and then manually fine-tuned. This part can be set to update the orchestration in a similar way to crontab timed tasks or triggers.
[0098] Secondly, the input feature vector extraction is combined with the existing monitoring system to collect and process various data of the entry gateway, not limited to nginx, zuul, Nagios, Zabbix or other similar infrastructures and monitoring data of various applications, and generate input feature vectors at the macro level and application level according to the input vector definition given in the patent.
[0099] Secondly, conduct a single application evaluation. This step is the micro-evaluation link in the solution. Each non-empty element in the matrix needs to consider the actual expansion quantity at the micro level.
[0100] Among them, the expansion template mainly specifies several levels of capacity water levels according to the actual business situation, so that the overall expansion and contraction can be done with one click in some common scenarios. The biggest advantage is that it is fast and has sufficient capacity. The disadvantage is static evaluation, which may cause some applications to have large traffic redundancy and other applications to be overloaded. Generally speaking, the technical team and the business classify the scenarios and traffic together and then specify them; for example, the standing redundant template matrix (5wQps), where the number in the matrix represents the number of machines in each cluster in the current scenario. Because of the differences in the call link and the node fan-in and fan-out system and the nonlinearity of the node's own capacity, the expansion quantity is also nonlinear.
[0101] Among them, the machine learning technology of expanding the capacity decision tree to generate a decision tree from data is called decision tree learning. In this embodiment, the decision tree is mainly generated through actual online data and cluster stress test data.
[0102] like Figure 2 As shown, this embodiment adopts a step-type stress test, in which the horizontal axis represents the test time, T is the unit time in the test stage, A represents the normal pressure stage, B and C represent the stages after the step-by-step pressure test, and there are several points to note during the stress test: It is recommended to use a step-type gradual pressure signal and a step-like signal to fully reproduce the hot spot traffic and obtain the characteristic response curves of the single application and the cluster.
[0103] Among them, the control model part mainly builds the model based on the PID control algorithm and uses the discrete PID controller for capacity expansion. This part also involves PID tuning.
[0104] Among them, the fusion selection strategy selection strategy is mainly based on the rule configuration, and is configured according to the actual situation of the business type.
[0105] Secondly, the hotspot path inference, capacity correction and expansion modules use the kmeans algorithm to infer specific scenarios and then re-supplement and correct the expansion strategy based on the scenarios to prevent inaccurate expansion caused by the failure of some application circuit-breaker traffic to be passed on.
[0106] Finally, capacity expansion is performed based on the results obtained in the above steps.
[0107] In order to improve the system response speed, the present invention divides the system into two granularities, macro and micro, for expansion. Figure 3 As shown in Figure 1, the macro process is used for hot spot inference and overall capacity expansion decision-making, specifically: inlet traffic feature extraction, capacity expansion evaluation and quantity generation for each application in the application matrix, hot spot path inference and capacity correction, and capacity expansion; Figure 4 As shown, the steps of capacity expansion within a single application include application traffic feature extraction, capacity expansion quantity evaluation, capacity expansion, and feedback correction.
[0108] The present invention provides a method for dynamically expanding microservices for burst traffic scenarios, which has the following advantages:
[0109] It can simplify the complexity of scaling large-scale microservice clusters and convert the scaling of hundreds or even thousands of microservices into matrix space problem solving, including hot link analysis and compensation.
[0110] It is more suitable for burst traffic expansion. The traffic-related feature vectors cover the values, change speeds and accelerations of system-level and application-level parameters. The decision model is both macro and micro. At the macro level, it calculates the expansion quantity, determines hot links and even corrects and prunes them in the matrix space. At the micro level, it takes into account four intervals: normal traffic, daily peak hours, burst hot traffic and capacity peak warning. It integrates the decision-making technologies based on three methods: conventional templates, decision trees and automatic control. It takes into account both overall constraints and individual constraints, and better balances cost, efficiency and quality.
[0111] In a large-scale microservice cluster, this patented matrix management solution can expand and simplify the management work such as downgrade, current limiting and fuse breaking. In the burst traffic scenario, the capacity problem is converted into a matrix method to handle it, providing an effective means of convergence complexity for larger-scale service support;
[0112] Capacity management in burst traffic scenarios is more standardized. Through non-intrusive bypass underlying monitoring data docking, it can be sunk and built into a universal underlying solution for hot spot traffic type systems. It can even be used as an independent product feature of cloud providers to enhance competitiveness in hot spot traffic scenarios.
[0113] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A microservice dynamic expansion method for burst traffic scenarios. It is characterized in that include: S1: collecting operating indicators of multiple applications in the system and preprocessing the operating indicators, and taking the preprocessed operating indicators, the increments of the operating indicators, and the increment speed of the operating indicators as input vectors; S2: Based on the input vector, a control strategy set including a capacity expansion decision tree, a capacity expansion template, and a follow-up capacity expansion evaluation strategy is established; S3: Select the control strategy set through the expansion plan selection strategy to obtain the expansion quantity; S4: generating an expansion matrix according to the expansion quantity, and selecting a hotspot path according to the node data in the expansion matrix; S5: inferring the current application scenario of the system through the kmeans algorithm, and modifying the expansion matrix according to the application scenario to obtain an optimized expansion matrix; S6: Expand the system according to the hotspot path and the optimized expansion matrix.
2. According to claim 1, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that The operating indicators in step S1 include: System-level indicators, including CPU indicators, memory indicators, IO indicators and bandwidth indicators; Application-level indicators, including QPS indicators and delay indicators.
3. According to claim 2, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that The expression of the input vector in step S1 is: x=(α,β,γ); α=(cpu,memory,io,bandwidth,qps,latency); β = Δα; γ = Δβ; Among them, x is the input vector, α is the running indicator, β is the increment of the running indicator, γ is the increment speed of the running indicator, cpu is the CPU indicator, memory is the memory indicator, io is the IO indicator, bandwidth is the bandwidth indicator, qps is the QPS indicator, and latency is the delay indicator.
4. According to claim 1, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that In step S1, the preprocessing of the operation index is to perform fitting filtering on the operation index in the time domain based on the local polynomial least squares method through the SG smoothing algorithm.
5. According to claim 1, a method for dynamic expansion of microservices for burst traffic scenarios, It is characterized in that The expression of the dynamic expansion evaluation strategy in step S2 is: Δφ(k)=K p Δe(k)+K i e(k)+K d [Δe(k)-Δe(k-1)]; Among them, Δφ(k) is the obtained dynamic expansion evaluation strategy, K p is the debugging parameter corresponding to the proportional unit in the controller, K i is the debugging parameter corresponding to the integral unit in the controller, K d is the debugging parameter corresponding to the differential unit in the controller, e(k) is the difference between the flow input and output monitored by the controller at time k, Δe(k) is the change in the difference between the flow input and output monitored by the controller at time k, and Δe(k-1) is the change in the difference between the flow input and output monitored by the controller at time k-1.
6. According to claim 1, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that The expression of the expansion quantity in step S3 is: σ=H(Ω 1 ,Oh 2 ,Oh 3 ); Among them, σ is the number of expansions obtained, H is the expansion plan selection strategy, Ω 1 is the expansion quantity corresponding to the expansion template, Ω 2 is the expansion quantity corresponding to the expansion decision tree, Ω 3 The expansion quantity corresponding to the dynamic expansion evaluation strategy.
7. According to claim 1, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that The rule dimensions of the expansion solution selection strategy in step S3 include: Expansion constraints; According to the scenario configuration of the system operation, the flow situation monitored by the system operation is divided into multiple operation intervals by presetting the division boundary through the input vector, and the control strategy set is selected according to the operation intervals; The redundant computing power of the next expansion cycle is calculated according to the input vector, and the control strategy set is selected according to the redundant computing power.
8. According to claim 7, a method for dynamically expanding microservice capacity in a burst traffic scenario, It is characterized in that The capacity expansion constraints include cost constraints and capacity expansion upper limit constraints.
9. According to claim 7, a method for dynamically expanding microservice capacity for burst traffic scenarios, It is characterized in that The operating range includes normal traffic, daily peak period, sudden hot spot traffic and capacity peak warning.
