A method and device for elastic scaling based on transaction volume load

By automatically calculating the transaction volume load and response time of the business system, the estimated resource demand and automatic expansion are achieved, which solves the problems of low operation and maintenance efficiency and high operation risks in the existing technology, and improves the automated management of elastic scaling ability.

CN115473804BActive Publication Date: 2025-02-14CHINA CONSTRUCTION BANK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211086670.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-02-14
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

The existing elastic scaling detection methods still require manual configuration of storage, network, third-party applications and business systems after creating computing instances, resulting in low operation and maintenance efficiency and high operational risks.

Method used

By obtaining the current transaction volume load, transaction volume index smoothing curve and business response time smoothing curve of the target business system, calculate the estimated resource demand and estimated response time, and automatically perform capacity expansion or capacity reduction operations to avoid manual configuration.

Benefits of technology

Improve operation and maintenance efficiency, reduce operation risks, realize automated elastic scaling management, and adapt to changes in business loads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115473804B_ABST
    Figure CN115473804B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for elastic scaling based on transaction volume load, the method comprising: obtaining the current transaction volume load, transaction volume index smoothing curve and business response time smoothing curve of a target business system; calculating the estimated resource load after a preset time and the estimated resource demand after the preset time; using the business response time smoothing curve to calculate the estimated response time after the preset time; when the estimated resource demand and / or the estimated response time meet the preset expansion conditions, performing expansion operations on the target business system based on the running resources in the resource pool; when the estimated resource demand, the estimated response time, the current response time and the current time meet the preset reduction conditions, performing reduction operations on the target business system, and no manual configuration is required in the process of performing the reduction operation or the expansion operation, thereby improving operation and maintenance efficiency and reducing operation risks.
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 elastic scaling based on transaction volume load. Background Art

[0002] The volume of Internet services during peak hours and off-peak hours often differs by several times or even dozens of times. If computing and storage resources are configured based on peak hour traffic, resources will be wasted during off-peak hours. However, if computing and storage resources are configured based on off-peak hour traffic, congestion or even service interruption may occur during peak hours due to insufficient resources.

[0003] Currently, elastic scaling detection methods are commonly used to solve the above problems. However, after creating a computing instance, existing elastic scaling detection methods still require manual configuration of storage, network, third-party applications, and business systems. This leads to a large workload and is prone to errors, resulting in low efficiency and high operational risks. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method and apparatus for elastic scaling based on transaction volume load, so as to solve the problems of low operation and maintenance efficiency and high operational risks in existing elastic scaling detection methods.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a method for elastic scaling based on transaction volume load, the method comprising:

[0007] Obtaining the current transaction volume load, transaction volume exponential smoothing curve, and business response time smoothing curve of the target business system, where the current transaction volume load includes the current transaction volume and the current response time. The target business system is any business system in the business system cluster, and the business systems in the business system cluster operate based on operating resources provided by the resource pool.

[0008] Calculate the estimated resource load after a preset duration based on the current transaction volume, the fixed resource consumption of the computing instance, and the preset ratio;

[0009] Calculating an estimated resource demand after the preset time period using the transaction volume index smoothing curve, the estimated resource load, and the preset proportional relationship;

[0010] Calculate the estimated response time after the preset time using the service response time smoothing curve;

[0011] When the estimated resource demand and / or the estimated response time meet a preset expansion condition, performing a capacity expansion operation on the target business system based on the operating resources in the resource pool;

[0012] When the estimated resource demand, the estimated response time, the current response time, and the current time meet a preset scaling-down condition, a scaling-down operation is performed on the target business system.

[0013] Preferably, the estimated resource demand after the preset time period is calculated using the transaction volume exponential smoothing curve, the estimated resource load, and the preset proportional relationship, including:

[0014] Calculating the second derivative of the volume exponential smoothing curve;

[0015] Calculating the first derivative of each time slice within a preset time period based on the second derivative of the trading volume exponential smoothing curve to obtain a first value corresponding to each time slice;

[0016] For each time slice within the preset time period, calculate the product of the actual trading volume corresponding to the time slice, the first value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point to obtain a second value corresponding to the time slice;

[0017] Taking a weighted average of the second values ​​corresponding to each time slice within the preset time period to obtain an estimated transaction volume;

[0018] If the estimated transaction volume is higher than the preset transaction volume lower limit and lower than the preset transaction volume upper limit, the estimated resource demand after the preset time period is calculated using the estimated transaction volume, the estimated resource load and the preset proportional relationship.

[0019] Preferably, using the service response time smoothing curve to calculate the estimated response time after the preset duration includes:

[0020] Calculating the second derivative of the service response time smooth curve;

[0021] Calculating a first derivative value of each time slice within a preset duration according to the second derivative of the service response time smooth curve to obtain a third value corresponding to each time slice;

[0022] For each time slice within the preset duration, calculate the product of the actual service average response time corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point to obtain a fourth value corresponding to the time slice;

[0023] A weighted average is performed on the fourth value corresponding to each time slice within the preset duration to obtain an estimated response time after the preset duration.

[0024] Preferably, when the estimated resource demand and / or the estimated response time meets a preset expansion condition, performing a capacity expansion operation on the target business system based on the operating resources in the resource pool includes:

[0025] When the estimated resource demand and / or the estimated response time meet a preset expansion condition, creating a new computing instance and a new storage volume for the target business system;

[0026] Mounting the new storage volume for the new computing instance;

[0027] Deploy and configure a new application node corresponding to the new computing instance, and add the new application node to the application cluster;

[0028] Performing network configuration and service verification on the new application node so that the new application node can perform internal access and respond to external requests;

[0029] Security monitoring configuration and operation monitoring configuration are performed on the new application node, so that the new application node can meet security requirements and be included in the operation and maintenance monitoring system.

