CN103973759A - Load adjusting method and load adjusting device - Google Patents

Load adjusting method and load adjusting device Download PDF

Info

Publication number
CN103973759A
CN103973759A CN201310048123.8A CN201310048123A CN103973759A CN 103973759 A CN103973759 A CN 103973759A CN 201310048123 A CN201310048123 A CN 201310048123A CN 103973759 A CN103973759 A CN 103973759A
Authority
CN
China
Prior art keywords
dilatation
machine
amount
capacity
capacity regulating
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
CN201310048123.8A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310048123.8A priority Critical patent/CN103973759A/en
Publication of CN103973759A publication Critical patent/CN103973759A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a load adjusting method and a load adjusting device, relates to the technical field of networks and can solve the problem that load adjusting is poor in instantaneity and low in accuracy. The load adjusting method includes when a capacity adjusting instruction is received, acquiring number of currently-running machines, wherein the capacity adjusting instruction is used for indicating capacity expansion or volume contraction; according to preset rules and the number of the currently-running machines, determining capacity adjusting quantity which refers to increasing or reducing the number of the machines; adjusting capacity according to the capacity adjusting quantity. The load adjusting method and the load adjusting device are mainly applied in the process of load balancing in a cloud server.

Description

The method of load regulation and device
Technical field
The present invention relates to networking technology area, relate in particular to a kind of method and device of load regulation.
Background technology
Along with the development of network technology, cloud is used widely.Cloud comprise the public cloud using by public network and use by corporate intranet certainly grind cloud.In cloud framework, cloud platform includes at least one dispatch group, and each dispatch group comprises one group of virtual server being responsible for certain class function, and the system of the each virtual server operation in dispatch group is identical.Concerning outside called side, a dispatch group is exactly a large server that high-performance, high reliability can be provided.
At present, mainly adopt mode of operation manually for the operation and maintenance of dispatch group, i.e. the loading condition of the each dispatch group of O&M personnel regular check, determines whether dispatch group is carried out to dilatation or capacity reducing, and the virtual server number of units of definite dilatation or capacity reducing.
State in realization in the process of load regulation, inventor finds that in prior art, at least there are the following problems: manually dispatch group being carried out to load regulation cannot respond in time to the load variations of dispatch group, when dispatch group load too high and O&M personnel while failing to check in time, dispatch group is because load too high there will be the problem of dispatch group lowering service quality.In addition,, because misoperation appears in manual operation unavoidably, affect the accuracy of load regulation.
Summary of the invention
The method of a kind of load regulation provided by the invention and device, can solve the poor and low problem of accuracy of load regulation instantaneity.
On the one hand, the invention provides a kind of method of load regulation, comprising:
In the time receiving capacity regulating instruction, obtain the quantity of the machine of current operation, described capacity regulating instruction is used to indicate dilatation or capacity reducing;
Determine capacity regulating amount according to the quantity of the machine of preset rules and current operation, described capacity regulating amount is the quantity of the machine of increase or minimizing;
Carry out capacity regulating according to described capacity regulating amount.
On the other hand, the present invention also provides a kind of load adjusting device, comprising:
Receiving element, for receiving capacity regulating instruction;
Acquiring unit, while instruction, obtains the quantity of the machine of current operation for receive capacity regulating when described receiving element, and described capacity regulating instruction is used to indicate dilatation or capacity reducing;
Processing unit, determines capacity regulating amount for the quantity of the machine of the current operation of obtaining according to preset rules and described acquiring unit, and described capacity regulating amount is the quantity of the machine that increases or reduce;
Regulon, carries out capacity regulating for the described capacity regulating amount of determining according to described processing unit.
The method of load regulation provided by the invention and device, after receiving capacity regulating instruction, determine capacity regulating amount according to preset rules and the quantity of the machine of the current operation getting, then carry out capacity regulating, i.e. load regulation according to capacity regulating amount.With in prior art, determine compared with adjustment amount by artificial, the present invention can confirm capacity regulating amount automatically by preset algorithm and the quantity of the machine of the current operation getting, after receiving capacity regulating instruction, can determine capacity regulating amount and carry out capacity regulating according to capacity regulating amount, therefore can carry out corresponding to load variations in time, making has suitable machine quantity to support the service of dispatch group in dispatch group, ensures the service quality of dispatch group.In addition, owing to determining concrete regulated quantity by machine, therefore avoid the misoperation that causes because of manual operation, and then improved the accuracy of load regulation.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the flow chart of the method for first load regulation in the embodiment of the present invention;
Fig. 2 is the flow chart of the method for second load regulation in the embodiment of the present invention;
Fig. 3 is the flow chart of the method for the 3rd load regulation in the embodiment of the present invention;
Fig. 4 is the flow chart of the method for the 4th load regulation in the embodiment of the present invention;
Fig. 5 is the structural representation of a load adjusting device in the embodiment of the present invention;
Fig. 6 is the structural representation of another load adjusting device in the embodiment of the present invention;
Fig. 7 is the structural representation of another load adjusting device in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment mono-
The embodiment of the present invention provides a kind of method of load regulation, as shown in Figure 1, comprising:
Step 101, when receiving capacity regulating when instruction, obtain the quantity of the machine of current operation, capacity regulating instruction is used to indicate dilatation or capacity reducing.
Every machine (virtual machine) in dispatch group is upper, all contains resource service (Resource Service is called for short RS) module, and this module is for adding up the loading condition on certain machine.Monitoring of tools (InstanceWatcher, be called for short IW) module, for receiving the load capacity on the machine that in a dispatch group, each RS sends, draw by the mode of calculating mean value the load capacity that dispatch group is current, in the time that load capacity exceeds default loading range, send capacity regulating instruction.If described default loading range is 40%-60%, in the time that load capacity is greater than 60%, send the capacity regulating instruction for dilatation, in the time that load capacity is less than 40%, send the capacity regulating instruction for capacity reducing.For example, the load information that RS collects is central processing unit (the English CentralProcessing Unit of each machine, be called for short CPU) utilization rate, IW module receives after the CPU usage on each machine that each RS sends, calculate the mean value of all CPU usage, the load capacity using this mean value as dispatch group, if now the load capacity of dispatch group is 70%, default loading range is 40%-60%, sends the capacity regulating instruction for dilatation.The machine quantity of current operation leaves in memory cell conventionally, can obtain the quantity of the machine of current operation by storage unit access.If do not preserve the quantity of the machine of described current operation in memory cell, send the information of system exception.
Step 102, determine capacity regulating amount according to the quantity of the machine of preset rules and current operation, capacity regulating amount is the quantity of the machine that increases or reduce.
Capacity regulating instruction in step 101 is used to indicate dilatation or capacity reducing, according to the different instruction content of capacity regulating instruction, can determine the quantity that increases or reduce the machine of current operation.The quantity of the concrete machine increasing or reduce is capacity regulating amount, can calculate according to the quantity of the machine of the current operation getting in preset algorithm and step 101.
Step 103, carry out capacity regulating according to capacity regulating amount.
Carry out capacity regulating operation according to the capacity regulating amount calculating in step 102, as dilatation operation or capacity reducing operation.
The method of the load regulation that the embodiment of the present invention provides, after receiving capacity regulating instruction, determines capacity regulating amount according to preset rules and the quantity of the machine of the current operation getting, then carries out capacity regulating, i.e. load regulation according to capacity regulating amount.With in prior art, determine compared with adjustment amount by artificial, the method that the embodiment of the present invention provides, can automatically confirm capacity regulating amount by preset algorithm and the quantity of the machine of the current operation getting, after receiving capacity regulating instruction, can determine capacity regulating amount and carry out capacity regulating according to capacity regulating amount, therefore can respond load variations in time, making has suitable machine quantity to support the service of dispatch group in dispatch group, ensures the service quality of dispatch group.Secondly, owing to determining concrete regulated quantity by preset rules, therefore avoid the misoperation that causes because of manual operation, and then improved the accuracy of load regulation.
Embodiment bis-
As further illustrating embodiment mono-, the embodiment of the present invention provides a kind of method of load regulation, and in the time that the judgement of IW module show that current scheduling group load value is greater than the maximum of default loading range, the capacity regulating of transmission is designated as dilatation instruction, as shown in Figure 2, described method comprises:
Step 101 comprises:
Step 201, when receiving dilatation when instruction, obtain the quantity of the machine of current operation, dilatation instruction is used to indicate dilatation.
After receiving the dilatation instruction of IW module transmission, the machine quantity of current operation leaves in memory cell conventionally, can obtain the quantity of the machine of current operation by storage unit access.If do not preserve the quantity of the machine of described current operation in memory cell, send the information of system exception.
Step 102 comprises:
Step 202, determine dilatation amount according to the quantity of the machine of the first preset ratio and current operation;
Or, the first preset value is defined as to dilatation amount.
Wherein, the first preset ratio adopts a numerical value between 0%-50% conventionally.If the quantity of the machine of described current operation is 100, the first preset ratio is 20%, the quantity of the machine of described current operation 100 and the first preset ratio 20% is multiplied each other, and obtaining dilatation amount is 20.If dilatation amount exists fractional part, integer-bit adds 1, and removes fractional part, and for example: dilatation amount is 20.3, the dilatation amount obtaining is 21.
The first preset value adopts a numerical value between 0-250 platform conventionally.If described first be set to 20,, after receiving dilatation instruction, can directly the first preset value 20 be defined as to dilatation amount, now dilatation amount is 20.
In order to ensure that the machine quantity after dilatation can not exceed hardware capabilities scope, can add following steps, to ensure enough hardware supports in step 202.
Whether the quantity sum that judges the machine of described dilatation amount and described current operation is greater than ultimate load, carry out step 203 if be not more than, if be greater than, poor by the quantity of the machine of ultimate load and described current operation, be defined as dilatation amount, then carry out step 203.Thus, in the time being greater than, by redefining dilatation amount, making the quantity of the machine after dilatation operation is ultimate load, and then ensures this dilatation operation of enough hardware supports.
In addition,, if the quantity of the machine of described current operation equals described ultimate load, do not carry out dilatation.
The first preset ratio described in step 202 and described the first preset value, can be saved in memory cell, to use when next dilatation.Also can be after definite dilatation amount, to O&M, personnel send a notification message, and described notification message is for showing the dilatation amount after determining and whether needing dilatation.Whether O&M personnel are reasonable according to the determined dilatation amount of the notification message determining step 202 of receiving, reach the effect that ensures dilatation operational stability.O&M personnel confirm instruction by transmission, can control and whether carry out steps 203.
Step 103 comprises:
Step 203, in the machine of current operation determine one with reference to machine.
Obtain the information of the machine of all current operations, described information comprises device identification and Internet protocol (Internet Protocol the be called for short IP) address of equipment on network of machine.
If store with the data structure of array device identification and IP address with reference to machine, any one machine in the machine of current operation is defined as with reference to machine.Because the deploy content of the each machine in dispatch group is identical, therefore any machine can be defined as with reference to machine.
If store with the data structure of chained list device identification and IP address with reference to machine, by last unit in chained list, i.e. the machine of the last foundation in the machine of current operation is defined as with reference to machine.By storage of linked list method, can realize with the mode of operation of storehouse the foundation of machine is processed.
Step 204, obtain the standard specimen information with reference to machine, standard specimen information is defined as to dilatation standard specimen information.
Addressable with reference to machine according to the IP address in step 203, described with reference to the configuration information on machine and data content by copying, obtain the described standard specimen information with reference to machine.After copy, described standard specimen information is preserved, the standard specimen information after preserving is defined as to dilatation standard specimen information.
Step 205, according to the newly-increased machine of dilatation standard specimen information and dilatation amount structure.
According to dilatation amount definite in dilatation standard specimen information definite in step 204 and step 202, construct newly-increased machine.For example: dilatation amount is 3, dilatation standard specimen information comprises mail service configuration information and mail service software is installed, now specified newly-increased machine is 3, and every newly-increased machine is provided with the dilatation standard specimen information that comprises mail service configuration information and mail service software.But, in the time of the newly-increased machine of structure, may occur disposablely completing the newly-increased machine equating with dilatation amount quantity.
After step 103, for the dilatation result of dilatation operation is checked, determine whether to carry out dilatation according to dilatation amount quantity, as shown in Figure 3, described method also comprises:
Step 301, obtain dilatation operation mark, dilatation operation mark is for a dilatation of unique identification operation, and dilatation is operating as according to the operation of dilatation standard specimen information and the newly-increased machine of dilatation amount structure.
Wherein, dilatation mark, for a dilatation of unique identification operation, is identified and can be found corresponding with it dilatation operation by dilatation.
Step 302, obtain dilatation result according to dilatation operation mark, dilatation result is the machine quantity of operation after dilatation operation.
Can determine in the machine of current operation the machine which constructs during corresponding dilatation operates for this dilatation identifies according to described dilatation mark.
If the machine quantity of operation equals the quantity sum of the machine of dilatation amount and the front operation of dilatation operation after step 303 dilatation operation, finish dilatation operation;
If the machine quantity of operation is less than the quantity sum of the machine of dilatation amount and the front operation of dilatation operation after dilatation operation,, according to dilatation standard specimen information and the newly-increased machine of dilatation difference structure, dilatation difference is the difference of the quantity sum of the machine of operation before the rear machine quantity moving of dilatation operation and dilatation amount and dilatation operation.
Whether be less than the quantity sum of the machine of described dilatation amount and the front operation of dilatation operation by the machine quantity of operation after more described dilatation operation, can determine whether the quantity of the machine of structure conforms to dilatation amount definite in step 202.If conform to, equal, finish dilatation operation.When not conforming to, while being less than, after dilatation operation, dispatch group will keep overload, cannot ensure dispatch group service quality.Therefore, need to proceed dilatation operation, until conform to.For example: dilatation operation mark is " 1 ", it is 3 that described dilatation identifies dilatation amount in corresponding dilatation operation, dilatation result is 13, the quantity of the preoperative machine of dilatation is 12, the machine quantity 13 of the rear operation of dilatation operation is less than quantity 12 sums 15 of the machine moving before dilatation amount 3 operates with dilatation, therefore needs again to carry out dilatation operation.This time difference value is 15-13=2, if after dilatation operates again, dilatation amount is consistent with dilatation result, stops dilatation and is designated the dilatation operation of " 1 ", otherwise proceed dilatation operation.
When dilatation identifies after corresponding dilatation EO, can send report to O&M personnel, described report has been used to indicate dilatation operation.O&M personnel receive after this report, can manually check, and further ensure the success rate of dilatation operation.
In addition, because IW module judges whether dispatch group needs dilatation conventionally after certain time interval, in the process of dilatation operation, IW module still can be sent dilatation instruction, for fear of repeating dilatation operation, when when dilatation end of operation, after cooling time, again carry out the dilatation instruction of this dispatch group, within cooling time, receive in time the dilatation instruction that IW module sends, also do not carry out dilatation operation.Conventionally, cooling time is 20 minutes, and the time interval that IW module judges is 5 minutes.
The method of the load regulation that the embodiment of the present invention provides, after receiving dilatation instruction, determine dilatation amount according to the first preset ratio and the quantity of the machine of the current operation getting, or determine dilatation amount according to the first preset value, carry out capacity regulating, i.e. load regulation according to dilatation amount again.With in prior art, determine compared with dilatation amount by artificial, the method that the embodiment of the present invention provides, after receiving dilatation instruction, can determine dilatation amount and carry out dilatation operation according to dilatation amount, therefore can respond load variations in time, making has suitable machine quantity to support the service of dispatch group in dispatch group, ensures the service quality of dispatch group.Secondly, owing to determining concrete dilatation amount by the first preset ratio or the first preset value, therefore avoid the misoperation that causes because of manual operation, and then improved the accuracy of load regulation.In addition, by sending announcement information and report to O&M personnel, can make O&M personnel understand progress and result that present load regulates, strengthen the monitoring to load regulation, the stability that further proof load regulates.By dilatation result is checked, determine whether again to carry out dilatation operation, can improve the success rate of dilatation operation.After cooling time, the dilatation of receiving scheduling group instruction again, can prevent repetition dilatation operation, causes redundancy.
Embodiment tri-
The embodiment of the present invention provides a kind of method of load regulation, and in the time that the judgement of IW module show that current scheduling group load value is less than the minimum value of default loading range, the capacity regulating of transmission is designated as capacity reducing instruction, and as shown in Figure 4, described method comprises:
Step 101 comprises:
Step 401, when receiving capacity reducing when instruction, obtain the quantity of the machine of current operation, capacity reducing instruction is used to indicate capacity reducing.
After receiving the capacity reducing instruction of IW module transmission, the machine quantity of current operation leaves in memory cell conventionally, can obtain the quantity of the machine of current operation by storage unit access.If do not preserve the quantity of the machine of described current operation in memory cell, send the information of system exception.
Step 102 comprises:
Step 402, determine capacity reducing amount according to the quantity of the machine of the second preset ratio and current operation;
Or, the second preset value is defined as to capacity reducing amount.
Wherein, the second preset ratio adopts a numerical value between 0%-50% conventionally.If the quantity of the machine of described current operation is 100, the second preset ratio is 20%, the quantity of the machine of described current operation 100 and the second preset ratio 20% is multiplied each other, and obtaining capacity reducing amount is 20.If capacity reducing amount exists fractional part, integer-bit adds 1, and removes fractional part, and for example: capacity reducing amount is 20.3, the capacity reducing amount obtaining is 21.
The second preset value adopts a numerical value between 0-250 platform conventionally.If described second be set to 20,, after receiving capacity reducing instruction, can directly the second preset value 20 be defined as to capacity reducing amount, now capacity reducing amount is 20.
In order to ensure after capacity reducing, still there is hardware resource for dispatch group, can there is not all deleted phenomenons of all machines, simultaneously, in order to prevent Single Point of Faliure, while only having the operation of machine, if breaking down, it between the service of whole dispatch group, stops or fault, therefore, can in step 402, increase following steps:
Judge the poor of the quantity of the current machine moving and described capacity reducing amount, if described difference is not more than 2, does not carry out step 403 and cancel this capacity reducing operation, if be greater than 2, carry out step 403.
The second preset ratio described in step 402 and described the second preset value, can be saved in memory cell, to use when next capacity reducing.Also can be after definite capacity reducing amount, to O&M, personnel send a notification message, and described notification message is for showing the capacity reducing amount after determining and whether needing capacity reducing.Whether O&M personnel are reasonable according to the determined capacity reducing amount of the notification message determining step 402 of receiving, reach the effect that ensures capacity reducing operational stability.O&M personnel confirm instruction by transmission, can control and whether carry out steps 403.
Step 103 comprises:
Step 403, the device identification list of obtaining the machine of current operation.
Wherein said device identification list, the device identification of the machine that contains current operation.Described device identification list can also comprise the IP address of machine on network.
Step 404, carry out capacity reducing according to capacity reducing amount and device identification list.
Concrete, from described device identification list, searched forward the list item of described capacity reducing amount number by last list item, the machine corresponding to list item of described capacity reducing amount number is defined as to machine to be deleted;
Discharge described machine to be deleted.
From device identification list, from back to front, search the machine that the list item identical with capacity reducing amount number is corresponding, this machine is defined as to machine to be deleted, discharge described machine to be deleted, can reach the effect of deleting described machine to be deleted.Described being released to discharges the memory space taking of described machine and discharges the system configuration resource that described machine to be deleted takies.If the other list of described device identification contains the IP address of each machine, machine to be deleted corresponding to releasing IP addresses.If contain device identification in described device identification list, discharge machine to be deleted corresponding to described device identification.During due to the described machine to be deleted of release, can realize and once discharge all machines to be deleted, therefore without checking whether described machine to be deleted is all released.
In addition, because IW module judges whether dispatch group needs capacity reducing conventionally after certain time interval, in the process of capacity reducing operation, IW module still can be sent capacity reducing instruction, for fear of repeating capacity reducing operation, when when capacity reducing end of operation, after cooling time, again carry out the capacity reducing of this dispatch group and indicate the dilatation instruction that receives in time the transmission of IW module within cooling time, do not carry out dilatation operation yet.Conventionally, cooling time is 20 minutes, and the time interval that IW module judges is 5 minutes.
The method of the load regulation that the embodiment of the present invention provides, after receiving capacity reducing instruction, determine capacity reducing amount according to the second preset ratio and the quantity of the machine of the current operation getting, or determine capacity reducing amount according to the second preset value, carry out capacity regulating, i.e. load regulation according to capacity reducing amount again.With in prior art, determine compared with capacity reducing amount by artificial, the method that the embodiment of the present invention provides, after receiving capacity reducing instruction, can determine capacity reducing amount and carry out capacity reducing operation according to capacity reducing amount, therefore can respond load variations in time, making has suitable machine quantity to support the service of dispatch group in dispatch group, ensures that dispatch group resource is rationally used, and avoids resources idle or waste.Secondly, owing to determining concrete capacity reducing amount by the second preset ratio or the second preset value, therefore avoid the misoperation that causes because of manual operation, and then improved the accuracy of load regulation.In addition, by sending announcement information and report to O&M personnel, can make O&M personnel understand progress and result that present load regulates, strengthen the monitoring to load regulation, the stability that further proof load regulates.After cooling time, the capacity reducing of receiving scheduling group instruction again, can prevent the operation of repetition capacity reducing, causes and cannot support dispatch group normally to move.
Embodiment tetra-
The embodiment of the present invention provides a kind of load adjusting device, as shown in Figure 5, comprising:
Receiving element 51, for receiving capacity regulating instruction, described capacity regulating instruction is used to indicate dilatation or capacity reducing.
Acquiring unit 52, while instruction, obtains the quantity of the machine of current operation for receive capacity regulating when described receiving element 51, and described capacity regulating instruction is used to indicate dilatation or capacity reducing.
The machine quantity of current operation leaves in memory cell conventionally, and acquiring unit 52 can obtain the quantity of the machine of current operation by storage unit access.If do not preserve the quantity of the machine of described current operation in memory cell, transmitting element 55 sends the information of system exception.
Processing unit 53, determines capacity regulating amount for the quantity of the machine of the current operation of obtaining according to preset rules and described acquiring unit 52, and described capacity regulating amount is the quantity of the machine that increases or reduce.
The capacity regulating instruction that receiving element 51 receives is used to indicate dilatation or capacity reducing, and processing unit 53, according to the different instruction content of capacity regulating instruction, can be determined the quantity that increases or reduce the machine of current operation.
Regulon 54, carries out capacity regulating for the described capacity regulating amount of determining according to described processing unit 53.
The capacity regulating amount that regulon 54 calculates according to processing unit 53 is carried out capacity regulating operation, as dilatation operation or capacity reducing operation.
Optionally, described processing unit 53 also for, the quantity of the machine of the described current operation of obtaining according to the first preset ratio and described acquiring unit 52 is determined dilatation amount;
The first preset value is defined as to dilatation amount.
Wherein, the first preset ratio adopts a numerical value between 0%-50% conventionally.If the quantity of the machine of described current operation is 100, the first preset ratio is 20%, the quantity of the machine of described current operation 100 and the first preset ratio 20% is multiplied each other, and obtaining dilatation amount is 20.If dilatation amount exists fractional part, integer-bit adds 1, and removes fractional part, and for example: dilatation amount is 20.3, the dilatation amount obtaining is 21.
The first preset value adopts a numerical value between 0-250 platform conventionally.If described first be set to 20,, after receiving dilatation instruction, can directly the first preset value 20 be defined as to dilatation amount, now dilatation amount is 20.
In order to ensure that the machine quantity after dilatation can not exceed hardware capabilities scope, described processing unit 53 also for, whether the quantity sum that judges the machine of described dilatation amount and described current operation is greater than ultimate load, if be greater than, cancel this dilatation operation, to ensure enough hardware supports.
In addition, described processing unit 53 also for, in the time that the quantity of the machine of described current operation equals described ultimate load, cancel dilatation operation.
Described the first preset ratio and described the first preset value, can be saved in memory cell, to use when next dilatation.Also can, after processing unit 53 is determined dilatation amount, send a notification message to O&M personnel by transmitting element 55, described notification message is for showing the dilatation amount after determining and whether needing dilatation.O&M personnel judge that according to the notification message of receiving whether the definite dilatation amount of processing unit 53 is reasonable, reach the effect that ensures dilatation operational stability.Receiving element 51 receives the confirmation instruction that O&M personnel send, and the confirmation instruction that processing unit 53 receives according to receiving element 51 determines that cancel dilatation operates right.
Optionally, as shown in Figure 6, described regulon 54 comprises:
Search subelement 61, determine that for the machine in described current operation one with reference to machine.
Search subelement 61 for, obtain the information of the machine of all current operations, described information comprises device identification and the IP address of equipment on network of machine.
Search subelement 61 also for, in the time that store with the data structure of array the device identification with reference to machine and IP address, any one machine in the machine of current operation is defined as with reference to machine.Because the deploy content of the each machine in dispatch group is identical, therefore any machine can be defined as with reference to machine.
Search subelement 61 also for, in the time that store with the data structure of chained list the device identification with reference to machine and IP address, search subelement 61 by last unit in chained list, i.e. the machine of the last foundation in the machine of current operation is defined as with reference to machine.By storage of linked list method, can realize with the mode of operation of storehouse the foundation of machine is processed.
Determine subelement 62, described in obtaining, search the described standard specimen information with reference to machine that subelement 61 is determined, described standard specimen information is defined as to dilatation standard specimen information.
Determine that subelement 62 is addressable with reference to machine according to searching the definite IP address of subelement 61, described with reference to the configuration information on machine and data content by copying, obtain the described standard specimen information with reference to machine.After copy, described standard specimen information is preserved, the standard specimen information after preserving is defined as to dilatation standard specimen information.
Constructor unit 63, for described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure determined according to described definite subelement 62.
Constructor unit 63, according to determining definite dilatation standard specimen information and the definite dilatation amount of processing unit 53 of subelement 62, constructs newly-increased machine.For example: dilatation amount is 3, dilatation standard specimen information comprises mail service configuration information and mail service software is installed, now newly-increased machine is 3, and every newly-increased machine is provided with the dilatation standard specimen information that comprises mail service configuration information and mail service software.But, construct newly-increased machine during in constructor unit 63, may occur once completing the newly-increased machine equating with dilatation amount quantity.
Optionally, described acquiring unit 52 also for:
Obtain dilatation operation mark, described dilatation operation mark is for a dilatation of unique identification operation, and described dilatation is operating as according to the operation of described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure;
Obtain dilatation result according to described dilatation operation mark, described dilatation result is the machine quantity of operation after described dilatation operation.
Wherein, dilatation mark, for a dilatation of unique identification operation, is identified and can be found corresponding with it dilatation operation by dilatation.Acquiring unit 52 can be determined in the machine of current operation the machine which constructs during corresponding dilatation operates for this dilatation identifies according to described dilatation mark.
Described regulon 54 also for, before the machine quantity of operation after the described dilatation operation that described acquiring unit 52 obtains equals described dilatation amount and dilatation operation, when the quantity sum of the machine of operation, finish dilatation and operate;
In the time that the machine quantity of operation after the described dilatation operation that described acquiring unit 52 obtains is less than the quantity sum of machine of described dilatation amount and the front operation of dilatation operation, according to described dilatation standard specimen information and the newly-increased machine of dilatation difference structure, described dilatation difference is the difference of the quantity sum of the machine of operation before the rear machine quantity moving of described dilatation operation and described dilatation amount and dilatation operation.
Regulon 54 by more described dilatation operation after the machine quantity of operation whether be less than the quantity sum of the machine moving before described dilatation amount and dilatation operation, whether the dilatation amount definite with processing unit 53 conforms to can to determine the quantity of machine of structure.If conform to, equal, described regulon 54 finishes dilatation operation.When not conforming to, while being less than, after dilatation operation, dispatch group will keep overload, cannot ensure dispatch group service quality.Therefore, regulon 54 need to be proceeded dilatation operation, until conform to.For example: dilatation operation mark is " 1 ", it is 3 that described dilatation identifies dilatation amount in corresponding dilatation operation, dilatation result is 13, the quantity of the preoperative machine of dilatation is 12, the machine quantity 13 of the rear operation of dilatation operation is less than quantity 12 sums 15 of the machine moving before dilatation amount 3 operates with dilatation, and therefore regulon 54 need to carry out dilatation operation again.This time difference value is 2, if again after dilatation operation, dilatation amount is consistent with dilatation result, and regulon 54 stops dilatation and be designated the dilatation operation of " 1 ", operates otherwise proceed dilatation.
Optionally, described processing unit 53 also for:
Determine capacity reducing amount according to the quantity of the machine of the second preset ratio and described current operation;
The second preset value is defined as to capacity reducing amount.
Wherein, the second preset ratio adopts a numerical value between 0%-50% conventionally.If the quantity of the machine of the described current operation that acquiring unit 52 obtains is 100, the second preset ratio is 20%, and processing unit 53 multiplies each other the quantity of the machine of described current operation 100 and the second preset ratio 20%, and obtaining capacity reducing amount is 20.If capacity reducing amount exists fractional part, integer-bit adds 1, and removes fractional part, and for example: capacity reducing amount is 20.3, the capacity reducing amount that processing unit 53 obtains is 21.
The second preset value adopts a numerical value between 0-250 platform conventionally.If described second be set to 20,, after receiving capacity reducing instruction, can directly the second preset value 20 be defined as to capacity reducing amount, now capacity reducing amount is 20.
In order to ensure after capacity reducing, still there is hardware resource for dispatch group, the phenomenon that all machines are all fallen by capacity reducing can not occur, simultaneously, in order to prevent Single Point of Faliure,, while only having the operation of machine, if breaking down, it between the service of whole dispatch group, stops or fault, therefore, processing unit 53 also for, judge the poor of the quantity of the current machine moving and described capacity reducing amount, if described difference is not more than 2, cancel this capacity reducing operation.
Described the second preset ratio and described the second preset value, can be saved in memory cell, to use when next capacity reducing.Also can, after processing unit 53 is determined capacity reducing amount, be sent a notification message to O&M personnel by transmitting element 55, described notification message is for showing the capacity reducing amount after determining and whether needing capacity reducing.O&M personnel judge that according to the notification message of receiving whether the determined capacity reducing amount of processing unit 53 is reasonable, reach the effect that ensures capacity reducing operational stability.Receiving element 51 receives the confirmation instruction that O&M personnel send, and the confirmation instruction that processing unit 53 receives according to receiving element 51 determines that cancel capacity reducing operates right.
Optionally, as shown in Figure 7, described regulon 54 also comprises:
Identification list obtains subelement 71, for obtaining the device identification list of machine of described current operation.
Identification list obtains the described device identification list of subelement 71, the device identification of the machine that contains current operation.Described device identification list can also comprise the IP address of machine on network.
Capacity reducing subelement 72, for carrying out capacity reducing according to described capacity reducing amount and described device identification list.
Described capacity reducing subelement 72 also for, from described device identification list, searched forward the list item of described capacity reducing amount number by last list item, the machine corresponding to list item of described capacity reducing amount number is defined as to machine to be deleted;
Discharge described machine to be deleted.
Capacity reducing subelement 72 from back to front, is searched the machine that the list item identical with capacity reducing amount number is corresponding from device identification list, and this machine is defined as to machine to be deleted, discharges described machine to be deleted, can reach the effect of deleting described machine to be deleted.Described being released to discharges the memory space taking of described machine and discharges the system configuration resource that described machine to be deleted takies.If the other list of described device identification contains the IP address of each machine, machine to be deleted corresponding to capacity reducing subelement 72 releasing IP addresses.If contain device identification in described device identification list, capacity reducing subelement 72 discharges machine to be deleted corresponding to described device identification.In practical operation, existing capacity reducing subelement 72 can be realized and once complete the release that discharges all machines to be deleted.
The load adjusting device that the embodiment of the present invention provides, after receiving element 51 receives capacity regulating instruction, processing unit 53 is determined capacity regulating amount according to preset algorithm, regulon 54 carries out capacity regulating, i.e. load regulation according to capacity regulating amount.With in prior art, determine compared with capacity regulating amount by artificial, the method that the embodiment of the present invention provides, after receiving capacity regulating instruction, can determine capacity regulating amount and carry out capacity regulating operation according to capacity regulating amount, therefore can respond load variations in time, making has suitable machine quantity to support the service of dispatch group in dispatch group, ensures that dispatch group resource is rationally used, and avoids resources idle or waste.Secondly, because processing unit 53 is determined concrete capacity reducing amount by preset algorithm, therefore avoid the misoperation that causes because of manual operation, and then improved the accuracy of load regulation.In addition, send announcement information and report by transmitting element 55 to O&M personnel, receive by receiving element 51 confirmation that O&M personnel send, can make O&M personnel understand progress and result that present load regulates, strengthen the monitoring to load regulation, the stability that further proof load regulates.By regulon 54, capacity regulating result is checked, determine whether again to carry out capacity regulating operation, can improve the success rate of capacity regulating operation.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, be divided into different functional modules by the internal structure of device, to complete all or part of function described above.The system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described module or unit, be only that a kind of logic function is divided, when actual realization, can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If described integrated unit is realized and during as production marketing independently or use, can be stored in a computer read/write memory medium using the form of SFU software functional unit.Based on such understanding, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) or processor (processor) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), the various media that can be program code stored such as random access memory (RAM, Random Access Memory), magnetic disc or CD.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, any be familiar with those skilled in the art the present invention disclose technical scope in; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (14)

