CN111580925B - Method and device for stretching application - Google Patents

Method and device for stretching application Download PDF

Info

Publication number
CN111580925B
CN111580925B CN201910123256.4A CN201910123256A CN111580925B CN 111580925 B CN111580925 B CN 111580925B CN 201910123256 A CN201910123256 A CN 201910123256A CN 111580925 B CN111580925 B CN 111580925B
Authority
CN
China
Prior art keywords
application
virtual machine
information
cluster
deployed
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
CN201910123256.4A
Other languages
Chinese (zh)
Other versions
CN111580925A (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 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 CN201910123256.4A priority Critical patent/CN111580925B/en
Publication of CN111580925A publication Critical patent/CN111580925A/en
Application granted granted Critical
Publication of CN111580925B publication Critical patent/CN111580925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The application provides a method and a device for stretching an application, and belongs to the technical field of big data. The method comprises the following steps: acquiring KPI information of an application, if KPI information of a first application in the application meets application stretching conditions, determining first deployment application information on a virtual machine in a first cluster to which the first application belongs, and stretching the first application by using the first deployment application information. By adopting the application, the stretching efficiency can be improved.

Description

Method and device for stretching application
Technical Field
The application relates to the technical field of big data, in particular to a method and a device for stretching application.
Background
As the most profound revolution in the internet technology (Internet Technology, IT) industry since the internet revolution, cloud computing has implemented shielding of business, underlying resources. In a cloud computing system, there are multiple clusters, where each cluster includes at least one Virtual Machine (VM), each Virtual Machine may run at least one application, each application is provided with resources by at least one Virtual Machine, and when the traffic of the application a suddenly increases, the Virtual Machine is newly added to provide services for the application a.
In the related art, a cluster includes a virtual machine a and a virtual machine B, where the virtual machine a and the virtual machine B both provide resources for an application C and an application D, and when the resource utilization of the virtual machine B exceeds the maximum resource utilization, a virtual machine is newly created, and the application C and the application D are deployed on the newly created virtual machine, so that the resource utilization of the virtual machine B is lower than the maximum resource utilization.
In carrying out the present application, the inventors have found that the related art has at least the following problems:
when the resource utilization rate of the virtual machine B exceeds the maximum resource utilization rate, the traffic of the application C exceeds the maximum traffic, but the traffic of the application D does not exceed the maximum traffic, and both the application C and the application D are deployed on the new virtual machine, so that the application D uses resources which do not need to be consumed, and the application C may not stretch once, needs to stretch for multiple times, and has low stretching efficiency.
Disclosure of Invention
In order to solve the problems of the related art, the embodiment of the application provides a method and a device for application extension. The technical scheme is as follows:
in a first aspect, there is provided a method of application stretching, the method comprising:
and acquiring Key Performance Index (KPI) information of an application, and if the KPI information of a first application in the application meets an application extension condition, determining first deployment application information on a virtual machine in a first cluster to which the first application belongs. And carrying out stretching processing on the first application according to the first deployment application information.
According to the scheme disclosed by the embodiment of the application, a management agent (which can be a program) is arranged on each virtual machine, the management agent can periodically collect key performance index (Key Performance Indicators, KPI) information of each application on the affiliated virtual machine and then send the key performance index (Key Performance Indicators, KPI) information to management equipment, and the management equipment can count the sum of each received KPI information for one application after receiving the key performance index information. After acquiring the KPI information of the application, it may be determined whether the KPI information of the application satisfies an application extension condition, if the KPI information of a certain application (which may be referred to as a first application in the following) in the application satisfies the application extension condition, it may be determined that a cluster to which the first application belongs (which may be referred to as a first cluster in the following), and then first deployment application information of the first cluster is acquired. Then, based on the first deployment application information, whether to newly build the virtual machine or whether to deploy the first application on another virtual machine can be determined, and then the first application is stretched. Thus, stretching processing can be performed for the first application.
In one possible implementation, the KPI information includes one or more of connection number, concurrent call volume, parallel thread number, call number CAPS established per second.
The connection number refers to the number of services currently establishing connection with the application according to the scheme shown in the embodiment of the application. For example, connections are established with 5 devices for which data is transmitted respectively, the number of connections being 5.
Concurrent call volume refers to the number of concurrent calls made. For example, 15 devices are called in parallel, and the concurrent call volume is 15.
The number of concurrent threads refers to the number of concurrently running threads. For example, there are 20 threads running in parallel, with 20 concurrent threads.
The number of calls established per second (Call Attempt Per Second, CAPS) refers to the number of call connections established per second. For example, there are 10 call connections established per second, with CAPS being 10.
In a possible implementation manner, the stretching processing is performed on the first application according to the first deployment application information, including: according to the first deployment application information, if all virtual machines in the first cluster are deployed with the first application, a first virtual machine is newly built; the first application is deployed on the first virtual machine.
According to the scheme disclosed by the embodiment of the application, the management equipment can use the first deployment application information to determine the application deployed on each virtual machine in the first cluster, then judge whether the first application is deployed on each virtual machine or not, and if the first application is deployed on each virtual machine in the first cluster, the virtual machine can be newly deployed (which can be called as a first virtual machine in the follow-up). The first application is then deployed on the first virtual machine. In this way, since the first application is deployed on the virtual machine which is not deployed with the first application, the extension of the first application is realized, and since other applications on the virtual machine to which the first application belongs are not deployed on the first virtual machine, the waste of resources can be reduced.
In a possible implementation manner, the stretching processing is performed on the first application according to the first deployment application information, including: according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a second virtual machine with the least deployment application number in the at least one virtual machine; the first application is deployed on the second virtual machine.
According to the scheme disclosed by the embodiment of the application, the application deployed on each virtual machine in the first cluster can be determined by using the first deployment application information, then whether the first application is deployed on each virtual machine is judged, if at least one virtual machine in the first cluster is not deployed with the first application, the second virtual machine with the minimum number of the deployed applications on the at least one virtual machine can be determined, and then the first application can be deployed on the second virtual machine. In this way, since the first application is deployed on the virtual machine which is not deployed with the first application before, the first application is stretched, and since other applications on the virtual machine to which the first application belongs are not stretched, the waste of resources can be reduced.
In a possible implementation manner, the stretching processing is performed on the first application according to the first deployment application information, including: according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a third virtual machine with the minimum current resource utilization rate in the at least one virtual machine; the first application is deployed on the third virtual machine.
According to the scheme disclosed by the embodiment of the application, the management equipment can use the first deployment application information to determine the application deployed on each virtual machine in the first cluster, then judge whether the first application is deployed on each virtual machine or not, if at least one virtual machine in the first cluster is not deployed with the first application, the resource utilization rate of the at least one virtual machine can be determined, the virtual machine with the minimum resource utilization rate is selected and determined as the third virtual machine, and then the first application can be deployed on the third virtual machine. In this way, since the first application is deployed on the virtual machine which is not deployed with the first application before, the first application is stretched, and since other applications on the virtual machine to which the first application belongs are not stretched, the waste of resources can be reduced.
In one possible embodiment, the method further comprises: if KPI information of a second application in the applications meets application contraction conditions, determining second deployment application information on a virtual machine in a second cluster to which the second application belongs; and performing contraction processing on the second application according to the second deployment application information.
According to the scheme disclosed by the embodiment of the application, after the management equipment acquires the KPI information of the application, the management equipment can judge whether the KPI information of the application meets the application contraction condition, if the KPI information of a certain application (which can be called a second application later) in the application meets the application expansion and contraction condition, the cluster (which can be called a second cluster later) to which the second application belongs can be determined, and then the second deployment application information of the second cluster is acquired. Then, based on the second deployment application information, it can be determined which applications on the virtual machines can be deleted, and then the second application is shrunk. In this way, application contraction can also be achieved.
In a possible implementation manner, the contracting processing for the first application according to the second deployment application information includes: and according to the second deployment application information, deleting a fourth virtual machine if the fourth virtual machine is only deployed with the second application in the second cluster, determining that the second application is contained in the second cluster and a fifth virtual machine with the minimum number of other applications is contained in the second cluster if the fourth virtual machine is not deployed with the second application in the second cluster, and unloading the second application from the fifth virtual machine.
According to the scheme disclosed by the embodiment of the application, the management equipment can determine whether the virtual machine of the second application is only deployed in the second cluster based on the second deployment application information, and if the virtual machine of the fourth virtual machine is only deployed with the second application, the virtual machine of the fourth virtual machine can be directly deleted. In this way, the use of other applications may not be affected. In this way, virtual machines can be saved. If there is no virtual machine with only the second application deployed, the number of applications deployed on each virtual machine may be determined in the second cluster, the virtual machine with the smallest number of deployed applications (i.e., the fifth virtual machine) is selected, and then the second application may be deleted from the fifth virtual machine.
In one possible embodiment, the method further comprises: and if the values of various KPI information in KPI information of a second application in the applications are lower than a first preset threshold, determining that the KPI information of the second application meets the application contraction condition.
According to the scheme disclosed by the embodiment of the application, the management equipment can determine whether the values of the KPI information of the second application are lower than the first preset threshold value, and if the values of the KPI information of the second application are lower than the first preset threshold value, the KPI information of the second application can be determined to meet the application contraction condition. In this way, whether the KPI information of the second application meets the application contraction condition can be accurately determined.
In one possible embodiment, the method further comprises: and if the value of at least one piece of KPI information in the KPI information of the first application exceeds a second preset threshold, determining that the KPI information of the first application meets the application extension condition.
According to the scheme disclosed by the embodiment of the application, the management equipment can determine whether the values of the KPI information of the first application exceed the second preset threshold, if the values of at least one KPI information exceed the second preset threshold, the KPI information of the first application can be determined to meet the application extension conditions, and if not, the KPI information of the first application can be determined to not meet the application extension conditions. In this way, whether the KPI information of the second application meets the application extension condition can be accurately determined.
In a second aspect, a management device is provided, the management device comprising a processor and a memory, the processor implementing the method of application extension provided in the first aspect above by executing instructions.
In a third aspect, there is provided an apparatus for application extension, the apparatus comprising one or more modules that, by executing instructions, implement the method for application extension provided in the first aspect above.
In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing instructions that, when run on a management device, cause the management device to perform the method of application extension provided in the first aspect above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a management device, cause the management device to perform the method of application extension provided in the first aspect described above.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the embodiment of the application, the KPI information of the application can be obtained, if the KPI information of the first application in the application meets the application extension condition, the first deployment application information on the virtual machine in the first cluster to which the first application belongs can be determined, and then the extension processing is carried out for the first application by using the first deployment application information. In this way, since only the application conforming to the application extension condition is subjected to the extension processing using the application as the extension unit, and not all the applications on the virtual machine are subjected to the extension processing, the extension efficiency can be improved.
Drawings
FIG. 1 is a schematic illustration of an application extension scenario provided by an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a management device according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for applying stretching according to an embodiment of the present application;
FIG. 4 is a schematic illustration of an application extension provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of an embodiment of the present application for applying shrinkage;
FIG. 6 is a flow chart of an application extension provided by an embodiment of the present application;
FIG. 7 is a schematic view of a device for applying stretching according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for applying stretching according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
In order to facilitate understanding of embodiments of the present application, the system architecture to which embodiments of the present application relate, and the concepts of the terms involved, are first described below.
The embodiment of the application can be applied to a cloud computing system, as shown in fig. 1, wherein the cloud computing system comprises a plurality of clusters, each cluster comprises at least one virtual machine, each virtual machine can run at least one application, each application provides resources for the application by at least one virtual machine, and when the traffic of the application A suddenly increases, the virtual machine is newly added or the application A is deployed on other virtual machines to provide services for the application A.
Cloud computing, a computing manner used to obtain computing power from a service provider, provides computing, storage, network resources needed for computing power, and is virtual.
Virtual machines, computing nodes provided by cloud computing services.
An application, a series of software that performs certain specific functions running on a single or multiple virtual machines.
The application is integrated and a plurality of applications run on one or a group of virtual machines.
The embodiment of the application provides a method for stretching an application, wherein an execution subject of the method can be a management device, and the management device can be a device for managing a cluster. Fig. 2 shows a block diagram of a management device in an embodiment of the application, which management device may comprise at least a receiver 201, a processor 202, a memory 203 and a transmitter 204. Wherein the receiver 201 may be used to implement reception of data, the transmitter 204 may be used for transmission of data, the memory 203 may be used to store software programs and modules, and the processor 202 may execute various functional applications and data processing by running the software programs and modules stored in the memory 203. The memory 203 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the management device, and the like. In addition, memory 203 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 203 may also include a memory controller to provide access to the memory 203 by the processor 202, the receiver 201, and the transmitter 204. The processor 202 is a control center of the management device, connects various parts of the entire management device using various interfaces and lines, and performs various functions of the management device and processes data by running or executing software programs and/or modules stored in the memory 203, and calling data stored in the memory 203, thereby performing overall monitoring of the management device.
Optionally, processor 202 may include one or more processing cores; preferably, the processor 202 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 202.
The embodiment of the present application provides a method for stretching applications, and in the following, a detailed description will be given of a process flow shown in fig. 3, where the details may be as follows:
step 301, obtaining KPI information of an application.
In implementation, a management agent (may be a program) is set on each virtual machine, and the management agent may periodically collect KPI information of each application on the virtual machine to which the management agent belongs, and send the KPI information to the management device, where after the management device receives the KPI information, the management device may count the sum of each received KPI information for one application. For example, in one cluster, for application a, the connection numbers are 210, 180, and 160, respectively, deployed on three virtual machines, and the connection number in KPI information of application a is 550. Thus, the management equipment can acquire the KPI information of the application.
Or, a management agent is set on each virtual machine, the management device can periodically inform the management agent on the virtual machine of sending KPI information, the management agent can send KPI information of each application on the virtual machine to which the management agent belongs to the management device, and after the management device receives the KPI information, the management device can count the sum of each received KPI information for one application. Thus, the management equipment can acquire the KPI information of the application.
The period may be preset and stored, for example, 1 minute.
Optionally, the KPI information includes one or more of connection number, concurrent call volume, parallel thread number, call number CAPS established per second.
In practice, the number of connections refers to the number of services currently establishing a connection with an application. For example, connections are established with 5 devices for which data is transmitted respectively, the number of connections being 5.
Concurrent call volume refers to the number of concurrent calls made. For example, 15 devices are called in parallel, and the concurrent call volume is 15.
The number of concurrent threads refers to the number of concurrently running threads. For example, there are 20 threads running in parallel, with 20 concurrent threads.
The number of calls established per second (Call Attempt Per Second, CAPS) refers to the number of call connections established per second. For example, there are 10 call connections established per second, with CAPS being 10.
It should be noted that the above KPI information is only an example, and any KPI information may be used as KPI information in the embodiment of the present application.
Step 302, if KPI information of a first application in the applications meets an application extension condition, determining first deployment application information on a virtual machine in a first cluster to which the first application belongs.
The deployment application information is used for indicating which applications are deployed by the virtual machines respectively, and the first deployment application information can be used for indicating which applications are deployed on the virtual machines in the first cluster. The application stretch conditions are used to determine which applications require stretch processing.
In implementation, after acquiring the KPI information of the application, the management device may determine whether the KPI information of the application meets an application extension condition, determine a cluster to which the first application belongs (which may be referred to as a first cluster) if the KPI information of a certain application (which may be referred to as a first application) in the application meets the application extension condition, and then acquire first deployment application information of the first cluster.
In addition, if the KPI information of a certain application does not meet the application stretch condition, it may be determined that the application does not need to be stretched.
It should be noted that, each time an application is deployed on a virtual machine, deployment application information of the application deployed on each virtual machine is recorded and stored.
Alternatively, the first deployment application information may be represented using a correspondence. For example, as shown in table one, the first cluster includes 3 virtual machines (virtual machine 1, virtual machine 2, and virtual machine 3), where application 1 and application 2 are deployed on virtual machine 1, application 2 and application 3 are deployed on virtual machine 2, and application 1, application 2, and application 3 are deployed on virtual machine 3.
List one
Alternatively, a threshold may be used to determine whether KPI information of the first application satisfies the application extension condition, and the corresponding processing may be as follows:
and if the value of at least one piece of KPI information in the KPI information of the first application exceeds a second preset threshold, determining that the KPI information of the first application meets the application extension condition.
The second preset threshold may be preset and stored in the management device.
In implementation, the management device may determine whether the values of the KPI information of the first application all exceed a second preset threshold, if the value of the at least one KPI information exceeds the second preset threshold, it may determine that the KPI information of the first application meets the application extension condition, otherwise, it may determine that the KPI information of the first application does not meet the application extension condition.
In addition, when the KPI information includes multiple types, a weight of each KPI information may be obtained, then a value of each KPI information of the first application is multiplied by the corresponding weight to obtain a product corresponding to the KPI information, and then the products of the multiple types of KPI information are added to obtain a weighted value of the first application, and if the weighted value is greater than a first preset value (may be preset and stored in the management device), it may be determined that the KPI information of the first application satisfies an application extension condition.
In addition, when the KPI information comprises a plurality of types, a threshold value can be set corresponding to each type of KPI information, whether the value of each type of KPI information exceeds the threshold value corresponding to the KPI information can be judged, and if at least one type of KPI information exceeds the threshold value corresponding to the KPI information, the KPI information of the first application can be determined to meet the application expansion condition.
Step 303, performing stretching processing for the first application according to the first deployment application information.
In implementation, after the management device obtains the first deployment application information, whether to newly build the virtual machine or whether to deploy the first application on another virtual machine can be determined based on the first deployment application information, so as to perform extension processing on the first application. Thus, stretching processing can be performed for the first application.
Alternatively, when the first application is deployed on all the virtual machines in the first cluster, the processing in the corresponding step 301 may be as follows:
and according to the first deployment application information, if all the virtual machines in the first cluster are deployed with the first application, creating a first virtual machine, and deploying the first application on the first virtual machine.
In an implementation, the management device may determine, using the first deployment application information, an application deployed on each virtual machine in the first cluster, and then determine whether or not the first application is deployed on each virtual machine, and if each virtual machine in the first cluster is deployed with the first application, may newly deploy the virtual machine (which may be referred to as a first virtual machine hereinafter). The first application is then deployed on the first virtual machine.
In this way, since the first application is deployed on the virtual machine which is not deployed with the first application, the extension of the first application is realized, and since other applications which do not need to be extended on the virtual machine to which the first application belongs are not deployed on the first virtual machine, the waste of resources can be reduced.
Optionally, when there is a virtual machine in the first cluster where the first application is not deployed, the processing in the corresponding step 301 may be as follows:
and according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a second virtual machine with the least number of deployed applications in the at least one virtual machine, and deploying the first application on the second virtual machine.
In an implementation, the management device may determine, using the first deployment application information, an application deployed on each virtual machine in the first cluster, then determine whether the first application is deployed on each virtual machine, if there is at least one virtual machine in the first cluster on which the first application is not deployed, then determine a second virtual machine on which the number of deployed applications on the at least one virtual machine is the least, and then may deploy the first application on the second virtual machine. For example, the virtual machines not deployed with the first application are virtual machine a, virtual machine B, and virtual machine C, on which 3, 2, and 4 applications are deployed, respectively, and since the number of applications deployed on virtual machine B is the smallest, the first application may be deployed on virtual machine B.
Therefore, the first application is deployed on the virtual machine which is not deployed with the first application, so that the first application is stretched, and other applications which do not need to be stretched on the virtual machine to which the first application belongs are not stretched, so that the waste of resources can be reduced.
Optionally, when there is a virtual machine in the first cluster where the first application is not deployed, the processing in the corresponding step 301 may be as follows:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a third virtual machine with the minimum current resource utilization rate in the at least one virtual machine, and deploying the first application on the third virtual machine.
Wherein, the resource refers to one or more of bandwidth, central processing unit (Central Processing Unit, CPU) and memory.
In implementation, the management device may determine, using the first deployment application information, an application deployed on each virtual machine in the first cluster, then determine whether or not the first application is deployed on each virtual machine, if there is at least one virtual machine in the first cluster on which the first application is not deployed, determine a resource utilization rate of the at least one virtual machine, select a virtual machine with a minimum resource utilization rate, determine the virtual machine as a third virtual machine, and then may deploy the first application on the third virtual machine.
Therefore, the first application is deployed on the virtual machine which is not deployed with the first application, so that the first application is stretched, and other applications which do not need to be stretched on the virtual machine to which the first application belongs are not stretched, so that the waste of resources can be reduced.
It should be noted that, if the resource is one of a bandwidth, a CPU, and a memory, the virtual machine with the smallest resource utilization may be directly obtained as the third virtual machine. If the resources are multiple kinds of bandwidth, CPU and memory, the weight corresponding to each resource can be obtained, then the resource utilization rate of each resource is multiplied by the corresponding weight, the products are added to obtain weighted resource utilization rate, and the virtual machine with the minimum weighted resource utilization rate is determined as the third virtual machine. For example, the resources include a bandwidth and a memory, the weight corresponding to the bandwidth is 0.6, the weight corresponding to the memory is 0.4, there is a virtual machine E, no first application is deployed on the virtual machine F, the bandwidth utilization of the virtual machine E is 30%, the resource utilization of the memory is 40%, the weighted resource utilization is 30% ×0.6+40% ×0.4=34%, the bandwidth utilization of the virtual machine F is 40%, the resource utilization of the memory is 50%, the weighted resource utilization is 40% ×0.6+50% ×0.4=44%, and the weighted resource utilization of the virtual machine E is smaller than the weighted resource utilization of the virtual machine F, so that the virtual machine E is selected as the third virtual machine.
In addition, in the application, whether the application combination exists in the first cluster can be judged first, if the application combination does not exist, the virtual machine can be directly copied in a cluster mode, and the first application is deployed on the copied virtual machine.
In this way, when a plurality of applications are deployed on the same virtual machine, the application can perform extension processing according to the applications instead of the virtual machine, thereby ensuring that extension is performed completely according to service requirements, avoiding meaningless resource consumption and improving resource utilization rate and extension efficiency. For example, as shown in fig. 4, the application 1 and the application 2 are deployed on the virtual machine 1 and the virtual machine 2 at the same time (that is, the application 1 and the application 2 are deployed on the virtual machine 1, the application 1 and the application 2 are deployed on the virtual machine 2), the service target of the application 1 is that the connection number is not more than 100, and is 180 at present, the service target of the application 2 is that the connection number is not more than 120, and is 60 at present, after one extension, the virtual machine 3 is newly built, the application 1 is deployed on the virtual machine 3, after one extension, since the application 2 is not deployed on the virtual machine 3, the resource of the virtual machine 3 completely belongs to the application 1, the connection number of the application 1 reaches 90, no reprocessing is required, the connection number of the application 2 is unchanged, 60 is maintained, and no processing is required. Thus, the operation can be performed once to meet the business requirements.
Optionally, the present application also provides a method for applying shrinkage, as shown in fig. 5, and the corresponding process flow may be as follows:
step 501, KPI information of an application is obtained.
In practice, the process of step 501 is identical to the process of step 301, and specific processes may be seen in step 301.
Optionally, the KPI information includes one or more of connection number, concurrent call volume, parallel thread number, call number CAPS established per second.
In implementation, the number of connections refers to the number of services currently established with the application, the number of concurrent calls refers to the number of concurrent calls, the number of concurrent threads refers to the number of concurrently running threads, and the number of call connections established per second refers to the number of call connections established per second.
It should be noted that the above KPI information is only an example, and any KPI information may be used as KPI information in the embodiment of the present application.
Step 502, if KPI information of a second application in the applications meets an application contraction condition, determining second deployment application information on a virtual machine in a second cluster to which the second application belongs.
The deployment application information is used for indicating which applications are deployed by the virtual machine respectively. The application contraction condition is used to determine which applications can be deleted.
In implementation, after acquiring the KPI information of the application, the management device may determine whether the KPI information of the application meets an application contraction condition, determine a cluster to which the second application belongs (which may be referred to as a second cluster) if the KPI information of a certain application (which may be referred to as a second application) in the application meets an application extension contraction condition, and then acquire second deployment application information of the second cluster.
Alternatively, the second deployment application information may also be represented using a correspondence, which is identical to the format of the first deployment application information.
It should be noted that, each time an application is deployed on a virtual machine, deployment application information of the application deployed on each virtual machine is recorded and stored.
Alternatively, the process of determining whether the KPI information of the application satisfies the application contraction condition may be as follows:
and if the values of various KPI information in KPI information of the second application in the application are lower than the first preset threshold, determining that the KPI information of the second application meets the application contraction condition.
The first preset threshold may be preset and stored in the management device.
In implementation, the management device may determine whether the values of the KPI information of the second application are both below a first preset threshold, and if both are below the first preset threshold, may determine that the KPI information of the second application meets an application contraction condition.
In addition, if the KPI information includes multiple types, a weight of each KPI information may be obtained, then a value of each KPI information of the second application is multiplied by the corresponding weight to obtain a product corresponding to the KPI information, and then the products of the multiple types of KPI information are added to obtain a weighted value of the second application, and if the weighted value is smaller than a second preset value (may be preset and stored in the management device), it may be determined that the KPI information of the second application satisfies an application contraction condition.
And step 503, performing shrink processing for the second application according to the second deployment application information.
In an implementation, after the management device obtains the second deployment application information, it may determine, based on the second deployment application information, which applications on the virtual machines may be deleted, and then perform shrink processing for the second application.
Alternatively, the contraction processing of the second application may be performed based on whether the second application is deployed on the virtual machine in the second cluster, and the corresponding processing may be as follows:
according to the second deployment application information, if the fourth virtual machine in the second cluster is only deployed with the second application, deleting the fourth virtual machine, and if the virtual machine in the second cluster is not deployed with the second application, determining that the second cluster contains the second application and contains a fifth virtual machine with the minimum number of other applications, and unloading the second application from the fifth virtual machine.
In an implementation, the management device may determine, based on the second deployment application information, whether only the virtual machine of the second application is deployed in the second cluster, and if there is a fourth virtual machine that is only deployed with the second application, may delete the fourth virtual machine directly. In this way, the use of other applications may not be affected. In this way, virtual machines can be saved.
If there is no virtual machine with only the second application deployed, the number of applications deployed on each virtual machine may be determined in the second cluster, the virtual machine with the smallest number of deployed applications (i.e., the fifth virtual machine) is selected, and then the second application may be deleted from the fifth virtual machine.
In addition, in the application, whether the application combination exists in the second cluster can be judged first, and if the application combination does not exist, a certain virtual machine where the second application exists can be deleted directly.
Therefore, when a plurality of applications are deployed on the same virtual machine, the contraction processing can be performed according to the applications instead of the virtual machine, so that the contraction is ensured to be performed completely according to service requirements, meanwhile, meaningless resource consumption is avoided, and the resource utilization rate and the contraction efficiency can be improved.
In addition, in the present application, as shown in fig. 6, a third-party virtualization management system and a scaling management system may be disposed on a management device, where a management agent may send KPI information to the scaling management system, and the management device may control the scaling management system to determine whether an application extends or contracts (may simply be referred to as scaling), and if scaling is required, may control the third-party virtualization management system to apply for a virtual machine or delete the application (may also apply for deleting the virtual machine).
In the embodiment of the application, the KPI information of the application can be obtained, if the KPI information of the first application in the application meets the application extension condition, the first deployment application information on the virtual machine in the first cluster to which the first application belongs can be determined, and then the extension processing is carried out for the first application by using the first deployment application information. In this way, since only the application conforming to the application extension condition is subjected to the extension processing using the application as the extension unit, and not all the applications on the virtual machine are subjected to the extension processing, the extension efficiency can be improved.
Fig. 7 is a block diagram of an apparatus for application provided in an embodiment of the present application. The apparatus may be implemented as part or all of a management device by software, hardware, or a combination of both. The management device provided by the embodiment of the present application may implement the flow described in fig. 3 and fig. 5 according to the embodiment of the present application, where the apparatus includes: an acquisition module 710, a determination module 720, an extension module 730, and a contraction module 740, wherein:
The acquiring module 710 is configured to acquire key performance indicator KPI information of an application, and specifically may implement the acquiring function in step 301 and other implicit steps;
a determining module 720, configured to determine, if KPI information of a first application in the applications meets an application extension condition, first deployment application information on a virtual machine in a first cluster to which the first application belongs, where the determining function in step 302 and other implicit steps may be specifically implemented;
the stretching module 730 is configured to perform stretching processing for the first application according to the first deployment application information, and specifically may implement the stretching function in step 303 and other implicit steps.
Optionally, the stretch module 730 is configured to:
according to the first deployment application information, if all virtual machines in the first cluster are deployed with the first application, a first virtual machine is newly built;
the first application is deployed on the first virtual machine.
Optionally, the stretch module 730 is configured to:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a second virtual machine with the least deployment application number in the at least one virtual machine;
The first application is deployed on the second virtual machine.
Optionally, the stretch module 730 is configured to:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a third virtual machine with the minimum current resource utilization rate in the at least one virtual machine;
the first application is deployed on the third virtual machine.
Optionally, the determining module 720 is further configured to:
if KPI information of a second application in the applications meets application contraction conditions, determining second deployment application information on a virtual machine in a second cluster to which the second application belongs;
as shown in fig. 8, the apparatus further includes:
and the contraction module 740 is configured to perform contraction processing for the second application according to the second deployment application information.
Optionally, the contraction module 740 is configured to:
and according to the second deployment application information, deleting a fourth virtual machine if the fourth virtual machine is only deployed with the second application in the second cluster, determining that the second application is contained in the second cluster and a fifth virtual machine with the minimum number of other applications is contained in the second cluster if the fourth virtual machine is not deployed with the second application in the second cluster, and unloading the second application from the fifth virtual machine.
Optionally, the determining module 720 is further configured to:
and if the values of various KPI information in KPI information of a second application in the applications are lower than a first preset threshold, determining that the KPI information of the second application meets the application contraction condition.
Optionally, the determining module 720 is further configured to:
and if the value of at least one piece of KPI information in the KPI information of the first application exceeds a second preset threshold, determining that the KPI information of the first application meets the application extension condition.
Optionally, the KPI information includes one or more of connection number, concurrent call volume, parallel thread number, call number CAPS established per second.
It should be noted that the acquiring module 710, the determining module 720, the extending module 730, and the contracting module 740 may be implemented by the processor 202, or the processor 202 may be implemented in cooperation with the transmitter 204 and the receiver 201.
In the embodiment of the application, the KPI information of the application can be obtained, if the KPI information of the first application in the application meets the application extension condition, the first deployment application information on the virtual machine in the first cluster to which the first application belongs can be determined, and then the extension processing is carried out for the first application by using the first deployment application information. In this way, since only the application conforming to the application extension condition is subjected to the extension processing using the application as the extension unit, and not all the applications on the virtual machine are subjected to the extension processing, the extension efficiency can be improved.
It should be noted that: the application extension device provided in the above embodiment is only exemplified by the division of the above functional modules when the application extends, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the application stretching device provided in the above embodiment and the application stretching method embodiment belong to the same concept, and specific implementation processes of the application stretching device are detailed in the method embodiment and are not repeated here.
Optionally, an embodiment of the present application further provides a computer readable storage medium, where instructions are stored, when the computer readable storage medium runs on the management device, to cause the management device to execute the method for stretching the application.
Optionally, an embodiment of the present application further provides a computer program product containing instructions which, when run on a management device, cause the management device to perform the method of application extension described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof, and when implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions which, when loaded and executed on a server or terminal, fully or partially produce a process or function in accordance with embodiments of the present application. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a server or terminal or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a digital video disk (Digital Video Disk, DVD), etc.), or a semiconductor medium (such as a solid state disk, etc.).
The above embodiments are merely examples of the present application, and the present application is not limited thereto, but any modifications, equivalents, improvements and the like made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (15)

