CN110008000A - Application cluster capacity reduction method and device - Google Patents

Application cluster capacity reduction method and device Download PDF

Info

Publication number
CN110008000A
CN110008000A CN201910165025.XA CN201910165025A CN110008000A CN 110008000 A CN110008000 A CN 110008000A CN 201910165025 A CN201910165025 A CN 201910165025A CN 110008000 A CN110008000 A CN 110008000A
Authority
CN
China
Prior art keywords
virtual machine
capacity reducing
load data
resource load
cluster
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.)
Pending
Application number
CN201910165025.XA
Other languages
Chinese (zh)
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910165025.XA priority Critical patent/CN110008000A/en
Publication of CN110008000A publication Critical patent/CN110008000A/en
Pending legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application provides a kind of application cluster capacity reduction method and device, wherein method includes: to acquire the resource load data of each virtual machine of application deployment cluster first, then judged whether to carry out capacity reducing to application cluster according to the resource load data of each virtual machine, if, then according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, it is last according to can the virtual machine quantity of capacity reducing capacity reducing is carried out to application cluster.

Description

Application cluster capacity reduction method and device
Technical field
This specification is related to field of computer technology more particularly to a kind of application cluster capacity reduction method and device.
Background technique
Cloud computing be it is a kind of provide the calculating mode of the telescopic virtual resource of dynamic by internet with method of service, lead to This mode is crossed, shared software and hardware resources and information can be supplied to computer and other equipment on demand.
The basic environment of cloud computing is virtualization, by virtual machine (VM, Virtual Machine) application deployment cluster, The resource of shared cloud computing.When the load of application cluster entirety is relatively low, in order to economize on resources, need to contract to application cluster Hold.Currently, the mode for generalling use artificial capacity reducing carries out capacity reducing, which high labor cost and capacity reducing efficiency to application cluster It is low.
Summary of the invention
The purpose of this specification one or more embodiment is to provide a kind of application cluster capacity reduction method and device, to solve Certainly in the prior art application cluster capacity reducing when the problem of human cost is high, capacity reducing low efficiency.
In order to solve the above technical problems, this specification one or more embodiment is achieved in that
On the one hand, this specification one or more embodiment provides a kind of application cluster capacity reduction method, comprising:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, it is described according to the resource load data of each virtual machine calculate can the virtual machine quantity of capacity reducing include:
Obtain the regulatory factor for influencing the load of the application cluster, wherein the regulatory factor include it is big promote to ensure because At least one of son, the real time load factor, real-time machine Quantitative factor;
According to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
Optionally, the virtual machine is distributed at least one computer room;
The resource load data according to each virtual machine judge whether that carrying out capacity reducing to the application cluster includes:
The computer room according to belonging to the resource load data of each virtual machine and each virtual machine calculates each institute State the resource load data of computer room;
The resource load data of each computer room are compared with a default resource load data respectively;
If the resource load data of at least one computer room are lower than the default resource load data, to the application Cluster carries out capacity reducing;
If the resource load data of all computer rooms are not less than the default resource load data, do not answer described Capacity reducing is carried out with cluster.
Optionally, it is described according to the resource load data of each virtual machine calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
According to each resource load data to capacity reducing computer room and in conjunction with following formula calculate it is each described in capacity reducing computer room Can capacity reducing virtual machine quantity, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load Data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th in capacity reducing computer room deployment described in answer With the virtual machine quantity of cluster.
Optionally, it is described according to the resource load data of each virtual machine calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
Each regulatory factor to capacity reducing computer room is obtained, the regulatory factor includes that big rush ensures the factor, real time load At least one of the factor, real-time machine Quantitative factor;
According to each regulatory factor and resource load data to capacity reducing computer room, calculate it is each it is described to capacity reducing computer room can The virtual machine quantity of capacity reducing.
Optionally, it is described according to can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing include:
According to it is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, the type of the virtual machine is non-disaster tolerance type.
On the other hand, this specification one or more embodiment provides a kind of application cluster capacity reducing device, comprising:
Acquisition module, the resource load data of each virtual machine for acquiring application deployment cluster;
Judgment module, for judging whether to carry out the application cluster according to the resource load data of each virtual machine Capacity reducing;
Computing module, for if so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine Quantity;
Capacity reducing module, for according to can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, the computing module influences the regulatory factor of the load of the application cluster specifically for obtaining, In, the regulatory factor includes that big rush ensures at least one of the factor, the real time load factor, real-time machine Quantitative factor;With And according to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
Optionally, the virtual machine is distributed at least one computer room;The judgment module includes:
First computing unit, for according to belonging to the resource load data of each virtual machine and each virtual machine The computer room calculates the resource load data of each computer room;
Comparing unit, for comparing the resource load data of each computer room with a default resource load data respectively Compared with;
First judging unit, if the resource load data for computer room described at least one are lower than the default resource load Data then carry out capacity reducing to the application cluster;
Second judging unit, if the resource load data for all computer rooms are not less than the default resource load Data then do not carry out capacity reducing to the application cluster.
Optionally, the computing module includes:
First determination unit is determined for the computer room by the resource load data lower than the default resource load data For to capacity reducing computer room;
Second computing unit, for being calculated according to each resource load data and the following formula of combination to capacity reducing computer room It is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load Data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th in capacity reducing computer room deployment described in answer With the virtual machine quantity of cluster.
Optionally, the computing module includes:
Second determination unit is determined for the computer room by the resource load data lower than the default resource load data For to capacity reducing computer room;
Acquiring unit, for obtaining each regulatory factor to capacity reducing computer room, the regulatory factor includes that big rush ensures At least one of the factor, the real time load factor, real-time machine Quantitative factor;
Third computing unit, for calculating each according to each regulatory factor and resource load data to capacity reducing computer room It is described to capacity reducing computer room can capacity reducing virtual machine quantity.
Optionally, the capacity reducing module, specifically for according to it is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity Capacity reducing is carried out to the application cluster.
Optionally, the type of the virtual machine is non-disaster tolerance type.
In another aspect, this specification one or more embodiment provides a kind of application cluster capacity reducing equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the computer executable instructions make when executed The processor:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
In another aspect, this specification one or more embodiment provides a kind of storage medium, can be held for storing computer Row instruction, the computer executable instructions realize following below scheme when executed:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Using the technical solution of this specification one or more embodiment, the money of each virtual machine of application deployment cluster is acquired Source load data, and judged whether to carry out capacity reducing to application cluster according to the resource load data of each virtual machine, if so, according to The resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to can capacity reducing virtual machine quantity to application Cluster carries out capacity reducing.On the one hand, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to Can capacity reducing virtual machine quantity to application cluster carry out capacity reducing, provide it is a kind of automatically to application cluster carry out capacity reducing mode, Compared with the prior art, without the mode of artificial capacity reducing, human cost greatly reduces, improves capacity reducing efficiency;Separately On the one hand, judge whether application cluster needs capacity reducing and basis according to the resource load data of each virtual machine of application deployment cluster The resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to can capacity reducing virtual machine quantity to application Cluster carries out capacity reducing, and capacity reducing step is simple and easy to carry out.
Detailed description of the invention
In order to illustrate more clearly of this specification one or more embodiment or technical solution in the prior art, below will A brief introduction will be made to the drawings that need to be used in the embodiment or the description of the prior art, it should be apparent that, it is described below Attached drawing is only some embodiments recorded in this specification one or more embodiment, and those of ordinary skill in the art are come It says, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram of application cluster capacity reduction method provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of the computer room of application deployment cluster provided by the embodiments of the present application;
Fig. 3 be the resource load data provided by the embodiments of the present application according to each virtual machine judge whether to application cluster into The flow diagram of row capacity reducing;
Fig. 4 be it is provided by the embodiments of the present application according to the resource load data of each virtual machine calculate can capacity reducing virtual machine number The flow diagram of amount;
Fig. 5 is the composition schematic diagram of application cluster capacity reducing device provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of application cluster capacity reducing equipment provided by the embodiments of the present application.
Specific embodiment
This specification one or more embodiment provides a kind of application cluster capacity reduction method and device, to solve existing skill In art when application cluster capacity reducing the problem of human cost height, capacity reducing low efficiency.
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment, Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than Whole embodiments.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creativeness The model of this specification one or more embodiment protection all should belong in every other embodiment obtained under the premise of labour It encloses.
Fig. 1 is the flow diagram of application cluster capacity reduction method provided by the embodiments of the present application, the executing subject of this method It such as can be terminal device or server, wherein terminal device for example can be for personal computer etc., and server for example can be with Be independent a server, be also possible to the server cluster being made of multiple servers, the present exemplary embodiment to this not Do particular determination.Application cluster is the set of multiple examples composition of application, and so-called application, which refers to, realizes one or more function Can module, the application in the same application cluster belongs to the same type.For example, user throws in internet insurance scene The functional modules such as guarantor, user's declaration form correct, user's declaration form is inquired are respectively an application.Application cluster is deployed in multiple virtual machines On, wherein multiple virtual machines of above-mentioned application deployment cluster can also divide not in a computer room in the more of multiple places In a computer room, in other words, application cluster can be deployed in multiple virtual machines in a computer room, can also be deployed in multiplely In multiple computer rooms of side.It should be noted that application cluster is generally deployed in the more of multiple places in order to realize high availability In a computer room, to realize that strange land is mostly living, with city disaster tolerance.The type of the virtual machine of application deployment cluster may include two kinds, respectively For disaster tolerance type and non-disaster tolerance type, i.e. the virtual machine of disaster tolerance type carries out disaster tolerance processing when the virtual machine of non-disaster tolerance type breaks down. It should be noted that the virtual machine in each computer room can dispose an application cluster, multiple application clusters can also be disposed, this Exemplary embodiment does not do particular determination to this.For example, Fig. 2 is the computer room of application deployment cluster provided by the embodiments of the present application Schematic diagram includes 3 computer rooms, respectively the first computer room 201, the second computer room 202, third computer room 203, wherein the first machine in Fig. 2 It include eight virtual machines in room 201, wherein four virtual machines are used for application deployment cluster 1, and four additional virtual machine is for disposing Application cluster 2;Second computer room 202 includes eight virtual machines, wherein four virtual machines are used for application deployment cluster 1, four additional Virtual machine is used for application deployment cluster 3;Third computer room 203 includes eight virtual machines, wherein four virtual machines are used for application deployment Cluster 1, four additional virtual machine is used for application deployment cluster 1 and four virtual machines are the virtual machine of disaster tolerance type.
As shown in Figure 1, this method may comprise steps of:
Step S102, the resource load data of each virtual machine of application deployment cluster are acquired.
In the embodiment of the present application, application cluster can refer to an application cluster, for example, application cluster can be in Fig. 2 Application cluster 1 or Fig. 2 in application cluster 2 or Fig. 2 in application cluster 3.
The resource load data of virtual machine may include: CPU (Central Processing Unit, central processing unit) One or more of utilization rate, memory usage, disk utilization, bandwidth availability ratio etc., the present exemplary embodiment is to this Do not do particular determination.It should be noted that the particular content of the resource load data of virtual machine can be carried out according to the demand of calculating It determines.For example, if under the premise of not considering calculating speed, the resource load data of virtual machine may include cpu busy percentage, interior Deposit utilization rate, disk utilization, bandwidth availability ratio etc..If improving calculating speed on the basis of the accuracy rate for not influencing to calculate, The particular content that the resource load data of virtual machine can be determined according to the service attribute of application cluster, for example, if application cluster Service attribute be bandwidth intensive, i.e. the bandwidth occupancy of application cluster is higher, then the resource load data of virtual machine be bandwidth Utilization rate;If the service attribute of application cluster is computation-intensive, i.e. the cpu busy percentage of application cluster is higher, then virtual machine Resource load data are cpu busy percentage;If the service attribute of application cluster is I/O intensive, the resource load number of virtual machine According to for disk utilization.
In the embodiment of the present application, the load resource of each virtual machine of application deployment cluster can be acquired by monitoring modular Data.For example, if the resource load data of virtual machine are cpu busy percentage application deployment collection can be acquired by monitoring modular The cpu busy percentage of each virtual machine of group, and the cpu busy percentage of each virtual machine of application deployment cluster is determined as each virtual machine Resource load data.For another example if resource load data include cpu busy percentage, memory usage, disk utilization, bandwidth benefit With rate, then cpu busy percentage, memory usage, the disk that each virtual machine of application deployment cluster is acquired by monitoring modular utilize Rate, bandwidth availability ratio, and the cpu busy percentage of each virtual machine of application deployment cluster, memory usage, disk are utilized respectively Rate, bandwidth availability ratio are weighted summation, and obtained numerical value is determined as each virtual machine of corresponding application deployment cluster Resource load data.It should be noted that in the cpu busy percentage to virtual machine, memory usage, disk utilization, bandwidth benefit When being weighted summation with rate, the corresponding weighted value of cpu busy percentage, memory usage, disk utilization, bandwidth availability ratio can be with Contribution proportion of resource load of application cluster is determined according to it, the present exemplary embodiment does not do particular determination to this.
The resource load data of above-mentioned virtual machine can be the resource load data based on day, or the money based on week Source load data etc., the present exemplary embodiment does not do particular determination to this.It should be noted that accurate in order to guarantee to calculate Rate, the resource load data of virtual machine can be the resource load data of the service period based on application cluster.
In the following, to each virtual of acquisition deployment application cluster by taking the resource load data of virtual machine are cpu busy percentage as an example The process of the resource load data of machine is illustrated.
If the resource load data of virtual machine are the cpu busy percentage based on day, a void of application deployment cluster is acquired The process of the resource load data of quasi- machine includes: per minute CPU of the virtual machine of acquisition application deployment cluster at one day Utilization rate, i.e., each corresponding 1440 cpu busy percentages of virtual machine;It is utilized cpu busy percentage per minute as the CPU of a point Rate, i.e., the cpu busy percentage of each corresponding 1440 points of virtual machine;The cpu busy percentage of corresponding 1440 points of the virtual machine is pressed It is ranked up according to descending sequence, and obtains the cpu busy percentage for coming the point of preset quantity of foremost, and most by the row The point of the preset quantity of front is determined as point to be processed;By the cpu busy percentage of each point to be processed respectively with it in acquisition time The cpu busy percentage for going up multiple points that are adjacent and being later than it is compared, if the cpu busy percentage of point to be processed is each compared with it Within six times of cpu busy percentage of point, then the point to be processed is not burr point, and otherwise the process points are burr point, to be processed Remove burr point in point, average to the cpu busy percentage of remaining point to be processed, (i.e. cpu busy percentage is flat by the average value Mean value) it is determined as the resource load data of the virtual machine.Application deployment collection can be obtained it should be noted that repeating the above process The resource load data of other virtual machines of group.On this basis, due to general with the portfolio of the application cluster at weekend in week There can be fluctuation, therefore, in order to further improve the accuracy of calculating, and then improve the accuracy of application cluster capacity reducing, The resource load data of virtual machine are the resource load data based on week.One virtual machine of specific acquisition application deployment cluster The processes of the load resource data resource load data of week (i.e. based on) may include: that the virtual machine is acquired according to the above process When the day before yesterday and six days resource load data before the day before yesterday, and will be when the day before yesterday and six days resources before the day before yesterday Maximum resource load data are determined as resource load data (the resource load number i.e. based on week of virtual machine in load data According to).
Step S104, judged whether to carry out capacity reducing to application cluster according to the resource load data of each virtual machine.
In the embodiment of the present application, it can sum to the resource load data of the virtual machine of all application deployment clusters, and With the value of summation divided by the total quantity of the virtual machine of application deployment cluster, and by the quotient acquired (i.e. all application deployment clusters The average value of the resource load data of virtual machine) it is compared with a default resource load data, it is preset if the quotient acquired is less than Resource load data then carry out capacity reducing to the application cluster, if the quotient acquired is not less than default resource load data, answer this With cluster without capacity reducing.It should be noted that default resource load data can by developer according to the effect of capacity reducing into Row setting, the present exemplary embodiment are not particularly limited this.
For example, if the resource load data of virtual machine are cpu busy percentage, and the quantity of the virtual machine of application deployment cluster is 6, respectively the first virtual machine to the 6th virtual machine, if the cpu busy percentage of the first virtual machine to the 6th virtual machine is successively are as follows: 75%, 50%, 60%, 45%, 45%, 55%, then the resource load data of the six of the application deployment cluster virtual machine is flat Mean value are as follows: 55%, if default resource load data are 75%, capacity reducing is carried out to application cluster.
Step S106, if so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity.
In the embodiment of the present application, can according to following formula calculate can capacity reducing virtual machine quantity, wherein above-mentioned formula Are as follows:
Wherein, C be can capacity reducing virtual machine quantity, q0To preset resource load data, qjFor j-th of application deployment cluster Virtual machine resource load data, m be application deployment cluster virtual machine quantity, q be application deployment cluster virtual machine Resource load data mean value.
It should be noted that if the C acquired be the numerical value with decimal, then can capacity reducing virtual machine quantity be C it is whole Number part.
Due to promoting the period greatly, business can be several orders of magnitude usually, therefore, in order to guarantee to promote business in the period greatly Normal operation, generally greatly promote the period before preparation stage need to application cluster carry out dilatation, i.e., increase application deployment The virtual machine of cluster.Based on this, preparation stage before promoting the period greatly, portfolio goes up there is no practical, and application deployment The virtual machine of cluster in place, the relatively low feelings of the load data that virtual machine can occur in the preparation stage before promoting the period greatly Condition, and do not need to carry out application cluster capacity reducing in this case, therefore, it is necessary to consider that the big rush for influencing application cluster ensures The factor, further, since can capacity reducing virtual machine quantity be according to off-line data (i.e. offline resources load data) calculate, need To calculate can the virtual machine quantity of capacity reducing be modified, therefore, it is necessary to consider the real time load factor, to pass through the real time load factor To can the virtual machine quantity of capacity reducing be modified, and then exclude the case where business goes up or carried out capacity reducing to application cluster, separately Outside, due in the negligible amounts of the virtual machine of application deployment cluster, it is not necessary that carry out capacity reducing to application cluster, therefore, need Consider real-time machine Quantitative factor, herein, real-time machine quantity refers to the virtual machine quantity of current application deployment cluster.
Based on the above situation, more accurate calculated result in order to obtain, and then improve and capacity reducing is carried out to application cluster Accuracy, according to the resource load data of each virtual machine of application deployment cluster calculate can the process of virtual machine quantity of capacity reducing can To include: the regulatory factor for obtaining the load for influencing application cluster, wherein regulatory factor ensures the factor including big rush, bears in real time Carry the factor, at least one of real-time machine Quantitative factor, and according to regulatory factor, each virtual machine of application deployment cluster Resource load data calculate can capacity reducing virtual machine quantity.For example, if regulatory factor include it is big promote to ensure the factor, real time load because Son, real-time machine Quantitative factor, then can according to following formula calculate can capacity reducing virtual machine quantity, wherein above-mentioned formula can With are as follows:
Wherein, C be can capacity reducing virtual machine quantity, q0To preset resource load data, qjFor j-th of application deployment cluster Virtual machine resource load data, m be application deployment cluster virtual machine quantity, q be application deployment cluster virtual machine Resource load data mean value, γ be it is big promote to ensure the factor, if current time promote greatly the period and it is big promote the period before standard For the stage, then γ is 0, if current time is not promoting greatly period and the preparation stage before promoting the period greatly, γ 1, λ are real-time Load factor, if the mean value of the real time resources load data of the virtual machine of application deployment cluster is in higher level, λ 0 is said Bright business goes up or carries out capacity reducing to application cluster, and it is real-time machine Quantitative factor that otherwise λ, which is 1, σ, if current application deployment The virtual machine quantity of cluster is less than preset quantity, then σ is 0, otherwise, σ 1, if current application deployment cluster virtual machine Quantity is lower than the virtual machine of the last week application deployment cluster less than preset quantity and the virtual machine quantity of current application deployment cluster Quantity, then σ be 0, otherwise, σ 1.
It should be noted that if the C acquired be the numerical value with decimal, then can capacity reducing virtual machine quantity be C it is whole Number part.
Step S108, according to can capacity reducing virtual machine quantity to application cluster carry out capacity reducing.
In the embodiment of the present application, obtain can capacity reducing virtual machine quantity when, can be in the virtual of application deployment cluster In machine choose with can capacity reducing virtual machine quantity equivalent amount virtual machine, and discharge selection with can capacity reducing virtual machine number The application cluster disposed in the virtual machine of equivalent amount is measured, and then realizes the capacity reducing to application cluster.
Since the type of the virtual machine of application deployment cluster includes non-disaster tolerance type and disaster tolerance type, due to the virtual machine of disaster tolerance type It is disaster tolerance processing to be carried out, therefore, in order to further improve the accurate of calculating when the virtual machine of non-disaster tolerance type breaks down Rate, and then the accuracy of application cluster capacity reducing is improved, the type of the virtual machine in above-mentioned steps is non-disaster tolerance type virtual machine.Herein On the basis of to application cluster carry out capacity reducing process may include:
Acquire the resource load data of the virtual machine of each non-disaster tolerance type of application deployment cluster;According to application deployment cluster The resource load data of the virtual machine of each non-disaster tolerance type judge whether to carry out capacity reducing to application cluster;If so, being answered according to deployment With the resource load data of the virtual machine of each non-disaster tolerance type of cluster calculate can capacity reducing non-disaster tolerance type virtual machine quantity;And According to can capacity reducing non-disaster tolerance type virtual machine quantity to application cluster carry out capacity reducing.Further, more accurate in order to obtain Calculated result, and then improve application cluster capacity reducing accuracy, according to the virtual machine of each non-disaster tolerance type of application deployment cluster Resource load data calculate can capacity reducing non-disaster tolerance type virtual machine quantity may include: obtain influence application cluster load Regulatory factor, wherein regulatory factor include it is big promote to ensure the factor, the real time load factor, in real-time machine Quantitative factor extremely Few one, and according to the resource load data of regulatory factor, the virtual machine of each non-disaster tolerance type calculate can capacity reducing non-disaster tolerance type Virtual machine quantity.It should be noted that the specific implementation principle of the above process and above-mentioned steps S102, step S104, step The realization principle of S106 and step S108 are identical, therefore are not repeating herein.
It can be deployed in due to application cluster in the virtual machine in multiple computer rooms in multiple places, i.e. application deployment cluster Virtual machine is distributed at least one computer room, is carried out capacity reducing to application cluster in order to more accurate and refinement, is being collected After the resource load data of each virtual machine of application deployment cluster, as shown in figure 3, according to each virtual machine of application deployment cluster Resource load data judge whether that carrying out capacity reducing to application cluster may comprise steps of:
Step S302, the computer room according to belonging to the resource load data of each virtual machine and each virtual machine calculates each computer room Resource load data.
In the embodiment of the present application, can the computer room according to belonging to each virtual machine of application deployment cluster, obtain each machine The quantity that the virtual machine of application cluster is disposed in the virtual machine and each computer room of application cluster is disposed in room, according to each computer room The quantity meter of the virtual machine of application cluster is disposed in the resource load data of the virtual machine of middle deployment application cluster and each computer room The average value that the resource load data of virtual machine of application cluster are disposed in each computer room is calculated, and by application deployment in each computer room The average value of the resource load data of the virtual machine of cluster is determined as the resource load data of corresponding computer room.For example, an if machine The quantity that the virtual machine of application cluster is disposed in room is 4, respectively the first virtual machine to the 4th virtual machine, wherein first is virtual Machine to the 4th virtual machine resource load data successively are as follows: 70%, 50%, 60%, 55%, then resource load data of the computer room For (70%+50%+60%+55%)/4=58.75%.
Step S304, the resource load data of each computer room are compared with a default resource load data respectively.At this To apply in embodiment, the specific value of default resource load data can be configured by developer according to capacity reducing situation, this Exemplary embodiment does not do particular determination to this, for example, default resource load data can be 75%, can also be 60% etc..
If step S306, the resource load data of at least one computer room are lower than default resource load data, application is collected Group carries out capacity reducing, i.e., the resource load data of one computer room or the resource load data of multiple computer rooms are lower than default resource load When data, capacity reducing is carried out to application cluster.
If the resource load data of step S308, all computer rooms are not less than default resource load data, not to application Cluster carries out capacity reducing, i.e., when the resource load data of each computer room are not less than default resource load data, not to application cluster Carry out capacity reducing.
Based on this, according to the resource load data of each virtual machine calculate can the process of virtual machine quantity of capacity reducing can wrap It includes: the computer room that resource load data are lower than default resource load data is determined as to capacity reducing computer room, and, according to respectively to capacity reducing The resource load data of computer room and combine following formula calculate respectively to capacity reducing computer room can capacity reducing virtual machine quantity, wherein on Stating formula can be with are as follows:
Wherein, CiFor i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0To preset resource load data, qiFor I-th of resource load data to capacity reducing computer room, miFor i-th of the virtual machine quantity to dispose application cluster in capacity reducing computer room.
It should be noted that if the C acquirediFor the numerical value with decimal, then can the quantity of virtual machine of capacity reducing be CiIt is whole Number part.
More accurate calculated result in order to obtain, and then the accuracy of application cluster capacity reducing is improved, as shown in figure 4, root According to the resource load data of each virtual machine calculate can the virtual machine quantity of capacity reducing may comprise steps of:
Step S402, the computer room that resource load data are lower than default resource load data is determined as to capacity reducing computer room.
Step S404, the respectively regulatory factor to capacity reducing computer room is obtained, regulatory factor includes that big rush ensures the factor, real time load At least one of the factor, real-time machine Quantitative factor to the regulatory factor of capacity reducing computer room may include each big promoting to ensure One of the factor, the real time load factor, real-time machine Quantitative factor or any two kinds of combination or three kinds.
Step S406, according to respectively to the regulatory factor of capacity reducing computer room and resource load data, calculating is respectively to capacity reducing computer room Can capacity reducing virtual machine quantity.
In the embodiment of the present application, if including each the big rush guarantee factor to the regulatory factor of capacity reducing computer room, negative in real time Carry the factor, real-time machine Quantitative factor, then can according to following formula calculate respectively to capacity reducing computer room can capacity reducing virtual machine number Amount, wherein above-mentioned formula can be with are as follows:
Wherein, CiFor i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0To preset resource load data, qiFor I-th of resource load data to capacity reducing computer room, miFor i-th of virtual machine number to dispose the application cluster in capacity reducing computer room Amount, γiThe factor is ensured for i-th of big rush to capacity reducing computer room, if standard of the current time before promoting the period greatly and promoting the period greatly Standby stage, then γiIt is 0, if current time is not promoting greatly period and the preparation stage before promoting the period greatly, γiIt is 1, λiIt is The i real time load factors to capacity reducing computer room, if i-th of virtual machine to dispose application deployment cluster in capacity reducing computer room is real-time The mean value of resource load data is in higher level, then λiIt is 0, illustrates that business goes up or carries out capacity reducing to application cluster, it is no Then λiIt is 1, σiFor i-th of real-time machine Quantitative factor to capacity reducing computer room, if i-th to current application deployment in capacity reducing computer room The virtual machine quantity of cluster is less than preset quantity, then σiIt is 0, otherwise, σiIt is 1 or i-th to currently be disposed in capacity reducing computer room The virtual machine quantity of application cluster is less than preset quantity and i-th of virtual machine number to application deployment cluster current in capacity reducing computer room Amount is lower than the quantity of the virtual machine of its last week application deployment cluster, then σiIt is 0, otherwise, σiIt is 1.
It should be noted that if the C acquirediFor the numerical value with decimal, then can the quantity of virtual machine of capacity reducing be CiIt is whole Number part.
Based on this, according to can the virtual machine quantity of capacity reducing to carry out capacity reducing to application cluster may include: according to respectively to capacity reducing Computer room can capacity reducing virtual machine quantity to application cluster carry out capacity reducing.In the embodiment of the present application, respectively in capacity reducing computer room Choose with it is corresponding to capacity reducing computer room can capacity reducing the identical virtual machine of virtual machine quantity, and discharge respectively in capacity reducing computer room The application cluster disposed in the virtual machine of selection.
Further, since the type for disposing the virtual machine of application cluster in computer room includes non-disaster tolerance type and disaster tolerance type, again Since the virtual machine of disaster tolerance type is disaster tolerance processing to be carried out, therefore, in order to more into one when the virtual machine of non-disaster tolerance type breaks down The accuracy rate of the calculating of step, and then the accuracy of application cluster capacity reducing is improved, the type of the virtual machine in the above process is non-appearance Calamity type virtual machine only considers non-disaster tolerance type virtual machine that is, in calculating process.On this basis, capacity reducing is carried out to application cluster Process may include:
Acquire the resource load data of the virtual machine of each non-disaster tolerance type of application deployment cluster;According to the void of each non-disaster tolerance type Computer room belonging to the resource load data of quasi- machine and the virtual machine of each non-disaster tolerance type calculates the resource load data of each computer room, if The resource load data of at least one computer room are lower than default resource load data, then carry out capacity reducing to application cluster, if institute is organic The resource load data in room are not less than default resource load data, then do not carry out capacity reducing to application cluster.If to application cluster Capacity reducing is carried out, then the computer room that resource load data are lower than default resource load data is determined as to capacity reducing computer room, and according to To capacity reducing computer room resource load data and combine following formula calculate respectively to capacity reducing computer room can capacity reducing non-disaster tolerance type void Quasi- machine quantity, wherein above-mentioned formula can be with are as follows:
Wherein, CiFor i-th to capacity reducing computer room can capacity reducing non-disaster tolerance type virtual machine quantity, q0It is negative for default resource Carry data, qiFor i-th of resource load data to capacity reducing computer room, miFor i-th to dispose the non-of application cluster in capacity reducing computer room Disaster tolerance type virtual machine quantity.
It should be noted that if the C acquirediFor the numerical value with decimal, then can the quantity of virtual machine of capacity reducing be CiIt is whole Number part.
Finally, according to respectively to capacity reducing computer room can the virtual machine quantity of non-disaster tolerance type of capacity reducing contract to application cluster Hold.
Further, more accurate calculated result, and then the accuracy of raising application cluster capacity reducing in order to obtain, calculates Respectively to capacity reducing computer room can the process of virtual machine quantity of non-disaster tolerance type of capacity reducing may include: to obtain each tune to capacity reducing computer room The factor is saved, respectively to the regulatory factor of capacity reducing computer room including in the big rush guarantee factor, the real time load factor, real-time machine Quantitative factor At least one, and according to respectively to the regulatory factor of capacity reducing computer room and in conjunction with following formula calculate each computer room can capacity reducing it is non- The virtual machine quantity of disaster tolerance type.For example, if respectively to the regulatory factor of capacity reducing computer room include it is big promote to ensure the factor, real time load because Son, real-time machine Quantitative factor, then above-mentioned formula can be with are as follows:
Wherein, CiFor i-th to capacity reducing computer room can capacity reducing non-disaster tolerance type virtual machine quantity, q0It is negative for default resource Carry data, qiFor i-th of resource load data to capacity reducing computer room, miFor i-th to dispose the non-of application cluster in capacity reducing computer room Disaster tolerance type virtual machine quantity, γiThe factor is ensured for i-th of big rush to capacity reducing computer room, if current time is in the rush period greatly and greatly Promote the preparation stage before the period, then γiIt is 0, if current time is not promoting greatly period and the preparation stage before promoting the period greatly, Then γiIt is 1, λiFor i-th of real time load factor to capacity reducing computer room, if i-th to dispose the non-of application cluster in capacity reducing computer room The mean value of the real time resources load data of the virtual machine of disaster tolerance type is in higher level, then λiIt is 0, illustrates business rise or right Application cluster carries out capacity reducing, otherwise λiIt is 1, σiFor i-th of real-time machine Quantitative factor to capacity reducing computer room, if i-th to capacity reducing The virtual machine quantity of the non-disaster tolerance type of current application deployment cluster is less than preset quantity in computer room, then σiIt is 0, otherwise, σiIt is 1, or The virtual machine quantity of i-th of the person non-disaster tolerance type to application deployment cluster current in capacity reducing computer room is less than preset quantity and i-th The virtual machine quantity of non-disaster tolerance to application deployment cluster current in capacity reducing computer room is non-lower than its last week application deployment cluster The quantity of the virtual machine of disaster tolerance type, then σiIt is 0, otherwise, σiIt is 1.
It should be noted that if the C acquirediFor the numerical value with decimal, then can the quantity of virtual machine of capacity reducing be CiIt is whole Number part.
In conclusion according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to can The virtual machine quantity of capacity reducing carries out capacity reducing to application cluster, provides a kind of mode for carrying out capacity reducing to application cluster automatically, phase Than human cost greatly reduces without the mode of artificial capacity reducing in the prior art, capacity reducing efficiency is improved;In addition, Judge whether application cluster needs capacity reducing and according to each virtual according to the resource load data of each virtual machine of application deployment cluster The resource load data of machine calculate can capacity reducing virtual machine quantity, and according to can capacity reducing virtual machine quantity to application cluster into Row capacity reducing, capacity reducing step are simple and easy to carry out.
Corresponding above-mentioned application cluster capacity reduction method, based on the same technical idea, the embodiment of the present application also provides one kind Application cluster capacity reducing device, Fig. 5 are the composition schematic diagram of application cluster capacity reducing device provided by the embodiments of the present application, which uses In executing above-mentioned application cluster capacity reduction method, as shown in figure 5, the device 500 may include: acquisition module 501, judgment module 502, computing module 503 and capacity reducing module 504, in which:
Acquisition module 501, the resource load data of each virtual machine for acquiring application deployment cluster;
Judgment module 502, for being judged whether according to the resource load data of each virtual machine to the application cluster Carry out capacity reducing;
Computing module 503, for if so, according to the resource load data of each virtual machine calculate can capacity reducing it is virtual Machine quantity;
Capacity reducing module 504, for according to can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, the computing module 503, can be specifically used for obtaining the adjusting of the load for influencing the application cluster because Son, wherein the regulatory factor includes big promoting to ensure the factor, the real time load factor, at least one in real-time machine Quantitative factor It is a;And according to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
Optionally, the virtual machine is distributed at least one computer room;The judgment module 502 may include:
First computing unit, for according to belonging to the resource load data of each virtual machine and each virtual machine The computer room calculates the resource load data of each computer room;
Comparing unit, for comparing the resource load data of each computer room with a default resource load data respectively Compared with;
First judging unit, if the resource load data for computer room described at least one are lower than the default resource load Data then carry out capacity reducing to the application cluster;
Second judging unit, if the resource load data for all computer rooms are not less than the default resource load Data then do not carry out capacity reducing to the application cluster.
Optionally, the computing module 503 may include:
First determination unit is determined for the computer room by the resource load data lower than the default resource load data For to capacity reducing computer room;
Second computing unit, for being calculated according to each resource load data and the following formula of combination to capacity reducing computer room It is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load Data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th in capacity reducing computer room deployment described in answer With the virtual machine quantity of cluster.
Optionally, the computing module 503 may include:
Second determination unit is determined for the computer room by the resource load data lower than the default resource load data For to capacity reducing computer room;
Acquiring unit, for obtaining each regulatory factor to capacity reducing computer room, the regulatory factor includes that big rush ensures At least one of the factor, the real time load factor, real-time machine Quantitative factor;
Third computing unit, for calculating each according to each regulatory factor and resource load data to capacity reducing computer room It is described to capacity reducing computer room can capacity reducing virtual machine quantity.
Optionally, the capacity reducing module 504, can be specifically used for according to it is each it is described to capacity reducing computer room can capacity reducing it is virtual Machine quantity carries out capacity reducing to the application cluster.
Optionally, the type of the virtual machine can be non-disaster tolerance type.
Application cluster capacity reducing device in the embodiment of the present application, can capacity reducing according to the calculating of the resource load data of each virtual machine Virtual machine quantity, and according to can capacity reducing virtual machine quantity to application cluster carry out capacity reducing, provide a kind of automatic correspondence The mode of capacity reducing is carried out with cluster, compared with the prior art, without the mode of artificial capacity reducing, greatly reduce manpower at This, improves capacity reducing efficiency;In addition, judging that application cluster is according to the resource load data of each virtual machine of application deployment cluster It is no need capacity reducing and according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to can capacity reducing Virtual machine quantity carries out capacity reducing to application cluster, and capacity reducing step is simple and easy to carry out.
Above-mentioned application cluster capacity reduction method is answered, based on the same technical idea, the embodiment of the present application also provides one kind to answer With cluster capacity reducing equipment, Fig. 6 is the structural schematic diagram of application cluster capacity reducing equipment provided by the embodiments of the present application, which is used for Execute above-mentioned application cluster capacity reduction method.
As shown in fig. 6, application cluster capacity reducing equipment can generate bigger difference because configuration or performance are different, can wrap One or more processor 601 and memory 602 are included, one or more has been can store in memory 602 and has deposited Store up application program or data.Wherein, memory 602 can be of short duration storage or persistent storage.It is stored in the application of memory 602 Program may include one or more modules (diagram is not shown), and each module may include to application cluster capacity reducing equipment In series of computation machine executable instruction.Further, processor 601 can be set to communicate with memory 602, answer With the series of computation machine executable instruction executed in cluster capacity reducing equipment in memory 602.Application cluster capacity reducing equipment may be used also To include one or more power supplys 603, one or more wired or wireless network interfaces 604, one or one with Upper input/output interface 605, one or more keyboards 606 etc..
In a specific embodiment, application cluster capacity reducing equipment include memory and one or more Program, perhaps more than one program is stored in memory and one or more than one program may include for one of them One or more modules, and each module may include executable to the series of computation machine in application cluster capacity reducing equipment Instruction, and be configured to execute this or more than one program by one or more than one processor to include for carrying out Following computer executable instructions:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, computer executable instructions when executed, the resource load data according to each virtual machine Calculate can the virtual machine quantity of capacity reducing include:
Obtain the regulatory factor for influencing the load of the application cluster, wherein the regulatory factor include it is big promote to ensure because At least one of son, the real time load factor, real-time machine Quantitative factor;
According to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
Optionally, when executed, the virtual machine is distributed at least one computer room computer executable instructions;
The resource load data according to each virtual machine judge whether that carrying out capacity reducing to the application cluster includes:
The computer room according to belonging to the resource load data of each virtual machine and each virtual machine calculates each institute State the resource load data of computer room;
The resource load data of each computer room are compared with a default resource load data respectively;
If the resource load data of at least one computer room are lower than the default resource load data, to the application Cluster carries out capacity reducing;
If the resource load data of all computer rooms are not less than the default resource load data, do not answer described Capacity reducing is carried out with cluster.
Optionally, computer executable instructions when executed, the resource load data according to each virtual machine Calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
According to each resource load data to capacity reducing computer room and in conjunction with following formula calculate it is each described in capacity reducing computer room Can capacity reducing virtual machine quantity, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load Data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th in capacity reducing computer room deployment described in answer With the virtual machine quantity of cluster.
Optionally, computer executable instructions when executed, the resource load data according to each virtual machine Calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
Each regulatory factor to capacity reducing computer room is obtained, the regulatory factor includes that big rush ensures the factor, real time load At least one of the factor, real-time machine Quantitative factor;
According to each regulatory factor and resource load data to capacity reducing computer room, calculate it is each it is described to capacity reducing computer room can The virtual machine quantity of capacity reducing.
Optionally, computer executable instructions when executed, it is described according to can capacity reducing virtual machine quantity to institute Stating application cluster progress capacity reducing includes:
According to it is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, when executed, the type of the virtual machine is non-disaster tolerance type to computer executable instructions.
Application cluster capacity reducing equipment in the embodiment of the present application, can capacity reducing according to the calculating of the resource load data of each virtual machine Virtual machine quantity, and according to can capacity reducing virtual machine quantity to application cluster carry out capacity reducing, provide a kind of automatic correspondence The mode of capacity reducing is carried out with cluster, compared with the prior art, without the mode of artificial capacity reducing, greatly reduce manpower at This, improves capacity reducing efficiency;In addition, judging that application cluster is according to the resource load data of each virtual machine of application deployment cluster It is no need capacity reducing and according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity, and according to can capacity reducing Virtual machine quantity carries out capacity reducing to application cluster, and capacity reducing step is simple and easy to carry out.
Corresponding above-mentioned application cluster capacity reduction method, based on the same technical idea, the embodiment of the present application also provides one kind Storage medium, for storing computer executable instructions, in a specific embodiment, which can be USB flash disk, light Disk, hard disk etc., the computer executable instructions of storage medium storage are able to achieve following below scheme when being executed by processor:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, the computer executable instructions of storage medium storage are described according to each institute when being executed by processor State virtual machine resource load data calculate can the virtual machine quantity of capacity reducing include:
Obtain the regulatory factor for influencing the load of the application cluster, wherein the regulatory factor include it is big promote to ensure because At least one of son, the real time load factor, real-time machine Quantitative factor;
According to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the virtual machine point Cloth is at least one computer room;
The resource load data according to each virtual machine judge whether that carrying out capacity reducing to the application cluster includes:
The computer room according to belonging to the resource load data of each virtual machine and each virtual machine calculates each institute State the resource load data of computer room;
The resource load data of each computer room are compared with a default resource load data respectively;
If the resource load data of at least one computer room are lower than the default resource load data, to the application Cluster carries out capacity reducing;
If the resource load data of all computer rooms are not less than the default resource load data, do not answer described Capacity reducing is carried out with cluster.
Optionally, the computer executable instructions of storage medium storage are described according to each institute when being executed by processor State virtual machine resource load data calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
According to each resource load data to capacity reducing computer room and in conjunction with following formula calculate it is each described in capacity reducing computer room Can capacity reducing virtual machine quantity, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load Data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th in capacity reducing computer room deployment described in answer With the virtual machine quantity of cluster.
Optionally, the computer executable instructions of storage medium storage are described according to each institute when being executed by processor State virtual machine resource load data calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
Each regulatory factor to capacity reducing computer room is obtained, the regulatory factor includes that big rush ensures the factor, real time load At least one of the factor, real-time machine Quantitative factor;
According to each regulatory factor and resource load data to capacity reducing computer room, calculate it is each it is described to capacity reducing computer room can The virtual machine quantity of capacity reducing.
Optionally, the computer executable instructions of storage medium storage are described according to when being executed by processor Can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing include:
According to it is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
Optionally, the storage medium storage computer executable instructions when being executed by processor, the virtual machine Type is non-disaster tolerance type.
The computer executable instructions of storage medium storage in the embodiment of the present application are when being executed by processor, according to each The resource load data of virtual machine calculate can capacity reducing virtual machine quantity, and according to can the virtual machine quantity of capacity reducing application is collected Group carries out capacity reducing, a kind of mode for carrying out capacity reducing to application cluster automatically is provided, compared with the prior art, without artificial The mode of capacity reducing, greatly reduces human cost, improves capacity reducing efficiency;In addition, according to each virtual of application deployment cluster The resource load data of machine judge whether application cluster needs capacity reducing and can contract according to the calculating of the resource load data of each virtual machine The virtual machine quantity of appearance, and according to can the virtual machine quantity of capacity reducing capacity reducing carried out to application cluster, capacity reducing step is simple and easily In execution.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (10)