1. a method for load regulation, is characterized in that, comprising:
In the time receiving capacity regulating instruction, obtain the quantity of the machine of current operation, described capacity regulating instruction is used to indicate dilatation or capacity reducing;
Determine capacity regulating amount according to the quantity of the machine of preset rules and current operation, described capacity regulating amount is the quantity of the machine of increase or minimizing;
Carry out capacity regulating according to described capacity regulating amount.
2. method according to claim 1, is characterized in that, in the time that described capacity regulating is designated as dilatation instruction, the described quantity according to the machine of preset rules and current operation is determined capacity regulating amount, comprising:
Determine dilatation amount according to the quantity of the machine of the first preset ratio and described current operation;
Or, the first preset value is defined as to dilatation amount.
3. method according to claim 2, is characterized in that, describedly carries out capacity regulating according to described capacity regulating amount, comprising:
In the machine of described current operation, determine that one with reference to machine;
Obtain the described standard specimen information with reference to machine, described standard specimen information is defined as to dilatation standard specimen information;
According to described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure.
4. method according to claim 3, is characterized in that, described according to the newly-increased machine of described dilatation standard specimen information and described dilatation amount structure after, also comprise:
Obtain dilatation operation mark, described dilatation operation mark is for a dilatation of unique identification operation, and described dilatation is operating as according to the operation of described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure;
Obtain dilatation result according to described dilatation operation mark, described dilatation result is the machine quantity of operation after described dilatation operation;
If the machine quantity of operation equals the quantity sum of the machine of described dilatation amount and the front operation of dilatation operation after described dilatation operation, finish dilatation operation;
If the machine quantity of operation is less than the quantity sum of the machine of described dilatation amount and the front operation of dilatation operation after described dilatation operation,, according to described dilatation standard specimen information and the newly-increased machine of dilatation difference structure, described dilatation difference is the difference of the quantity sum of the machine of operation before the rear machine quantity moving of described dilatation operation and described dilatation amount and dilatation operation.
5. method according to claim 1, is characterized in that, in the time that described capacity regulating is designated as capacity reducing instruction, the described quantity according to the machine of preset rules and current operation is determined capacity regulating amount, comprising:
Determine capacity reducing amount according to the quantity of the machine of the second preset ratio and described current operation;
Or, the second preset value is defined as to capacity reducing amount.
6. method according to claim 5, is characterized in that, describedly carries out capacity regulating according to described capacity regulating amount, comprising:
Obtain the device identification list of the machine of described current operation;
Carry out capacity reducing according to described capacity reducing amount and described device identification list.
7. method according to claim 6, is characterized in that, describedly carries out capacity reducing according to described capacity reducing amount and described device identification list, comprising:
From described device identification list, searched forward the list item of described capacity reducing amount number by last list item, the machine corresponding to list item of described capacity reducing amount number is defined as to machine to be deleted;
Discharge described machine to be deleted.
8. a load adjusting device, is characterized in that, comprising:
Receiving element, for receiving capacity regulating instruction;
Acquiring unit, while instruction, obtains the quantity of the machine of current operation for receive capacity regulating when described receiving element, and described capacity regulating instruction is used to indicate dilatation or capacity reducing;
Processing unit, determines capacity regulating amount for the quantity of the machine of the current operation of obtaining according to preset rules and described acquiring unit, and described capacity regulating amount is the quantity of the machine that increases or reduce;
Regulon, carries out capacity regulating for the described capacity regulating amount of determining according to described processing unit.
9. load adjusting device according to claim 8, is characterized in that, described processing unit also for:
The quantity of the machine of the described current operation of obtaining according to the first preset ratio and described acquiring unit is determined dilatation amount;
The first preset value is defined as to dilatation amount.
10. load adjusting device according to claim 9, is characterized in that, described regulon comprises:
Search subelement, determine that for the machine in described current operation one with reference to machine;
Determine subelement, described in obtaining, search the described standard specimen information with reference to machine that subelement is determined, described standard specimen information is defined as to dilatation standard specimen information;
Constructor unit, for described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure determined according to described definite subelement.
11. load adjusting devices according to claim 10, it is characterized in that, described acquiring unit also for, obtain dilatation operation mark, described dilatation operation mark is for a dilatation of unique identification operation, described dilatation is operating as according to the operation of described dilatation standard specimen information and the newly-increased machine of described dilatation amount structure, obtains dilatation result according to described dilatation operation mark, and described dilatation result is the machine quantity of operation after described dilatation operation;
Described regulon also for, in the time that the machine quantity of operation after the described dilatation operation that described acquiring unit obtains equals the quantity sum of machine of described dilatation amount and the front operation of dilatation operation, finish dilatation operation, in the time that the machine quantity of operation after the described dilatation operation that described acquiring unit obtains is less than the quantity sum of machine of described dilatation amount and the front operation of dilatation operation, according to described dilatation standard specimen information and the newly-increased machine of dilatation difference structure, described dilatation difference is the difference of the quantity sum of the machine quantity of operation after described dilatation operation and the machine of described dilatation amount and the front operation of dilatation operation.
12. load adjusting devices according to claim 8, is characterized in that, described processing unit also for:
Determine capacity reducing amount according to the quantity of the machine of the second preset ratio and described current operation;
The second preset value is defined as to capacity reducing amount.
13. load adjusting devices according to claim 12, is characterized in that, described regulon also comprises:
Identification list obtains subelement, for obtaining the device identification list of machine of described current operation;
Capacity reducing subelement, for carrying out capacity reducing according to described capacity reducing amount and described device identification list.
14. load adjusting devices according to claim 13, is characterized in that, described capacity reducing subelement also for:
From described device identification list, searched forward the list item of described capacity reducing amount number by last list item, the machine corresponding to list item of described capacity reducing amount number is defined as to machine to be deleted;
Discharge described machine to be deleted.
CN201310048123.8A 2013-02-06 2013-02-06 Load adjusting method and load adjusting device Pending CN103973759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310048123.8A CN103973759A (en) 2013-02-06 2013-02-06 Load adjusting method and load adjusting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310048123.8A CN103973759A (en) 2013-02-06 2013-02-06 Load adjusting method and load adjusting device