[0030] Preferably, when the estimated resource demand, the estimated response time, the current response time, and the current time meet a preset scaling-down condition, a scaling-down operation is performed on the target business system, including:

[0031] When the estimated resource demand, the estimated response time, the current response time, and the current time meet the preset scaling-down conditions, modifying the operation monitoring configuration of the target business system to avoid false alarms during scaling-down;

[0032] Modify the load balancing policy of the target business system so that the target computing instance of the target business system stops receiving new requests, wherein the target computing instance is the computing instance corresponding to the target business system with the latest creation time;

[0033] Deleting the application node on the target computing instance from the application cluster;

[0034] Configuring the network to remove the target computing instance from the business network and performing data backup;

[0035] Unmounting the storage volume for the target computing instance and reclaiming the corresponding running resources and the unmounted storage volume;

[0036] Modify the security monitoring configuration so that the target computing instance is no longer subject to security monitoring to avoid IP spoofing attacks.

[0037] Preferably, the expansion condition is: the estimated resource demand is greater than a preset resource threshold, or the estimated response time is greater than a preset response time upper limit, wherein the resource threshold is determined based on the resource amount allocated to the target business system.

[0038] Preferably, the scaling-down conditions are: the estimated resource demand is less than the preset resource utilization lower limit, the estimated response time and the current response time are both less than the preset response time lower limit, and the current time is in a low-peak business period.

[0039] A second aspect of an embodiment of the present invention discloses a device for elastic scaling based on transaction volume load, the device comprising:

[0040] an acquisition unit, configured to acquire a current transaction volume load, a transaction volume exponential smoothing curve, and a business response time smoothing curve of a target business system, wherein the current transaction volume load includes the current transaction volume and the current response time. The target business system is any business system in a business system cluster, and the business systems in the business system cluster operate based on operating resources provided by a resource pool;

[0041] A first calculation unit is configured to calculate an estimated resource load after a preset time period based on the current transaction volume, the fixed consumed resources of the calculation instance, and a preset proportional relationship;

[0042] A second calculation unit is configured to calculate an estimated resource demand after the preset time period by using the transaction volume index smoothing curve, the estimated resource load, and the preset proportional relationship;

[0043] A third calculation unit is used to calculate the estimated response time after the preset time period using the service response time smoothing curve;

[0044] an expansion unit, configured to perform a capacity expansion operation on the target business system based on the operating resources in the resource pool when the estimated resource demand and / or the estimated response time meet a preset capacity expansion condition;

[0045] The scaling-down unit is configured to perform a scaling-down operation on the target business system when the estimated resource demand, the estimated response time, the current response time, and the current time meet a preset scaling-down condition.

[0046] Preferably, the second computing unit includes:

[0047] A first calculation module is used to calculate the second derivative of the trading volume index smoothing curve;

[0048] a second calculation module, configured to calculate a first derivative of each time slice within a preset time period based on the second derivative of the trading volume exponential smoothing curve, so as to obtain a first value corresponding to each time slice;

[0049] a third calculation module configured to calculate, for each time slice within the preset time period, the product of the actual trading volume corresponding to the time slice, the first value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a second value corresponding to the time slice;

[0050] a weighting module, configured to perform a weighted average of the second values ​​corresponding to each time slice within the preset time period to obtain an estimated transaction volume;

[0051] The fourth calculation module is used to calculate the estimated resource demand after the preset time period using the estimated transaction volume, the estimated resource load and the preset proportional relationship if the estimated transaction volume is higher than the preset transaction volume lower limit and lower than the preset transaction volume upper limit.

[0052] Preferably, the third computing unit includes:

[0053] A first calculation module, configured to calculate the second derivative of the service response time smooth curve;

[0054] A second calculation module is used to calculate the first derivative value of each time slice within a preset duration according to the second derivative of the service response time smooth curve, so as to obtain a third value corresponding to each time slice;

[0055] a third calculation module, configured to calculate, for each time slice within the preset duration, the product of the real service average response time corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a fourth value corresponding to the time slice;

[0056] The weighting module is used to perform weighted averaging on the fourth value corresponding to each time slice within the preset duration to obtain the estimated response time after the preset duration.

[0057] Based on the above-mentioned embodiment of the present invention, a method and device for elastic scaling based on transaction volume load is provided. The method is as follows: obtaining the current transaction volume load, transaction volume index smoothing curve and business response time smoothing curve of the target business system; calculating the estimated resource load after the preset time period according to the current transaction volume, the fixed consumption resources of the computing instance and the preset proportional relationship; using the transaction volume index smoothing curve, the estimated resource load and the preset proportional relationship, calculating the estimated resource demand after the preset time period; using the business response time smoothing curve, calculating the estimated response time after the preset time period; when the estimated resource demand and / or the estimated response time meet the preset expansion conditions, performing expansion operations on the target business system based on the running resources in the resource pool; when the estimated resource demand, the estimated response time, the current response time and the current time meet the preset contraction conditions, performing contraction operations on the target business system. In this solution, the corresponding estimated resource demand and estimated resource demand are calculated using data related to the transaction volume load of the target business system. Based on the estimated resource demand, estimated resource demand and other information, determine whether to perform a scaling operation or a scaling operation on the target business system. During the scaling operation or the scaling operation, no manual configuration is required, thereby improving operation and maintenance efficiency and reducing operational risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0059] Figure 1 A schematic diagram of a service-level elastic scaling system provided by an embodiment of the present invention;

[0060] Figure 2 A flowchart of a method for elastic scaling based on transaction volume load provided by an embodiment of the present invention;

[0061] Figure 3 A structural block diagram of a device for elastic scaling based on transaction volume load provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0063] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0064] As can be seen from the background technology, existing elastic scaling detection methods still require manual configuration of storage, network, third-party applications and business systems after creating a computing instance. The operation and maintenance workload is large and prone to errors, and the operation and maintenance efficiency is low and the operational risk is high.

