Dynamic scaling method and device within an elastic scaling group

By combining a multi-order smoothing exponential algorithm with a delay coefficient, the problem of frequent scaling caused by sudden load changes within the elastic scaling group is resolved, achieving more stable scaling processing and saving system resources.

CN114090229BActive Publication Date: 2025-09-19NEW H3C SECURITY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111171814.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-08
Publication Date
2025-09-19
Estimated Expiration
2041-10-08

AI Technical Summary

Technical Problem

In the prior art, the virtual main control board in the elastic scaling group frequently expands and contracts when the load index suddenly changes, resulting in resource waste and system resource occupation.

Method used

A multi-order smoothing exponential algorithm is used to generate predicted load information. By comparing the actual load change trend with the predicted load change trend, it is determined whether to perform capacity expansion or contraction. The capacity expansion or contraction processing is delayed by combining the delay coefficient and the load threshold value.

Benefits of technology

It improves the stability of expansion and contraction, avoids frequent expansion and contraction caused by sudden load changes, and saves system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090229B_ABST
    Figure CN114090229B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for dynamic expansion and contraction within an elastic scaling group, the method comprising: collecting real-time load information of each virtual service board and determining a multi-order smoothing index corresponding to the real-time load information; generating predicted load information corresponding to the real-time load information based on the multi-order smoothing index; identifying the current actual load change trend within the elastic scaling group and determining a predicted load change trend based on the predicted load information; comparing the actual load change trend with the predicted load change trend, and judging whether to expand or contract the virtual service board within the elastic scaling group based on the comparison result. The technical solution provided by the present invention can improve the stability of expansion and contraction, thereby saving system resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for dynamic scaling within an elastic scaling group. Background Art

[0002] The forwarding and control separation system based on VBRAS (Virtual Broadband Remote Access Server) completely decouples the forwarding plane from the control plane, solving problems existing in traditional BRAS (Broadband Remote Access Server) such as mismatched control and forwarding plane capabilities, inability to share resources, and delayed deployment of new services.

[0003] See also Figure 1 The VBRAS's virtual user plane (VUP) can include virtual control boards (VCPUs) and virtual service boards (VSPs). Generally, a VCPU and one or more VSPs form an elastic scaling group. The VCPU can dynamically scale the VSPs within the elastic scaling group based on the VSPs' load metrics, providing more stable services.

[0004] In existing technologies, the virtual main control board within an elastic scaling group collects the load metrics of the virtual service boards and determines a load reference value for the elastic scaling group by averaging or taking the maximum value. The virtual service boards can then be scaled up or down based on this load reference value. However, this scaling method is likely to cause frequent scaling in response to a sudden change in the load metric, resulting in wasted virtual service board resources. Frequent scaling also consumes limited system resources. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method and apparatus for dynamic scaling within an elastic scaling group, which can improve the stability of scaling and reducing capacity, thereby saving system resource consumption.

[0006] On the one hand, the present invention provides a dynamic scaling method within an elastic scaling group, which is applied to a virtual main control board within the elastic scaling group, and the elastic scaling group also includes one or more virtual business boards; the method includes: collecting real-time load information of each of the virtual business boards, and determining a multi-order smoothing index corresponding to the real-time load information; generating predicted load information corresponding to the real-time load information based on the multi-order smoothing index; identifying the current actual load change trend within the elastic scaling group, and determining a predicted load change trend based on the predicted load information; comparing the actual load change trend with the predicted load change trend, and judging whether to scale the virtual business board within the elastic scaling group based on the comparison result.

[0007] In one embodiment, determining the multi-order smoothing index corresponding to the real-time load information includes:

[0008] Calculate the load average value of the real-time load information of each virtual service board, and generate a multi-order smoothing index corresponding to the load average value in the following manner:

[0009] S t (1) = a*X t +(1-a)S t-1 (1)

[0010] S t (2) = a*S t (1)+(1-a)S t-1 (2)

[0011] Among them, the subscript t-1 represents the previous moment of time t, a represents the preset smoothing coefficient, and X t represents the load average value, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t.

[0012] In one embodiment, the multi-order smoothing index includes a first-order smoothing index and a second-order smoothing index; generating the predicted load information corresponding to the real-time load information according to the multi-order smoothing index includes: generating a first predicted value A according to the first-order smoothing index and the second-order smoothing index in the following manner: t :

[0013] A t =2*S t (1)-S t (2)

[0014] According to the first-order smoothing index, the second-order smoothing index and the preset smoothing coefficient, the second prediction value B is generated in the following manner: t :