1. A method of applying stretching, the method comprising:
acquiring key performance index KPI information of an application;
if KPI information of a first application in the applications meets application extension conditions and application combination is arranged on a virtual machine in a first cluster to which the first application belongs, determining first deployment application information on the virtual machine in the first cluster, wherein the first deployment application information is used for indicating applications deployed on the virtual machine in the first cluster;
determining a virtual machine newly built in the first cluster or deploying the first application on a current virtual machine according to the first deployment application information;
if KPI information of a second application in the applications meets application contraction conditions and application closing equipment exists on virtual machines in a second cluster to which the second application belongs, determining second deployment application information on the virtual machines in the second cluster, wherein the second deployment application information is used for indicating applications deployed on the virtual machines in the second cluster;
And according to the second deployment application information, deleting a fourth virtual machine if the fourth virtual machine is only deployed with the second application in the second cluster, determining that the second application is contained in the second cluster and a fifth virtual machine with the minimum number of other applications is contained in the second cluster if the fourth virtual machine is not deployed with the second application in the second cluster, and unloading the second application from the fifth virtual machine.
2. The method of claim 1, wherein the determining whether to build a virtual machine in the first cluster or to deploy the first application on a current virtual machine according to the first deployment application information comprises:
according to the first deployment application information, if all virtual machines in the first cluster are deployed with the first application, a first virtual machine is newly built;
the first application is deployed on the first virtual machine.
3. The method of claim 1, wherein the determining whether to build a virtual machine in the first cluster or to deploy the first application on a current virtual machine according to the first deployment application information comprises:
According to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a second virtual machine with the least deployment application number in the at least one virtual machine;
the first application is deployed on the second virtual machine.
4. The method of claim 1, wherein the determining whether to build a virtual machine in the first cluster or to deploy the first application on a current virtual machine according to the first deployment application information comprises:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a third virtual machine with the minimum current resource utilization rate in the at least one virtual machine;
the first application is deployed on the third virtual machine.
5. The method according to claim 1, wherein the method further comprises:
and if the values of various KPI information in KPI information of a second application in the applications are lower than a first preset threshold, determining that the KPI information of the second application meets the application contraction condition.
6. The method according to any one of claims 1 to 5, further comprising:
And if the value of at least one piece of KPI information in the KPI information of the first application exceeds a second preset threshold, determining that the KPI information of the first application meets the application extension condition.
7. The method of any of claims 1 to 5, wherein the KPI information includes one or more of connection number, concurrent call volume, number of parallel threads, number of calls per second CAPS established.
8. An apparatus for applying stretching, the apparatus comprising:
the acquisition module is used for acquiring Key Performance Index (KPI) information of the application;
the determining module is used for determining first deployment application information on the virtual machines in the first cluster if the KPI information of the first application in the applications meets the application stretching condition and the application combination is arranged on the virtual machines in the first cluster to which the first application belongs, wherein the first deployment application information is used for indicating the applications deployed on the virtual machines in the first cluster;
the stretching module is used for determining a virtual machine newly built in the first cluster or deploying the first application on the current virtual machine according to the first deployment application information;
the determining module is further configured to determine second deployment application information on a virtual machine in a second cluster, where the second deployment application information is used to indicate an application deployed on the virtual machine in the second cluster, if KPI information of a second application in the applications meets an application contraction condition and there is an application syndication on the virtual machine in the second cluster to which the second application belongs;
And the contraction module is used for deleting the fourth virtual machine if the fourth virtual machine exists in the second cluster and deploys only the second application according to the second deployment application information, determining that the second cluster contains the second application and contains a fifth virtual machine with the minimum number of other applications if the second cluster does not exist and deploys only the second application, and unloading the second application from the fifth virtual machine.
9. The apparatus of claim 8, wherein the stretching module is configured to:
according to the first deployment application information, if all virtual machines in the first cluster are deployed with the first application, a first virtual machine is newly built;
the first application is deployed on the first virtual machine.
10. The apparatus of claim 8, wherein the stretching module is configured to:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a second virtual machine with the least deployment application number in the at least one virtual machine;
the first application is deployed on the second virtual machine.
11. The apparatus of claim 8, wherein the stretching module is configured to:
according to the first deployment application information, if at least one virtual machine in the first cluster is not deployed with the first application, determining a third virtual machine with the minimum current resource utilization rate in the at least one virtual machine;
the first application is deployed on the third virtual machine.
12. The apparatus of claim 8, wherein the determining module is further configured to:
and if the values of various KPI information in KPI information of a second application in the applications are lower than a first preset threshold, determining that the KPI information of the second application meets the application contraction condition.
13. The apparatus according to any one of claims 8 to 12, wherein the determining module is further configured to:
and if the value of at least one piece of KPI information in the KPI information of the first application exceeds a second preset threshold, determining that the KPI information of the first application meets the application extension condition.
14. The apparatus of any one of claims 8 to 12, wherein the KPI information includes one or more of a number of connections, a number of concurrent calls, a number of parallel threads, a number of calls per second CAPS established.
15. A computer readable storage medium storing instructions which, when run on a management device, cause the management device to perform the method of any one of claims 1-7.
CN201910123256.4A 2019-02-18 2019-02-18 Method and device for stretching application Active CN111580925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910123256.4A CN111580925B (en) 2019-02-18 2019-02-18 Method and device for stretching application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910123256.4A CN111580925B (en) 2019-02-18 2019-02-18 Method and device for stretching application