[0065] Therefore, embodiments of the present invention provide a method and apparatus for elastic scaling based on transaction load. These methods utilize data related to the transaction load of a target business system to calculate the corresponding estimated resource requirements and estimated resource demand. Based on the estimated resource requirements, estimated resource demand, and other information, a decision is made to scale the target business system down or up. This process eliminates the need for manual configuration, thereby improving operational efficiency and reducing operational risks.

[0066] It should be noted that the method and device for elastic scaling based on transaction volume load provided in the embodiments of the present invention can be applied to business-level elastic scaling systems. To facilitate understanding of the method for elastic scaling based on transaction volume load provided in the embodiments of the present invention, the business-level elastic scaling system is first explained below.

[0067] See also Figure 1 , shows a schematic diagram of a business-level elastic scaling system provided by an embodiment of the present invention, the business elastic scaling system includes a cloud platform 100, a business load monitoring 200, an elastic scaling manager 300, a network automatic deployment manager 400, a storage automatic deployment manager 500, an application automatic deployment manager 600, and multiple business system clusters 700; wherein, the multiple business system clusters 700 are Figure 1 In the business system cluster 1 to business system cluster N, the business system cluster 700 includes a business system, a middleware cluster (or a database cluster), and multiple computing instances. The database cluster in this solution can use a shared storage cluster or other database cluster that can perform node deletion.

[0068] Cloud platform 100: provides the ability to automatically create / reclaim computing resources.

[0069] Business load monitoring 200: provides real-time business volume, CPU load, memory load, disk I / O load, disk usage load and other data to the elastic scaling manager 300.

[0070] The elastic scaling manager 300 estimates the business volume changes based on the data provided by the business volume load monitoring 200 to trigger elastic configuration operations.

[0071] Network automatic deployment manager 400: provides network automatic configuration capabilities to make service resources of computing instances accessible.

[0072] Storage automatic deployment manager 500: provides storage volume automatic configuration capabilities, allowing computing instances to mount additional storage volumes.

[0073] Application automatic deployment manager 600: provides automatic deployment and automatic configuration of application nodes (which may be referred to as applications for short) to automatically complete application installation and configuration of computing instances.

[0074] It should be noted that the computing instance is an operating system instance and / or container instance created by the cloud platform 100, wherein the operating system instance may include: virtual CPU resources, virtual memory resources, virtual storage resources (local hard disk and network storage), virtual network resources, and a logical concept of the operating system.

[0075] It is worth noting that the method for elastic scaling based on transaction volume load provided by the embodiment of the present invention is mainly based on elastic scaling based on transaction volume load; the inventors have found through research that in theory, resource load (various resources allocated by the operating system, such as CPU, memory and disk capacity, etc.) can be used as the basis for elastic scaling, but in practice, most of the existing business systems run on third-party middleware and third-party database products; affected by the distribution of data on physical resources and the management operations of these third-party products themselves, the resource load situation and the actual business requests are very different. For example, the database often performs statistics and data collation late at night when the business volume is lowest, which often leads to a sharp increase in CPU and memory usage, because these data collation operations are low-priority tasks. These operations can be delayed when there are actual business requests, so it is meaningless to perform capacity expansion operations at this time.

[0076] As can be seen from the above, using transaction load as a metric for elastic scaling is relatively objective. However, the distribution of transactions in real-world applications fluctuates, making it difficult to find a very precise metric to quantify transaction load. Transaction load is relatively simple, typically only considering variations in transaction volume and response time. In everyday transactions, the difference between transaction load and business load is minimal, so transaction load is often used to approximate business load in practice. For these reasons, this solution allows for elastic scaling based on transaction load. The specific implementation of this solution is detailed below.

[0077] See also Figure 2 , shows a flow chart of a method for elastic scaling based on transaction volume load provided by an embodiment of the present invention, the method comprising:

[0078] Step S201: Obtain the current transaction volume load, transaction volume index smoothing curve, and business response time smoothing curve of the target business system.

[0079] It should be noted that the current transaction volume load includes the current transaction volume and the current response time. The target business system is any business system in the business system cluster. The business systems in the business system cluster run based on the operating resources (computing resources and storage resources) provided by the resource pool.

[0080] In the specific implementation of step S201, data related to transaction volume, such as the current transaction volume load, transaction volume index smoothing curve, and business response time smoothing curve of the target business system, are obtained, and elastic scaling is performed based on the aforementioned data related to transaction volume.

[0081] It should be noted that the resource pools mentioned above are mainly divided into primary resource pools, secondary resource pools and tertiary resource pools; the entire cloud environment uniformly allocates primary resource pools, secondary resource pools and tertiary resource pools.

[0082] Among them, the first-level resource pool is the minimum resource pool that can support the operation of the business system and meet the availability and security requirements. The first-level resource pool is equivalent to a fixed pool and is not affected by elastic scaling.

[0083] The secondary resource pool is a resource pool managed by the elastic scaling manager 300. The size of the secondary resource pool is dynamically managed according to actual business changes. The secondary resource pool is specifically the maximum resource that can be allocated to the business system.

[0084] The third-level resource pool is a reserve resource pool for the entire data center that requires manual authorization. If a business system's automatic expansion to the upper limit of elastic scaling still cannot meet business service needs, manual authorization is required to allocate a portion of the operating resources from the reserve resource pool for the entire data center to the business system.

[0085] It's important to note that transaction load is primarily composed of two metrics: transaction volume and response time. Response time has three thresholds: an upper limit, a lower limit, and a lower limit for errors. The upper limit represents a transaction timeout (one of the indicators that trigger capacity expansion); the lower limit represents a light load on the business system (which can be used as an indicator for capacity reduction); and the lower limit for errors represents an immediate transaction error return due to a business system failure.

[0086] Trading volume has two thresholds: an upper and a lower limit. The upper limit corresponds to the upper limit of the trading volume that the secondary resource pool can support after expansion. If the trading volume reaches the upper limit, resources must be allocated from the tertiary resource pool. However, since the allocation of operating resources in the tertiary resource pool requires manual authorization, an alarm mechanism is required for the upper limit of trading volume. The lower limit of trading volume is crucial for elastic scaling: if the trading volume falls below the lower limit, scaling down will not occur. As can be seen from the above, trading volumes below the lower limit correspond to the primary resource pool, those between the upper and lower limits correspond to the secondary resource pool, and those above the upper limit correspond to the tertiary resource pool.

[0087] Step S202: Calculate the estimated resource load after a preset duration based on the current transaction volume, the fixed consumption resources of the computing instance, and the preset ratio relationship.

[0088] In the specific implementation of step S202 , the estimated resource load after the preset duration is calculated based on the current transaction volume, the fixed consumed resources of the computing instance, and the preset proportional relationship.

[0089] Specifically, the estimated resource load after the preset duration is calculated according to formula (1).

[0090] Resource load = K0 + N * preset ratio (1)

[0091] It should be noted that in the process of calculating the estimated resource load, K0 in formula (1) represents the fixed consumption resources of the computing instance (usually composed of the consumption of objects such as the operating system, middleware, and database), N is the transaction volume, and the preset proportional coefficient can be calculated based on the daily transaction volume baseline and resource usage baseline. The preset proportional coefficient is the proportional relationship between the transaction volume load and the resource load.

[0092] Step S203: Calculate the estimated resource demand after a preset time period using the transaction volume index smoothing curve, the estimated resource load, and the preset proportional relationship.

[0093] In the specific implementation of step S203, the second derivative of the trading volume index smoothing curve is calculated; based on the second derivative of the trading volume index smoothing curve, the first derivative of each time slice within a preset time period (usually the estimated business volume after the preset time period, such as the estimated business volume after 10 minutes) is calculated to obtain a first value corresponding to each time slice; it should be noted that each time slice has a corresponding real trading volume, and the length of the time slice can be from several seconds to 1 minute (this is just an example, and the actual length is set according to the specific situation).

[0094] For each time slot within the preset duration, the second value corresponding to that time slot is calculated by multiplying the actual trading volume corresponding to that time slot (obtained through monitoring), the first value corresponding to that time slot, and the number of time slots between that time slot and the estimated time point. The number of time slots is the number of time slots between that time slot and the estimated time point (the time point corresponding to the preset duration). In other words, the second value corresponding to a time slot = the actual trading volume corresponding to that time slot * the first value corresponding to that time slot * the number of time slots between that time slot and the estimated time point.

[0095] Through the above method, multiple second values ​​can be calculated. The second values ​​corresponding to each time slice within the preset duration are weighted averaged to obtain the estimated trading volume. The weighting values ​​corresponding to each time slice can be selected based on the specific system conditions. In principle, time slices closer to the estimated time point have higher weighting values, while time slices further away have lower weighting values.

[0096] For example, after calculating the second value corresponding to each time slice within a 10-minute period, a weighted average of multiple second values ​​is calculated to obtain the estimated trading volume after 10 minutes.

[0097] After the estimated transaction volume is calculated, if the estimated transaction volume is higher than the preset transaction volume upper limit, an alarm will be triggered to prompt the operation and maintenance personnel to handle it.

[0098] If the estimated transaction volume is higher than the preset lower limit and lower than the upper limit, the estimated resource demand after the preset duration is calculated using the estimated transaction volume, estimated resource load, and the preset ratio.

[0099] Specifically, if the estimated transaction volume is higher than the lower limit and lower than the upper limit, the estimated resource demand after the preset duration is calculated using the estimated transaction volume, the estimated resource load, and the preset ratio, combined with the above formula (1).

[0100] Step S204: using the service response time smoothing curve, calculate the estimated response time after the preset duration.

[0101] In the specific implementation of step S204, the second derivative of the business response time smooth curve is calculated; based on the second derivative of the business response time smooth curve, the first derivative of each time slice within the preset duration is calculated to obtain a third value corresponding to each time slice.

[0102] For each time slice within the preset duration, calculate the product of the actual business average response time (obtained by monitoring) corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point to obtain the fourth value corresponding to the time slice; through the above method, the fourth value corresponding to each time slice within the preset duration is calculated. The specific calculation process can be seen in the relevant content of calculating the second value in the above step S203, which will not be repeated here.

[0103] A weighted average is performed on the fourth value corresponding to each time slice within the preset time length to obtain an estimated response time after the preset time length.

[0104] Step S205: When the estimated resource demand and / or the estimated response time meet the preset expansion conditions, the expansion operation is performed on the target business system based on the operating resources in the resource pool.

[0105] It should be noted that the timing of capacity expansion is mainly based on business response time, and the amount of resources to be expanded is mainly based on the ratio between transaction volume load and resource load. The following three issues need to be paid attention to when expanding capacity.

[0106] The first issue is the 100% utilization of a single CPU. Middleware, databases, and applications often require sequential processing tasks, so increasing the number of CPUs alone won't improve business processing performance. Therefore, the actual transaction volume load and resource load are a complex function, and each system is different. To simplify processing, the elastic scaling strategy monitors the improvement in response time after expansion, as well as monitoring the situation where a single CPU reaches 100%. If the improvement in response time after a single expansion is far less than expected, and a single CPU reaches 100%, manual authorization will be required for the next expansion (even if the expansion is within the secondary resource pool).