[0015] B t =(a / (1-a))(S t (1)-S t (2)

[0016] Among them, a represents the preset smoothing coefficient, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t;

[0017] The sum of the first predicted value and the second predicted value is used as the predicted load information corresponding to the real-time load information.

[0018] In one embodiment, determining whether to scale the virtual business board in the elastic scaling group based on the comparison result includes: if the comparison result indicates that the predicted load change trend is consistent with the actual load change trend, determining to scale the virtual business board in the elastic scaling group at the current moment; if the comparison result indicates that the predicted load change trend is inconsistent with the actual load change trend, determining not to scale the virtual business board in the elastic scaling group at the current moment.

[0019] In one embodiment, judging whether to scale the virtual business board in the elastic scaling group based on the comparison result includes: if the actual load change trend indicates an increase in load, and the predicted load change trend indicates a decrease in load, determining not to scale the virtual business board in the elastic scaling group at the current moment; if the actual load change trend indicates an increase in load, and the predicted load change trend also indicates an increase in load, determining to scale the virtual business board in the elastic scaling group at the current moment; if the actual load change trend indicates a decrease in load, and the predicted load change trend indicates an increase in load, determining not to scale the virtual business board in the elastic scaling group at the current moment; if the actual load change trend indicates a decrease in load, and the predicted load change trend also indicates a decrease in load, determining to scale the virtual business board in the elastic scaling group at the current moment.

[0020] On the other hand, the present invention also provides a dynamic scaling method within an elastic scaling group, which is applied to a virtual main control board within the elastic scaling group, and the elastic scaling group also includes one or more virtual business boards; the method includes: collecting real-time load information of each of the virtual business boards, and determining a multi-order smoothing index corresponding to the real-time load information; generating predicted load information corresponding to the real-time load information based on the multi-order smoothing index; comparing the predicted load information with a load threshold value, and updating a delay coefficient based on the comparison result; and judging whether to scale the virtual business board within the elastic scaling group based on the delay coefficient.

[0021] In one embodiment, the load threshold value includes a load upper limit value and a load lower limit value, and the delay coefficient includes an expansion delay coefficient and a contraction delay coefficient; updating the delay coefficient according to the comparison result specifically includes: if the predicted load information is greater than the load upper limit value, clearing the contraction delay coefficient and adding 1 to the expansion delay coefficient; if the predicted load information is less than the load lower limit value, clearing the expansion delay coefficient and adding 1 to the contraction delay coefficient; if the predicted load information is greater than or equal to the load lower limit value and less than or equal to the load upper limit value, clearing both the expansion delay coefficient and the contraction delay coefficient.

[0022] In one embodiment, the delay coefficient is used to determine whether to scale the virtual business board in the elastic scaling group, specifically including: if the value of the expansion delay coefficient reaches a specified expansion threshold, the virtual business board in the elastic scaling group is expanded at the current moment, and the expansion delay coefficient is cleared to zero; if the value of the shrinkage delay coefficient reaches a specified shrinkage threshold, the virtual business board in the elastic scaling group is shrunk at the current moment, and the shrinkage delay coefficient is cleared to zero.

[0023] In one embodiment, the method also includes: if the virtual business board in the elastic scaling group is expanded continuously for a specified number of times, doubling the specified expansion threshold to extend the expansion period; if the virtual business board in the elastic scaling group is shrunk continuously for a specified number of times, doubling the specified shrinkage threshold to extend the shrinkage period.

[0024] On the other hand, the present invention also provides a dynamic scaling device within an elastic scaling group, the device comprising: an index determination unit, used to collect real-time load information of each virtual business board, and determine a multi-order smoothing index corresponding to the real-time load information; a prediction unit, used to generate predicted load information corresponding to the real-time load information based on the multi-order smoothing index; a change trend determination unit, used to identify the current actual load change trend within the elastic scaling group, and determine the predicted load change trend based on the predicted load information; a judgment unit, used to compare the actual load change trend with the predicted load change trend, and judge whether to scale the virtual business board within the elastic scaling group based on the comparison result.

[0025] In one embodiment, the index determination unit includes:

[0026] The calculation module is configured to calculate the load average value of the real-time load information of each virtual service board and generate a multi-order smoothing index corresponding to the load average value in the following manner:

[0027] S t (1) = a*X t +(1-a)S t-1 (1)

[0028] S t (2) = a*S t (1)+(1-a)S t-1 (2)

[0029] Among them, the subscript t-1 represents the previous moment of time t, a represents the preset smoothing coefficient, and X t represents the load average value, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t.

[0030] In one embodiment, the multi-order smoothing index includes a first-order smoothing index and a second-order smoothing index; the prediction unit includes: a first prediction value calculation module for generating a first prediction value A according to the first-order smoothing index and the second-order smoothing index in the following manner: t :

[0031] A t =2*S t (1)-S t (2)

[0032] The second prediction value calculation module is used to generate the second prediction value B according to the first-order smoothing index, the second-order smoothing index and the preset smoothing coefficient in the following manner: t :

[0033] B t =(a / (1-a))(S t (1)-S t (2)

[0034] Among them, a represents the preset smoothing coefficient, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t;

[0035] The predicted load information determination module is configured to use the sum of the first predicted value and the second predicted value as the predicted load information corresponding to the real-time load information.

[0036] In one embodiment, the judgment unit includes: a first judgment module, used to determine whether to scale the virtual business board in the elastic scaling group at the current moment if the comparison result indicates that the predicted load change trend is consistent with the actual load change trend; a second judgment module, used to determine whether to scale the virtual business board in the elastic scaling group at the current moment if the comparison result indicates that the predicted load change trend is inconsistent with the actual load change trend.

[0037] In one embodiment, the judgment unit includes: a first expansion judgment module, which is used to determine that the virtual business board in the elastic scaling group should not be expanded at the current moment if the actual load change trend indicates an increase in load, while the predicted load change trend indicates a decrease in load; a second expansion judgment module, which is used to determine that the virtual business board in the elastic scaling group should be expanded at the current moment if the actual load change trend indicates an increase in load, and the predicted load change trend also indicates an increase in load; a first reduction judgment module, which is used to determine that the virtual business board in the elastic scaling group should not be reduced at the current moment if the actual load change trend indicates a decrease in load, while the predicted load change trend indicates an increase in load; and a second reduction judgment module, which is used to determine that the virtual business board in the elastic scaling group should be reduced at the current moment if the actual load change trend indicates a decrease in load, and the predicted load change trend also indicates a decrease in load.

[0038] On the other hand, the present invention also provides a dynamic scaling device within an elastic scaling group, the device comprising: an index determination unit, used to collect real-time load information of each virtual business board, and determine a multi-order smoothing index corresponding to the real-time load information; a prediction unit, used to generate predicted load information corresponding to the real-time load information based on the multi-order smoothing index; a coefficient updating unit, used to compare the predicted load information with the load threshold value, and update the delay coefficient according to the comparison result, so as to determine whether to scale the virtual business board in the elastic scaling group through the delay coefficient.

[0039] In one embodiment, the load threshold value includes a load upper limit value and a load lower limit value, and the delay coefficient includes an expansion delay coefficient and a contraction delay coefficient; the coefficient updating unit includes: a first adding module, used to clear the contraction delay coefficient to zero and add 1 to the expansion delay coefficient if the predicted load information is greater than the load upper limit value; a second adding module, used to clear the expansion delay coefficient to zero and add 1 to the contraction delay coefficient if the predicted load information is less than the load lower limit value; a clearing module, used to clear both the expansion delay coefficient and the contraction delay coefficient to zero if the predicted load information is greater than or equal to the load lower limit value and less than or equal to the load upper limit value.

[0040] In one embodiment, the coefficient update unit includes: an expansion module, which is used to expand the virtual business board in the elastic scaling group at the current moment and clear the expansion delay coefficient if the value of the expansion delay coefficient reaches a specified expansion threshold; a contraction module, which is used to contract the virtual business board in the elastic scaling group at the current moment and clear the contraction delay coefficient if the value of the contraction delay coefficient reaches a specified contraction threshold.

[0041] In one embodiment, the device also includes: a first extension module, which is used to double the specified expansion threshold to extend the expansion period if the virtual business board in the elastic scaling group is expanded continuously for a specified number of times; a second extension module, which is used to double the specified shrinkage threshold to extend the shrinkage period if the virtual business board in the elastic scaling group is shrunk continuously for a specified number of times.

[0042] Another aspect of the present invention provides a computer storage medium for storing a computer program. When the computer program is executed by a processor, the above method is implemented.

[0043] The technical solution provided by the present application can use a multi-order smoothing index method to determine the predicted load information of the virtual business board in the elastic scaling group. The predicted load information can represent the load situation in the elastic scaling group at the next moment. By comparing the actual load change trend with the predicted load change trend represented by the predicted load information, it is possible to predict whether the load information in the elastic scaling group will continue to grow or decay. In this way, even if a sudden load change occurs at a certain moment, the predicted load information will still indicate a smooth change in the load. In this case, the expansion and contraction processing will not be performed immediately, thereby avoiding the frequent expansion and contraction phenomenon caused by sudden load changes.

[0044] Furthermore, the technical solution provided by this application can compare predicted load information with a load threshold and update a delay coefficient based on the comparison result. This delay coefficient can be used to delay the scaling of the elastic scaling group. Scaling is only performed when the delay coefficient reaches a certain value. This also avoids frequent scaling caused by sudden changes in load.

[0045] It can be seen that the technical solutions provided in the above embodiments of the present application can improve the stability of expansion and contraction, thereby saving system resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0047] Figure 1 A schematic diagram of a virtual user plane in the prior art is shown;

[0048] Figure 2 A diagram showing the steps of a method for dynamic scaling within an elastic scaling group in one embodiment of the present invention is shown;

[0049] Figure 3 A flow chart of dynamic expansion and contraction in one embodiment of the present invention is shown;

[0050] Figure 4 A schematic diagram of the functional modules of a dynamic scaling system within an elastic scaling group in one embodiment of the present invention is shown;

[0051] Figure 5 A diagram showing the steps of a method for dynamic scaling within an elastic scaling group in another embodiment of the present invention is shown;

[0052] Figure 6 A curve diagram showing predicted changes in bandwidth utilization in one embodiment of the present invention is shown;

[0053] Figure 7 shows a curve diagram of predicted change of bandwidth utilization in another embodiment of the present invention;

[0054] Figure 8 A schematic diagram of functional modules of a dynamic scaling system within an elastic scaling group in another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0055] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0056] One embodiment of the present application provides a dynamic scaling method within an elastic scaling group, which can be applied to a virtual main control board within the elastic scaling group. The elastic scaling group can include one or more virtual service boards, which can provide services independently or collaboratively. During the service provision process, these virtual service boards will have certain load information.