Publications (1)

Publication Number Publication Date
CN103973759A true CN103973759A (en) 2014-08-06

Family

ID=51242800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310048123.8A Pending CN103973759A (en) 2013-02-06 2013-02-06 Load adjusting method and load adjusting device

Country Status (1)

Country Link
CN (1) CN103973759A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032805A (en) * 2018-08-06 2018-12-18 深圳乐信软件技术有限公司 A kind of scalable appearance method, apparatus of elasticity, server and storage medium
CN109600402A (en) * 2017-09-30 2019-04-09 上海波克城市网络科技股份有限公司 Server load balancing method and device, storage medium, server, service system
CN110019110A (en) * 2017-07-28 2019-07-16 腾讯科技(深圳)有限公司 A kind of capacity management methods of operation system, device, equipment and operation system
CN111371583A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Server capacity expansion method and device, server and storage medium
CN111404704A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 VNF capacity expansion and reduction method and device, network element and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1212680A2 (en) * 1999-08-13 2002-06-12 Sun Microsystems, Inc. Graceful distribution in application server load balancing
CN102508693A (en) * 2011-09-29 2012-06-20 华中科技大学 Web server capacity expansion system based on virtual machine
CN102646062A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Flexible capacity enlargement method for cloud computing platform based application clusters
CN102833355A (en) * 2012-09-22 2012-12-19 广东电子工业研究院有限公司 Load balance system and cloud computing oriented mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1212680A2 (en) * 1999-08-13 2002-06-12 Sun Microsystems, Inc. Graceful distribution in application server load balancing
CN102508693A (en) * 2011-09-29 2012-06-20 华中科技大学 Web server capacity expansion system based on virtual machine
CN102646062A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Flexible capacity enlargement method for cloud computing platform based application clusters
CN102833355A (en) * 2012-09-22 2012-12-19 广东电子工业研究院有限公司 Load balance system and cloud computing oriented mechanism

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019110A (en) * 2017-07-28 2019-07-16 腾讯科技(深圳)有限公司 A kind of capacity management methods of operation system, device, equipment and operation system
CN110019110B (en) * 2017-07-28 2022-11-18 腾讯科技(深圳)有限公司 Capacity management method, device and equipment of service system and service system
CN109600402A (en) * 2017-09-30 2019-04-09 上海波克城市网络科技股份有限公司 Server load balancing method and device, storage medium, server, service system
CN109032805A (en) * 2018-08-06 2018-12-18 深圳乐信软件技术有限公司 A kind of scalable appearance method, apparatus of elasticity, server and storage medium
CN111371583A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Server capacity expansion method and device, server and storage medium
CN111404704A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 VNF capacity expansion and reduction method and device, network element and storage medium