1. a kind of application cluster capacity reduction method characterized by comprising
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
2. application cluster capacity reduction method according to claim 1, which is characterized in that the money according to each virtual machine Source load data calculate can the virtual machine quantity of capacity reducing include:
Obtain the regulatory factor for influencing the load of the application cluster, wherein the regulatory factor includes that big rush ensures the factor, reality When load factor, at least one of real-time machine Quantitative factor;
According to the resource load data of the regulatory factor, each virtual machine calculate can capacity reducing virtual machine quantity.
3. application cluster capacity reduction method according to claim 1, which is characterized in that the virtual machine is distributed at least one In computer room;
The resource load data according to each virtual machine judge whether that carrying out capacity reducing to the application cluster includes:
The computer room according to belonging to the resource load data of each virtual machine and each virtual machine calculates each machine The resource load data in room;
The resource load data of each computer room are compared with a default resource load data respectively;
If the resource load data of at least one computer room are lower than the default resource load data, to the application cluster Carry out capacity reducing;
If the resource load data of all computer rooms are not less than the default resource load data, not to the application collection Group carries out capacity reducing.
4. application cluster capacity reduction method according to claim 3, which is characterized in that the money according to each virtual machine Source load data calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
According to each resource load data to capacity reducing computer room and in conjunction with following formula calculate it is each described in capacity reducing computer room can The virtual machine quantity of capacity reducing, wherein the formula are as follows:
Wherein, CiFor described in i-th to capacity reducing computer room can capacity reducing virtual machine quantity, q0For the default resource load data, qiFor the resource load data described in i-th to capacity reducing computer room, miFor described in i-th to dispose the application collection in capacity reducing computer room The virtual machine quantity of group.
5. application cluster capacity reduction method according to claim 3, which is characterized in that the money according to each virtual machine Source load data calculate can the virtual machine quantity of capacity reducing include:
Computer room by the resource load data lower than the default resource load data is determined as to capacity reducing computer room;
Obtain each regulatory factor to capacity reducing computer room, the regulatory factor include it is big promote to ensure the factor, the real time load factor, At least one of real-time machine Quantitative factor;
According to each regulatory factor and resource load data to capacity reducing computer room, calculate it is each it is described to capacity reducing computer room can capacity reducing Virtual machine quantity.
6. application cluster capacity reduction method according to claim 4 or 5, which is characterized in that it is described can capacity reducing according to Virtual machine quantity carries out capacity reducing to the application cluster
According to it is each it is described to capacity reducing computer room can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
7. application cluster capacity reduction method according to any one of claims 1 to 5, which is characterized in that the virtual machine Type is non-disaster tolerance type.
8. a kind of application cluster capacity reducing device characterized by comprising
Acquisition module, the resource load data of each virtual machine for acquiring application deployment cluster;
Judgment module, for judging whether to contract to the application cluster according to the resource load data of each virtual machine Hold;
Computing module, for if so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
Capacity reducing module, for according to can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
9. a kind of application cluster capacity reducing equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the computer executable instructions make described when executed Processor:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
10. a kind of storage medium, for storing computer executable instructions, the computer executable instructions are real when executed Existing following below scheme:
Acquire the resource load data of each virtual machine of application deployment cluster;
Judged whether to carry out capacity reducing to the application cluster according to the resource load data of each virtual machine;
If so, according to the resource load data of each virtual machine calculate can capacity reducing virtual machine quantity;
According to it is described can capacity reducing virtual machine quantity to the application cluster carry out capacity reducing.
CN201910165025.XA 2019-03-05 2019-03-05 Application cluster capacity reduction method and device Pending CN110008000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910165025.XA CN110008000A (en) 2019-03-05 2019-03-05 Application cluster capacity reduction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910165025.XA CN110008000A (en) 2019-03-05 2019-03-05 Application cluster capacity reduction method and device