[0057] In this embodiment, the load information of the virtual service board may include various indicators such as bandwidth utilization, CPU utilization, and the number of online users. According to different application scenarios, one or more of the indicators can be selectively analyzed. In the following embodiments, the technical solution of the present application is explained by taking bandwidth utilization as an example. It should be noted that although the explanation is given using bandwidth utilization as an example, it does not mean that the technical solution of the present application is only applicable to bandwidth utilization. As long as it is the load information of the virtual service board, the technical solution of the present application can be used for analysis, thereby realizing the process of dynamic expansion and contraction.

[0058] See also Figure 2 and Figure 3 In one embodiment, the dynamic scaling method within an elastic scaling group may include the following steps.

[0059] S11: collecting real-time load information of each virtual service board, and determining a multi-order smoothing index corresponding to the real-time load information.

[0060] In this embodiment, after a scaling group is created, the virtual main control board (VCS) starts a sampling timer and collects real-time load information for each virtual service board in the scaling group according to the time period specified by the sampling timer. During each round of collection, the VCS obtains real-time load information for each virtual service board in the scaling group. However, if a virtual service board in the scaling group fails or is operating abnormally, real-time load information for that virtual service board may not be collected.

[0061] After collecting real-time load information from each virtual service board, the virtual main control board uses a multi-order smoothing exponential algorithm to calculate the predicted load information corresponding to the real-time load information. This predicted load information can represent the load situation within the elastic scaling group at the next moment.