Similar Documents

Publication Publication Date Title
US8839049B2 (en) Dynamically allocating multitier applications based upon application requirements and performance reliability of resources
CN103973759A (en) Load adjusting method and load adjusting device
CN109669762B (en) Cloud computing resource management method, device, equipment and computer readable storage medium
CN108023967B (en) Data balancing method and device and management equipment in distributed storage system
CN110166523B (en) Content updating method, device, equipment and computer readable storage medium
CN105740063A (en) Data processing method and apparatus
CN105653630A (en) Data migration method and apparatus for distributed database
CN103399778A (en) Method and device for on-line integral migration of virtual machine
CN111008075A (en) Load balancing system, method, device, equipment and medium
US20140173354A1 (en) Software Installation Method, Apparatus and Program Product
CN105512283A (en) Data quality management and control method and device
CN104503840A (en) Method and device for optimizing terminal resources
CN110636122A (en) Distributed storage method, server, system, electronic device, and storage medium
CN103368785A (en) Server operation monitoring system and method
US11922059B2 (en) Method and device for distributed data storage
CN105450716A (en) Dynamic business distribution method and dynamic business distribution system
CN103559124A (en) Fast fault detection method and device
CN110737924B (en) Data protection method and equipment
US10133757B2 (en) Method for managing data using in-memory database and apparatus thereof
EP2913759A1 (en) Memory access processing method based on memory chip interconnection, memory chip, and system
CN105577756A (en) Distributed database log collection and load regulation system adopting cross backup and method thereof
CN104486401A (en) Partitioned data control method and system
CN111767126A (en) System and method for distributed batch processing
CN115686746A (en) Access method, task processing method, computing device, and computer storage medium
CN105187489A (en) File transfer method and system capable of clustering and supporting multiple users to upload simultaneously

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140806