Publications (1)

Publication Number Publication Date
CN110008000A true CN110008000A (en) 2019-07-12

Family

ID=67166413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910165025.XA Pending CN110008000A (en) 2019-03-05 2019-03-05 Application cluster capacity reduction method and device

Country Status (1)

Country Link
CN (1) CN110008000A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928640A (en) * 2019-10-28 2020-03-27 烽火通信科技股份有限公司 Method and system for acquiring in-band index of virtual machine of cloud platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836819A (en) * 2014-02-10 2015-08-12 阿里巴巴集团控股有限公司 Dynamic load balancing method and system, and monitoring and dispatching device
CN107231421A (en) * 2017-05-27 2017-10-03 北京力尊信通科技股份有限公司 A kind of virtual machine computing capability dynamic adjusting method, device and system
WO2018153218A1 (en) * 2017-02-27 2018-08-30 腾讯科技(深圳)有限公司 Resource processing method, related apparatus and communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836819A (en) * 2014-02-10 2015-08-12 阿里巴巴集团控股有限公司 Dynamic load balancing method and system, and monitoring and dispatching device
WO2018153218A1 (en) * 2017-02-27 2018-08-30 腾讯科技(深圳)有限公司 Resource processing method, related apparatus and communication system
CN107231421A (en) * 2017-05-27 2017-10-03 北京力尊信通科技股份有限公司 A kind of virtual machine computing capability dynamic adjusting method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928640A (en) * 2019-10-28 2020-03-27 烽火通信科技股份有限公司 Method and system for acquiring in-band index of virtual machine of cloud platform