[0062] Before calculating the predicted load information, the virtual main control board may first determine a multi-order smoothing index corresponding to the real-time load information. Taking the second exponential smoothing method as an example, the multi-order smoothing index corresponding to the real-time load information may include a first-order smoothing index and a second-order smoothing index.

[0063] In one embodiment, when generating a multi-order smoothing index of real-time load information, the load average value of the real-time load information of each virtual service board may be calculated first, and then a multi-order smoothing index corresponding to the load average value may be generated.

[0064] In a specific application example, an auto-scaling group contains three virtual service boards. The real-time load information collected by the virtual main control board at a certain moment is the bandwidth utilization of these three virtual service boards. The bandwidth utilization of the three virtual service boards can be 28%, 32%, and 30%, respectively. The calculated average bandwidth utilization is 30%.

[0065] In the quadratic smoothing index algorithm, the first-order smoothing index S at time t t (1) and the second-order smoothing index S t (2) can be expressed as:

[0066] S t (1) = a*X t +(1-a)S t-1 (1)

[0067] S t (2) = a*S t (1)+(1-a)S t-1 (2)

[0068] Among them, the subscript t-1 represents the previous moment of time t, a represents the preset smoothing coefficient, and X t Indicates the load average.

[0069] S13: Generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index.

[0070] In this embodiment, after generating the multi-order smoothing index corresponding to the real-time load information, multiple prediction values ​​corresponding to the real-time load information may be further generated, and then the final predicted load information may be calculated based on the generated multiple prediction values.

[0071] In one embodiment, the first prediction value can be generated based on the first-order smoothing index and the second-order smoothing index. Specifically, the first prediction value can be obtained by weighted summation of the first-order smoothing index and the second-order smoothing index. In a specific application example, the first prediction value A at time t t It can be expressed as:

[0072] A t =2*S t (1)-S t (2)

[0073] The second prediction value can be generated based on the first-order smoothing index, the second-order smoothing index, and the preset smoothing coefficient. Specifically, the second prediction value is related to the difference between the first-order smoothing index and the second-order smoothing index, and the second prediction value can be obtained by performing a proportional operation on the difference using the preset smoothing coefficient.

[0074] In a specific application example, the second predicted value at time t can be expressed as:

