CN101000563A - Adaptive congestion control method and device - Google Patents

Adaptive congestion control method and device Download PDF

Info

Publication number
CN101000563A
CN101000563A CNA2006101732271A CN200610173227A CN101000563A CN 101000563 A CN101000563 A CN 101000563A CN A2006101732271 A CNA2006101732271 A CN A2006101732271A CN 200610173227 A CN200610173227 A CN 200610173227A CN 101000563 A CN101000563 A CN 101000563A
Authority
CN
China
Prior art keywords
transaction
failure rate
server
concurrent number
congestion control
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.)
Granted
Application number
CNA2006101732271A
Other languages
Chinese (zh)
Other versions
CN100524226C (en
Inventor
吴炜斯
王迎春
杨芬
周子坚
施健
陈建文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CNB2006101732271A priority Critical patent/CN100524226C/en
Publication of CN101000563A publication Critical patent/CN101000563A/en
Application granted granted Critical
Publication of CN100524226C publication Critical patent/CN100524226C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

A method for controlling adaptive congestion includes presetting configuration file stored with controlled object fault ratio and corresponding concurrent number of controlled object fault radio, calculating current fault ratio of controlled object, obtaining controlled object fault ratio concurrent number corresponding to current fault ratio of controlled object from configuration file and refusing to make transaction on provided object if current concurrent number of controlled object is greater than fault ratio concurrent number of controlled object. The device for realizing said method is also disclosed.

Description

A kind of adaptive congestion control method and device
Technical field
The present invention relates to the data communication field, particularly relate to a kind of adaptive congestion control method and device.
Background technology
At present, based on the ubiquitous life that affects people of the network application of client/server architecture.In such architecture, server is often being born important work, as calculating, storage etc.Particularly in the system that some large-scale real-times are had relatively high expectations, the number of transaction that server need respond and handle is very big.In order in time to handle transaction, in the inner mode that adopts multi-thread concurrent to handle of server.But, the resource of server is limited, this server can simultaneously treated number of deals also be limited, therefore if will conclude the business do not add restriction on send server, will cause wherein a large amount of transaction to be in waiting status because of the processing that can not get server, form congestedly, cause handling time-delay, and then can't requirement of real time.If such system applies requires very high field in real-times such as finance, governments, consequent influence is difficult to accept.Therefore, the how effectively congested generation of control guarantees the normal stable operation of server, with regard to become those skilled in the art the problem that must face.
At present, comparatively the congested method of Chang Yong control is: preset a counter, behind concurrent transaction of server response, this counter adds 1; After server process was finished above-mentioned transaction, this counter subtracted 1.In above-mentioned processing procedure, as long as exceeding, the value of counter do not preset threshold values, this server just is allowed to receive new transaction.
Said method comes limiting server simultaneously treatedly to conclude the business by counter is set, though send the number of transaction of server on having limited to a certain extent, has protected the stable operation of server, still can not avoid congested generation.For example: if certain process in the server has caused server performance decline or downward trend to occur because handle transaction, and the value of current counter does not exceed threshold values.In this case, server still is allowed to receive new transaction, and thus, this server residual resource will certainly be fought for and take to other process in the server in order to handle new transaction, like this, will aggravate the decline of server performance.Further, even can cause server resource to exhaust, the generation systems collapse.
Summary of the invention
The object of the present invention is to provide a kind of adaptive congestion control method and device, conclude the business when reception appears still being forced under the unusual situation in server health to solve in the prior art, and the problem that the server performance that causes further descends.
The invention discloses a kind of adaptive congestion control method for addressing the above problem, may further comprise the steps:
Preset configuration file, described configuration file also store controlling object failure rate and the corresponding concurrent number of controlling object failure rate;
The current failure rate of calculation control object;
From configuration file, obtain and the concurrent number of the current failure rate control corresponding of described controlling object object failure rate;
If the current concurrent number of controlling object is greater than the concurrent number of described controlling object failure rate, then refusal is submitted target transaction to.
Preferably, the corresponding one or more controlling object failure rates of the concurrent number of described controlling object failure rate.
Preferably, the current failure rate of described calculation control object comprises: select continuous many transactions through server process as sample information; Calculate the ratio that processing procedure is unusual in the described sample information transaction accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.
Preferably, described processing procedure comprises overtime and/or the system communication mistake unusually.
Preferably, described controlling object is a server.
Preferably, described controlling object is transaction.
Preferably, described configuration file is according to type of transaction difference store transaction failure rate and the corresponding concurrent number of transaction failure rate.
Preferably, described target transaction is the transaction in the affairs.
Preferably, described method also comprises: if the target transaction stand-by period greater than overtime standard, then refusal is submitted this target transaction to server.
Preferably, described method also comprises: if the predicted processing time of target transaction is not more than overtime standard, then allow to submit to this target transaction.
Preferably, described method also comprises: if the concurrent numerical value of target transaction is 0, then allow to submit to this target transaction.
Preferably, described method also comprises: if the mortality of target transaction is not more than a random number, then allow to submit to this target transaction.
For addressing the above problem, the invention also discloses a kind of adaptive congestion control device, it is characterized in that, comprising:
Storage unit is used to store controlling object failure rate and the corresponding concurrent number of controlling object failure rate;
The failure rate computing unit is used for the current failure rate of calculation control object;
Concurrent counter is used to add up the current concurrent number of controlling object;
Comparing unit is used for obtaining and the concurrent number of the current failure rate control corresponding of described controlling object object from storage unit; From concurrent counter, obtain the current concurrent number of controlling object; Compare current concurrent number of controlling object and the concurrent number of described controlling object failure rate, if greater than, notice control module refusal is submitted target transaction to;
Control module is used for control and whether submits target transaction to.
Preferably, the corresponding one or more controlling object failure rates of the concurrent number of controlling object in the described storage unit.
Preferably, described failure rate computing unit comprises: collector unit is used to select continuous many transactions through server process as sample information; The failure rate counter is used for calculating the ratio that the unusual transaction of described sample information processing procedure accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.
Preferably, described processing procedure comprises overtime and/or the system communication mistake unusually.
Preferably, described controlling object is a server.
Preferably, described controlling object is transaction.
Preferably, described storage unit also stores transaction failure rate and the corresponding concurrent number of transaction failure rate that is provided with according to type of transaction.
Preferably, described device also comprises: first authentication unit, be used for comparison object transaction stand-by period and overtime standard, if greater than, then notify the control module refusal to submit this target transaction to.
Preferably, described device also comprises: second authentication unit, be used for comparison object transaction predicted processing time and overtime standard, and if be not more than, then notify control module to allow to submit to this target transaction.
Preferably, described device also comprises: the 3rd authentication unit, be used to verify whether the concurrent numerical value of target transaction is 0, if 0, then notify control module to allow to submit to this target transaction.
Preferably, described device also comprises: the 4th authentication unit, be used for mortality and a random number of comparison object transaction, and if be not more than, then notify control module to allow to submit to this target transaction.
The invention also discloses a kind of adaptive congestion control method for addressing the above problem, it is characterized in that, comprising:
Preset configuration file, described configuration file stores have server failure rate and the concurrent number of corresponding server failure rate;
The current failure rate of calculation server;
From configuration file, obtain and the concurrent number of the corresponding server failure rate of the current failure rate of described server; If the current concurrent number of server is greater than the concurrent number of described server failure rate, then refusal is submitted target transaction to;
Described configuration file also stores transaction failure rate and the corresponding concurrent number of transaction failure rate;
Calculate the current failure rate of transaction;
From configuration file, obtain and the current failure rate of the described transaction concurrent number of failure rate of concluding the business accordingly; If the current concurrent number of transaction is greater than the concurrent number of described transaction failure rate, then refusal is submitted target transaction to.
Preferably, described method also comprises: if the target transaction stand-by period greater than overtime standard, then refusal is submitted this target transaction to server.
Compared with prior art, the present invention has the following advantages:
The present invention utilizes the current concurrent number of the server failure rate concurrent number corresponding with the current failure rate of server to compare by the current failure rate of real-time calculation server, and whether control submits transaction to according to comparative result.Because the concurrent number of failure rate that different failure rates is corresponding different, therefore the operation conditions that the present invention can be current according to server, regulate to submit the number of transaction of server adaptively to, avoided in the prior art on server occurs under the unusual situation still, delivering easily and the server performance that causes, the further decline of resource.
In addition, the present invention passes through classification of business transaction, control the number of transaction that to submit to respectively by type of transaction, therefore, effectively distinguished the influence of different transaction to server, when the processing of a certain class transaction occurs when unusual, only need to control such transaction on send quantity, and can not influence the processing of other transaction.
Description of drawings
Fig. 1 is the flow chart of steps according to the preferred embodiment of adaptive congestion control method of the present invention;
Fig. 2 is the flow chart of steps according to another preferred embodiment of adaptive congestion control method of the present invention;
Fig. 3 is the flow chart of steps according to another preferred embodiment of adaptive congestion control method of the present invention;
Fig. 4 is the structured flowchart according to the preferred embodiment of adaptive congestion control device of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Adaptive congestion control method disclosed by the invention comprises: preset configuration file, described configuration file stores have controlling object failure rate and the corresponding concurrent number of controlling object failure rate; The current failure rate of calculation control object; From configuration file, obtain and the concurrent number of the current failure rate control corresponding of described controlling object object failure rate; If the current concurrent number of controlling object is greater than the concurrent number of described controlling object failure rate, then refusal is submitted target transaction to.
With reference to Fig. 1, Fig. 1 shows the flow chart of steps according to a preferred embodiment of adaptive congestion control method of the present invention.Below with reference to Fig. 1 this embodiment of the present invention is done detailed description.
Step 101: preset configuration file, described configuration file stores have server failure rate and the concurrent number of corresponding server failure rate.
Server is the preferred controlling object of the present invention.Because the difference of server self-acting, the accessible transaction of this server also can be divided into multiple, as addressing transaction, route transaction, inquiry transaction, money transfer transactions etc.For convenience of explanation, will wait among the present invention that the transaction of submitting to is called target transaction.If transaction is lined up in the mode of formation, the transaction that then is in the formation top is exactly a target transaction.
Fault is meant the abnormal conditions in the transaction processing process.According to the difference of applied environment, unusual implication also has corresponding variation, as hardware fault, network failure, system mistake, response timeout etc.Preferred describedly comprise overtime unusually and/or the system communication mistake.Overtime for an overtime standard.Exceeded overtime standard when the stand-by period of a transaction, thought that then this transaction is overtime.Among the present invention, the stand-by period of transaction is meant the time of playing this exchange's cost of response when inserting this transaction.Described overtime standard can calculate, and also can add up drawing, and also can set up on their own as the case may be when enforcement is of the present invention, and the present invention does not limit this.For example, can add up the mean value of nearest 10000 transaction stand-by period as overtime standard.In this example, with 1000 seconds as overtime standard.
The server failure rate is meant in some transactions, handles the ratio that unusual transaction accounts for whole transaction sums.The present invention sets in advance server failure rate and the concurrent number of corresponding server failure rate in configuration file.Preferably, corresponding a plurality of server failure rates of the concurrent number of server failure rate.The content of this configuration file is as shown in table 1:
Failure rate scope (unit: %) The concurrent number of failure rate
1-10 10000
11-30 5000
31-50 800
51-70 100
Table 1
As can be seen, if failure rate drops in the same failure rate scope, then the concurrent number of its corresponding failure rate is identical.Certainly, the corresponding relation of above-mentioned failure rate scope and the concurrent number of failure rate is just in order to illustrate the present invention, and those skilled in the art need not be confined to this certainly, for example, and can be to the scope or the further refinement of the concurrent number of failure rate of failure rate.When enforcement is of the present invention, can set up on their own as hardware environment, system requirements etc. as the case may be.
Step 102: the current failure rate of calculation server.
Preferably, the current failure rate of server is calculated in accordance with the following methods: select continuous many transactions through server process as sample information; Calculate the ratio that processing procedure is unusual in the described sample information transaction accounts for whole sample informations, with result of calculation as the current failure rate of this server.For example, with 100 transactions as sample information.If server has totally been handled two transactions, write down the disposition of every transaction, if the second transaction fault, the first stroke transaction is normal, and the sample information of this moment is 2, and then the current failure rate of server is 50%.Then, a transaction is handled in every increase, and sample information adds 1, and the current failure rate of calculation server again.After if the sample information number reaches 100, at first the first stroke in the sample information is removed, the transaction that will newly handle is as sample information then, and the current failure rate of calculation server again.This is just as a formation, and after new transaction added formation, the transaction that is in the formation end will be deleted, thereby guarantee a metastable sample information, to improve the real-time of calculating.
Step 103: from described configuration file, obtain and the concurrent number of the corresponding server failure rate of the current failure rate of described server.
Step 104: greater than the concurrent number of described server failure rate, then execution in step 109 as if the current concurrent number of server.
Server is provided with concurrent counter, if a transaction is handled in the every increase of server, this Counter Value adds 1; Whenever the transaction of finishing dealing with, this Counter Value subtracts 1.The currency of this counter is exactly the current concurrent number of server.
Because the current failure rate of server is to calculate according to the transaction that server has been handled, therefore, the current failure rate of server is a kind of reflection to the current operation conditions of this server.
The current failure rate of the real-time calculation server of the present invention, and by the mode that compares with the concurrent number of corresponding server failure rate control transaction on give.Use the present invention, when the current failure rate of server changed, the concurrent number of server failure rate that compares with it also can correspondingly change.Like this, operation conditions that can be current according to server is adjusted the number of transaction that send server dynamically, makes whole control process have the ability that self-adaptation is regulated, thereby has effectively guaranteed the operation that server is normal, stable.
Step 105: if the target transaction stand-by period greater than overtime standard, then execution in step 109.
If the result that step 104 is carried out allows to submit to target transaction, and is preferred, execution in step 105.
Before the described target transaction stand-by period is meant that preferably this transaction is by response, the time that in waiting list, is spent.For example, the time that transaction is placed into waiting list is 12:00, and the current time of execution in step 105 is 12:05, and then the stand-by period is 5s before the response of this transaction.
If overtime standard is 1000s, if stand-by period of target transaction surpassed 1000s, taken place when the transaction of server before handling this target transaction then is described unusual, the unusual or network anomaly etc. as, server process.In this case, even it is new unusual to submit to server also may cause target transaction, even can cause further deterioration to the performance or the resource of server.Therefore,, avoided when generation is unusual, submitting target transaction to, provide the time so that its self-recovery also for the unusual server of generation by above-mentioned comparison.
Step 106: if the predicted processing time of target transaction is not more than overtime standard, then execution in step 110.
The predicted processing time of described target transaction is the stand-by period of target transaction and the estimation time sum of this target transaction in the present embodiment.Described target transaction estimation time is to submit to before the target transaction, the upward pen exchange of the same type time-consuming of this server process.The present invention is preferred, and transaction is classified and corresponding type identification is set by function of finishing and purpose.For example, exist three transactions to be respectively: inquiry transaction T1, money transfer transactions T2 and inquiry transaction T3, wherein T1 is similar transaction with T3, and T1 and T2 submitted server process to, its 10S and 5s of being respectively consuming time, the stand-by period of T3 is 5s.So, for T1 and T3, though the data of its operation may be variant, its function of finishing is identical.Based on this, think server process T3 consuming time and T1 quite or close, claim that the consuming time of T1 is the estimation time of T3.Therefore, the estimation time of T3 is 10s, and the predicted processing time of T3 is 10s+5s=15s.If this predicted processing time is not more than overtime standard, then submit T3 to.Like this, whether the processing time decision by the anticipation target transaction submits this transaction to, has not only avoided the delay to target transaction as much as possible, has realized test to server the present situation with the cost of minimum simultaneously.
Preferably, described target transaction is the transaction in the affairs.Generally include continuous many transactions in the affairs, if wherein any transaction can't be submitted to, then the All Activity in these affairs all need return to the state of not submitting to.In this case, the estimation time sum that residue is concluded the business in the predicted processing time of described target transaction stand-by period with target transaction consuming time for the transaction of having handled in these affairs and the affairs; Described overtime standard is the overtime standard of these affairs, can be that the overtime standard sum of All Activity in these affairs also can set up on their own.For example, if comprise four transactions in the affairs, be respectively Ta, Tb, Tc and Td, wherein Ta and Tb submit to and handle, its 10s and 6s of being respectively consuming time, the stand-by period 5s of Tc, the 3s and the 2s of being respectively consuming time of the last transaction identical with the Td type of server process with Tc, then according to the method described above, the predicted processing time of target transaction Tc is: 10s+6s+5s+3s+2s=26s, if this result is not more than the overtime standard of these affairs, then submit Tc to.
Step 107: if the concurrent numerical value of target transaction is 0, then execution in step 110.
The concurrent number of described target transaction is the concurrent number that belongs to the transaction of same type with this target transaction, can from the concurrent counter of described server, obtain according to the type identification of target transaction, also can adopt alternate manner to obtain, as, according to type of transaction concurrent counter etc. is set respectively.Certainly, adopt which kind of mode to classification of business transaction, the present invention does not limit this, can decide in its sole discretion when enforcement is of the present invention.
If the concurrent numerical value of target transaction is 0, illustrating then that server is current not have to handle and target transaction transaction of the same type.In this case, submit this target transaction to.
If described target transaction is a transaction in the affairs, when whether the concurrent numerical value of judging target transaction is 0, judge respectively whether the concurrent number of residue transaction in these affairs is 0, be 0 transaction if there is concurrent number, then allow this target transaction of submission.
Step 108: if the mortality of target transaction is not more than a random number, then execution in step 110.
The preferred computing method of the mortality of described target transaction are: 1-(1-X) (1-Tw/Tc), wherein, X is the current failure rate of target transaction, its computing method are: select through server process with target transaction many transactions of the same type as sample information, calculate and handle the ratio that unusual transaction accounts for whole sample informations in the sample information, this result of calculation is the current failure rate of target transaction; Tw is the stand-by period of this target transaction, promptly is linked into by the spent time of response from target transaction; Tc is consuming time for the standard of transaction; Tw/Tc is the mortality that target transaction causes because of wait; 1-Tw/Tc is the success ratio that target transaction causes because of wait; (1-X) (1-Tw/Tc) is the success ratio of target transaction; 1-(1-X) is the mortality of target transaction (1-Tw/Tc).
Therefore, 1-(1-X) result of calculation (1-Tw/Tc) is that unusual estimated value is taken place the server process target transaction.If it is very little that result of calculation, thinks then that unusual possibility takes place this target transaction of server process less than a random number, therefore allow to submit this target transaction to server.To reach the purpose of the current operation conditions of detecting server.
If the mortality of the target transaction that calculates is as stated above then submitted this target transaction to less than any one random number.So, further improve the present invention and in control whether, delivered accuracy when easy.
If described target transaction is a transaction in the affairs, the computing method of described target transaction mortality be 1-(1-Xi) (1-Xi+1) ... (1-Xn) (1-Tw/Tc), wherein, Xi is the current failure rate of target transaction, Xi+1 is a next transaction failure rate in the affairs, (1-Xi) is the success ratio of target transaction; Tw is the transaction sum of having handled in stand-by period of target transaction and the affairs consuming time; Tc is the standard consuming time of these affairs; Tw/Tc is the mortality that target transaction causes because of wait; (1-Xi) (1-Xi+1) ... (1-Xn) (1-Tw/Tc) is the success ratio of residue transaction in the affairs; 1-(1-Xi) (1-Xi+1) ... (1-Xn) (1-Tw/Tc) is the mortality of residue transaction in these affairs, if less than a random number, then allows to submit to this target transaction.
Step 109: refusal is submitted target transaction to server.
Step 110: submit target transaction to server.
Need to prove that described step 105 to step 107 and the described method of step 110 is preferable methods of the present invention.Those skilled in the art implement can therefrom to select according to the needs of oneself when of the present invention or combination in any after use, the present invention does not limit this.For example,, then can select execution in step 108 refusals to submit target transaction to, also can select to continue execution in step 107 if the concurrent numerical value of target transaction is not 0 for step 106.
With reference to Fig. 2, Fig. 2 shows the flow chart of steps according to another preferred embodiment of adaptive congestion control method of the present invention.In this embodiment to conclude the business as controlling object.Because the function of dissimilar transaction is different with purpose, thus server to its processing mode and handle the server resource that this exchange takies also can be different, for example inquiry transaction, money transfer transactions etc.Below with reference to Fig. 2 this embodiment of the present invention is done detailed description.The not detailed part of this embodiment sees also implements one.
Step 201: preset configuration file, described configuration file stores have transaction failure rate and the corresponding concurrent number of transaction failure rate.
As indicated above, the present invention distinguishes store transaction failure rate and corresponding failure rate concurrent number according to type of transaction to classification of business transaction in configuration file.
Step 202: calculate the current failure rate of transaction.
The computing method of the current failure rate of described transaction are: select continuous many transactions through server process as sample information; Calculate the ratio that processing procedure is unusual in the described sample information transaction accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.Described continuous many transactions are transaction identical with the target transaction type.
Step 203: from configuration file, obtain and the current failure rate of the described transaction concurrent number of failure rate of concluding the business accordingly.
Step 204: greater than the concurrent number of described transaction failure rate, then execution in step 209 as if the current concurrent number of transaction.
The present invention is by being provided with transaction failure rate and the corresponding concurrent number of transaction failure rate respectively by type of transaction, calculate the current failure rate of transaction by type of transaction, judge whether the current concurrent number of transaction exceeds the concurrent number of transaction failure rate, can distinguish and control the influence of different transaction to server, as in configuration file, the failure rate of inquiry transaction is 50% o'clock, the concurrent number of transaction failure rate of its correspondence is 100, the failure rate of money transfer transactions is 50% o'clock, the concurrent number of its corresponding failure rate is 10, under the identical situation of the current failure rate of transaction, the concurrent number of transaction failure rate of its correspondence is 10.If target transaction is a money transfer transactions, the current failure rate of such transaction is 50%, and the current concurrent number of money transfer transactions is 10, if continue to submit this target transaction to, will certainly exceed the tolerance range of server, causes the further decline of server performance, resource.Refusal submits to this transaction then to avoid the generation of above-mentioned situation, has also avoided the influence to other class transaction.
Step 205: if the target transaction stand-by period greater than the transaction overtime standard, then execution in step 209.
Step 206: if the predicted processing time of target transaction is not more than the overtime standard of transaction, then execution in step 210.
Step 207: if the concurrent numerical value of target transaction is 0, then execution in step 210.
Step 208: if the mortality of target transaction is not more than a random number, then execution in step 210.
Step 209: refusal is submitted target transaction to server.
Step 210: submit target transaction to server.
With reference to Fig. 3, Fig. 3 shows the flow chart of steps according to another preferred embodiment of adaptive congestion control method of the present invention.Below with reference to Fig. 3 this embodiment of the present invention is done detailed description.The not detailed part of this embodiment sees also embodiment one.
Step 301: preset configuration file, described configuration file stores have server failure rate and the concurrent number of corresponding server failure rate; Described configuration file also stores transaction failure rate and the corresponding concurrent number of transaction failure rate.
Step 302: the current failure rate of calculation server.
Step 303: from configuration file, obtain and the concurrent number of the corresponding server failure rate of the current failure rate of described server.
Step 304: greater than the concurrent number of described server failure rate, then execution in step 312 as if the current concurrent number of server.
Step 305: calculate the current failure rate of transaction according to the target transaction type;
Step 306: from configuration file, obtain and the current failure rate of the described transaction concurrent number of failure rate of concluding the business accordingly.
Step 307: greater than the concurrent number of described transaction failure rate, then execution in step 312 as if the current concurrent number of transaction.
Step 308: if the target transaction stand-by period greater than the transaction overtime standard, then execution in step 312.
Step 309: if the predicted processing time of target transaction is not more than the overtime standard of transaction, then execution in step 313.
Step 310: if the concurrent numerical value of target transaction is 0, then execution in step 313.
Step 311: if the mortality of target transaction is not more than a random number, then execution in step 313.
Step 312: refusal is submitted target transaction to server.
Step 313: submit target transaction to server.
More than, a kind of adaptive congestion control method of the present invention has been described in conjunction with specific embodiments.With reference to above relevant introduction of the present invention, as shown in Figure 4, be a kind of adaptive congestion control device of the present invention, in this embodiment preferably with server as controlling object, described device comprises:
Storage unit 410 is used for storage server failure rate and the concurrent number of corresponding server failure rate;
Failure rate computing unit 420 is used for the current failure rate of calculation server;
Concurrent counter 430 is used for the current concurrent number of statistical server;
Comparing unit 440 is used for obtaining and the concurrent number of the corresponding server failure rate of the current failure rate of described server from storage unit 410; From concurrent counter 430, obtain the current concurrent number of server; Compare current concurrent number of server and the concurrent number of described server failure rate, if greater than, notice control module 450 refusals are submitted target transaction to;
Control module 450 is used for control and whether submits target transaction to.
Wherein, the corresponding one or more server failure rates of 410 the concurrent number of server in the described storage unit.
Preferably, described failure rate computing unit 420 comprises:
Collector unit 421 is used to select continuous many transactions through server process as sample information;
Failure rate counter 422 is used for calculating the ratio that the unusual transaction of described sample information processing procedure accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.
Preferably, described processing procedure comprises overtime and/or the system communication mistake unusually.
Preferably, described adaptive congestion control device also comprises: first authentication unit 460, be used for comparison object transaction stand-by period and overtime standard, if greater than, then notify control module 450 refusals to submit this target transaction to.
Preferably, described adaptive congestion control device also comprises: second authentication unit 470, be used for comparison object transaction predicted processing time and overtime standard, and if be not more than, then notify control module 450 to allow to submit to this target transaction.
Preferably, described adaptive congestion control device also comprises: the 3rd authentication unit 480, be used to verify whether the concurrent numerical value of target transaction is 0, if 0, then notify control module 450 to allow to submit to this target transaction.
Preferably, described adaptive congestion control device also comprises: the 4th authentication unit 490, be used for mortality and a random number of comparison object transaction, and if be not more than, then notify control module 450 to allow to submit to this target transaction.
At first, the concurrent number of storage server failure rate and failure rate in storage unit 410, the corresponding one or more server failure rates of the concurrent number of described failure rate; Collector unit 421 selects continuous many transactions through server process as sample information, and failure rate counter 422 calculates the ratio that the unusual transaction of processing procedure in the described sample information accounts for whole sample informations and obtains the current failure rate of server then; Comparing unit 440 is current concurrent number of server and the concurrent number of server failure rate relatively, if greater than, then notify control module 450 refusals to submit target transaction to, the current concurrent number of described server obtains from concurrent counter 430, and the concurrent number of described server failure rate obtains according to the current failure rate of server from storage unit 410; If than the concurrent number of server less than the concurrent number of server failure rate, by first authentication unit, 460 comparison object transaction stand-by period and overtime standard, if greater than, then notify control module 450 these target transaction of refusal submission; If the target transaction stand-by period less than overtime standard, by second authentication unit, 470 comparison object transaction predicted processing time and overtime standard, if be not more than, then notifies control module 450 to allow to submit to this target transaction; If the target transaction predicted processing time greater than overtime standard, verifies by the 3rd authentication unit 480 whether the concurrent numerical value of target transaction is 0, if 0, then notify control module 450 to allow to submit to these target transaction; The concurrent numerical value of target transaction is not 0, by mortality and random number of the 4th authentication unit 490 comparison object transaction, if be not more than, then notifies control module 450 to allow to submit to this target transaction.
In the another embodiment of the present invention, storage unit stores transaction failure rate and the corresponding concurrent number of transaction failure rate by type of transaction; Failure rate computing unit according to target type of transaction calculates the current failure rate of transaction; Comparing unit relatively conclude the business current concurrent number and transaction failure rate concurrent number, if greater than, then notify the control module refusal to submit target transaction to, the current concurrent number of described transaction type according to target transaction from concurrent counter is obtained, and the concurrent number of described transaction failure rate obtains according to the current failure rate of transaction from storage unit.The processing of present embodiment further part is same as the previously described embodiments, repeats no more here.
In the another embodiment of the present invention, cell stores server failure rate and the concurrent number of corresponding server failure rate; Described storage unit also stores transaction failure rate and the corresponding concurrent number of transaction failure rate that is provided with by type of transaction; At first, the current failure rate of failure rate computing unit calculation server; Comparing unit is current concurrent number of server and the concurrent number of server failure rate relatively, if greater than, then notify the control module refusal to submit target transaction to, the concurrent number of described server obtains from concurrent counter, and the concurrent number of described server failure rate obtains according to the current failure rate of server from storage unit; If the current concurrent number of server is less than the concurrent number of server failure rate, then the failure rate computing unit according to target type of transaction calculate the current failure rate of transaction.Comparing unit relatively conclude the business current concurrent number and transaction failure rate concurrent number, if greater than, then notify the control module refusal to submit target transaction to, the current concurrent number of described transaction type according to target transaction from concurrent counter is obtained, and the concurrent number of described transaction failure rate obtains according to the current failure rate of transaction from storage unit.The processing of present embodiment further part is same as the previously described embodiments, repeats no more here.
More than to a kind of adaptive congestion control method provided by the present invention and device, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (25)

1, a kind of adaptive congestion control method is characterized in that, may further comprise the steps:
Preset configuration file, described configuration file also store controlling object failure rate and the corresponding concurrent number of controlling object failure rate;
The current failure rate of calculation control object;
From configuration file, obtain and the concurrent number of the current failure rate control corresponding of described controlling object object failure rate;
If the current concurrent number of controlling object is greater than the concurrent number of described controlling object failure rate, then refusal is submitted target transaction to.
2, adaptive congestion control method according to claim 1 is characterized in that,
The corresponding one or more controlling object failure rates of the concurrent number of described controlling object failure rate.
3, adaptive congestion control method according to claim 2 is characterized in that, the current failure rate of described calculation control object comprises:
Selection through continuous many transactions of server process as sample information;
Calculate the ratio that processing procedure is unusual in the described sample information transaction accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.
4, adaptive congestion control method according to claim 3 is characterized in that, described processing procedure comprises overtime and/or the system communication mistake unusually.
5, adaptive congestion control method according to claim 4 is characterized in that, described controlling object is a server.
6, adaptive congestion control method according to claim 4 is characterized in that, described controlling object is transaction.
7, adaptive congestion control method according to claim 6 is characterized in that, described configuration file is according to type of transaction difference store transaction failure rate and the corresponding concurrent number of transaction failure rate.
According to claim 5 or 7 described adaptive congestion control methods, it is characterized in that 8, described target transaction is the transaction in the affairs.
9, adaptive congestion control method according to claim 8 is characterized in that, also comprises:
If the target transaction stand-by period, then refusal was submitted this target transaction to server greater than overtime standard.
10, adaptive congestion control method according to claim 9 is characterized in that, also comprises:
If the predicted processing time of target transaction is not more than overtime standard, then allow to submit to this target transaction.
11, adaptive congestion control method according to claim 9 is characterized in that, also comprises:
If the concurrent numerical value of target transaction is 0, then allow to submit to this target transaction.
12, adaptive congestion control method according to claim 9 is characterized in that, also comprises:
If the mortality of target transaction is not more than a random number, then allow to submit to this target transaction.
13, a kind of adaptive congestion control device is characterized in that, comprising:
Storage unit is used to store controlling object failure rate and the corresponding concurrent number of controlling object failure rate;
The failure rate computing unit is used for the current failure rate of calculation control object;
Concurrent counter is used to add up the current concurrent number of controlling object;
Comparing unit is used for obtaining and the concurrent number of the current failure rate control corresponding of described controlling object object from storage unit; From concurrent counter, obtain the current concurrent number of controlling object; Compare current concurrent number of controlling object and the concurrent number of described controlling object failure rate, if greater than, notice control module refusal is submitted target transaction to;
Control module is used for control and whether submits target transaction to.
14, adaptive congestion control device according to claim 13 is characterized in that, the corresponding one or more controlling object failure rates of the concurrent number of the controlling object in the described storage unit.
15, adaptive congestion control device according to claim 14 is characterized in that, described failure rate computing unit comprises:
Collector unit is used to select continuous many transactions through server process as sample information;
The failure rate counter is used for calculating the ratio that the unusual transaction of described sample information processing procedure accounts for whole sample informations, with result of calculation as the current failure rate of described controlling object.
16, adaptive congestion control device according to claim 15 is characterized in that, described processing procedure comprises overtime and/or the system communication mistake unusually.
17, adaptive congestion control device according to claim 16 is characterized in that, described controlling object is a server.
18, adaptive congestion control device according to claim 16 is characterized in that, described controlling object is transaction.
19, adaptive congestion control device according to claim 18 is characterized in that, described storage unit also stores transaction failure rate and the corresponding concurrent number of transaction failure rate that is provided with according to type of transaction.
20, according to claim 17 or 19 described adaptive congestion control devices, it is characterized in that, also comprise:
First authentication unit is used for comparison object transaction stand-by period and overtime standard, if greater than, then notify the control module refusal to submit this target transaction to.
21, adaptive congestion control device according to claim 20 is characterized in that, also comprises:
Second authentication unit is used for comparison object transaction predicted processing time and overtime standard, if be not more than, then notifies control module to allow to submit to this target transaction.
22, adaptive congestion control device according to claim 20 is characterized in that, also comprises:
The 3rd authentication unit is used to verify whether the concurrent numerical value of target transaction is 0, if 0, then notify control module to allow to submit to this target transaction.
23, adaptive congestion control device according to claim 20 is characterized in that, also comprises:
The 4th authentication unit is used for mortality and a random number of comparison object transaction, if be not more than, then notifies control module to allow to submit to this target transaction.
24, a kind of adaptive congestion control method is characterized in that, comprising:
Preset configuration file, described configuration file stores have server failure rate and the concurrent number of corresponding server failure rate;
The current failure rate of calculation server;
From configuration file, obtain and the concurrent number of the corresponding server failure rate of the current failure rate of described server; If the current concurrent number of server is greater than the concurrent number of described server failure rate, then refusal is submitted target transaction to;
Described configuration file also stores transaction failure rate and the corresponding concurrent number of transaction failure rate;
Calculate the current failure rate of transaction;
From configuration file, obtain and the current failure rate of the described transaction concurrent number of failure rate of concluding the business accordingly; If the current concurrent number of transaction is greater than the concurrent number of described transaction failure rate, then refusal is submitted target transaction to.
25, adaptive congestion control method according to claim 24 is characterized in that, also comprises:
If the target transaction stand-by period, then refusal was submitted this target transaction to server greater than overtime standard.
CNB2006101732271A 2006-12-30 2006-12-30 Adaptive congestion control method and device Active CN100524226C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101732271A CN100524226C (en) 2006-12-30 2006-12-30 Adaptive congestion control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101732271A CN100524226C (en) 2006-12-30 2006-12-30 Adaptive congestion control method and device

Publications (2)

Publication Number Publication Date
CN101000563A true CN101000563A (en) 2007-07-18
CN100524226C CN100524226C (en) 2009-08-05

Family

ID=38692547

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101732271A Active CN100524226C (en) 2006-12-30 2006-12-30 Adaptive congestion control method and device

Country Status (1)

Country Link
CN (1) CN100524226C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090823A (en) * 2014-06-09 2014-10-08 中国建设银行股份有限公司 Flow control method and device for computer system
CN104408656A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Method and system for dynamic adjusting flow control threshold
CN104580103A (en) * 2013-10-24 2015-04-29 中国电信股份有限公司 Method and system of exchanging electronic identification cards
CN105282042A (en) * 2015-12-07 2016-01-27 中国建设银行股份有限公司 Flow control method and system
CN105389214A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Monitoring method and system
CN106780034A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Unilateral account scale domination method and system
CN107948250A (en) * 2017-11-02 2018-04-20 努比亚技术有限公司 A kind of method of adjustment and equipment of user's visit capacity
CN108011840A (en) * 2017-12-07 2018-05-08 中国银行股份有限公司 Control method, server and the system of transaction request
CN108490323A (en) * 2018-03-21 2018-09-04 广东电网有限责任公司电力科学研究院 A kind of system and method for being handled transformer fault

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580103A (en) * 2013-10-24 2015-04-29 中国电信股份有限公司 Method and system of exchanging electronic identification cards
CN104090823A (en) * 2014-06-09 2014-10-08 中国建设银行股份有限公司 Flow control method and device for computer system
CN104408656A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Method and system for dynamic adjusting flow control threshold
CN105389214A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Monitoring method and system
CN105389214B (en) * 2015-11-10 2019-03-29 中国建设银行股份有限公司 A kind of monitoring method and system
CN105282042A (en) * 2015-12-07 2016-01-27 中国建设银行股份有限公司 Flow control method and system
CN106780034A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Unilateral account scale domination method and system
CN106780034B (en) * 2016-12-26 2020-08-28 中国建设银行股份有限公司 Unilateral account scale control method and system
CN107948250A (en) * 2017-11-02 2018-04-20 努比亚技术有限公司 A kind of method of adjustment and equipment of user's visit capacity
CN108011840A (en) * 2017-12-07 2018-05-08 中国银行股份有限公司 Control method, server and the system of transaction request
CN108490323A (en) * 2018-03-21 2018-09-04 广东电网有限责任公司电力科学研究院 A kind of system and method for being handled transformer fault

Also Published As

Publication number Publication date
CN100524226C (en) 2009-08-05

Similar Documents

Publication Publication Date Title
CN100524226C (en) Adaptive congestion control method and device
US10439937B2 (en) Service addressing in distributed environment
CN110489447A (en) Data query method, apparatus, computer equipment and storage medium
CN111190745B (en) Data processing method, device and computer readable storage medium
CN101556678A (en) Processing method of batch processing services, system and service processing control equipment
CN108111554B (en) Control method and device for access queue
CN107590002A (en) Method for allocating tasks, device, storage medium, equipment and distributed task scheduling system
CN103164266B (en) The Dynamic Resource Allocation for Multimedia of the transactions requests sent for initiating equipment to receiving device
CN113138860B (en) Message queue management method and device
CN101366012A (en) Methods and system for interrupt distribution in a multiprocessor system
CN110740164B (en) Server determination method, regulation and control method, device, equipment and storage medium
CN109408243B (en) RDMA-based data processing method, device and medium
EP2462569A1 (en) Method and system for account parallel processing
CN112866136A (en) Service data processing method and device
US7454478B1 (en) Business message tracking system using message queues and tracking queue for tracking transaction messages communicated between computers
Mukherjee et al. Universality of power-of-d load balancing schemes
CN107704322A (en) Ask distribution method and device
CN117909263A (en) Remapping method, device and storage medium based on ID order preserving circuit
CN101685427A (en) Device and method for scheduling dynamic memory on the basis of used time margin
CN108920278B (en) Resource allocation method and device
CN101557419A (en) Data reading and writing system and data management method
JP4526774B2 (en) Apparatus and method for performing performance balance evaluation and sizing of computer system components
CN114827033B (en) Data flow control method, device, equipment and computer readable storage medium
US20090235005A1 (en) System And Method To Dynamically Order System Management Interrupt Handler Dispatches
CN106874336B (en) Data matching method, data query method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant