CN107656807B - Automatic elastic expansion method and device for virtual resources - Google Patents

Automatic elastic expansion method and device for virtual resources Download PDF

Info

Publication number
CN107656807B
CN107656807B CN201610594541.0A CN201610594541A CN107656807B CN 107656807 B CN107656807 B CN 107656807B CN 201610594541 A CN201610594541 A CN 201610594541A CN 107656807 B CN107656807 B CN 107656807B
Authority
CN
China
Prior art keywords
instance
target
group
monitoring data
statistical information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610594541.0A
Other languages
Chinese (zh)
Other versions
CN107656807A (en
Inventor
王喆
李金成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610594541.0A priority Critical patent/CN107656807B/en
Publication of CN107656807A publication Critical patent/CN107656807A/en
Application granted granted Critical
Publication of CN107656807B publication Critical patent/CN107656807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

The embodiment of the invention provides an automatic elastic stretching method and device for virtual resources, wherein the method comprises the following steps: receiving a monitoring alarm aiming at least one working index of a target telescopic group; determining a telescopic strategy aiming at a target telescopic group according to the monitoring alarm; when the expansion strategy is to increase the instances, obtaining the instance specification of the target expansion group, wherein the instance specification is determined in advance according to the statistical information of the monitoring data of at least one working index of the target expansion group; and sending an instance adding request carrying the instance specification to the instance resource management platform so that the instance resource management platform adds the instance to the target flexible group according to the instance specification. Namely, the instance specification of the newly-added instance in the embodiment of the invention is updated according to the load condition reflected by the working index of the scalable group, so that the resource allocation precision and the resource utilization rate of the instance of the scalable group can be improved.

Description

Automatic elastic expansion method and device for virtual resources
Technical Field
The invention relates to the technical field of electronics, in particular to an automatic elastic stretching method and device for virtual resources.
Background
The elasticity of resources is an important characteristic of a cloud computing data center, and is mainly realized based on an automatic elastic Scaling (Auto Scaling) technology. The automatic elastic expansion technology adopts a certain fixed automatic elastic expansion strategy, and when the load change of an expansion group of an application is increased or reduced, the number of virtual instances in the expansion group of the application is correspondingly increased or reduced. In practical application, because the cloud computing data center often cannot predict the actual load demand of the application, when the current load demand exceeds or is about to exceed the load that can be borne by the resources of the cloud computing data center, the cloud computing data center needs to add more virtualization instances to deal with loads other than the load that can be borne currently, and conversely, when the load that can be borne by the resources of the cloud computing data center far exceeds the current load demand, the cloud computing data center needs to reduce the unused virtualization instances, so the cloud computing data center can control the number of the applied virtualization instances by using an automatic elastic expansion and contraction technology.
In the prior art, the virtualization instances are configured according to different specifications. For example, the virtualized instance may be configured according to the specification that the CPU dominant frequency is 1G and the memory is 2G, or may be configured according to the specification that the CPU dominant frequency is 2G and the memory is 4G, where this configuration mode lacks precision, and if the initially configured instance specification is too high, it is easy to cause resource waste, and if the initially configured instance specification is too low, it is easy to cause insufficient resources allocated to the instance.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide an automatic elastic scaling method and apparatus for virtual resources, which are used for adding instances to a scalable group according to an instance specification that is updated regularly according to actual resource requirements, thereby improving resource allocation accuracy and resource utilization rate of the scalable group instances.
The first embodiment of the invention provides an automatic elastic expansion and contraction method of virtual resources. The method comprises the steps that after an automatic elastic expansion device of the virtual resource receives a monitoring alarm according to a monitoring alarm aiming at least one working index of a target expansion group, an expansion strategy aiming at the target expansion group is determined, when the expansion strategy is determined to be the situation of increasing an example, an example specification which is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group is obtained, and finally an example increasing request carrying the example specification is sent to an example resource management platform, wherein the example increasing request is used for indicating the example resource management platform to increase the example for the target expansion group according to the example specification.
In the technical scheme, the instance specification of the newly-added instance of the automatic elastic expansion device of the virtual resource is updated according to the load condition reflected by the working index of the target expansion group, so that the problem of difficult initial configuration of the instance specification caused by fixing the instance specification can be avoided, the resource allocation precision and the resource utilization rate of the instance of the expansion group can be improved, and the relative stability of the expansion group can be ensured.
In a first possible implementation manner of the first aspect, before the automatic elastic expansion device of the virtual resource acquires the instance specification of the target expansion group, first acquiring monitoring data for at least one working index of the target expansion group, determining statistical information of the monitoring data for the at least one working index of the target expansion group according to the acquired monitoring data, and then determining the instance specification of the target expansion group according to the statistical information of the monitoring data for the at least one working index of the target expansion group.
In the technical scheme, after the monitoring data of the working indexes of the target telescopic group are subjected to statistical analysis by the automatic elastic telescopic device of the virtual resource, statistical information capable of reflecting the load requirements of the target telescopic group is obtained, so that the instance specification of the target telescopic group can be updated regularly according to the load requirements of the target telescopic group, and the resource allocation precision and the resource utilization rate of the telescopic group instance are improved.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, after the automatic elastic stretching device of the virtual resource determines the instance specification of the target stretching group, the determined instance specification of the target stretching group is covered with the original instance specification of the target stretching group.
In the technical scheme, the automatic elastic expansion device of the virtual resource replaces the original instance specification with the updated instance specification of the target expansion group, so that the storage space can be saved.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, after determining an instance specification of the target scalable group, an automatic elastic scaling device of a virtual resource acquires creation time of the determined instance specification of the target scalable group, and stores the creation time and the instance specification of the target scalable group into a preset instance specification set of the target scalable group in a corresponding manner, where the instance specification set of the target scalable group includes multiple instance specifications of the target scalable group corresponding to the creation time.
In the technical scheme, the automatic elastic scaling device of the virtual resource stores the instance specification updated by the target scaling group every time in a timing manner and the corresponding creation time in the instance specification set, so that the integrity of the instance specification update record can be kept, and meanwhile, more optional deleting methods can be provided when the target scaling group instance is deleted.
With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner, the monitoring data includes multiple monitoring data collected at multiple sampling time points, the automatic elastic expansion device of the virtual resource determines, according to a time sequence of the multiple sampling time points, weight values of the multiple monitoring data corresponding to the multiple sampling time points, and then calculates, according to the multiple monitoring data corresponding to the multiple sampling time points, statistical information of the monitoring data for at least one work index of the target expansion group with reference to the weight values corresponding to the multiple monitoring data.
In the technical scheme, the automatic elastic expansion device of the virtual resource can set the weight values of a plurality of monitoring data corresponding to a plurality of sampling time points respectively according to the importance degrees of the plurality of monitoring data corresponding to the plurality of sampling time points, so that more accurate statistical information can be obtained.
With reference to the first possible implementation manner of the first aspect, in a fifth possible implementation manner, the statistical information of the monitoring data of at least one working index respectively has a corresponding instance specification ranking policy, the automatic elastic expansion device of the virtual resource obtains the instance specification ranking policy corresponding to the statistical information of the monitoring data of at least one working index of the target expansion group, and then determines the instance specification of the target expansion group according to the statistical information of the monitoring data of at least one working index of the target expansion group and the instance specification ranking policy corresponding to the statistical information of the monitoring data of at least one working index.
In the technical scheme, the automatic elastic expansion device of the virtual resource obtains the instance specification capable of meeting the statistical information of different degrees by setting an instance specification grading strategy.
In a sixth possible implementation manner of the first aspect, a plurality of example specifications of a target scaling group exist, an automatic elastic scaling device of a virtual resource acquires an example specification with the latest creation time from the plurality of example specifications of the target scaling group, and sends an instance adding request carrying the example specification with the latest creation time to the instance resource management platform, where the instance adding request is used to instruct the instance resource management platform to add an instance to the target scaling group according to the example specification with the latest creation time.
In a seventh possible implementation manner of the first aspect, when the scaling policy is to reduce an instance, the automatic elastic scaling device of the virtual resource obtains an instance specification of the target scaling group, and sends an instance reduction request carrying the instance specification to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete at least one instance of multiple instances of the target scaling group according to the instance specification.
With reference to the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner, a plurality of instance specifications of a target scalable group exist, an automatic elastic scaling device of a virtual resource acquires an instance specification with an earliest creation time in the plurality of instance specifications of the target scalable group, and sends an instance reduction request carrying the instance specification with the earliest creation time to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete an instance with an earliest creation time of at least one instance specification in the plurality of instances of the target scalable group.
The invention provides an automatic elastic expansion device of virtual resources in a second aspect. The apparatus includes a processor, a memory, and a communication interface. The processor is connected to the memory and the communication interface, for example, the processor may be connected to the memory and the communication interface through a bus. The communication interface is used for communicating with monitoring equipment, an instance resource management platform and other equipment. The memory is used for storing the example specification of the target scale group and the like. The processor is configured to perform part or all of the procedures of the first aspect.
A third aspect provides another apparatus for automatic elastic stretching of virtual resources, the apparatus comprising:
the receiving module is used for receiving a monitoring alarm aiming at least one working index of the target telescopic group;
the processing module is used for determining a telescopic strategy aiming at the target telescopic group according to the monitoring alarm;
the processing module is further configured to:
when the expansion strategy is to increase an example, acquiring an example specification of the target expansion group, wherein the example specification is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group;
and the sending module is used for sending an instance adding request carrying the instance specification to an instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification.
In a first possible implementation manner of the third aspect, the processing module is further configured to:
acquiring monitoring data of at least one working index of the target telescopic group;
determining statistical information of the monitoring data of at least one working index of the target telescopic group according to the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner, the processing module is further configured to:
and covering the determined example specification of the target telescopic group with the original example specification of the target telescopic group.
With reference to the first possible implementation manner of the third aspect, in a third possible implementation manner, the processing module is further configured to:
acquiring the establishing time of the determined example specification of the target telescopic group;
and correspondingly storing the creation time and the example specification of the target telescopic group into a preset example specification set of the target telescopic group, wherein the example specification set of the target telescopic group comprises a plurality of example specifications of the target telescopic group corresponding to the creation time.
With reference to the first possible implementation manner of the third aspect, in a fourth possible implementation manner, the monitoring data includes multiple monitoring data collected at multiple sampling time points;
the processing module is further configured to:
determining the weight values of a plurality of monitoring data respectively corresponding to the plurality of sampling time points according to the time front-back sequence of the plurality of sampling time points;
and calculating statistical information of the monitoring data of at least one working index of the target telescopic group according to a plurality of monitoring data respectively corresponding to the plurality of sampling time points and by combining the weight values corresponding to the plurality of monitoring data.
With reference to the first possible implementation manner of the third aspect, in a fifth possible implementation manner, the statistical information of the monitoring data of the at least one working index respectively has a corresponding instance specification ranking policy;
the processing module is further configured to:
acquiring an example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group and by combining the example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index.
In a sixth possible implementation manner of the third aspect, there are a plurality of instance specifications of the target scaling group;
the processing module is further configured to: acquiring an instance specification with the latest creation time in a plurality of instance specifications of the target telescopic group;
the sending module is further configured to: and sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification with the latest creation time.
In a seventh possible implementation manner of the third aspect, the processing module is further configured to: when the scaling strategy is a reduction example, acquiring the example specification of the target scaling group;
the sending module is further configured to: and sending an instance reduction request carrying the instance specification to the instance resource management platform, wherein the instance reduction request is used for indicating the instance resource management platform to delete at least one instance in the multiple instances of the target scalable group according to the instance specification.
With reference to the seventh possible implementation manner of the third aspect, in an eighth possible implementation manner, a plurality of instance specifications of the target scalable group exist;
the processing module is further configured to: acquiring an instance specification with the earliest creation time in a plurality of instance specifications of the target telescopic group;
the sending module is further configured to: sending an instance reduction request carrying the instance specification with the earliest creation time to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete the instance with the earliest creation time of at least one instance specification from the multiple instances of the target scalable group.
In a fourth aspect of the present application, a storage medium is provided, where a program code is stored in the storage medium, and when the program code is executed by a computing device, the method for automatically elastic scaling of virtual resources according to the first aspect or any one of the implementation manners of the first aspect is performed. The storage medium includes, but is not limited to, a flash memory (english: flash memory), a hard disk (HDD) or a Solid State Drive (SSD).
In a fifth aspect of the present application, a computer program product is provided, which when executed by a computing device, performs an automatic elastic scaling method for a virtual resource provided in the first aspect or any one of the implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram of a management architecture of an automatic elastic expansion device according to an embodiment of the present invention;
FIG. 1b is a system architecture diagram of an automatic elastic expansion system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an automatic elastic scaling method for virtual resources according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for updating specification of an example of a scalable group according to an embodiment of the present invention;
fig. 4 is a simplified schematic diagram illustrating a structure of an automatic elastic expansion device for virtual resources according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an automatic elastic expansion device for virtual resources according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another automatic elastic expansion device for virtual resources according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this section, some basic concepts related to various embodiments of the present invention will be described first.
The scalable group in the embodiment of the present invention refers to a set of virtualized instances that execute the same application and have the same function.
The virtualization instance refers to a virtual individual which is formed by physical resources (computing resources, storage resources, network resources and the like) through virtualization technology and can independently perform computing, storage and network communication functions, and the virtual individual can be mainly represented as a virtual machine and a container. The virtualization instance related to the automatic elastic stretching method in the embodiment of the present invention may be a virtual machine or a container, and is not limited to a certain form. Hereinafter, the virtualized instance is simply referred to as an "instance".
The instance specification may be understood as a configuration of the virtualized instance, and may specifically include a main frequency size of the CPU, a memory size, a network bandwidth, a disk capacity, and the like.
Fig. 1a is a schematic diagram illustrating a scaling management architecture of an automatic elastic scaling device, wherein one scaling group includes at least one virtualization instance (virtualization instances 103a, 103b, and 103c are illustrated in fig. 1 a), and an elastic scaling device 101 of a virtual resource can perform scaling control management on at least one scaling group (scaling groups 102a, 102b, and 102c are illustrated in fig. 1 a), that is, the elastic scaling device 101 of a virtual resource can make decisions on increase or decrease of virtualization instances in a certain scaling group that it manages, and on the number of instances and the instance specification that should be increased or decreased. For example, the scalable group 102b includes virtualization instances 103a, 103b, and 103c, and the elastic scaling device 101 of the virtual resource may decide to add a virtualization instance to the scalable group 102b, including adding several virtualization instances, what specification the added instance needs to be configured; it may also be decided to delete a virtualized instance 103a, 103b, or 103c in the flex group 102 b.
The method in this embodiment is applicable to various automated elastic telescoping systems based on virtualized instances of a telescoping group, for example, a system architecture diagram of an automated elastic telescoping system is shown in fig. 1 b. The instance resource management platform 104 is a device that manages at least one virtualized instance, and the virtualized instance managed by the platform runs on a server or a server cluster (servers 105a, 105b, and 105c running the virtualized instance are shown in fig. 1 b). In the system architecture diagram shown in fig. 1b, after the elastic scaling device 101 of the virtual resource determines the scaling policy for the target scaling group, the scaling policy and the corresponding instance specification may be sent to the instance resource management platform 104, and the instance resource management platform 104 adds or reduces the virtualized instance to or from the target scaling group according to the scaling policy and the instance specification. Further, the instance resource management platform 104 may be not only a centralized management platform as shown in fig. 1b, but also a distributed management platform distributed on each server running the virtualized instance. The execution method described in the embodiment of the present invention is an automatic elastic scaling method for virtual resources in the system environment shown in fig. 1b, so that the virtualized instance of the scaling group is adjusted according to the scaling control management of the elastic scaling device 101 for virtual resources.
Referring to fig. 2, fig. 2 is a flowchart illustrating an automatic elastic scaling method for virtual resources according to an embodiment of the present invention, where the method is applicable to scaling control of any virtualization instance of a scaling group, and scaling control flows of virtualization instances for each scaling group are substantially the same, so that in the embodiment of the present invention, an automatic elastic scaling method for only one scaling group, that is, an automatic elastic scaling method for a target scaling group, is described. The method according to the embodiment of the present invention may be executed by an automatic elastic expansion device for virtual resources, where the automatic elastic expansion device for virtual resources may be an electronic device such as a server or a personal computer, or a software program running on the electronic device.
The method comprises the following steps:
step S201, receiving a monitoring alarm aiming at least one working index of the target telescopic group.
The work index is a series of index data capable of reflecting the overall work condition of the scalable group or the work condition of a certain example of the scalable group, for example, the work index may be the average CPU (Central Processing Unit) usage, memory usage, disk occupancy, disk read-write capacity, network throughput, and the like of all the examples in the scalable group; or the CPU usage, the memory usage, the disk occupation amount, the disk read-write amount, the network throughput, and the like of one example in the scalable group. That is, whether the monitored operation index is an overall operation index for all instances of the scalable group or an individual operation index for each instance of the scalable group is possible, and is not specifically limited herein.
In this embodiment, the monitoring alarm may be sent by the automatic elastic expansion device of the virtual resource, or may be received by the automatic elastic expansion device of the virtual resource after being sent to the automatic elastic expansion device of the virtual resource by other monitoring equipment. In specific implementation, the automatic elastic expansion device or other monitoring equipment of the virtual resource can monitor at least one working index of the target expansion group in real time, and can preset alarm conditions for each working index, and when monitoring that the monitoring data of one working index meets the alarm condition corresponding to the working index, the corresponding monitoring alarm is triggered. For example, the memory usage amount of an instance in the scalable group may be monitored in real time, and if the memory usage amount of a certain instance of the scalable group is monitored to account for 60% of the total memory size of the instance, a monitoring alarm for the memory usage amount is issued. The specific types of the monitoring alarms may include an alarm exceeding a preset threshold and an alarm lower than the preset threshold, for example, the specific types of the monitoring alarms may include an alarm that the memory usage exceeds a certain threshold, and may also include an alarm that the memory usage is lower than a certain threshold.
And step S202, determining a telescopic strategy aiming at the target telescopic group according to the monitoring alarm.
The scaling strategy refers to an adjustment strategy of an automatic elastic scaling device of a virtual resource on a virtualized instance in a scaling group, and may include increasing instances in the scaling group and decreasing instances in the scaling group.
And after receiving the monitoring alarm, determining a specific expansion strategy according to the monitoring alarm. For example, when the received monitoring alarm that the memory usage exceeds a preset first threshold value, the scaling strategy of the target scaling group may be determined to increase instances in the target scaling group; or when a monitoring alarm that the occupied amount of the disk is lower than a preset second threshold value is received, the scaling strategy of the target scaling group can be determined to reduce the instances in the target scaling group; or, when a monitoring alarm that the CPU usage exceeds the third threshold and the memory usage exceeds the fourth threshold is received, the scaling policy of the target scaling group may be determined to increase the instances in the target scaling group.
Step S203, when the expansion strategy is to increase an example, obtaining an example specification of the target expansion group, wherein the example specification is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group.
Step S204, an instance adding request carrying the instance specification is sent to an instance resource management platform, and the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification.
Each instance of the scalable group is configured with a corresponding instance specification, and when the scaling strategy is to increase the instances in the target scalable group, the instance specification of the target scalable group may be obtained first, and the instances are newly added to the target scalable group according to the obtained instance specification. It should be noted that, in the embodiment of the present invention, the obtained example specification of the target expansion group is determined according to statistical information obtained by analyzing and calculating monitoring data of at least one working index of the target expansion group obtained at regular time. The statistical information may include at least one of statistical parameters such as a mean value, an upper limit value, a lower limit value, a burst value, and a probability distribution function of the monitoring data of at least one working index of the target scaling group.
That is to say, the automatic elastic expansion device of the virtual resource may periodically update the instance specification of the target expansion group according to the monitoring data of the working index of the target expansion group, and when the target expansion group needs to add an instance, configure the newly added instance with the updated latest instance specification.
In some implementation scenarios, only one instance specification of the target expansion group is stored in the automatic elastic expansion device of the virtual resource, which is the latest instance specification of the target expansion group, that is, after the instance specification of the target expansion group is updated each time to generate the latest instance specification, the original instance specification is replaced with the latest instance specification, and when the instance specification of the target expansion group is obtained, the latest instance specification of the target expansion group can be obtained by directly searching the instance specification corresponding to the target expansion group, and an instance adding request carrying the instance specification is sent to the instance resource management platform, so that the instance resource management platform adds an instance to the target expansion group according to the instance specification.
For example, if the latest instance specification after the target scalable group is updated is 2G of the CPU master frequency, 4GB of the memory size, 10M of the disk space, and 500Mb/s of the network bandwidth, after the instance resource management platform acquires the instance specification, at least one instance of the instance specification may be added to the target scalable group.
In other implementation scenarios, a plurality of instance specifications of the target scaling group stored in the automatic elastic scaling device of the virtual resource exist, that is, after a new instance specification is generated each time, the generated instance is stored, so as to form an instance specification set of the plurality of instance specifications for the target scaling group, and when the instance specification of the target scaling group is obtained, an instance specification with the latest time may be first searched for in the instance specification set of the target scaling group, where the instance specification with the latest time of creation refers to the newly established instance specification in the plurality of instance specifications, that is, the instance specification generated by one update closest to the time of currently obtaining the instance specification. And finally, sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform, so that the instance resource management platform can add the instance to the target telescopic group according to the instance specification with the latest creation time.
Further, the manner of searching for the instance specification with the latest creation time in the instance specification set of the target scalable group may be determined according to the creation time or version number corresponding to the instance specification or other identifiers capable of expressing the order of generation of the instance specification, and is not specifically limited herein.
For example, assuming that the target scaling group has an instance specification set including three instance specifications (for example, a CPU master frequency, a memory size, and a network bandwidth configuration), each instance specification has a corresponding creation time, and as shown in table 1, for example, the latest time found by the automatic elastic scaling apparatus for virtual resources is 12: 15, if the corresponding instance specification is the 3 rd group instance specification, the instance specification can be added by taking the instance specification as a target expansion group, that is, each currently added instance is a specification with a CPU main frequency of 2G, a memory size of 4G, and a network bandwidth of 800 Mb/s.
Serial number Example Specifications Creation time
1 CPU main frequency 1G, memory size 2G, network bandwidth 500Mb/s 10:15
2 CPU main frequency 3G, memory size 6G, network bandwidth 1Gb/s 11:15
3 CPU main frequency 2G, memory size 4G, network bandwidth 800Mb/s 12:15
Table 1: example specification and creation time corresponding relation schematic table (example)
Optionally, the embodiment of the present invention may further include:
step S205, when the scaling policy is a reduction instance, obtaining an instance specification of the target scaling group.
Step S206, sending an instance reduction request carrying the instance specification to the instance resource management platform, wherein the instance reduction request is used for instructing the instance resource management platform to delete at least one instance in the multiple instances of the target scalable group according to the instance specification.
Corresponding to steps S203 and S204, in some implementation scenarios, there is only one instance specification of the target scalable group stored in the automatic elastic scaling device of the virtual resource, that is, the latest instance specification of the target scalable group, and thus when the scaling strategy is a reduction instance, the latest instance specification of the target scalable group can be obtained by directly searching the instance specification corresponding to the target scalable group, and an instance reduction request carrying the instance specification is sent to the instance resource management platform, so that the instance resource management platform deletes at least one instance of the multiple instances of the target scalable group according to the instance specification. Specifically, the instance resource management platform may reserve an instance configured as the latest instance specification in the target scalable group, and select at least one of the other remaining instances to delete; or when a certain number of instances still need to be deleted after other remaining instances are deleted, the instances configured to the latest instance specification in the target scalable group are partially deleted.
For example, the latest instance specification after the target scaling group is updated is the CPU major frequency 2G (taking the CPU major frequency specification as an example), and the target scaling group includes 4 instances, which are 2 instances with the CPU major frequency 2G and 2 instances with the CPU major frequency 1G. After receiving the latest instance specification, the instance resource management platform can preferentially delete the 2 instances with the specification of the CPU dominant frequency 1G according to the current instance specification of the target scalable group if 2 instances need to be reduced; if 3 instances need to be reduced, then after deleting 2 instances with the specification of the CPU dominant frequency 1G, an instance with the specification of the CPU dominant frequency 2G can be selected and deleted.
In other implementation scenarios, a plurality of instance specifications of the target expansion group stored in the automatic elastic expansion device of the virtual resource exist, and each instance specification has a corresponding creation time or an identifier capable of expressing the order of the creation time, so that when the expansion strategy is to reduce instances, the creation time corresponding to each of the plurality of instance specifications in the target expansion group or the identifier capable of expressing the order of the creation time may be obtained first, and then the instance specification with the earliest creation time in the plurality of instance specifications of the target expansion group is obtained, where the instance specification with the earliest creation time refers to the instance specification established first in the plurality of instance specifications, that is, the instance specification generated by one update with the farthest time from the currently obtained instance specification. And finally, sending a request for reducing the instance carrying the instance specification with the earliest creation time to the instance resource management platform, so that the instance resource management platform deletes the instance with the earliest creation time of at least one instance specification from the multiple instances of the target scalable group.
For example, it is assumed that an instance specification set for a target scaling group exists in an automatic elastic scaling device for virtual resources, where the instance specification set includes three instance specifications (for example, a CPU master frequency, a memory size, and a network bandwidth configuration), and each instance specification has a corresponding version identifier, and the version identifier may represent a front-back order of creation time, that is, the larger the number of the version identifier is, the later the creation time is, the smaller the number of the version identifier is, and the earlier the creation time is. The target expansion group comprises 4 examples, wherein the 2 examples respectively have the specification of CPU main frequency 2G, memory size 4G and network bandwidth 800Mb/s and the 2 examples have the specification of CPU main frequency 3G, memory size 6G and network bandwidth 1 Gb/s. Illustratively, as shown in table 2, the automatic elastic expansion device for virtual resources finds out that the version identifier corresponding to the version identifier 2 Gb/s (the CPU master frequency 3G, the memory size 4G, and the network bandwidth 800 Mb/s) is 3, the version identifier corresponding to the CPU master frequency 3G, the memory size 6G, and the network bandwidth 1Gb/s is 2 in 4 instances in the target expansion group, that is, the version identifier minimum in 4 instances in the target expansion group is 2, the automatic elastic expansion device for virtual resources can send the instance specifications corresponding to the version identifier 2 (the CPU master frequency 3G, the memory size 6G, and the network bandwidth 1Gb/s) to the instance resource management platform, and after the instance resource management platform receives the latest instance specification, if 1 instance needs to be reduced, one instance specification can be deleted as the CPU master frequency 3G and the memory size 6G, example network bandwidth 1 Gb/s.
Serial number Example Specifications Version identification
1 CPU main frequency 1G, memory size 2G, network bandwidth 500Mb/s 1
2 CPU main frequency 3G, memory size 6G, network bandwidth 1Gb/s 2
3 CPU main frequency 2G, memory size 4G, network bandwidth 800Mb/s 3
Table 2: example specification and version identification corresponding relation indication table (example)
In the embodiment shown in fig. 2, after receiving a monitoring alarm for at least one working index of a target scalable group, an automatic elastic scaling device of a virtual resource determines a scaling strategy for the target scalable group according to the monitoring alarm, and when the scaling strategy determines that an instance is to be added, obtains an instance specification determined in advance according to statistical information of monitoring data for at least one working index of the target scalable group, and finally configures the newly added instance for the target scalable group by using the instance specification through an instance resource management platform. That is to say, the instance specification of the newly added instance of the automatic elastic expansion device of the virtual resource is updated according to the load condition reflected by the working index of the expansion group, so that the problem of difficult initial configuration of the instance specification caused by fixing the instance specification can be avoided, the resource allocation precision and the resource utilization rate of the instance of the expansion group can be improved, and the relative stability of the expansion group can be ensured.
Before the embodiment shown in fig. 2, monitoring data for at least one working index of a target expansion group is obtained in advance, statistical analysis is performed on the monitoring data to obtain corresponding statistical information, and finally a latest instance specification is determined. Therefore, the process of updating the instance specification by the automatic elastic scaling device of the virtual resource is further described by the embodiment shown in fig. 3. It should be noted that the updating method according to the embodiment of the present invention may be executed in a loop, and since the algorithm and the process of each update are consistent, only the process of one update is described here.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a method for updating specification of an example of a scalable group according to an embodiment of the present invention, where the method includes:
step S301, acquiring monitoring data of at least one working index of the target telescopic group.
As described in the above embodiment, the work index is a series of index data capable of reflecting the overall work condition of the scalable group or the work condition of one example of the scalable group, for example, the work index may be the average CPU usage, memory usage, disk occupancy, disk read/write capacity, network throughput, and the like of all the examples in the scalable group; or the CPU usage, the memory usage, the disk occupation amount, the disk read-write amount, the network throughput, and the like of one example in the scalable group. The automatic elastic telescopic device of the virtual resource can be considered to collect the monitoring data corresponding to each working index at regular time when monitoring the working index of the target telescopic group, and each sampling time point corresponds to one monitoring data. When the statistical analysis is performed on the monitoring data of at least one working index of the target expansion group, a statistical period can be preset, and then the monitoring data in one statistical period is obtained, namely the monitoring data collected at each sampling time point in the time length corresponding to the statistical period is obtained.
For example, if the statistical period is 1 hour, and the monitoring data of the work index of the target expansion group is sampled every 1 minute, then 59 groups of sampled monitoring data exist in one statistical period, and then the automatic elastic expansion device of the virtual resource may obtain 59 groups of sampled monitoring data collected in the statistical period.
Step S302, according to the monitoring data of at least one working index of the target telescopic group, determining the statistical information of the monitoring data of at least one working index of the target telescopic group.
The statistical information is statistical data obtained by calculating the obtained multiple monitoring data according to a mathematical statistical method, and may specifically include, but is not limited to, an average value, an upper limit value, a lower limit value, a burst value, a probability distribution function, or a joint probability distribution function of the multiple monitoring data of at least one working index of the target telescopic group.
For example, if the automatic elastic expansion device of the virtual resource acquires the monitoring data of 60 memory usage amounts regularly acquired in one period, the average value of the monitoring data of the 60 memory usage amounts can be calculated according to the data calculation formula of the average value; the maximum memory usage value in the monitoring data can be used as an upper limit value, and the minimum memory usage value can be used as a lower limit value; or taking monitoring data with a certain amount higher than the average value in the monitoring data as a burst value; the probability distribution function of the 60 memory usage amounts can also be calculated by a mathematical calculation formula of the probability distribution function.
When the weighted average value is calculated, the automatic elastic expansion device of the virtual resource can distribute the same weight to each monitoring data, and can also distribute the weight values of a plurality of monitoring data according to the time sequence of a plurality of sampling time points when the monitoring data are collected regularly. For example, the later the time at which the time point is sampled, i.e., the closer to the current time at which the statistical analysis is performed, the higher the weight value is assigned, and conversely, the lower the weight value is assigned.
Further, there may be a plurality of weight proportions distributed, for example, the first weight proportion may be that the weight of the first sample point is 0.1, the weight of the second sample point is 0.2, the weight of the third sample point is 0.3, and so on; the second weight distribution ratio may be that the weight of the first sample point is 0.1, the weight of the second sample point is 0.5, the weight of the third sample point is 1, and so on. It can be seen that the first weight distribution ratio is expected to acquire average statistical information of a relatively average, and the second weight distribution ratio is expected to acquire average statistical information closer to the sampling time point, that is, closer to the current time.
Furthermore, the automatic elastic expansion device of the virtual resource not only can count the statistical information of the monitoring data aiming at one working index, but also can perform joint statistics on the monitoring data of a plurality of working indexes, for example, a joint probability distribution function of the usage amount of the CPU and the usage amount of the memory can be calculated.
In this embodiment, the statistical information corresponding to the monitoring data of each operation index may be the same or different, and is not limited specifically here. For example, empirically, if the average of CPU usage is more accurate, the average of CPU usage may be calculated, and if the burst value of network throughput is more valuable for the configuration of the instance specification, the burst value of network throughput may be calculated.
Step S303, determining an example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group.
After the automatic elastic expansion device of the virtual resource calculates statistical information of the monitoring data of at least one working index of the target expansion group in a statistical period, example specifications of the statistical information of the monitoring data which can meet the working indexes can be further determined.
For example, if the average of the calculated network throughputs is 500Mb/s, a piece of network bandwidth data that can satisfy the average of the network throughputs in the statistical period may be determined as the specification for the network bandwidth in the example specification of the target scalable group, for example, the network bandwidth in the example specification may be set to 1 Gb/s.
For another example, if the calculated upper limit of the memory usage amount is 3G, a memory size that can satisfy the upper limit of the memory usage amount in the statistical period may be determined as a specification of the memory size in the example specification of the target scalable group, and for example, the memory size in the example specification may be set to 3G.
Further optionally, there may be a plurality of example specifications determined according to the obtained statistical information, for example, the memory size satisfying that the upper limit of the memory usage amount is 3G may be set to 3G, or may be 4G, and so on. Therefore, in some implementation scenarios, different instance specification grading strategies can be set for the statistical data in the multiple kinds of statistical information corresponding to each kind of working index according to different requirements, and the instance specifications corresponding to the different grading strategies can meet the statistical information to different degrees.
For example, if the average value of the CPU usage in the statistical information is 2G, there are three example specification classification strategies for the CPU usage average value, the first example specification can satisfy the CPU usage average value of 50%, the second example specification can satisfy the CPU usage average value of 100%, and the third example specification can satisfy the CPU usage average value of 200%. The automatic elastic expansion device of the virtual resource can select a classification strategy according to the current requirement, for example, if the first classification strategy is selected, the CPU dominant frequency in the example specification can be set to 1G, namely, the CPU usage average value obtained by 50% of statistics is met; if the third level is selected, the CPU dominant frequency in the example specification may be set to 4G, which is to satisfy 200% of the statistically derived CPU usage average.
For another example, if the joint probability distribution of the CPU usage and the memory usage in the statistical information reflects: the probability that the CPU usage is less than 1G and the memory usage is less than 2G is 40%, the probability that the CPU usage is less than 2G and the memory usage is less than 4G is 60%, and the probability that the CPU usage is less than 3G and the memory usage is less than 6G is 80%. There may be three example specification grading strategies for the joint probability distribution of the CPU usage and the memory usage, which are respectively an example specification grading strategy capable of satisfying 40% of the CPU usage and the memory usage, 60% of the CPU usage and the memory usage, and 80% of the CPU usage and the memory usage. If the first instance specification grading strategy is selected, the CPU main frequency can be set to be 1G, the memory size can be set to be 2G, and 40% of CPU usage and memory usage can be met; if the second instance specification grading strategy is selected, the CPU main frequency can be set to be 2G, and the memory size can be set to be 4G, namely 60% of CPU usage and memory usage can be met.
Further, after determining the current latest target scaling group instance specification, the generated latest instance specification needs to be stored, and the specific storage manner may be described in step S304, or may be described in steps S305 and S306. The two storage modes correspond to two modes for acquiring the specification of the target expansion group instance when the automatic elastic expansion device of the virtual resource in the embodiment shown in fig. 2 increases or decreases instances.
Step S304, the determined example specification of the target telescopic group covers the original example specification of the target telescopic group.
The original example specification may be an initial example specification configured for the target expansion group, or may be an example specification updated by the automatic elastic expansion device of the virtual resource in the previous statistical period according to the statistical information of the monitoring data of the target expansion group. In some implementation scenarios, after determining the latest instance specification corresponding to the current statistical period, the latest instance specification of the currently determined target scalable group may be stored in place of the original instance specification of the target scalable group. That is, only the latest instance specification of one target scalability group is stored in the automatic elastic scalability apparatus for a virtual resource.
Step S305, acquiring the creation time of the determined example specification of the target telescopic group.
Step S306, correspondingly storing the creation time and the instance specification of the target scalable group into a preset instance specification set of the target scalable group, where the instance specification set of the target scalable group includes multiple instance specifications of the target scalable group corresponding to the creation time.
In some implementation scenarios, after determining the instance specification of the target scalable group, the configuration in the instance specification may be recorded, that is, a version or a document of the instance specification is generated, and at this time, the creation time of the instance specification may be recorded or an identifier that may represent the creation time sequence may be recorded. During storage, the instance specification and the corresponding creation time or the identifier representing the order of the creation time may be stored in a preset instance specification set of the target scalable group, where the instance specification set may include the instance specification and the corresponding creation time updated in each previous statistical period of the target scalable group. That is, each updated instance specification of the target scaling group and the corresponding creation time are saved by the instance specification set of the target scaling group.
In the embodiment shown in fig. 3, the automatic elastic expansion device of the virtual resource determines statistical information according to the monitoring data for at least one working index of the target expansion group, and then determines an example specification of the target expansion group that can satisfy the statistical information according to the statistical information. That is to say, the automatic elastic expansion device of the virtual resource obtains statistical information capable of reflecting the load demand of the target expansion group after performing statistical analysis on the monitoring data of the working index of the target expansion group, so that the instance specification of the target expansion group can be updated regularly according to the load demand of the target expansion group, and the problem of difficulty in initial configuration of the instance specification caused by fixing the instance specification is avoided.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an automatic elastic expansion device for virtual resources according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes: a receiving module 41, a processing module 42, and a sending module 43, wherein, as shown in fig. 5, the processing module 42 may include: a scaling policy determining module 421, an instance specification obtaining module 422, a monitoring data obtaining module 423, a statistical information determining module 424, an instance specification determining module 425, a first storage module 426, a creation time obtaining module 427, and a second storage module 428, specifically:
a receiving module 41, configured to receive a monitoring alarm for at least one working indicator of a target expansion group;
the processing module 42 includes:
a scaling strategy determining module 421, configured to determine a scaling strategy for the target scaling group according to the monitoring alarm;
an instance specification obtaining module 422, configured to obtain an instance specification of the target scalable group when the scaling policy is to increase an instance, where the instance specification is determined in advance according to statistical information of monitoring data for at least one working index of the target scalable group;
a sending module 43, configured to send an instance adding request carrying the instance specification to an instance resource management platform, where the instance adding request is used to instruct the instance resource management platform to add an instance to the target scalable group according to the instance specification.
Optionally, there are a plurality of instance specifications of the target scaling group;
the instance specification obtaining module 422 is specifically configured to: acquiring an instance specification with the latest creation time in a plurality of instance specifications of the target telescopic group;
the sending module 43 is specifically configured to: and sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification with the latest creation time.
Optionally, the processing module 42 further includes:
a monitoring data obtaining module 423, configured to obtain monitoring data for at least one working indicator of the target expansion group;
a statistical information determining module 424, configured to determine statistical information of monitoring data for at least one working indicator of the target scalable group according to the monitoring data for the at least one working indicator of the target scalable group;
an example specification determining module 425, configured to determine an example specification of the target scaling group according to statistical information of the monitoring data of at least one working indicator of the target scaling group.
Optionally, the monitoring data includes a plurality of monitoring data collected at a plurality of sampling time points;
the statistical information determining module 424 is specifically configured to:
determining the weight values of a plurality of monitoring data respectively corresponding to the plurality of sampling time points according to the time front-back sequence of the plurality of sampling time points;
and calculating statistical information of the monitoring data of at least one working index of the target telescopic group according to a plurality of monitoring data respectively corresponding to the plurality of sampling time points and by combining the weight values corresponding to the plurality of monitoring data.
Optionally, the statistical information of the monitoring data of the at least one working index respectively has a corresponding instance specification grading strategy;
the instance specification determination module 425 is specifically configured to:
acquiring an example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group and by combining the example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index.
Optionally, the processing module 42 further includes:
a first storage module 426, configured to overwrite the determined instance specification of the target scaling group with an original instance specification of the target scaling group.
Optionally, the processing module 42 further includes:
a creation time acquisition module 427, configured to acquire the creation time of the determined example specification of the target expansion group;
a second storing module 428, configured to store the creation time and the instance specification of the target scalable group correspondingly into a preset instance specification set of the target scalable group, where the instance specification set of the target scalable group includes multiple instance specifications of the target scalable group corresponding to the creation time.
Optionally, the instance specification obtaining module 422 is further configured to:
when the scaling strategy is a reduction example, acquiring the example specification of the target scaling group;
the sending module 43 is further configured to: and sending an instance reduction request carrying the instance specification to the instance resource management platform, wherein the instance reduction request is used for indicating the instance resource management platform to delete at least one instance in the multiple instances of the target scalable group according to the instance specification.
Optionally, there are a plurality of instance specifications of the target scaling group;
the instance specification obtaining module 422 is specifically configured to: acquiring an instance specification with the earliest creation time in a plurality of instance specifications of the target telescopic group;
the sending module 43 is specifically configured to: sending an instance reduction request carrying the instance specification with the earliest creation time to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete the instance with the earliest creation time of at least one instance specification from the multiple instances of the target scalable group.
In the embodiment of the invention, after the automatic elastic expansion device of the virtual resource receives the monitoring alarm aiming at least one working index of the target expansion group, the expansion strategy aiming at the target expansion group is determined according to the monitoring alarm, when the expansion strategy is determined to be the situation of increasing the example, the example specification determined according to the statistical information of the monitoring data of at least one working index of the target expansion group in advance is obtained, and finally the example resource management platform configures the newly increased example by taking the example specification as the target expansion group. That is to say, the instance specification of the newly added instance of the automatic elastic expansion device of the virtual resource is updated according to the load condition reflected by the working index of the expansion group, so that the problem of difficult initial configuration of the instance specification caused by fixing the instance specification can be avoided, the resource allocation precision and the resource utilization rate of the instance of the expansion group can be improved, and the relative stability of the expansion group can be ensured.
Fig. 6 is a schematic structural diagram of another automatic elastic expansion device for virtual resources according to an embodiment of the present invention. As shown in fig. 6, the apparatus includes a processor 61, a memory 62, and a communication interface 63. The processor 61 is connected to the memory 62 and the communication interface 63, for example, the processor 61 may be connected to the memory 62 and the communication interface 63 through a bus. The device can be a server for realizing the elastic expansion function in an actual scene.
The processor 61 is configured to support the automatic elastic scaling device of the virtual resource to execute the corresponding functions in the above method. The processor 61 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 62 is used for storing example specifications of the target scalable group, program codes, and the like. The memory 62 may include a volatile memory (RAM), such as a Random Access Memory (RAM); the memory 62 may also include a non-volatile memory (ROM), such as a read-only memory (read-only memory), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory 62 may also comprise a combination of the above types of memory.
The communication interface 63 is used for wireless connection with other devices, such as monitoring devices, instance resource management platforms.
The processor 61 may call the program code to perform the following operations:
receiving a monitoring alarm for at least one working index of the target telescopic group through the communication interface 63; determining a scaling strategy aiming at the target scaling group according to the monitoring alarm; when the expansion strategy is to increase an example, acquiring an example specification of the target expansion group, wherein the example specification is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group; and sending an instance adding request carrying the instance specification to an instance resource management platform through a communication interface 63, wherein the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification.
Optionally, before the processor 61 obtains the instance specification of the target expansion group, the processor obtains monitoring data of at least one working index of the target expansion group; determining statistical information of the monitoring data of at least one working index of the target telescopic group according to the monitoring data of at least one working index of the target telescopic group; and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group.
Optionally, after the processor 61 determines the instance specification of the target scalable group, the determined instance specification of the target scalable group is covered with the original instance specification of the target scalable group.
Optionally, after the processor 61 determines the example specification of the target scalable group, acquiring the creation time of the determined example specification of the target scalable group; and correspondingly storing the creation time and the example specification of the target telescopic group into a preset example specification set of the target telescopic group, wherein the example specification set of the target telescopic group comprises a plurality of example specifications of the target telescopic group corresponding to the creation time.
Optionally, the monitoring data includes a plurality of monitoring data collected at a plurality of sampling time points; when determining statistical information of the monitoring data for the at least one working index of the target expansion group according to the monitoring data for the at least one working index of the target expansion group, the processor 61 determines weight values of a plurality of monitoring data respectively corresponding to the plurality of sampling time points according to a time sequence of the plurality of sampling time points; and calculating statistical information of the monitoring data of at least one working index of the target telescopic group according to a plurality of monitoring data respectively corresponding to the plurality of sampling time points and by combining the weight values corresponding to the plurality of monitoring data.
Optionally, the statistical information of the monitoring data of the at least one working index respectively has a corresponding instance specification grading strategy; when the example specification of the target scalable group is determined according to the statistical information of the monitoring data of at least one working index of the target scalable group, the processor 61 obtains an example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index of the target scalable group; and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group and by combining the example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index.
Optionally, there are a plurality of instance specifications of the target scaling group; when acquiring the instance specification of the target scalable group, the processor 61 acquires an instance specification whose creation time is the latest among the plurality of instance specifications of the target scalable group; and sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform through a communication interface 63, where the instance adding request is used to instruct the instance resource management platform to add an instance to the target scalable group according to the instance specification with the latest creation time.
Optionally, when the scaling policy is a reduction instance, the processor 61 further obtains an instance specification of the target scaling group; sending an instance reduction request carrying the instance specification to the instance resource management platform through a communication interface 63, where the instance reduction request is used to instruct the instance resource management platform to delete at least one instance in the multiple instances of the target scalable group according to the instance specification.
Optionally, there are a plurality of instance specifications of the target scaling group; when acquiring the instance specification of the target scalable group, the processor 61 acquires an instance specification whose creation time is the earliest among the plurality of instance specifications of the target scalable group; sending, to the instance resource management platform through a communication interface 63, a reduced instance request carrying the instance specification with the earliest creation time, where the reduced instance request is used to instruct the instance resource management platform to delete, from the multiple instances of the target scalable group, the instance with the earliest creation time of at least one instance specification.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (13)

1. A method for automatic elastic scaling of virtual resources, the method comprising:
receiving a monitoring alarm aiming at least one working index of a target telescopic group;
determining a scaling strategy aiming at the target scaling group according to the monitoring alarm;
when the expansion strategy is to increase an example, acquiring an example specification of the target expansion group, wherein the example specification is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group;
sending an instance adding request carrying the instance specification to an instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add the instance of the instance specification to the target flexible group according to the instance specification;
wherein there are a plurality of instance specifications of the target scalability group;
the obtaining of the instance specification of the target scalable group comprises:
acquiring an instance specification with the latest creation time in a plurality of instance specifications of the target telescopic group;
the sending of the instance adding request carrying the instance specification to the instance resource management platform includes:
sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add the instance specification with the latest creation time to the target flexible group according to the instance specification with the latest creation time;
when the scaling strategy is a reduction example, acquiring an example specification with the earliest creation time in a plurality of example specifications of the target scaling group;
sending an instance reduction request carrying the instance specification with the earliest creation time to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete the instance with the earliest creation time of at least one instance specification from the multiple instances of the target scalable group.
2. The method of claim 1, wherein prior to obtaining the instance specification for the target warp group, further comprising:
acquiring monitoring data of at least one working index of the target telescopic group;
determining statistical information of the monitoring data of at least one working index of the target telescopic group according to the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group.
3. The method of claim 2, wherein after determining the instance specification of the target warp group, further comprising:
and covering the determined example specification of the target telescopic group with the original example specification of the target telescopic group.
4. The method of claim 2, wherein after determining the instance specification of the target warp group, further comprising:
acquiring the establishing time of the determined example specification of the target telescopic group;
and correspondingly storing the creation time and the example specification of the target telescopic group into a preset example specification set of the target telescopic group, wherein the example specification set of the target telescopic group comprises a plurality of example specifications of the target telescopic group corresponding to the creation time.
5. The method of claim 2, wherein the monitoring data comprises a plurality of monitoring data collected at a plurality of sampling time points;
the determining, according to the monitoring data for the at least one working index of the target scalable group, statistical information of the monitoring data for the at least one working index of the target scalable group includes:
determining the weight values of a plurality of monitoring data respectively corresponding to the plurality of sampling time points according to the time front-back sequence of the plurality of sampling time points;
and calculating statistical information of the monitoring data of at least one working index of the target telescopic group according to a plurality of monitoring data respectively corresponding to the plurality of sampling time points and by combining the weight values corresponding to the plurality of monitoring data.
6. The method of claim 2, wherein there is a corresponding instance specification ranking policy for the statistical information of the monitored data of the at least one working indicator, respectively;
the determining the example specification of the target expansion group according to the statistical information of the monitoring data of at least one working index of the target expansion group comprises:
acquiring an example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group and by combining the example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index.
7. An automatic elastic expansion device of virtual resources, characterized in that the device comprises:
the receiving module is used for receiving a monitoring alarm aiming at least one working index of the target telescopic group;
the processing module is used for determining a telescopic strategy aiming at the target telescopic group according to the monitoring alarm;
the processing module is further configured to:
when the expansion strategy is to increase an example, acquiring an example specification of the target expansion group, wherein the example specification is determined in advance according to statistical information of monitoring data of at least one working index of the target expansion group;
a sending module, configured to send an instance adding request carrying the instance specification to an instance resource management platform, where the instance adding request is used to instruct the instance resource management platform to add an instance to the target scalable group according to the instance specification;
wherein there are a plurality of instance specifications of the target scalability group;
the processing module is further configured to: acquiring an instance specification with the latest creation time in a plurality of instance specifications of the target telescopic group;
the sending module is further configured to: sending an instance adding request carrying the instance specification with the latest creation time to the instance resource management platform, wherein the instance adding request is used for indicating the instance resource management platform to add an instance to the target flexible group according to the instance specification with the latest creation time;
the processing module is further configured to: when the scaling strategy is a reduction example, acquiring an example specification with the earliest creation time in a plurality of example specifications of the target scaling group;
the sending module is further configured to: sending an instance reduction request carrying the instance specification with the earliest creation time to the instance resource management platform, where the instance reduction request is used to instruct the instance resource management platform to delete the instance with the earliest creation time of at least one instance specification from the multiple instances of the target scalable group.
8. The apparatus of claim 7, wherein the processing module is further to:
acquiring monitoring data of at least one working index of the target telescopic group;
determining statistical information of the monitoring data of at least one working index of the target telescopic group according to the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group.
9. The apparatus of claim 8, wherein the processing module is further to:
and covering the determined example specification of the target telescopic group with the original example specification of the target telescopic group.
10. The apparatus of claim 8, wherein the processing module is further to:
acquiring the establishing time of the determined example specification of the target telescopic group;
and correspondingly storing the creation time and the example specification of the target telescopic group into a preset example specification set of the target telescopic group, wherein the example specification set of the target telescopic group comprises a plurality of example specifications of the target telescopic group corresponding to the creation time.
11. The apparatus of claim 8, wherein the monitoring data comprises a plurality of monitoring data collected at a plurality of sampling time points;
the processing module is further configured to:
determining the weight values of a plurality of monitoring data respectively corresponding to the plurality of sampling time points according to the time front-back sequence of the plurality of sampling time points;
and calculating statistical information of the monitoring data of at least one working index of the target telescopic group according to a plurality of monitoring data respectively corresponding to the plurality of sampling time points and by combining the weight values corresponding to the plurality of monitoring data.
12. The apparatus of claim 8, wherein there is a corresponding instance specification ranking policy for the statistical information of the monitored data of the at least one working indicator, respectively;
the processing module is further configured to:
acquiring an example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index of the target telescopic group;
and determining the example specification of the target telescopic group according to the statistical information of the monitoring data of at least one working index of the target telescopic group and by combining the example specification grading strategy corresponding to the statistical information of the monitoring data of at least one working index.
13. An automatic elastic scaling device for virtual resources, characterized in that the device comprises a processor, a memory and a communication interface, wherein the memory is used for storing program codes, and the processor calls the program codes stored in the memory to execute the method of any one of claims 1 to 6.
CN201610594541.0A 2016-07-26 2016-07-26 Automatic elastic expansion method and device for virtual resources Active CN107656807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610594541.0A CN107656807B (en) 2016-07-26 2016-07-26 Automatic elastic expansion method and device for virtual resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610594541.0A CN107656807B (en) 2016-07-26 2016-07-26 Automatic elastic expansion method and device for virtual resources

Publications (2)

Publication Number Publication Date
CN107656807A CN107656807A (en) 2018-02-02
CN107656807B true CN107656807B (en) 2021-06-29

Family

ID=61127441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610594541.0A Active CN107656807B (en) 2016-07-26 2016-07-26 Automatic elastic expansion method and device for virtual resources

Country Status (1)

Country Link
CN (1) CN107656807B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932156A (en) * 2018-08-22 2018-12-04 郑州云海信息技术有限公司 A kind of information acquisition method and device
CN109412841A (en) * 2018-09-30 2019-03-01 北京金山云网络技术有限公司 Method of adjustment, device and the cloud platform of resources of virtual machine
CN109445911B (en) * 2018-11-06 2020-12-18 北京金山云网络技术有限公司 CVM (continuously variable memory) instance adjusting method and device, cloud platform and server
CN111190719A (en) * 2018-11-14 2020-05-22 北京京东尚科信息技术有限公司 Method, device, medium and electronic equipment for optimizing cluster resource allocation
CN110175068A (en) * 2019-04-16 2019-08-27 平安科技(深圳)有限公司 Host number elastic telescopic method, apparatus and computer equipment in distributed system
CN110502340A (en) * 2019-08-09 2019-11-26 广东浪潮大数据研究有限公司 A kind of resource dynamic regulation method, device, equipment and storage medium
CN113918315A (en) * 2020-07-07 2022-01-11 华为技术有限公司 Method, device and system for capacity adjustment and computing equipment
CN111857977B (en) * 2020-09-21 2020-12-25 腾讯科技(深圳)有限公司 Elastic expansion method, device, server and storage medium
CN115766336A (en) * 2022-09-27 2023-03-07 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257683A (en) * 2013-05-07 2013-08-21 华为技术有限公司 Method and device of cloud calculation service expansion and contraction
TW201407476A (en) * 2012-08-06 2014-02-16 Hon Hai Prec Ind Co Ltd System and method for allocating resource of virtual machine
CN103810020A (en) * 2014-02-14 2014-05-21 华为技术有限公司 Virtual machine elastic scaling method and device
US9154549B2 (en) * 2011-10-27 2015-10-06 Cisco Technology, Inc. Dynamic server farms
CN105159775A (en) * 2015-08-05 2015-12-16 浪潮(北京)电子信息产业有限公司 Load balancer based management system and management method for cloud computing data center

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014038364A (en) * 2010-10-27 2014-02-27 Hitachi Ltd Resource management server, resource management method and resource management program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154549B2 (en) * 2011-10-27 2015-10-06 Cisco Technology, Inc. Dynamic server farms
TW201407476A (en) * 2012-08-06 2014-02-16 Hon Hai Prec Ind Co Ltd System and method for allocating resource of virtual machine
CN103257683A (en) * 2013-05-07 2013-08-21 华为技术有限公司 Method and device of cloud calculation service expansion and contraction
CN103810020A (en) * 2014-02-14 2014-05-21 华为技术有限公司 Virtual machine elastic scaling method and device
CN105159775A (en) * 2015-08-05 2015-12-16 浪潮(北京)电子信息产业有限公司 Load balancer based management system and management method for cloud computing data center

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多目标优化的云计算虚拟集群动态调整方法;张玮 等;《济南大学学报》;20140306;第28卷(第5期);第378-379页 *

Also Published As

Publication number Publication date
CN107656807A (en) 2018-02-02

Similar Documents

Publication Publication Date Title
CN107656807B (en) Automatic elastic expansion method and device for virtual resources
CN108205541B (en) Method and device for scheduling distributed web crawler tasks
CN107943718B (en) Method and device for cleaning cache file
JP6191691B2 (en) Abnormality detection apparatus, control method, and program
CN110545326B (en) Cluster load scheduling method and device, electronic equipment and storage medium
CN112667376A (en) Task scheduling processing method and device, computer equipment and storage medium
KR20120102664A (en) Allocating storage memory based on future use estimates
US8572621B2 (en) Selection of server for relocation of application program based on largest number of algorithms with identical output using selected server resource criteria
WO2015001850A1 (en) Task allocation determination device, control method, and program
CN113010260A (en) Elastic expansion method and system for container quantity
CN110244901B (en) Task allocation method and device and distributed storage system
EP3932025B1 (en) Computing resource scheduling method, scheduler, internet of things system, and computer readable medium
CN111522636A (en) Application container adjusting method, application container adjusting system, computer readable medium and terminal device
CN112269661B (en) Partition migration method and device based on Kafka cluster
CN114385463A (en) Data acquisition method and device and electronic equipment
CN112214288B (en) Pod scheduling method, device, equipment and medium based on Kubernetes cluster
CN111694505B (en) Data storage management method, device and computer readable storage medium
CN113312371A (en) Processing method, equipment and system for execution plan
CN111291018B (en) Data management method, device, equipment and storage medium
CN106686082B (en) Storage resource adjusting method and management node
US11416152B2 (en) Information processing device, information processing method, computer-readable storage medium, and information processing system
US9367439B2 (en) Physical memory usage prediction
CN112416888B (en) Dynamic load balancing method and system for distributed file system
CN112367384A (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
CN113448747B (en) Data transmission method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220215

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right