[0075] B t =(a / (1-a))(S t (1)-S t (2)

[0076] Finally, the sum of the first prediction value and the second prediction value can be used as the predicted load information corresponding to the real-time load information.

[0077] It should be noted that the preset smoothing coefficient a can be a rational number greater than 0 and less than 1. This preset smoothing coefficient can be flexibly set based on the time and scenario in which the real-time load information is generated. Generally speaking, if the preset smoothing coefficient a is small, it indicates that historical load information has a greater impact on the predicted load information than the current load information. Conversely, if the preset smoothing coefficient a is large, it indicates that the current load information has a greater impact on the predicted load information than the historical load information.

[0078] For example, in a specific application example, if the real-time load information is relatively stable within a certain period (e.g., from 7:00 AM to 10:00 AM), then a can be configured to 0.4, indicating that the real-time load information at the current moment has little impact on the final predicted load information. In another specific application example, if the real-time load information varies greatly within a certain period (e.g., from 7:00 PM to 12:00 AM), then a can be configured to 0.7, indicating that the real-time load information at the current moment has a greater impact on the final predicted load information.

[0079] The following table lists the predicted load information for four different situations.

[0080] Table 1 The first predicted load information table

[0081]

[0082]

[0083] Table 2 The second predicted load information table

[0084]

[0085] Table 3 The third predicted load information table

[0086]

[0087] Table 4 The fourth predicted load information table

[0088]

[0089] S15: Identify the current actual load change trend in the elastic scaling group, and determine the predicted load change trend based on the predicted load information.

[0090] In this embodiment, corresponding predicted load information can be generated for real-time load information at different times through steps S11 and S13.

[0091] By identifying real-time load information at different moments, you can determine the actual load change trend within the elastic scaling group. For example, the first six sets of real-time load information in Table 1 and Table 2 represent an increasing load trend, while the first five sets of real-time load information in Table 3 and Table 4 represent a decreasing load trend.

[0092] Furthermore, by combining real-time and predicted load information, a predicted load change trend can be determined. For example, in Table 1, the predicted load change trend for the seventh data set is a load decrease (from 60 to 55.792), while in Table 2, the predicted load change trend for the fifth data set is a load increase (from 80 to 94.54), in Table 3, the predicted load change trend for the fifth data set is a load increase (from 20 to 23.72), and in Table 4, the predicted load change trend for the fifth data set is a load decrease (from 20 to 11.08).

[0093] It should be noted that the above-mentioned actual load change trend and predicted load change trend can be achieved by calculating curvature comb, variance, standard deviation, interquartile range, etc., and this application does not limit this.

[0094] S17: Compare the actual load change trend with the predicted load change trend, and determine whether to scale the virtual service board in the elastic scaling group according to the comparison result.

[0095] In this embodiment, if the real-time load information exceeds the normal load range, or the real-time load information undergoes a sudden change, the actual load change trend corresponding to the real-time load information can be compared with the predicted load change trend to determine whether the virtual main control board in the elastic scaling group needs to be expanded or reduced at the moment corresponding to the real-time load information.

[0096] Specifically, the normal load range can typically be defined by an upper and lower load limit. Taking bandwidth utilization as an example, the upper limit might be 70% and the lower limit might be 30%. Anything between 30% and 70% is considered normal bandwidth utilization. In Table 2, Group 5's bandwidth utilization is 80%, exceeding the upper limit of 70%. At this point, the actual load change trend for this group can be compared with the predicted load change trend.

[0097] For another example, in Table 1, the bandwidth utilization of group 6 changes suddenly compared to that of group 5. Then, the actual load change trend and the predicted load change trend corresponding to this group can also be compared.

[0098] In this embodiment, if the comparison result indicates that the predicted load change trend is consistent with the actual load change trend, then it indicates that at the next moment, the load in the elastic scaling group will change according to the existing trend. However, since a sudden load change or load out-of-range has occurred at the current moment, the load at the next moment is likely to continue to increase or decrease. At this time, it can be directly determined to expand or shrink the virtual main control board in the elastic scaling group at the current moment.

[0099] If the comparison result indicates that the predicted load change trend is inconsistent with the actual load change trend, it indicates that the load mutation or load out-of-range at the current moment will be gradually corrected at the next moment or later. In this case, it can be determined that the virtual main control board in the elastic scaling group will not be expanded or reduced at the current moment.

[0100] Specifically, taking the sixth group of data in Table 1 as an example, the actual load trend indicates an increase, while the predicted load trend indicates a decrease. Therefore, it can be determined that the virtual service boards in the elastic scaling group do not need to be expanded at this time. In fact, the subsequent load does return to the normal range, indicating that the virtual service boards do not need to be expanded at the time of the sixth group.

[0101] Taking the fifth group of data in Table 2 as an example, the actual load change trend indicates an increase in load, and the predicted load change trend also indicates an increase in load. At this time, the predicted load change trend indicates that the load may continue to rise in the future. In this case, it can be determined that the virtual service board in the elastic scaling group should be expanded at the current moment.

[0102] Taking the fifth group of data in Table 3 as an example, the actual load change trend indicates a load decrease, while the predicted load change trend indicates a load increase, indicating that the load will increase again in the subsequent period. It can be determined that the virtual service boards in the elastic scaling group will not be scaled down at this moment.

[0103] Taking the fifth group of data in Table 4 as an example, the actual load change trend indicates a load decrease, and the predicted load change trend also indicates a load decrease, indicating that the subsequent load will continue to decrease. It can be determined that the virtual service boards in the elastic scaling group should be scaled down at the current moment.

[0104] As can be seen, by comparing the actual load change trend with the predicted load change trend represented by the predicted load information, it is possible to predict whether the load information within the elastic scaling group will continue to increase or decrease. In this way, even if there is a sudden load change at a certain moment, the predicted load information will still indicate a stable load change. In this case, the scaling process will not be executed immediately. In addition, when the load exceeds the normal range, the predicted load information may also indicate that the load will return to normal values, so the scaling process will not be executed immediately. This avoids the frequent scaling caused by sudden load changes or temporary load increases outside the normal range.

[0105] See also Figure 4 The present application also provides a dynamic expansion and contraction device within an elastic expansion group, the device comprising:

[0106] An index determination unit, configured to collect real-time load information of each virtual service board and determine a multi-order smoothing index corresponding to the real-time load information;

[0107] a prediction unit, configured to generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index;

[0108] a change trend determining unit, configured to identify a current actual load change trend within the elastic scaling group and determine a predicted load change trend based on the predicted load information;

[0109] A judgment unit is used to compare the actual load change trend with the predicted load change trend, and judge whether to expand or shrink the virtual service board in the elastic scaling group according to the comparison result.

[0110] In one embodiment, the present application also provides a method for dynamic expansion and contraction in an elastic scaling group, which can also be applied to a virtual main control board. Figure 5 , the method may include the following steps.

[0111] S21: Collecting real-time load information of each virtual service board, and determining a multi-order smoothing index corresponding to the real-time load information.

[0112] S23: Generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index.

[0113] In this embodiment, the predicted load information corresponding to the real-time load information may be generated in a manner similar to steps S11 and S13, which will not be described in detail here.

[0114] S25: Compare the predicted load information with the load threshold, and update the delay coefficient according to the comparison result, so as to determine whether to scale the virtual service board in the elastic scaling group by the delay coefficient.

[0115] In this embodiment, the predicted load information can be compared with the load threshold to determine whether it is within the normal load range. A delay factor can also be set, which can be used to delay the scaling of virtual service boards within the elastic scaling group. If the predicted load information is outside the normal load range, the delay factor can be updated. Scaling will not be performed until the delay factor reaches a certain value. This can avoid frequent scaling caused by sudden changes or fluctuations in the load within a short period of time.

[0116] Specifically, the load threshold may include an upper load limit and a lower load limit, which together determine a normal load range. In addition, the delay coefficient may also be divided into a shrinking delay coefficient and an expanding delay coefficient, which may be updated separately.

[0117] In a specific application example, if the predicted load information exceeds the load limit, the scaling delay coefficient can be reset to zero and the expansion delay coefficient can be increased. Both the scaling delay coefficient and the expansion delay coefficient can be initialized to 0. Each time they need to be increased, they can be added by 1 to the current value. When the delay coefficient reaches a specified expansion threshold or a specified scaling threshold (for example, 3 for both), the corresponding scaling action can be triggered.

[0118] If the predicted load information is less than the load lower limit, the expansion delay coefficient can be cleared and the reduction delay coefficient can be increased.

[0119] If the predicted load information is greater than or equal to the lower load limit and less than or equal to the upper load limit, it indicates that the predicted load information is within a normal load range. In this case, both the expansion delay coefficient and the reduction delay coefficient can be cleared.

[0120] by Figure 6Taking the bandwidth utilization forecast curve shown above as an example, the bandwidth utilization upper limit is 70% and the lower limit is 30%. At 20 seconds, the bandwidth utilization exceeds the upper limit, so the scaling-in delay factor can be reset to zero and the scaling-out delay factor can be increased by 1. At 30 seconds, the bandwidth utilization returns to normal, so both delay factors can be reset to zero. At 40 seconds, the bandwidth utilization exceeds the upper limit, so the scaling-in delay factor can be reset to zero and the scaling-out delay factor can be increased by 1. At 50 seconds, the bandwidth utilization falls below the lower limit, so the scaling-in delay factor can be reset to zero and the scaling-out delay factor can be increased by 1. Similarly, at the final 60 seconds, both the scaling-in delay factor and the scaling-out delay factor are reset to zero. Therefore, despite the fluctuating predicted load information, no scaling actions are executed within the Auto Scaling Group during these 60 seconds. Only when the scaling-in or scaling-out request is triggered multiple times in a row will the scaling-in or scaling-out action be executed.

[0121] In one embodiment, if the value of the expansion delay coefficient reaches a specified expansion threshold, indicating that the expansion demand has been triggered a sufficient number of times, the virtual service boards in the elastic scaling group can be expanded at the current time, and the expansion delay coefficient can be reset to zero after the expansion. Similarly, if the value of the reduction delay coefficient reaches a specified reduction threshold, the virtual service boards in the elastic scaling group can be reduced at the current time, and the reduction delay coefficient can be reset to zero.

[0122] See also Figure 3 When expanding capacity, you can start a new virtual business board and then issue a configuration file to the newly started virtual business board. After the virtual business board is initialized according to the configuration file, the expansion is complete. When shrinking capacity, you can first delete the configuration file of the virtual business board and then delete the virtual business board to complete the shrinking process.

[0123] In one embodiment, considering that after executing a scaling action, the scaling is not actually successful, in this case, the scaling demand will continue to be triggered. To avoid frequent scaling actions, in this embodiment, if scaling actions are frequently executed within a short period of time, the above-mentioned designated scaling threshold and designated scaling threshold can be appropriately increased to extend the scaling period and scaling period.

[0124] See also Figure 7 , you can configure the avoidance coefficient, which can be used to record the number of continuous expansion or continuous reduction. Figure 7As shown, at 20 seconds, 30 seconds, and 40 seconds, the predicted load information is higher than the load upper limit. Therefore, the expansion demand is triggered at these three time nodes, and the corresponding expansion delay coefficient values ​​are continuously updated. At 40 seconds, the expansion delay coefficient reaches the specified expansion threshold (i.e., 3), so the expansion action is executed and the expansion delay coefficient is reset to zero. However, in actual applications, this expansion action may not produce an actual expansion effect, that is, the expansion fails. In this case, the expansion demand will still be triggered at multiple subsequent time nodes, and at 70 seconds and 100 seconds, because the expansion delay coefficient reaches the specified expansion threshold again, the expansion action will be executed. However, in reality, the expansion action will not produce an actual expansion effect in the current time period, so it is meaningless to perform expansion so frequently. In this case, the number of consecutive expansions can be recorded using an avoidance coefficient. If the virtual service board in the elastic scaling group is expanded a specified number of times in a row, the above-mentioned specified expansion threshold can be increased to extend the expansion period. Specifically, the avoidance coefficient will be updated at 40 seconds, 70 seconds, and 100 seconds. When it reaches the specified number of times (that is, 3) at 100 seconds, the specified expansion threshold can be doubled (from 3 to 6). Then, the expansion action will be performed only after the delay coefficient has been updated 6 times. Figure 7 In the example, the specified expansion threshold is doubled at 100 seconds, so the expansion action is performed again at 160 seconds. In actual applications, after the specified expansion threshold is increased, the avoidance count is reset to zero, and the number of consecutive expansions is recorded again.

[0125] Similarly, the avoidance count can also record the number of consecutive scaling-in times. If the virtual service board in the elastic scaling group is scaled down for a specified number of consecutive times, the above-mentioned specified scaling-in threshold can be increased to extend the scaling-in period.

[0126] The technical solution provided in this application compares predicted load information with a load threshold and updates a delay coefficient based on the comparison result. This delay coefficient can delay the scaling of the elastic scaling group. Scaling is only performed when the delay coefficient reaches a certain value. This also avoids frequent scaling caused by sudden changes in load.

[0127] In addition, by counting the number of continuous expansions or contractions using the avoidance coefficient, the specified expansion threshold or contraction threshold can be appropriately increased, thereby extending the expansion cycle or contraction cycle to avoid frequent expansion or contraction operations after expansion or contraction fails.

[0128] It can be seen that the technical solutions provided in the above embodiments of the present application can improve the stability of expansion and contraction, thereby saving system resource consumption.

[0129] See also Figure 8 The present application also provides a dynamic expansion and contraction device within an elastic expansion group, the device comprising:

[0130] An index determination unit, configured to collect real-time load information of each virtual service board and determine a multi-order smoothing index corresponding to the real-time load information;

[0131] a prediction unit, configured to generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index;

[0132] A coefficient updating unit is used to compare the predicted load information with the load threshold value, and update the delay coefficient according to the comparison result, so as to determine whether to expand or shrink the virtual service board in the elastic scaling group through the delay coefficient.

[0133] One embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it implements the above-mentioned dynamic scaling method within the elastic scaling group.

[0134] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0135] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods described in the embodiments of the present invention. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing, thereby implementing the methods described in the aforementioned method embodiments.