[0107] The second issue involves software resource usage limitations. Middleware, databases, and applications typically impose some kind of limit on the maximum amount of resources they can use. These limits can be implemented through software configuration, while others are inherently software limitations. To prevent autoscaling from failing due to software limitations, the upper limit of the software's available resources should be tested before implementing autoscaling. In principle, the upper limit of the secondary resource pool should not exceed the software's available resource limit. Systems with smaller software resource limits are not suitable for automatic autoscaling.

[0108] The third issue concerns the ratios of CPU, memory, disk I / O, and network bandwidth. Different software uses different ratios for CPU, memory, disk I / O, and network bandwidth, and these ratios can change with increasing transaction load. However, to reduce operational complexity, scaling is typically performed using fixed templates. Therefore, several different templates are typically set up, such as standard, CPU-focused, memory-focused, and high-disk I / O-focused. The template used for a business system's scaling is pre-determined and cannot be changed during automatic scaling.

[0109] In some embodiments, the expansion conditions are: the estimated resource demand is greater than a preset resource threshold, or the estimated response time is greater than a preset response time upper limit; wherein the resource threshold is determined based on the resource amount allocated to the target business system, for example: the resource threshold can be set to 80% of the resource amount allocated to the target business system.

[0110] In the specific implementation of step S205 , when the estimated resource demand and / or the estimated response time meet the preset expansion conditions, the expansion operation is performed on the target business system based on the operating resources in the resource pool.

[0111] That is to say, when the estimated resource demand is greater than the preset resource threshold (such as greater than 80% of the resources allocated to the target business system), and / or when the estimated response time is greater than the preset response time upper limit, the target business system is expanded based on the operating resources in the resource pool.

[0112] In some embodiments, during the process of performing capacity expansion operations on the target business system, the elastic scaling manager 300 triggers the cloud platform 100, the network automatic deployment manager 400, the storage automatic deployment manager 500, the application automatic deployment manager 600 and other components to perform corresponding operations. The specific method of performing capacity expansion operations on the target business system is as follows:

[0113] When the estimated resource demand and / or estimated response time meet the preset expansion conditions, a new computing instance and a new storage volume are created for the target business system; specifically, the cloud platform 100 is called to create a new computing instance according to a predefined template, and the storage automatic deployment manager 500 is called to create a new storage volume.

[0114] The elastic scaling manager 300 is called to mount a new storage volume for the new computing instance (if there is no need to mount a storage volume, it is not necessary to mount it).

[0115] Deploy and configure new application nodes corresponding to the new computing instances, and add the new application nodes to the application cluster; perform network configuration and service verification on the new application nodes so that the new application nodes can be internally accessed and respond to external requests.

[0116] Specifically, the application automatic deployment manager 600 is called to automatically deploy and configure the new application node corresponding to the new computing instance and add the new application node to the application cluster. The network automatic deployment manager 400 is called to configure the network so that the new application node can access the network internally and respond to external requests (or service external requests). In addition, the application automatic deployment manager 600 can also be called to run service verification on the new application node to ensure service availability.

[0117] Perform security monitoring and operation monitoring configurations on new application nodes to ensure that they meet security requirements and are included in the operation and maintenance monitoring system.

[0118] It should be noted that when adding new application nodes to the application cluster during the expansion process, it is usually necessary to modify the configuration of all application nodes in the application cluster to ensure that the new application nodes are visible within the application cluster; the firewall uses pre-configured network segments to avoid additional configuration of the firewall during elastic scaling; the load balancing must have real-time configuration capabilities so that the actual business services can reach the new computing instance after the new application node completes service verification.

[0119] Step S206: When the estimated resource demand, the estimated response time, the current response time, and the current time meet the preset scaling-down conditions, a scaling-down operation is performed on the target business system.

[0120] It should be noted that scaling down a business system carries higher risks and takes longer, and the scaling down process will also affect the use of certain operating resources. Therefore, in actual applications, scaling down is usually performed during off-peak business hours.

[0121] In some embodiments, the scaling-down conditions are: the estimated resource demand is less than the preset resource utilization lower limit, the estimated response time and the current response time are both less than the preset response time lower limit, and the current time is in the off-peak business period.

[0122] In the specific implementation of step S206 , when the estimated resource demand, the estimated response time, the current response time, and the current time meet the preset scaling-down conditions, a scaling-down operation is performed on the target business system.

[0123] In other words, if the estimated resource demand is less than the preset resource utilization lower limit, and if both the estimated response time and the current response time are less than the preset response time lower limit, and if the current time is during a low-peak business period, the target business system will be scaled down. In other words, scaling down the target business system can only be performed if at least the following three conditions are met: Condition 1: The estimated resource demand is less than the preset resource utilization lower limit; Condition 2: The estimated response time and the current response time are both less than the response time lower limit; Condition 3: The current time is during a low-peak business period.

[0124] It is worth noting that the lower limit of resource utilization is related to the importance of the target business system; for example: if the target business system is an important system, the lower limit of resource utilization is set to 30%; if the target business system is a general system, the lower limit of resource utilization is set to 50%.

[0125] In some embodiments, on the basis of the above three conditions that need to be met for executing the scaling-down operation, condition 4 can be added; condition 4: after scaling down, it is estimated that the business peak of the next day will not exceed the resource usage limit; after adding condition 4, conditions 1 to 4 need to be met before the scaling-down operation can be executed on the target business system.

[0126] The estimated business peak for the next day = the average peak transaction volume over seven consecutive days * 50% + the average peak transaction volume over the current month * 35% + the average peak transaction volume over the current year * 15%.

[0127] In some embodiments, during the process of scaling down the target business system, the elastic scaling manager 300 triggers the cloud platform 100, the network automatic deployment manager 400, the storage automatic deployment manager 500, the application automatic deployment manager 600 and other components to perform corresponding operations. The specific method of scaling down the target business system is as follows:

[0128] When the estimated resource demand, estimated response time, current response time, and current time meet the preset scaling-down conditions, modify the operation monitoring configuration of the target business system to avoid false alarms during scaling-down.