Publications (2)

Publication Number Publication Date
CN111580925A CN111580925A (en) 2020-08-25
CN111580925B true CN111580925B (en) 2023-11-17

Family

ID=72122471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910123256.4A Active CN111580925B (en) 2019-02-18 2019-02-18 Method and device for stretching application

Country Status (1)

Country Link
CN (1) CN111580925B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984602A (en) * 2014-05-20 2014-08-13 华为技术有限公司 VM (virtual machine) resource scheduling method, device and system
CN106227582A (en) * 2016-08-10 2016-12-14 华为技术有限公司 Elastic telescopic method and system
CN106919450A (en) * 2015-12-24 2017-07-04 华为技术有限公司 resource adjusting method and device
CN108023742A (en) * 2016-10-31 2018-05-11 阿里巴巴集团控股有限公司 A kind of expansion method of application, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9311140B2 (en) * 2013-08-13 2016-04-12 Vmware, Inc. Method and apparatus for extending local area networks between clouds and migrating virtual machines using static network addresses
US9424065B2 (en) * 2014-06-26 2016-08-23 Vmware, Inc. Methods and apparatus to scale application deployments in cloud computing environments using virtual machine pools

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984602A (en) * 2014-05-20 2014-08-13 华为技术有限公司 VM (virtual machine) resource scheduling method, device and system
CN106919450A (en) * 2015-12-24 2017-07-04 华为技术有限公司 resource adjusting method and device
CN106227582A (en) * 2016-08-10 2016-12-14 华为技术有限公司 Elastic telescopic method and system
CN108023742A (en) * 2016-10-31 2018-05-11 阿里巴巴集团控股有限公司 A kind of expansion method of application, device and system