[0136] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0137] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.

[0138] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for dynamic scaling within an elastic scaling group, characterized in that: The method is applied to a virtual main control board in the elastic scaling group, wherein the elastic scaling group also includes one or more virtual service boards; the method includes: Collecting real-time load information of each virtual service board and determining a multi-order smoothing index corresponding to the real-time load information; generating predicted load information corresponding to the real-time load information according to the multi-order smoothing index; Identifying a current actual load change trend within the elastic scaling group, and determining a predicted load change trend based on the predicted load information; Comparing the actual load change trend with the predicted load change trend, and determining whether to scale the virtual service board in the elastic scaling group according to the comparison result; Determining whether to scale the virtual service board in the elastic scaling group according to the comparison result includes: If the comparison result indicates that the predicted load change trend is consistent with the actual load change trend, it is determined to scale the virtual service board in the elastic scaling group at the current moment; If the comparison result indicates that the predicted load change trend is inconsistent with the actual load change trend, it is determined that the virtual service board in the elastic scaling group is not scaled up or down at the current moment.

2. The method according to claim 1, characterized in that Determining the multi-order smoothing index corresponding to the real-time load information includes: Calculate the load average value of the real-time load information of each virtual service board, and generate a multi-order smoothing index corresponding to the load average value in the following manner: S t (1)=a*X t +(1-a)S t-1 (1) S t (2)=a*S t (1)+(1-a)S t-1 (2) Among them, the subscript t-1 represents the previous moment of time t, a represents the preset smoothing coefficient, and X t represents the load average value, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t.