[0129] Modify the load balancing policy of the target business system so that the target computing instance of the target business system stops receiving new requests; specifically, call the network automatic deployment manager 400 to modify the load balancing policy so that the target computing instance stops receiving new requests.

[0130] It should be noted that the target computing instance is the computing instance that needs to be scaled down. Usually, computing instances are scaled down in the reverse order of expansion. Therefore, the target computing instance is the computing instance with the latest creation time corresponding to the target business system (that is, the computing instance that was expanded most recently).

[0131] After stopping the target compute instance from accepting new requests, wait for an application timeout period to ensure that all responses have been sent or cannot be sent.

[0132] Delete the application node on the target computing instance from the application cluster; specifically, call the application automatic deployment manager 600 to modify the cluster configuration of the application cluster, and delete the application node on the target computing instance from the application cluster.

[0133] The network is configured to separate the target computing instance from the service network and perform data backup; specifically, the network automatic deployment manager 400 is called to separate the target computing instance from the service network.

[0134] Unmount the storage volume for the target computing instance and reclaim the corresponding running resources and the unmounted storage volume; specifically, unmount the storage volume for the target computing instance, call the storage automatic deployment manager 500 to reclaim the unmounted storage volume, and call the cloud platform 100 to reclaim the running resources released by the shrink operation.

[0135] Modify the security monitoring configuration so that the target computing instance is no longer subject to security monitoring to avoid IP spoofing attacks; in other words, make the target computing instance no longer subject to security monitoring as a running computing instance.

[0136] It should be noted that during the process of performing a scaling-down operation on the target business system, if there are multiple computing instances that need to be scaled down, only one computing instance will be scaled down at a time; after scaling down one computing instance, if the next computing instance needs to be scaled down, it is also necessary to determine whether the scaling-down conditions are met. Only when the scaling-down conditions are met can the next computing instance be scaled down.

[0137] It is understandable that network segments need to be added to the firewall during the expansion and contraction process, and IP addresses that are not used daily pose a potential security risk; therefore, the elastic scaling manager 300 needs to have the ability to automatically configure security monitoring equipment to ensure that there are no loopholes in daily security monitoring.

[0138] For example, after capacity expansion, add the corresponding IP address and monitor the traffic of the IP address through security monitoring equipment to detect network attacks. After capacity reduction, delete the corresponding IP address so that the security monitoring equipment no longer monitors the deleted IP address, thereby preventing network attacks such as counterfeit IP addresses.

[0139] It should be noted that, for large enterprises, they usually have a business system monitoring system, so the elastic scaling manager 300 can be called to configure the business system monitoring system to ensure that there are no loopholes in business monitoring.

[0140] In an environment with automated operation and maintenance monitoring, the elastic scaling manager 300 also needs to have the ability to automatically configure the automated operation and maintenance monitoring to ensure that monitoring is not missed during expansion and contraction.

[0141] In an embodiment of the present invention, data related to the transaction load of a target business system is used to calculate the corresponding estimated resource requirements and estimated resource requirements. Based on the estimated resource requirements, estimated resource requirements, and other information, a decision is made to scale the target business system down or up. This eliminates the need for manual configuration during the scaling-down or scaling-up process, improving operational efficiency and reducing operational risks.

[0142] Corresponding to the method for elastic scaling based on transaction volume load provided in the above embodiment of the present invention, see Figure 3 , an embodiment of the present invention further provides a structural block diagram of an apparatus for elastic scaling based on transaction volume load, the apparatus comprising: an acquisition unit 301, a first calculation unit 302, a second calculation unit 303, a third calculation unit 304, an expansion unit 305, and a contraction unit 306;

[0143] The acquisition unit 301 is used to obtain the current transaction volume load, transaction volume index smoothing curve and business response time smoothing curve of the target business system. The current transaction volume load includes the current transaction volume and the current response time. The target business system is any business system in the business system cluster. The business systems in the business system cluster run based on the operating resources provided by the resource pool.

[0144] The first calculation unit 302 is configured to calculate an estimated resource load after a preset duration according to the current transaction volume, the fixed consumed resources of the calculation instance, and a preset proportional relationship.

[0145] The second calculation unit 303 is configured to calculate an estimated resource demand after a preset time period by using a transaction volume index smoothing curve, the estimated resource load, and a preset proportional relationship.

[0146] The third calculation unit 304 is configured to calculate an estimated response time after a preset time period by using the service response time smoothing curve.

[0147] The capacity expansion unit 305 is configured to execute a capacity expansion operation based on the target business system of the running resources in the resource pool when the estimated resource demand and / or the estimated response time meet the preset capacity expansion conditions.

[0148] In some embodiments, the expansion condition is: the estimated resource demand is greater than a preset resource threshold, or the estimated response time is greater than a preset response time upper limit, where the resource threshold is determined based on the resource amount allocated to the target business system.

[0149] The scaling-down unit 306 is configured to perform a scaling-down operation on the target business system when the estimated resource demand, the estimated response time, the current response time, and the current time meet preset scaling-down conditions.

[0150] In some embodiments, the scaling-down conditions are: the estimated resource demand is less than the preset resource utilization lower limit, the estimated response time and the current response time are both less than the preset response time lower limit, and the current time is in the off-peak business period.

[0151] In an embodiment of the present invention, data related to the transaction load of a target business system is used to calculate the corresponding estimated resource requirements and estimated resource requirements. Based on the estimated resource requirements, estimated resource requirements, and other information, a decision is made to scale the target business system down or up. This eliminates the need for manual configuration during the scaling-down or scaling-up process, improving operational efficiency and reducing operational risks.