Similar Documents

Publication Publication Date Title
CN110008018B (en) Batch task processing method, device and equipment
CN107391527A (en) A kind of data processing method and equipment based on block chain
CN110163417B (en) Traffic prediction method, device and equipment
CN111930486B (en) Task selection data processing method, device, equipment and storage medium
CN107577694A (en) A kind of data processing method and equipment based on block chain
CN107368510B (en) A kind of shop search ordering method and device
CN110096528A (en) The method, apparatus and system of formation sequence in a kind of distributed system
CN109583890A (en) Recognition methods, device and the equipment of abnormal trading object
CN108537619A (en) A kind of method for allocating tasks, device and equipment based on maximum-flow algorithm
CN106201673B (en) A kind of seismic data processing technique and device
CN109462260A (en) A kind of charging method, charging equipment and electronic equipment
CN109739627B (en) Task scheduling method, electronic device and medium
CN109584431A (en) A kind of data processing method of priority queue, apparatus and system
CN110046788A (en) Vehicle Demand Forecast method and device, vehicle supply amount prediction technique and device
CN109615171A (en) Characteristic threshold value determines that method and device, problem objects determine method and device
CN108920183A (en) A kind of operational decision making method, device and equipment
CN109597678A (en) Task processing method and device
CN110009490A (en) Abnormal financial transaction Stock discrimination method and device
CN110008000A (en) Application cluster capacity reduction method and device
CN110020004A (en) A kind of method for computing data and engine
CN116932175B (en) Heterogeneous chip task scheduling method and device based on sequence generation
CN116521350A (en) ETL scheduling method and device based on deep learning algorithm
CN110059712A (en) The detection method and device of abnormal data
CN110008386A (en) A kind of data generation, processing, evaluation method, device, equipment and medium
CN110704182A (en) Deep learning resource scheduling method and device and terminal equipment

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
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right