3. The method according to claim 1, characterized in that The multi-order smoothing index includes a first-order smoothing index and a second-order smoothing index; Generating predicted load information corresponding to the real-time load information according to the multi-order smoothing index includes: According to the first-order smoothing index and the second-order smoothing index, the first prediction value A is generated in the following manner: t : A t =2*S t (1)-S t (2) According to the first-order smoothing index, the second-order smoothing index and the preset smoothing coefficient, the second prediction value B is generated in the following manner: t : B t =(a / (1-a))(S t (1)-S t (2)) Among them, a represents the preset smoothing coefficient, S t (1) represents the first-order smoothing index at time t, S t (2) represents the second-order smoothing index at time t; The sum of the first predicted value and the second predicted value is used as the predicted load information corresponding to the real-time load information.

4. The method according to claim 1, wherein Determining whether to scale the virtual service board in the elastic scaling group according to the comparison result includes: If the actual load change trend indicates a load increase, and the predicted load change trend indicates a load decrease, determining not to expand the capacity of the virtual service board in the elastic scaling group at the current moment; If the actual load change trend indicates a load increase, and the predicted load change trend also indicates a load increase, determining to expand the capacity of the virtual service board in the elastic scaling group at the current moment; If the actual load change trend indicates a load decrease, and the predicted load change trend indicates a load increase, determining not to scale down the virtual service boards in the elastic scaling group at the current moment; If the actual load change trend indicates a load decrease, and the predicted load change trend also indicates a load decrease, it is determined to scale down the virtual service boards in the elastic scaling group at the current moment.