[0152] Preferably, combined Figure 3 As shown in the figure, the second calculation unit 303 includes a first calculation module, a second calculation module, a third calculation module, a weighting module and a fourth calculation module; the execution principle of each module is as follows: the first calculation module is used to calculate the second derivative of the trading volume index smoothing curve.

[0153] The second calculation module is used to calculate the first derivative of each time slice within a preset time length according to the second derivative of the trading volume exponential smoothing curve to obtain a first value corresponding to each time slice.

[0154] The third calculation module is used to calculate, for each time slice within a preset time length, the product of the actual trading volume corresponding to the time slice, the first value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a second value corresponding to the time slice.

[0155] The weighting module is used to perform weighted averaging on the second values ​​corresponding to each time slice within a preset time period to obtain an estimated transaction volume.

[0156] The fourth calculation module is used to calculate the estimated resource demand after a preset time period using the estimated transaction volume, the estimated resource load and the preset proportional relationship if the estimated transaction volume is higher than the preset transaction volume lower limit and lower than the preset transaction volume upper limit.

[0157] Preferably, combined Figure 3 As shown in the figure, the third calculation unit 304 includes a first calculation module, a second calculation module, a third calculation module and a weighting module; the execution principle of each module is as follows:

[0158] The first calculation module is used to calculate the second derivative of the service response time smooth curve.

[0159] The second calculation module is used to calculate the first derivative value of each time slice within a preset time length according to the second derivative of the business response time smooth curve to obtain a third value corresponding to each time slice.

[0160] The third calculation module is used to calculate, for each time slice within a preset duration, the product of the actual business average response time corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain the fourth value corresponding to the time slice.

[0161] The weighting module is used to perform weighted averaging on the fourth value corresponding to each time slice within the preset time length to obtain the estimated response time after the preset time length.

[0162] Preferably, combined Figure 3 As shown in the figure, the expansion unit 305 includes a creation module, a mounting module, a first processing module, a second processing module, and a configuration module; the execution principle of each module is as follows:

[0163] The creation module is used to create a new computing instance and a new storage volume for the target business system when the estimated resource demand and / or estimated response time meet the preset expansion conditions.

[0164] The mount module is used to mount new storage volumes for new compute instances.

[0165] The first processing module is used to deploy and configure a new application node corresponding to the new computing instance, and add the new application node to the application cluster.

[0166] The second processing module is used to perform network configuration and service verification on the new application node, so that the new application node can perform internal access and respond to external requests.

[0167] The configuration module is used to configure security monitoring and operation monitoring for new application nodes so that the new application nodes can meet security requirements and be included in the operation and maintenance monitoring system.

[0168] Preferably, combined Figure 3 As shown in the figure, the shrinking unit 306 includes a first modification module, a second modification module, a deletion module, a first processing module, a second processing module, and a third modification module. The execution principle of each module is as follows:

[0169] The first modification module is used to modify the operation monitoring configuration of the target business system when the estimated resource demand, estimated response time, current response time and current time meet the preset scaling-down conditions to avoid false alarms during scaling-down.

[0170] The second modification module is used to modify the load balancing policy of the target business system so that the target computing instance of the target business system stops receiving new requests, wherein the target computing instance is the computing instance corresponding to the target business system with the latest creation time.

[0171] The deletion module is used to delete the application node on the target computing instance from the application cluster.

[0172] The first processing module is used to configure the network to separate the target computing instance from the business network and perform data backup.

[0173] The second processing module is used to unmount the storage volume for the target computing instance and reclaim the corresponding operating resources and the unmounted storage volume.

[0174] The third modification module is used to modify the security monitoring configuration so that the target computing instance is no longer subject to security monitoring to avoid IP spoofing attacks.

[0175] In summary, embodiments of the present invention provide a method and apparatus for elastic scaling based on transaction load. These methods utilize data related to the transaction load of a target business system to calculate the corresponding estimated resource requirements and estimated resource demand. Based on the estimated resource requirements, estimated resource demand, and other information, a decision is made to scale the target business system down or up. This process eliminates the need for manual configuration, improving operational efficiency and reducing operational risks.

[0176] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0177] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0178] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for elastic scaling based on transaction volume load, characterized in that: The method comprises: Obtaining the current transaction volume load, transaction volume index smoothing curve, and business response time smoothing curve of the target business system, wherein the current transaction volume load includes the current transaction volume and the current response time, and the target business system is any business system in the business system cluster, and the business systems in the business system cluster run based on the running resources provided by the resource pool; Calculate the estimated resource load after a preset time period according to the current transaction volume, the fixed consumption resources of the computing instance and the preset ratio relationship; The estimated resource demand after the preset time period is calculated by using the transaction volume index smoothing curve, the estimated resource load and the preset proportional relationship; Using the service response time smoothing curve, the estimated response time after the preset time length is calculated; When the estimated resource demand and the estimated response time meet a preset expansion condition, an expansion operation is performed on the target business system based on the operating resources in the resource pool; the expansion condition is: the estimated resource demand is greater than a preset resource threshold, or the estimated response time is greater than a preset response time upper limit, wherein the resource threshold is determined based on the resource amount allocated to the target business system; When the estimated resource demand, the estimated response time, the current response time and the current time meet the preset scaling-down conditions, a scaling-down operation is performed on the target business system; the scaling-down conditions are: the estimated resource demand is less than the preset resource utilization lower limit, the estimated response time and the current response time are both less than the preset response time lower limit, and the current time is in a business off-peak period.

2. The method according to claim 1, characterized in that: Calculating the estimated resource demand after the preset time period by using the transaction volume index smoothing curve, the estimated resource load and the preset proportional relationship includes: Calculating the second derivative of the volume exponential smoothing curve; According to the second derivative of the trading volume exponential smoothing curve, the first derivative of each time slice within the preset time length is calculated to obtain a first value corresponding to each time slice; For each time slice within the preset time length, the product of the real transaction volume corresponding to the time slice, the first value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point is calculated to obtain a second value corresponding to the time slice; Taking a weighted average of the second values ​​corresponding to each time slice within the preset time length to obtain an estimated transaction volume; If the estimated transaction volume is higher than the preset transaction volume lower limit and lower than the preset transaction volume upper limit, the estimated resource demand after the preset time period is calculated using the estimated transaction volume, the estimated resource load and the preset proportional relationship.