Also Published As

Publication number Publication date
CN111580925A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN107241281B (en) Data processing method and device
CN107832100B (en) APK plug-in loading method and terminal thereof
CN110096336B (en) Data monitoring method, device, equipment and medium
EP3664372A1 (en) Network management method and related device
CN110677305A (en) Automatic scaling method and system in cloud computing environment
WO2015116449A1 (en) Methods, systems, and computer readable media for a cloud-based virtualization orchestrator
CN110430068B (en) Characteristic engineering arrangement method and device
EP3661291A1 (en) Method for managing network component, and network device
US20190268213A1 (en) Network function management method, management unit, and system
CN111198759B (en) Memory optimization method, system, terminal equipment and readable storage medium
CN110048882B (en) Method and device for resource allocation based on edge calculation
CN110647392A (en) Intelligent elastic expansion method based on container cluster
CN112463290A (en) Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
CN108366133B (en) TS server scheduling method, scheduling device and storage medium
CN109039694B (en) Global network resource allocation method and device for service
US9189287B1 (en) Harnessing idle computing resources in customer premise equipment
CN107426109B (en) Traffic scheduling method, VNF module and traffic scheduling server
CN114153609A (en) Resource control method and device, electronic equipment and computer readable storage medium
CN111190719A (en) Method, device, medium and electronic equipment for optimizing cluster resource allocation
US10681398B1 (en) Video encoding based on viewer feedback
CN111580925B (en) Method and device for stretching application
CN109165135B (en) Data management method, computer readable storage medium and terminal equipment
CN113453285B (en) Resource adjusting method, device and storage medium
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN111831503A (en) Monitoring method based on monitoring agent and monitoring agent device

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