5. A method for dynamic expansion and contraction within an elastic scaling group, characterized in that: The method is applied to a virtual main control board in the elastic scaling group, wherein the elastic scaling group also includes one or more virtual service boards; the method includes: Collecting real-time load information of each virtual service board and determining a multi-order smoothing index corresponding to the real-time load information; generating predicted load information corresponding to the real-time load information according to the multi-order smoothing index; Comparing the predicted load information with the load threshold, and updating the delay coefficient according to the comparison result; Determining whether to scale up or down the virtual service board in the elastic scaling group according to the delay coefficient; The determining, based on the delay coefficient, whether to scale the virtual service board in the elastic scaling group specifically includes: If the value of the expansion delay coefficient reaches the specified expansion threshold, the virtual service board in the elastic scaling group is expanded at the current moment; If the value of the scaling-down delay coefficient reaches a specified scaling-down threshold, the virtual service boards in the elastic scaling group are scaled down at the current moment.

6. The method according to claim 5, characterized in that The load threshold value includes an upper load limit value and a lower load limit value, and the delay coefficient includes an expansion delay coefficient and a contraction delay coefficient; Updating the delay coefficient according to the comparison result specifically includes: If the predicted load information is greater than the load upper limit, the shrinking delay coefficient is cleared to zero, and the expanding delay coefficient is increased by 1; If the predicted load information is less than the load lower limit, the expansion delay coefficient is cleared to zero, and the reduction delay coefficient is increased by 1; If the predicted load information is greater than or equal to the load lower limit and less than or equal to the load upper limit, both the expansion delay coefficient and the contraction delay coefficient are cleared.

7. The method according to claim 5 or 6, characterized in that The determining, based on the delay coefficient, whether to scale the virtual service board in the elastic scaling group further includes: If the value of the expansion delay coefficient reaches a specified expansion threshold, the expansion delay coefficient is cleared; If the value of the shrinkage delay coefficient reaches a specified shrinkage threshold, the shrinkage delay coefficient is cleared.

8. The method according to claim 7, characterized in that The method further comprises: If the virtual service board in the elastic scaling group is expanded continuously for a specified number of times, the specified expansion threshold is doubled to extend the expansion period; If the virtual service board in the elastic scaling group is scaled down for a specified number of consecutive times, the specified scaling-down threshold is doubled to extend the scaling-down period.

9. A dynamic expansion and contraction device in an elastic expansion group, characterized in that: The device comprises: An index determination unit, configured to collect real-time load information of each virtual service board and determine a multi-order smoothing index corresponding to the real-time load information; a prediction unit, configured to generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index; a change trend determining unit, configured to identify a current actual load change trend within the elastic scaling group and determine a predicted load change trend based on the predicted load information; a judgment unit, configured to compare the actual load change trend with the predicted load change trend, and judge whether to scale the virtual service board in the elastic scaling group according to the comparison result; The judging unit judging whether to scale up or down the virtual service board in the elastic scaling group according to the comparison result includes: If the comparison result indicates that the predicted load change trend is consistent with the actual load change trend, it is determined to scale the virtual service board in the elastic scaling group at the current moment; If the comparison result indicates that the predicted load change trend is inconsistent with the actual load change trend, it is determined that the virtual service board in the elastic scaling group is not scaled up or down at the current moment.

10. A dynamic expansion and contraction device in an elastic expansion group, characterized in that: The device comprises: An index determination unit, configured to collect real-time load information of each virtual service board and determine a multi-order smoothing index corresponding to the real-time load information; a prediction unit, configured to generate predicted load information corresponding to the real-time load information according to the multi-order smoothing index; A coefficient updating unit, configured to compare the predicted load information with a load threshold value and update a delay coefficient according to the comparison result, so as to determine whether to scale the virtual service board in the elastic scaling group by using the delay coefficient; The coefficient updating unit determines whether to scale the virtual service board in the elastic scaling group according to the delay coefficient, specifically including: If the value of the expansion delay coefficient reaches the specified expansion threshold, the virtual service board in the elastic scaling group is expanded at the current moment; If the value of the scaling-down delay coefficient reaches a specified scaling-down threshold, the virtual service boards in the elastic scaling group are scaled down at the current moment.

Citation Information

Patent Citations

  • Intelligent capacity expanding and shrinking method and device, computer equipment and storage medium

    CN109918194A