3. The method according to claim 1, characterized in that Calculating the estimated response time after the preset time using the service response time smoothing curve includes: Calculating the second derivative of the service response time smooth curve; Calculate the first derivative value of each time slice within a preset time length according to the second derivative of the service response time smooth curve to obtain a third value corresponding to each time slice; For each time slice within the preset duration, calculate the product of the real service average response time corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a fourth value corresponding to the time slice; A weighted average is performed on the fourth value corresponding to each time slice within the preset duration to obtain an estimated response time after the preset duration.

4. The method according to claim 1, characterized in that When the estimated resource demand and the estimated response time meet a preset capacity expansion condition, performing a capacity expansion operation on the target business system based on the operating resources in the resource pool, including: When the estimated resource demand and the estimated response time meet the preset expansion condition, creating a new computing instance and a new storage volume for the target business system; Mounting the new storage volume for the new computing instance; Deploy and configure a new application node corresponding to the new computing instance, and add the new application node to the application cluster; Performing network configuration and service verification on the new application node so that the new application node can perform internal access and respond to external requests; Security monitoring configuration and operation monitoring configuration are performed on the new application node so that the new application node can meet security requirements and be included in the operation and maintenance monitoring system.

5. The method according to claim 1, characterized in that When the estimated resource demand, the estimated response time, the current response time and the current time meet the preset shrinking condition, a shrinking operation is performed on the target business system, including: When the estimated resource demand, the estimated response time, the current response time and the current time meet the preset shrinking conditions, modify the operation monitoring configuration of the target business system to avoid false alarms during shrinking; Modify the load balancing policy of the target business system so that the target computing instance of the target business system stops receiving new requests, wherein the target computing instance is the computing instance corresponding to the target business system with the latest creation time; Deleting the application node on the target computing instance from the application cluster; Configuring the network to remove the target computing instance from the business network and performing data backup; Unmounting the storage volume for the target computing instance, and reclaiming the corresponding operating resources and the unmounted storage volume; Modify the security monitoring configuration so that the target computing instance is no longer subject to security monitoring to avoid IP spoofing attacks.

6. A device for elastic scaling based on transaction volume load, characterized in that: The device comprises: An acquisition unit, used to acquire a current transaction volume load, a transaction volume index smoothing curve, and a business response time smoothing curve of a target business system, wherein the current transaction volume load includes a current transaction volume and a current response time, and the target business system is any business system in a business system cluster, and the business systems in the business system cluster run based on running resources provided by a resource pool; A first calculation unit, configured to calculate an estimated resource load after a preset time period according to the current transaction volume, the fixed consumption resources of the calculation instance and a preset proportional relationship; A second calculation unit is used to calculate the estimated resource demand after the preset time period by using the transaction volume index smoothing curve, the estimated resource load and the preset proportional relationship; A third calculation unit, configured to calculate an estimated response time after the preset time period by using the service response time smoothing curve; an expansion unit, configured to perform an expansion operation on the target business system based on the operating resources in the resource pool when the estimated resource demand and the estimated response time meet a preset expansion condition; the expansion condition is: the estimated resource demand is greater than a preset resource threshold, or the estimated response time is greater than a preset response time upper limit, wherein the resource threshold is determined based on the resource amount allocated to the target business system; The capacity reduction unit is used to perform a capacity reduction operation on the target business system when the estimated resource demand, the estimated response time, the current response time and the current time meet the preset capacity reduction conditions; the capacity reduction conditions are: the estimated resource demand is less than the preset resource utilization lower limit, the estimated response time and the current response time are both less than the preset response time lower limit, and the current time is in the business off-peak period.

7. The device according to claim 6, characterized in that The second computing unit comprises: A first calculation module, used for calculating the second derivative of the trading volume index smoothing curve; A second calculation module is used to calculate the first derivative of each time slice within a preset time length according to the second derivative of the trading volume index smoothing curve, so as to obtain a first value corresponding to each time slice; A third calculation module is used to calculate, for each time slice within the preset time length, the product of the real transaction volume corresponding to the time slice, the first value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a second value corresponding to the time slice; A weighting module, used for performing weighted averaging on the second values ​​corresponding to each time slice within the preset time length to obtain an estimated transaction volume; The fourth calculation module is used to calculate the estimated resource demand after the preset time period using the estimated transaction volume, the estimated resource load and the preset proportional relationship if the estimated transaction volume is higher than the preset transaction volume lower limit and lower than the preset transaction volume upper limit.

8. The device according to claim 6, characterized in that The third computing unit comprises: A first calculation module, used to calculate the second derivative of the service response time smooth curve; A second calculation module, used to calculate the first derivative value of each time slice within a preset time length according to the second derivative of the business response time smooth curve, so as to obtain a third value corresponding to each time slice; A third calculation module is used to calculate, for each time slice within the preset duration, the product of the real service average response time corresponding to the time slice, the third value corresponding to the time slice, and the number of time slices between the time slice and the estimated time point, to obtain a fourth value corresponding to the time slice; The weighting module is used to perform weighted averaging on the fourth value corresponding to each time slice within the preset duration to obtain the estimated response time after the preset duration.

Citation Information

Patent Citations

  • intelligent network SCP cloud service implementation system based on CAAS

    CN109756366A

  • Method and device for predicting resource usage amount

    CN110618867A

  • Digital factory operation state prediction method, system and device

    CN110956331A