CN104090823A - Flow control method and device for computer system - Google Patents

Flow control method and device for computer system Download PDF

Info

Publication number
CN104090823A
CN104090823A CN201410252122.XA CN201410252122A CN104090823A CN 104090823 A CN104090823 A CN 104090823A CN 201410252122 A CN201410252122 A CN 201410252122A CN 104090823 A CN104090823 A CN 104090823A
Authority
CN
China
Prior art keywords
transaction
threshold value
resource
concurrency
failure rate
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
CN201410252122.XA
Other languages
Chinese (zh)
Inventor
唐成山
杨芬
吴炜斯
雷鸣
张楠楠
张亮
姚庆芬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201410252122.XA priority Critical patent/CN104090823A/en
Publication of CN104090823A publication Critical patent/CN104090823A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a flow control method for a computer system. The flow control method comprises the following steps: calling a resource management module for dynamically adjusting transaction concurrency quantity threshold value at one or more nodes of each processing link of transactions in the computer system, wherein the resource management module is used for dynamic adjustment according to the fault rate of the transactions, the fault rate of the transactions refers to a ratio of accumulation value of faulted transactions of a target resource to total accumulation value of transactions of the resource within a sampling time cycle, and the faulted transactions are transactions with transaction response time exceeding transaction time standards. In addition, the invention further provides a corresponding flow control device. By implementing the method and the device, the transaction concurrency quantity can be multi-dimensionally acquired and controlled and is dynamically adjusted according to the transaction fault rate, and the transaction channel blockage of the system is effectively relieved.

Description

A kind of flow control methods for computer system and device
Technical field
The present invention relates to the data processing of computer system, in particular to a kind of flow control methods for computer system and device.
Background technology
The data-handling capacity of computer system is mainly determined by hardware resource, but hardware resource is limited after all, in the time processing a large amount of concurrent transaction data, the thread resources that can run into computer system exhausts, and causes other transaction data to obtain resource and makes these Fail Transactions.Such problem is very common in the computer system for bank transaction data processing.For example, under the situation for bank transaction data processing, if certain a large amount of concurrent transactions mails to the front-end system in bank, front-end system constantly receives such transaction, take a large amount of thread resources and process such transaction, when the thread resources ratio that takies when such exchange is higher, will causes thread resources to exhaust, and then cause other transaction cannot obtain thread resources and failure in a large number.If above-mentioned concurrent problem continues for some time, will have a strong impact on the transaction data treatment effeciency of computer system.Therefore, need under limited resource for computer system prerequisite the solution that the flow of transaction data is controlled badly.
Summary of the invention
The invention provides a kind of method and apparatus of the flow control for computer system, Nodes by multiple processing links of concluding the business in computer system carries out the dynamic adjustment of various dimensions to transaction concurrency threshold value, has avoided extremely taking whole transaction processing path because of indivedual kinds transaction; Utilize the time out fault rate of a transaction in the sampling period dynamically to adjust concurrency threshold value, also can dynamically adjusting concurrency threshold value in detection system transaction processing speed in time, effectively alleviate the system transaction path blockade of concluding the business the instantaneous surge of concurrency and cause.
According to the first aspect of embodiment of the present invention, a kind of method and apparatus of the flow control for computer system is provided, wherein said computer system front-end system, send the canalization of transaction request and the service system of service is provided to described front-end system to described front-end system, described method comprises: one or more Nodes of each processing links of concluding the business in described computer system call resource management module transaction concurrency threshold value is dynamically adjusted
Wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
According to the second aspect of embodiment of the present invention, a kind of volume control device for computer system is provided, it is characterized in that described computer system comprises front-end system, sends the canalization of transaction request and the service system of service is provided to described front-end system to described front-end system, described device comprises:
Resource management module, one or more Nodes that are used for each processing links of concluding the business in described computer system are dynamically adjusted transaction concurrency threshold value, wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
Implement the flow control methods for computer system provided by the invention and device, can carry out the dynamic adjustment of concurrency threshold value in multiple processing links of transaction in various dimensions ground, and utilize the overtime rate of transaction in the single cycle in sampling time to carry out the dynamic adjustment of threshold value, aspect the real-time of threshold value adjustment and validity, be all significantly improved.
Brief description of the drawings
Fig. 1 shows according to the schematic flow sheet of each processing links in the computer system of embodiment of the present invention;
Fig. 2 shows according to the schematic diagram of the functional module of the resource management module of embodiment of the present invention;
Fig. 3 shows according to the schematic diagram of the implementation of each module of embodiment of the present invention;
Fig. 4 shows according to the schematic diagram of the flow process of the scheduling of resource control of embodiment of the present invention;
Fig. 5 shows according to the schematic diagram of the flow process of the computational resource scheduling controlling result of embodiment of the present invention;
Fig. 6 shows according to the schematic diagram of the dynamic adjustment flow process of the concurrency threshold value of embodiment of the present invention;
Fig. 7 shows the example of dynamically adjusting according to threshold value after the fault of embodiment of the present invention.
Embodiment
For making object, technical scheme and the advantage of embodiments of the invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail.
Before by reference to the accompanying drawings embodiments of the present invention being described in detail, first some terms that relate in embodiment being made an explanation or illustrated.
Canalization, refers to system from transactional services request to front-end system that send, processes at the transaction data for bank, and canalization can comprise cabinet face computing machine and the ATM etc. in bank outlets.In some other embodiment, canalization can refer to carry out transactional services request one side's computer system or similar system.
Channel transaction, refers to the transactional services request sending over from canalization.
Service system, refers to the background system that transaction processing service is provided to front-end system, can be the outside service systems relatively independent with front-end system, for example, can be the main frame on backstage.In some other embodiment, service system can refer to provide service processing one side's computer system.
Resource, the resource that need to use when computer system operation, comprising: flow, thread, queue, communication linking number, database linking number, object instance number etc.
Resource entries, a certain concrete resource.
Resource information, the relevant information of a certain resource entries, comprises multidate information (for example, present flow rate concurrency, current active thread numerical value etc.) and static information (for example, thread pool size value, connection pool sizes values etc.).
Scheduling of resource control strategy, the strategy that carries out scheduling of resource control for different resource entry.
Resource information acquisition strategies, the strategy that carries out resource information collection for different resource entry.
Front-end system, bottom is to be exchanged for the operation platform of core, unified access and the MESSAGE EXCHANGE to background service system of canalization are can be used for, the upper strata of bottom switching plane is application platform, business function is provided, and by the service encapsulates to background service system, provide service to channel.
According to a kind of flow control methods for computer system of embodiment of the present invention, wherein computer system can comprise front-end system, send the canalization of transaction request and the service system of service is provided to front-end system to front-end system, and described flow control methods specifically can comprise the steps:
One or more Nodes of each processing links of concluding the business in described computer system call resource management module transaction concurrency threshold value are dynamically adjusted,
Wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and the cumulative number of total transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
In embodiments of the present invention, the flow control methods of computer system is implemented based on JAVA platform development.Can comprise that to the processing links of once transaction communication access, channel processing, channel transaction processing, service processing, service system processing, communication pick out etc.Particularly, the each processing links in computer system can be as shown in Figure 1.Once concluding the business of initiating taking canalization to front-end system below illustrates the treatment scheme of transaction as example.Front-end system to the scheduling processing flow of transaction is: (1) communication access, process the communication request that receives canalization, identification canalization; (2) channel processing, carries out according to the message specification of this canalization that data message is unpacked, data conversion treatment, identification transaction code; (3) channel transaction processing, processes and obtains that the interface of transaction code is unpacked, data conversion treatment according to channel; (4) service processing, identifies service codes from the Data processing of channel transaction processing, and carries out service dispatch, and service processing is carried out in definite infrastructure service of calling which service system; (5) service system processing, according to the message specification of the service system of determining, carries out data-switching, the processing of group bag; (6) communication picks out, and calls communication corresponding to above-mentioned service system and picks out assembly, carries out communication and picks out processing, and receive the response of service system, and response message is returned to service system processing.Service system receives after response message, according to the message specification of service system unpack, data-switching.Then service processing, according to service procedure, continues to call the infrastructure service of next service system, until service procedure completes, front-end system can be according to the execution result of this service, composition channel respond packet, and then communication access is processed response message is returned to canalization.Wherein, the scheduling of resource control submodule that can call in resource management module at one or more Nodes of above-mentioned each processing links is dynamically adjusted transaction concurrency threshold value, thereby the flow to transaction is controlled, avoid that system occurs that for a long time transaction is overtime, obstruction etc.Flow control methods of the present invention may be used on the concurrency threshold value adjustment of one or more systems in canalization, front-end system and service system.
As shown in Figure 1, can be after transaction be carried out to channel processing, the node before channel transaction processing; After completing channel transaction processing, front-end system is concluded the business and is carried out service processing node before channel; Or, after processing the service system of having concluded the business, the node before communication picks out.Preferably, carry out flow control at above-mentioned three Nodes.In other some embodiments, also can carry out flow control at one or two Nodes of above-mentioned three Nodes.Before flow control in embodiment of the present invention mainly occurs in communication and picks out.Flow control can be divided by service system, control with the transaction concurrency of processing that mails to this service system from native system, also can divide according to channel, the transaction concurrency sending to native system with this channel, or the concurrency of certain concrete transaction is controlled.The information of these controlled resource entries, general need gather at of a native system processing node place.The collection of canalization transaction concurrency is to receive that by gathering native system the transaction concurrency of this canalization carries out, and can carry out collection of resources at any one Nodes of above-mentioned three Nodes.Wherein, the canalization of embodiment of the present invention can be classified according to different modes, and for example, ATM can think and belong to self-service channel, and the cabinet plane system in bank outlets can be thought and belongs to non-self-service channel.In addition, canalization can also be classified according to message format, communication modes, and wherein ATM and POS belong to same class and else unify channel, and cabinet plane system belongs to another kind of other cabinet face channel.Subordinate's system that can comprise it in the canalization of same type arranges a unique node serial number, utilize this node serial number can identify the type of this canalization, for example ATM system and POS system belong to 2 different cover systems, they have each self-corresponding node serial number, and utilizing node serial number can identify channel transaction is from ATM system or from POS system.In some embodiments of the present invention, can also adopt distributed deployment, with each point of behavior unit of bank, ATM system is disposed to an example each point of provisional capital, each example arranges a node serial number.The infrastructure service of same service system, can be by multiple branches, multiple channel, multiple support channels system access.Taken by some branches or a certain channel or some canalizations for fear of certain service channel, can carry out flow control according to above-mentioned different canalizations classification.For example, in some embodiments, can carry out respectively flow control to cabinet face channel, unified channel, and not carry out flow control with the Ge Fen behavior unit in banking institution.In other embodiment, can carry out respectively flow control to ATM system and POS system in unified channel.In other embodiment, can carry out flow control with each point of behavior unit to ATM system, or can carry out flow control with a point behavior unit to cabinet face canalization, for example Shanghai branch cabinet plane system arranges a threshold value, and Beijing branch cabinet plane system arranges another one threshold value.It should be noted that, the mode of the flow control in embodiment of the present invention and the collection of data on flows need to match, and carry out flow control with which kind of above-mentioned unit, need to carry out with which kind of above-mentioned unit the collection of data on flows.
In embodiments of the present invention, the link of the transaction processing shown in Fig. 1 adopts transaction processing main thread to carry out, and the dynamic adjustment of transaction concurrency threshold value and each link of transaction processing are loose couplings, adopt the separate threads different from the main thread of carrying out transaction to carry out, in the time that each sampling period finishes, carry out the calculating of failure rate and the dynamic adjustment of concurrency threshold value.Carry out in the dynamic embodiment of adjusting of concurrency threshold value in employing separate threads, can adopt the form of independent timed task to carry out the dynamic adjustment of concurrency threshold value, every batch of identical sampling period is an independently timed task, this is after independently timed task completes all concurrency threshold values that belong to this employing cycle internal object resource and dynamically adjusts, can also be used for providing the log information of INFO rank, record the relevant information that concurrency threshold value is dynamically adjusted, check for operating personnel.
Resource management module carries out the dynamic adjustment of concurrency threshold value according to the failure rate of transaction, and the failure rate of wherein concluding the business refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource.Conventionally different to the understanding of " fault " from technical field, the fault transaction in embodiment of the present invention does not refer to the transaction not completing, and refers to that the transaction response time is greater than the transaction of the standard consuming time of concluding the business, and can be called overtime transaction yet.Wherein, the standard consuming time of concluding the business can be calculated according to the average response time of this transaction in certain hour in system.The calculating of the failure rate of embodiment of the present invention is taking a cycle in sampling time as unit, and a for example cycle in sampling time can be set to 120 seconds.The sampling measurement period of each resource can adopt configuration file setting.Each sampling measurement period is by sampled data zero clearing in the time finishing, and zero clearing work can dynamically be adjusted service by threshold value and complete.Wherein, configuration file is extend markup language (Extensible Markup Language, XML) form.
As shown in Figure 2, resource management module can comprise that scheduling of resource control submodule, resource information gather submodule, concurrency threshold value sub module stored, resource information data field, dynamic threshold adjustment submodule, dynamic threshold algorithm submodule, timer submodule etc.Wherein, resource information acquisition module is for defined resource entries being carried out to information acquisition according to resource information acquisition strategies in the acquisition time cycle, and storing the information of the resource entries of collection into resource information data field, the information of collection comprises: the current concurrency of each resource entries, trading volume accumulative total, fault transaction cumulative number etc.All information that storage resources information acquisition module gathers are responsible in resource information data field, and can add up resource information.Other modules also can be obtained from resource information data field the resource information that himself needs.
In each link of the transaction processing shown in Fig. 1, can call scheduling of resource control submodule and carry out scheduling of resource control, scheduling of resource control submodule can be used for the result of the scheduling controlling strategy corresponding according to resource entries and resource information computational resource scheduling controlling.Concurrency threshold value submodule is responsible for storing the concurrency threshold value of current each resource, the initial threshold of concurrency can read or load from configuration file, wherein configuration file is XML file, taking the configuration file of a resource control as example, the control strategy of this resource is controlled taking service system as unit, and the maximum number of concurrent of service system main frame is 150, and the maximum number of concurrent of another system A is 60, the maximum number of concurrent of other service systems is 40, and configuration file can be following form:
Dynamic threshold is adjusted submodule and is responsible for the concurrency threshold value of current each resource to adjust, it obtains trading volume cumulative number and fault transaction cumulative number in time cycle of each resource entries from resource information data field, then calculate the failure rate in this cycle by dynamic threshold adjustment algorithm, and the failure rate calculating in this cycle and standard failure rate are compared, if the failure rate in this cycle is more than or equal to standard failure rate, transaction concurrency threshold value is carried out to Dynamic contraction, if the failure rate in this cycle is less than standard failure rate, transaction concurrency threshold value is dynamically recovered.It should be noted that, in the cycle in sampling time, the standard failure rate of certain resource can arrange by configuration file, for example, can be set to 20%.After each sampling period finishes, all the failure rate in this cycle and standard failure rate can be compared, recover to determine to start to shrink or start from this cycle.Sampling duration and sampling interval (are for example traditionally arranged to be second level, the sampling duration is 60 seconds, the sampling interval time is 30 seconds), failure rate that can be in the quick obtaining sampling period, thereby can shrink or recover to make immediately response with concurrency threshold value, improve significantly the efficiency of transaction concurrency processing, avoided long transaction processing path blockade.Dynamic threshold adjusting module obtains transaction cumulative number and fault transaction cumulative number is carrying out after threshold value adjustment, all carries out zero clearing, and this can save the storage space of flow control, improves the efficiency of flow control.Timer submodule can be responsible for timing and call dynamic threshold adjustment submodule, and timer submodule also can be used for switch and the configuration in cycle in sampling time that dynamic threshold is adjusted.In embodiments of the present invention, can dynamically adjust by the threshold value of configuration file Offered target resource the state of switch, the state that threshold value is dynamically adjusted switch comprises unlatching ON state for representing to allow dynamically to adjust and the OFF state of closing for representing to forbid dynamically to adjust.Technician can need to arrange threshold value and dynamically adjust according to application the state of switch flexibly.
The implementation of the flow process control of the main flow of transaction processing and resource management module can be as shown in Figure 3.In Fig. 3, the scheduling of resource control submodule in main thread, the resource management module of transaction processing and resource information gather performed step or the function of submodule and are perfectly clear.In the main thread of transaction processing, be linked into service processing from communication, call scheduling of resource control submodule and carry out flow control, then scheduling of resource control submodule is from the current concurrency threshold value of resource information data field Gains resources entry, the result of calculated flow rate control, shrinks or recovers.Next, judge whether to need flow control, if desired carry out flow control, will conclude the business and keep off back.Carry out flow control if do not need, call resource information collection submodule and carry out information acquisition, comprise and gather current transaction concurrency, collection trading volume accumulative total, collection fault transaction amount accumulative total, and store respectively the above-mentioned information gathering into resource information data field, then communication picks out, and continues follow-up flow process.
Scheduling of resource control submodule can call scheduling of resource control example at the Nodes of each link of transaction processing and carry out scheduling of resource control, and these nodes can be described as Resource Control Point.Different Resource Control Points can call identical scheduling of resource control example, also can call different scheduling of resource control examples.Each scheduling of resource control example can define resource entries and its corresponding control strategy of required control.Scheduling of resource control module, according to control strategy corresponding to resource entries in scheduling of resource control example, is obtained respective resources information and is calculated from resource information management module, so that resource is carried out to scheduling controlling.If scheduling of resource control result is controlled for needs, this link can be controlled so, otherwise, continue the normal transaction processing of carrying out.Each link of transaction processing is carried out the flow process of scheduling of resource control can be as shown in Figure 4.Scheduling of resource control starts, first judge whether scheduling of resource gauge tap is opened, if do not open, continue to carry out subsequent treatment, if open, call scheduling of resource control submodule Gains resources scheduling controlling result, if scheduling of resource control result is for controlling, carry out scheduling of resource control, if scheduling of resource control result, for not controlling, continues to carry out subsequent treatment.Wherein, the flow process of computational resource scheduling controlling result can be as shown in Figure 5.First, Gains resources item list, judge whether to also have the resource entries of not calculating, if also have the resource entries of not calculating, return and control result for not controlling, if there is no the resource entries of also not calculating, obtain the control strategy of this resource entries of not calculating, and obtain the behaviour in service of this resource entries, and judge whether to reach the control requirement that will carry out flow control, if do not reach control requirement, return and judge whether to also have the resource entries of not calculating, if reach control requirement, return and control result for controlling.Before the communication of certain transaction picks out, transaction concurrency to system is controlled, particularly, that the transaction concurrency obtaining in current period and concurrency threshold value are compared, if transaction concurrency is greater than concurrency threshold value, will conclude the business and keep off back, otherwise continue to process transaction according to normal flow.
Resource information gathers submodule and also can call at the Nodes of each link of transaction processing, and collection of resources submodule can carry out information acquisition by collection of resources example, and the node of these collections can be described as collection of resources point.Different collection of resources points can call identical resource information and gather example, also can call different resource informations and gather example.Each resource information gathers example can define resource entries and the acquisition strategies corresponding to this resource entries that self need to gather.Resource information gathers submodule and carries out information acquisition according to acquisition strategies corresponding to resource entries in resource information collection example, then the information collecting is stored in resource information data field.Dynamically to carry out in real time flow control in order realizing, to need the transaction concurrency of each system in collecting computer system, also need trading volume and fault transaction amount to gather statistics.The function that the transaction concurrency of each system in computer system is gathered can realize by the mode that increases deploy content, and what conclude the business concurrency collection is the transaction concurrency that native system is being processed.The deploy content increasing can be collection of resources configuration file: <identifier> label is resource type, and name attribute is resource type title, and impl-class attribute is that resource identification device is realized class name.<resource> label is resource entries, and name attribute is resource entries title.<strategy> label is acquisition strategies corresponding to this resource, and name attribute is tactful name.<attribute> label is the tactful correlation parameter that this resource is used, and name attribute is parameter name, and value attribute is this parameter value." dataArea " parameter is sampled data storage data field." stdDurTime " parameter, for transaction standard consuming time, if this parameter does not configure in collection of resources configuration file, is obtained default value from collection of resources strategy configuration file.Described the flow control of embodiment of the present invention in the above and with which kind of unit carried out, its corresponding flow data collector just with which kind of unit carries out.For example, collection of resources configuration file can be taking service system as unit, also can be taking the cabinet face canalization of a certain branch as unit collection, and also can be taking channel node as unit collection.The strategy gathering is counting.For a transaction, can there be above-mentioned three kinds of different resource informations, specifically gather which resource information, can select.For example, can be by following program:
Can realize by acquisition strategies module and sampling switching element the sampling statistics of trading volume and fault transaction amount.Wherein, being embodied as of acquisition strategies unit: first, the on off state of sampling switching element is judged, if sampling switch state is for opening, gather, if sampling switch state is for closing, do not gather.When collection, first the transaction total amount of this resource is added to 1, then the transaction response time is judged, if the transaction response time is greater than transaction standard consuming time, the fault transaction amount of this resource is added to 1, otherwise skip.The information gathering is stored in resource information data field.
The dynamic adjustment of the collection of transaction concurrency of the present invention and concurrency threshold value can be various dimensions, can carry out the dynamic adjustment of concurrency collection and threshold value according to one or more dimensions such as branch, channel type, channel node, service, service system, infrastructure services, and can will after above-mentioned more than one dimension combination, gather and dynamically adjust.In one embodiment of the invention, carry out the dynamic adjustment of concurrency threshold value taking service system as unit, consuming time when longer when certain infrastructure service, can control the number of concurrent of this infrastructure service separately, to ensure that in this service system, other service can normally be accessed.
The sub-adjusting module of dynamic threshold obtains sampling transaction sum and the sampling fault transaction number of target resource within this cycle according to the time cycle from resource information management module, and calculates failure rate.Can set the resource entries that needs dynamic threshold to adjust by configuration file.If certain resource entries is not set in configuration file, do not carry out dynamic threshold adjustment, adopt fixed threshold to carry out flow control.The measurement period of each resource also can be arranged by configuration file.It is by sampled data zero clearing that each sampling period finishes.The Trigger Function of sampling statistics is realized by timer, and by independently thread pool execution.Dynamic threshold adjustment algorithm can comprise Dynamic contraction and dynamically recover.Configuration file arranges the standard failure rate of certain resource.If sampling failure rate is more than or equal to standard failure rate, illustrate that overtime transaction increases to some extent, the processing pressure of system increases, and starts Dynamic contraction, reduces gradually transaction concurrency threshold value; If sampling failure rate is less than standard failure rate, illustrate that overtime transaction reduces to some extent, the processing pressure of system reduces, and starts dynamic recovery, increases gradually the dynamic threshold of transaction concurrency.Wherein Dynamic contraction can shrink in proportion, for example, under the situation that is 50% in the shrinkage factor of certain resource (those skilled in the art also as required shrinkage factor be set to 30%, 35%, 40%, 45% etc.), contraction desired value=current threshold value the * (1-shrinkage factor) of threshold value Dynamic contraction, wherein * is mathematical operation symbol, represents to multiply each other.When Dynamic contraction, also there is the upper and lower bound of contraction in proportion.Under shrinking, be limited to minimum threshold, be defaulted as 1, be limited to the max-thresholds of flow control in contraction, wherein max-thresholds can be determined according to the maximum bearing ability in system a period of time.In the time that the transaction processing of system is slow, resource management module Dynamic contraction, reduces transaction concurrency threshold value, in the transaction by minimizing failed services system, send number of request, ensure the transaction energy normal process of other service systems and canalization, reach the effect of fault isolation.In the time that system transaction processing is normal, resource management module dynamically recovers, and recovers transaction concurrency threshold value, until return to maximal value (being the transaction concurrency threshold value of the flow control before fault).Dynamically recovery also can recover in proportion, recovers desired value=current threshold value * (1+ recovery rate), and wherein recovery rate can arrange by configuration file, for example, can recovery rate be set to 100%.Under the situation of dynamically recovering, the minimum recovery ratio of certain resource can be set by configuration file, for example can be set to 10% (those skilled in the art can need to minimum recovery ratio be set to 5%, 15%, 20% etc. according to application), minimum recovery threshold value=minimum recovery ratio * max-thresholds.The desired value that threshold value is dynamically recovered is more than or equal to minimum recovery threshold value.If the recovery desired value calculating according to recovery desired value=current threshold value * (1+ recovery rate) is less than minimum recovery threshold value, using minimum recovery threshold value as recovering desired value.Minimum recovery threshold value should not be greater than max-thresholds.The dynamic adjustment flow process of concurrency threshold value can be as shown in Figure 6.Timer submodule is carried out timed task, call dynamic threshold and adjust submodule, and dynamic threshold adjustment submodule obtains transaction cumulative number and fault transaction amount cumulative number from resource information data field, and calculate failure rate, then obtaining dynamic threshold algorithm and parameter calculates to determine whether to revise concurrency threshold value, revise concurrency threshold value if do not need, by trading volume accumulative total and the zero clearing of fault transaction amount cumulative number; If desired revise concurrency threshold value, concurrency threshold value is modified, then, by trading volume cumulative number and the zero clearing of fault transaction amount cumulative number, so far complete timed task.
In embodiment of the present invention, the mode that transaction concurrency threshold value is carried out dynamically adjusting can comprise following three kinds of modes: the mode (for example, adopting the mode of shrinking or recovering in proportion) of shrinking gradually and recovering gradually; The two-stage staged of high concurrency and low concurrency; And number of concurrent constant type (being the indeclinable mode of number of concurrent).Above-mentioned three kinds of different adjustment modes can be used as control strategy and are applicable to respectively different application scenarioss, and different systems can select a kind of control strategy wherein to carry out flow control.That is to say, the computer system in embodiment of the present invention can adopt different control strategies to carry out flow control at different nodes, and concrete selection is according to carrying out according to the quantity of transaction and the response time of transaction.Very large (for example for trading volume, exceed a larger threshold value m1) and transaction the response time very short (for example, be less than a less response time t1) system, concurrency threshold value can adopt the adjustment mode of shrinking gradually and recover; Large (for example for trading volume, exceed a medium sized threshold value m2 but be less than a larger threshold value m1) and the transaction response time be not fast especially (for example, be greater than a medium response time t2, t2>=t1) system, concurrency threshold value can adopt the stepped adjustment mode of two-stage; For example, for the trading volume system of less (, being less than a less threshold value), concurrency threshold value can adopt the adjustment mode of number of concurrent constant type.
The process of dynamically adjusting with a concrete example explanation threshold value below.Max-thresholds is 100, it is ON that threshold value is dynamically adjusted switch, time-out time is 5 seconds, and the sampling interval time is 10 seconds, and the cycle in sampling time is 300 seconds, standard failure rate is 50%, shrinkage factor is 60%, and minimum threshold is 6, and recovery rate is 100%, initial threshold is 20, and the schematic diagram that after breaking down so, threshold value is dynamically adjusted is Fig. 7.
Set forth the flow control methods for computer system of the present invention in conjunction with embodiment above, set forth corresponding to above-mentioned flow control methods calculating and the volume control device of system below in conjunction with embodiment.
According to a kind of volume control device for computer system of embodiment of the present invention, wherein computer system can comprise front-end system, send the canalization of transaction request and the service system of service is provided to front-end system to front-end system, and described volume control device can comprise:
Resource management module, one or more Nodes that are used for each processing links of concluding the business in described computer system are dynamically adjusted transaction concurrency threshold value, wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and the cumulative number of total transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
In embodiments of the present invention, the device of flow control comprises resource management module, and resource management module can comprise that scheduling of resource control submodule, resource information gather submodule, concurrency threshold value sub module stored, resource information data field, dynamic threshold adjustment submodule, dynamic threshold algorithm submodule, timer submodule etc.Volume control device of the present invention is to implement based on JAVA platform.Can comprise that to the processing links of once transaction communication access, channel processing, channel transaction processing, service processing, service system processing, communication pick out etc.Particularly, the each processing links in computer system can be as shown in Figure 1.Concrete transaction processing link is described can be referring to the description of method part.As shown in Figure 1, one or more Nodes in the node that resource management module can be following carry out the adjustment of concurrency threshold value: after canalization requests transaction being completed to channel processing, carry out channel transaction processing node before; After completing channel transaction processing, front-end system is concluded the business and is carried out service processing node before channel; Or, after transaction submission service system is completed to processing, carry out communication and pick out previous node.Preferably, carry out flow control at above-mentioned three Nodes.In some other embodiment, can also carry out flow control at one or two Nodes of above-mentioned three Nodes.
In embodiments of the present invention, the link of the transaction processing shown in Fig. 1 adopts transaction processing main thread to carry out, and the dynamic adjustment of transaction concurrency threshold value and each link of transaction processing are loose couplings, resource management module can adopt the separate threads different from the main thread of carrying out transaction to carry out, and carries out the calculating of failure rate and the dynamic adjustment of concurrency threshold value in the time that each sampling period finishes.Carry out in the dynamic embodiment of adjusting of concurrency threshold value in employing separate threads, can adopt the form of independent timed task to carry out the dynamic adjustment of concurrency threshold value by timer submodule, every batch of identical sampling period is an independently timed task, this is after independently timed task completes all concurrency threshold values that belong to this employing cycle internal object resource and dynamically adjusts, can also be used for providing the log information of INFO rank, record the relevant information that concurrency threshold value is dynamically adjusted, check for operating personnel.
Resource management module carries out the dynamic adjustment of concurrency threshold value according to the failure rate of transaction, and the failure rate of wherein concluding the business refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource.Conventionally different to the understanding of " fault " from technical field, the fault transaction in embodiment of the present invention does not refer to the transaction not completing, and refers to that the transaction response time is greater than the transaction of the standard consuming time of concluding the business, and can be called overtime transaction yet.Wherein, the standard consuming time of concluding the business can be calculated according to the average response time of this transaction in certain hour in system.The calculating of the failure rate of embodiment of the present invention is taking a cycle in sampling time as unit, and a for example cycle in sampling time can be set to 120 seconds.The sampling measurement period of each resource can adopt configuration file setting.Each sampling measurement period is by sampled data zero clearing in the time finishing, and zero clearing work can dynamically be adjusted service by threshold value and complete.Wherein, configuration file is XML form.
As shown in Figure 2, resource management module can comprise that scheduling of resource control submodule, resource information gather submodule, concurrency threshold value sub module stored, resource information data field, dynamic threshold adjustment submodule, dynamic threshold algorithm submodule, timer submodule etc.Wherein, it is for defined resource entries being carried out to information acquisition according to resource information acquisition strategies in the acquisition time cycle that resource information gathers submodule, and storing the information of the resource entries of collection into resource information data field, the information of collection comprises: the current concurrency of each resource entries, trading volume accumulative total, fault transaction cumulative number.All information that storage resources information acquisition module gathers are responsible in resource information data field, and can add up resource information.Other modules also can be obtained the resource information himself needing from resource information database.The data storage in resource data district separates with the data storage of the flow process of main transaction, and the data field of every transaction of main transaction isolates, and discharges this ephemeral data district after closing the transaction.And resource data district in embodiment of the present invention is lasting, this resource data district is restarted or just set up when computer system is restarted.
In each link of the transaction processing shown in Fig. 1, can call scheduling of resource control submodule and carry out scheduling of resource control, scheduling of resource control submodule can be used for the result of the scheduling controlling strategy corresponding according to resource entries and resource information computational resource scheduling controlling.Concurrency threshold value submodule is responsible for storing the concurrency threshold value of current each resource, and the initial threshold of concurrency can read or load from configuration file.
Dynamic threshold is adjusted submodule and is responsible for the concurrency threshold value of current each resource to adjust, it obtains trading volume cumulative number and fault transaction cumulative number in time cycle of each resource entries from resource information data field, then calculate the failure rate in this cycle by dynamic threshold adjustment algorithm, and the failure rate calculating in this cycle and standard failure rate are compared, if the failure rate in this cycle is more than or equal to standard failure rate, transaction concurrency threshold value is carried out to Dynamic contraction, if the failure rate in this cycle is less than standard failure rate, transaction concurrency threshold value is dynamically recovered.It should be noted that, in the cycle in sampling time, the standard failure rate of certain resource can arrange by configuration file, for example, can be set to 20%.After each sampling period finishes, all the failure rate in this cycle and standard failure rate can be compared, recover to determine to start to shrink or start from this cycle.Sampling duration and sampling interval (are for example traditionally arranged to be second level, the sampling duration is 60 seconds, the sampling interval time is 30 seconds), failure rate that can be in the quick obtaining sampling period, respond thereby can shrink or recover with concurrency threshold value immediately, improve significantly the efficiency of transaction concurrency processing, avoided long transaction processing path blockade.Dynamic threshold adjusting module obtains transaction cumulative number and fault transaction cumulative number is carrying out after threshold value adjustment, all carries out zero clearing, and this can save the storage space of flow control control, improves the efficiency of flow control.Timer submodule can be responsible for timing and call dynamic threshold adjustment submodule, and timer submodule also can be used for switch and the configuration in cycle in sampling time that dynamic threshold is adjusted.In embodiments of the present invention, can dynamically adjust by the threshold value of configuration file Offered target resource the state of switch, the state that threshold value is dynamically adjusted switch comprises unlatching ON state for representing to allow dynamically to adjust and the OFF state of closing for representing to forbid dynamically to adjust.Technician can need to arrange threshold value and dynamically adjust according to application the state of switch flexibly.
The implementation of the flow process control of the main flow of transaction processing and resource management module can be as shown in Figure 3.In Fig. 3, the scheduling of resource control submodule in main thread, the resource management module of transaction processing and resource information gather performed step or the function of submodule and are perfectly clear.In the main thread of transaction processing, be linked into service processing from communication, call scheduling of resource control submodule and carry out flow control, then scheduling of resource control submodule is from the current concurrency threshold value of resource information data field Gains resources entry, the result of calculated flow rate control, shrinks or recovers.Next, judge whether to need flow control, if desired carry out flow control, will conclude the business and keep off back.Carry out flow control if do not need, call resource information collection submodule and carry out information acquisition, comprise and gather current transaction concurrency, collection trading volume accumulative total, collection fault transaction amount accumulative total, and store respectively the above-mentioned information gathering into resource information data field, then communication picks out, and continues follow-up flow process.
Scheduling of resource control submodule can call scheduling of resource control example at the Nodes of each link of transaction processing and carry out scheduling of resource control, and these nodes can be described as Resource Control Point.Different Resource Control Points can call identical scheduling of resource control example, also can call different scheduling of resource control examples.Each scheduling of resource control example can define resource entries and its corresponding control strategy of required control.Scheduling of resource control module, according to control strategy corresponding to resource entries in scheduling of resource control example, is obtained respective resources information and is calculated from resource information management module, so that resource is carried out to scheduling controlling.If scheduling of resource control result is controlled for needs, this link can be controlled so, otherwise, continue the normal transaction processing of carrying out.Each link of transaction processing is carried out the flow process of scheduling of resource control can be as shown in Figure 4.Scheduling of resource control starts, first judge whether scheduling of resource gauge tap is opened, if do not open, continue to carry out subsequent treatment, if open, call scheduling of resource control submodule Gains resources scheduling controlling result, if scheduling of resource control result is for controlling, carry out scheduling of resource control, if scheduling of resource control result, for not controlling, continues to carry out subsequent treatment.Wherein, the flow process of computational resource scheduling controlling result can be as shown in Figure 5.First, Gains resources item list, judges whether to also have the resource entries of not calculating, if also have the resource entries of not calculating, return and control result for not controlling, if there is no the resource entries of also not calculating, obtain the control strategy of this resource entries of not calculating, and obtain the behaviour in service of this resource entries, and judge whether to reach control requirement, if do not reach control requirement, return and judge whether to also have the resource entries of not calculating, if reach control requirement, return and control result for controlling.Before the communication of certain transaction picks out, transaction concurrency to system is controlled, particularly, that the transaction concurrency obtaining in current period and concurrency threshold value are compared, if transaction concurrency is greater than concurrency threshold value, will conclude the business and keep off back, otherwise continue to process transaction according to normal flow.
Resource information gathers submodule and also can call at the Nodes of each link of transaction processing, and collection of resources submodule can carry out information acquisition by collection of resources example, and the node of these collections can be described as collection of resources point.Different collection of resources points can call identical resource information and gather example, also can call different resource informations and gather example.Each resource information gathers example can define resource entries and the acquisition strategies corresponding to this resource entries that self need to gather.Resource information gathers submodule and carries out information acquisition according to acquisition strategies corresponding to resource entries in resource information collection example, then the information collecting is stored in resource information data field.Dynamically to carry out in real time flow control in order realizing, to need the transaction concurrency of each system in collecting computer system, also need trading volume and fault transaction amount to gather statistics.The function that the concurrency of concluding the business in computer system is gathered can realize by the mode that increases deploy content, and transaction concurrency is the transaction concurrency gathering with the dimension defining in acquisition mode.Gather dimension and comprise that native system mails to transaction concurrency, the transaction concurrency that certain canalization mails to native system etc. of certain service that the transaction concurrency of each service system, native system mail to certain service system.Can realize by acquisition strategies module and sampling switching element the sampling statistics of trading volume and fault transaction amount.Wherein, being embodied as of acquisition strategies unit: first, the on off state of sampling switching element is judged, if sampling switch state is for opening, gather, if sampling switch state is for closing, do not gather.When collection, first the transaction total amount of this resource is added to 1, then the transaction response time is judged, if the transaction response time is greater than transaction standard consuming time, the fault transaction amount of this resource is added to 1, otherwise skip.The information gathering is stored in resource information data field.
Dynamic threshold is adjusted submodule and is obtained sampling transaction sum and the sampling fault transaction number of target resource within this cycle according to the time cycle from resource information management module, and calculates failure rate.Can set the resource entries that needs dynamic threshold to adjust by configuration file.If certain resource entries is not set in configuration file, do not carry out dynamic threshold adjustment, adopt fixed threshold to carry out flow control.The measurement period of each resource also can be arranged by configuration file.When each sampling period finishes by sampled data zero clearing.The Trigger Function of sampling statistics is realized by timer, and by independently thread pool execution.Dynamic threshold adjustment algorithm can comprise Dynamic contraction and dynamically recover.Configuration file arranges the standard failure rate of certain resource.If sampling failure rate is more than or equal to standard failure rate, illustrate that overtime transaction increases to some extent, the processing pressure of system increases, and starts Dynamic contraction, reduces gradually transaction concurrency threshold value; If sampling failure rate is less than standard failure rate, illustrate that overtime transaction reduces to some extent, the processing pressure of system reduces, and starts dynamic recovery, increases gradually the dynamic threshold of transaction concurrency.Wherein Dynamic contraction can shrink in proportion, for example, under the situation that is 50% in the shrinkage factor of certain resource (those skilled in the art also as required shrinkage factor be set to 30%, 35%, 40%, 45% etc.), contraction desired value=current threshold value the * (1-shrinkage factor) of threshold value Dynamic contraction, wherein * is mathematical operation symbol, represents to multiply each other.When Dynamic contraction, also there is the upper and lower bound of contraction in proportion.Under shrinking, be limited to minimum threshold, be defaulted as 1, be limited to the max-thresholds of flow control in contraction, wherein max-thresholds can be determined according to the maximum bearing ability in system a period of time.In the time that the transaction processing of system is slow, resource management module Dynamic contraction, reduces transaction concurrency threshold value, in the transaction by minimizing failed services system, send number of request, ensure the transaction energy normal process of other service systems and canalization, reach the effect of fault isolation.In the time that system transaction processing is normal, resource management module dynamically recovers, and recovers transaction concurrency threshold value, until return to maximal value (being the transaction concurrency threshold value of the flow control before fault).Dynamically recovery also can recover in proportion, recovers desired value=current threshold value * (1+ recovery rate), and wherein recovery rate can arrange by configuration file, for example, can recovery rate be set to 100%.Under the situation of dynamically recovering, the minimum recovery ratio of certain resource can be set by configuration file, for example can be set to 10% (those skilled in the art can need to minimum recovery ratio be set to 5%, 15%, 20% etc. according to application), minimum recovery threshold value=minimum recovery ratio * max-thresholds.The desired value that threshold value is dynamically recovered is more than or equal to minimum recovery threshold value.If the recovery desired value calculating according to recovery desired value=current threshold value * (1+ recovery rate) is less than minimum recovery threshold value, using minimum recovery threshold value as recovering desired value.Minimum recovery threshold value should not be greater than max-thresholds.The dynamic adjustment flow process of concurrency threshold value can be as shown in Figure 6.Timer submodule is carried out timed task, call dynamic threshold and adjust submodule, and dynamic threshold adjustment submodule obtains transaction cumulative number and fault transaction amount cumulative number from resource information data field, and calculate failure rate, then obtaining dynamic adjustment algorithm and parameter calculates to determine whether to revise concurrency threshold value, revise concurrency threshold value if do not need, by trading volume accumulative total and the zero clearing of fault transaction amount cumulative number; If desired revise concurrency threshold value, concurrency threshold value is modified, then, by trading volume cumulative number and the zero clearing of fault transaction amount cumulative number, so far complete timed task.
In embodiments of the present invention, the mode that resource management module carries out dynamically adjusting to transaction concurrency threshold value can comprise following three kinds of modes: the mode (for example, adopting the mode of shrinking or recovering in proportion) of shrinking gradually and recovering gradually; The two-stage staged of high concurrency and low concurrency; And number of concurrent constant type (being the indeclinable mode of number of concurrent).Above-mentioned three kinds of different adjustment modes can be used as control strategy and are applicable to respectively different application scenarioss, and different systems can select a kind of control strategy wherein to carry out flow control.That is to say, computer system in embodiment of the present invention can adopt different control strategies to carry out flow control at different nodes (the each node in canalization, the each node in front-end system and the each node in service system), and concrete selection is according to carrying out according to the quantity of transaction and the response time of transaction.Very large (for example for trading volume, exceed a larger threshold value m1) and transaction the response time very short (for example, be less than a less response time t1) system, concurrency threshold value can adopt the adjustment mode of shrinking gradually and recover; Large (for example for trading volume, exceed a medium sized threshold value m2 but be less than a larger threshold value m1) and the transaction response time be not fast especially (for example, be greater than a medium response time t2, t2>=t1) system, concurrency threshold value can adopt the stepped adjustment mode of two-stage; For example, for the trading volume system of less (, being less than a less threshold value), concurrency threshold value can adopt the adjustment mode of number of concurrent constant type.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode of software combined with hardware platform, can certainly all implement by hardware.Based on such understanding, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Above disclosed is only a kind of preferred embodiment of the present invention, the interest field that certainly can not limit the present invention with this, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.

Claims (24)

1. the flow control methods for computer system, it is characterized in that, described computer system comprises front-end system, sends the canalization of transaction request and the service system of service is provided to described front-end system to described front-end system, and described method comprises:
One or more Nodes of each processing links of concluding the business in described computer system call resource management module transaction concurrency threshold value are dynamically adjusted,
Wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
2. method according to claim 1, wherein, described one or more nodes comprise:
After described canalization requests transaction being completed to channel processing, carry out channel transaction processing node before;
After completing described channel transaction processing, described front-end system carries out service processing node before to described channel transaction; Or
After the service system of having concluded the business is processed, carry out communication and pick out the node before processing.
3. method according to claim 1, wherein, described target resource comprises: flow, thread, queue, communication linking number, database linking number, object instance number.
4. method according to claim 1, wherein, described transaction concurrency threshold value is carried out dynamically adjusting and comprising: after each cycle in sampling time, failure rate in this cycle and standard failure rate are compared, if the failure rate in this cycle is more than or equal to standard failure rate, transaction concurrency threshold value is carried out to Dynamic contraction, if the failure rate in this cycle is less than standard failure rate, transaction concurrency threshold value is dynamically recovered.
5. method according to claim 4, wherein, described Dynamic contraction comprises contraction in proportion, contraction desired value and the current threshold value in this cycle are proportional, and in [minimum threshold, max-thresholds] scope.
6. method according to claim 4, wherein, described dynamic recovery comprises recovery in proportion, recovers desired value and the current threshold value in this cycle proportional.
7. method according to claim 6, wherein, described method also comprises the minimum recovery ratio that resource is set by configuration file, and minimum recovery threshold value is the product of minimum recovery ratio and max-thresholds, and wherein said recovery desired value is more than or equal to minimum recovery threshold value.
8. according to the method described in any one in claim 4 to 7, wherein, described transaction concurrency threshold value is carried out dynamically adjusting is to adopt with the incoherent separate threads of execution of transaction to carry out.
9. method according to claim 8, wherein, describedly carries out dynamically adjusting to transaction concurrency threshold value the form that adopts independent timed task, and described independent timed task is also for providing INFO rank log information completing after dynamic adjustment.
10. method according to claim 1, wherein, described method also comprises the state of dynamically adjusting switch by the threshold value of configuration file Offered target resource, the state of described adjustment switch comprises the unlatching ON state for representing to allow dynamic adjustment, and for representing to forbid the dynamically OFF state of closing of adjustment.
11. methods according to claim 1, wherein, described transaction concurrency threshold value is carried out dynamically adjusting the following three kinds of adjustment modes that comprise:
Concurrency threshold value is shunk and recovery formula gradually;
High concurrency and low concurrency two-stage staged;
Number of concurrent constant type.
12. methods according to claim 11, wherein, exceed first threshold and the transaction response time is less than the situation of the first response time for number of transaction, adopt concurrency threshold value to shrink gradually and recover the adjustment mode of formula;
Exceed Second Threshold but be less than first threshold and the transaction response time is greater than the situation of the second response time for number of transaction, adopting high concurrency and the stepped adjustment mode of low concurrency two-stage;
Be less than the situation of the 3rd threshold value for number of transaction, adopt the adjustment mode of number of concurrent constant type;
Wherein, first threshold is greater than Second Threshold, and Second Threshold is greater than the 3rd threshold value, and the second response time was more than or equal to for the first response time.
13. 1 kinds of volume control devices for computer system, it is characterized in that described computer system comprises front-end system, sends the canalization of transaction request and the service system of service is provided to described front-end system to described front-end system, described device comprises:
Resource management module, one or more Nodes that are used for each processing links of concluding the business in described computer system are dynamically adjusted transaction concurrency threshold value, wherein, described resource management module is dynamically to adjust according to the failure rate of transaction, the failure rate of described transaction refers to the ratio of the cumulative number of fault transaction of cycle in a sampling time internal object resource and total cumulative number of the transaction of this resource, and wherein said fault transaction is the transaction that the transaction response time is greater than the standard consuming time of concluding the business.
14. devices according to claim 13, wherein, described one or more nodes comprise:
After described canalization requests transaction being completed to channel processing, carry out channel transaction processing node before;
After completing described channel transaction processing, described front-end system carries out service processing node before to described channel transaction;
After the service system of having concluded the business is processed, carry out communication and pick out the node before processing.
15. devices according to claim 13, wherein, described target resource comprises: flow, thread, queue, communication linking number, database linking number, object instance number.
16. devices according to claim 13, wherein, described resource management module is used for: after each cycle in sampling time, failure rate in this cycle and standard failure rate are compared, if the failure rate in this cycle is more than or equal to standard failure rate, transaction concurrency threshold value is carried out to Dynamic contraction, if the failure rate in this cycle is less than standard failure rate, transaction concurrency threshold value is dynamically recovered.
17. devices according to claim 16, wherein, described Dynamic contraction comprises contraction in proportion, contraction desired value and the current threshold value in this cycle are proportional, and in [minimum threshold, max-thresholds] scope.
18. devices according to claim 16, wherein, described dynamic recovery comprises recovery in proportion, recovers desired value and the current threshold value in this cycle proportional.
19. devices according to claim 18, wherein, described device also comprises configuration file, and described configuration file arranges the minimum recovery ratio of resource, minimum recovery threshold value is the product of minimum recovery ratio and max-thresholds, and wherein said recovery desired value is more than or equal to minimum recovery threshold value.
20. according to claim 16 to the method described in any one in 19, and wherein, described resource management module is to adopt with the incoherent separate threads of execution of transaction to implement.
21. devices according to claim 20, the form that wherein said resource management module adopts independent timed task is dynamically adjusted transaction concurrency threshold value, and described independent timed task is also for providing INFO rank log information completing after dynamic adjustment.
22. devices according to claim 13, described device also comprises configuration file, the threshold value of described configuration file Offered target resource is dynamically adjusted the state of switch, the state of described adjustment switch comprises the unlatching ON state for representing to allow dynamic adjustment, and for representing to forbid the dynamically OFF state of closing of adjustment.
23. devices according to claim 13, wherein, described resource management module carries out dynamically adjusting to transaction concurrency threshold value the following three kinds of adjustment modes that comprise:
Concurrency threshold value is shunk and recovery formula gradually;
High concurrency and low concurrency two-stage staged;
Number of concurrent constant type.
24. devices according to claim 23, wherein, described resource management module exceedes first threshold for number of transaction and the transaction response time is less than the situation of the first response time, adopts concurrency threshold value to shrink gradually and recover the adjustment mode of formula;
Exceed Second Threshold but be less than first threshold and the transaction response time is greater than the situation of the second response time for number of transaction, adopting high concurrency and the stepped adjustment mode of low concurrency two-stage;
Be less than the situation of the 3rd threshold value for number of transaction, adopt the adjustment mode of number of concurrent constant type;
Wherein, first threshold is greater than Second Threshold, and Second Threshold is greater than the 3rd threshold value, and the second response time was more than or equal to for the first response time.
CN201410252122.XA 2014-06-09 2014-06-09 Flow control method and device for computer system Pending CN104090823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410252122.XA CN104090823A (en) 2014-06-09 2014-06-09 Flow control method and device for computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410252122.XA CN104090823A (en) 2014-06-09 2014-06-09 Flow control method and device for computer system

Publications (1)

Publication Number Publication Date
CN104090823A true CN104090823A (en) 2014-10-08

Family

ID=51638542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410252122.XA Pending CN104090823A (en) 2014-06-09 2014-06-09 Flow control method and device for computer system

Country Status (1)

Country Link
CN (1) CN104090823A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408656A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Method and system for dynamic adjusting flow control threshold
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
CN105847169A (en) * 2015-01-13 2016-08-10 阿里巴巴集团控股有限公司 Method and device for traffic control
CN106100901A (en) * 2016-08-04 2016-11-09 中国银联股份有限公司 A kind of flow rate control method and device
CN106780034A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Unilateral account scale domination method and system
CN107592345A (en) * 2017-08-28 2018-01-16 中国工商银行股份有限公司 Transaction current-limiting apparatus, method and transaction system
CN108111433A (en) * 2016-11-25 2018-06-01 阿里巴巴集团控股有限公司 A kind of service dynamic flow control method, device and electronic equipment
CN108234188A (en) * 2016-12-22 2018-06-29 中国移动通信集团上海有限公司 A kind of business platform resource scheduling processing method and device
WO2018137254A1 (en) * 2017-01-26 2018-08-02 华为技术有限公司 Call chain-based concurrency control method, device, and control node
CN108712350A (en) * 2018-06-05 2018-10-26 中国农业银行股份有限公司 Based on custom rule can in real time auto-control flow control methods and device
CN108932613A (en) * 2017-05-25 2018-12-04 北京嘀嘀无限科技发展有限公司 Monitoring method and monitoring device, the equipment and storage medium of internet payment channel
CN109412970A (en) * 2018-09-30 2019-03-01 江苏满运软件科技有限公司 Stream compression system, stream compression method, electronic equipment and storage medium
CN109561133A (en) * 2018-10-23 2019-04-02 深圳壹账通智能科技有限公司 Method for processing business, device, equipment and computer readable storage medium
CN110490737A (en) * 2019-07-29 2019-11-22 阿里巴巴集团控股有限公司 Transaction channel control method, device and electronic equipment
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN111461864A (en) * 2020-03-31 2020-07-28 中国银行股份有限公司 Transaction processing method and device
CN111769982A (en) * 2020-06-22 2020-10-13 上海理想信息产业(集团)有限公司 Large-scale network data acquisition method and device based on timeout factor
CN111858021A (en) * 2019-08-26 2020-10-30 马上消费金融股份有限公司 Transaction channel selection method, online transaction method and related device
CN112583862A (en) * 2019-09-27 2021-03-30 北京国双科技有限公司 Data concurrent processing method and device, storage medium and equipment
CN113469686A (en) * 2021-07-21 2021-10-01 上海浦东发展银行股份有限公司 Method, device, equipment and storage medium for adjusting business transaction amount

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537542A (en) * 1994-04-04 1996-07-16 International Business Machines Corporation Apparatus and method for managing a server workload according to client performance goals in a client/server data processing system
CN101000563A (en) * 2006-12-30 2007-07-18 中国建设银行股份有限公司 Adaptive congestion control method and device
CN101799910A (en) * 2010-01-14 2010-08-11 中国建设银行股份有限公司 Method and system for monitoring transaction channel state of self-service channel business system
CN101877158A (en) * 2010-03-23 2010-11-03 苏州德融嘉信信用管理技术有限公司 Front service platform of bank and operation processing method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537542A (en) * 1994-04-04 1996-07-16 International Business Machines Corporation Apparatus and method for managing a server workload according to client performance goals in a client/server data processing system
CN101000563A (en) * 2006-12-30 2007-07-18 中国建设银行股份有限公司 Adaptive congestion control method and device
CN101799910A (en) * 2010-01-14 2010-08-11 中国建设银行股份有限公司 Method and system for monitoring transaction channel state of self-service channel business system
CN101877158A (en) * 2010-03-23 2010-11-03 苏州德融嘉信信用管理技术有限公司 Front service platform of bank and operation processing method thereof

Cited By (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408656A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Method and system for dynamic adjusting flow control threshold
CN105847169A (en) * 2015-01-13 2016-08-10 阿里巴巴集团控股有限公司 Method and device for traffic control
CN105847169B (en) * 2015-01-13 2019-07-05 阿里巴巴集团控股有限公司 A kind of method and device for flow control
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
CN106100901B (en) * 2016-08-04 2019-12-06 中国银联股份有限公司 Flow velocity control method and device
CN106100901A (en) * 2016-08-04 2016-11-09 中国银联股份有限公司 A kind of flow rate control method and device
WO2018024076A1 (en) * 2016-08-04 2018-02-08 中国银联股份有限公司 Flow velocity control method and device
CN108111433A (en) * 2016-11-25 2018-06-01 阿里巴巴集团控股有限公司 A kind of service dynamic flow control method, device and electronic equipment
CN108234188B (en) * 2016-12-22 2021-06-04 中国移动通信集团上海有限公司 Service platform resource scheduling processing method and device
CN108234188A (en) * 2016-12-22 2018-06-29 中国移动通信集团上海有限公司 A kind of business platform resource scheduling processing method and device
CN106780034B (en) * 2016-12-26 2020-08-28 中国建设银行股份有限公司 Unilateral account scale control method and system
CN106780034A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Unilateral account scale domination method and system
EP3564816A4 (en) * 2017-01-26 2019-11-20 Huawei Technologies Co., Ltd. Call chain-based concurrency control method, device, and control node
CN108633311A (en) * 2017-01-26 2018-10-09 华为技术有限公司 A kind of method, apparatus and control node of the con current control based on call chain
US10873622B2 (en) * 2017-01-26 2020-12-22 Huawei Technologies Co., Ltd. Call chain-based concurrency control method and apparatus, and control node
WO2018137254A1 (en) * 2017-01-26 2018-08-02 华为技术有限公司 Call chain-based concurrency control method, device, and control node
CN108932613A (en) * 2017-05-25 2018-12-04 北京嘀嘀无限科技发展有限公司 Monitoring method and monitoring device, the equipment and storage medium of internet payment channel
CN108932613B (en) * 2017-05-25 2020-10-27 北京嘀嘀无限科技发展有限公司 Monitoring method and monitoring device for internet payment channel, equipment and storage medium
CN107592345A (en) * 2017-08-28 2018-01-16 中国工商银行股份有限公司 Transaction current-limiting apparatus, method and transaction system
CN107592345B (en) * 2017-08-28 2020-08-18 中国工商银行股份有限公司 Transaction current limiting device, method and transaction system
CN108712350B (en) * 2018-06-05 2022-04-05 中国农业银行股份有限公司 Flow control method and device capable of automatically regulating and controlling in real time based on custom rule
CN108712350A (en) * 2018-06-05 2018-10-26 中国农业银行股份有限公司 Based on custom rule can in real time auto-control flow control methods and device
CN109412970A (en) * 2018-09-30 2019-03-01 江苏满运软件科技有限公司 Stream compression system, stream compression method, electronic equipment and storage medium
CN109561133A (en) * 2018-10-23 2019-04-02 深圳壹账通智能科技有限公司 Method for processing business, device, equipment and computer readable storage medium
CN111385214B (en) * 2018-12-27 2023-11-17 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN110490737B (en) * 2019-07-29 2024-03-19 创新先进技术有限公司 Transaction channel control method and device and electronic equipment
CN110490737A (en) * 2019-07-29 2019-11-22 阿里巴巴集团控股有限公司 Transaction channel control method, device and electronic equipment
CN111858021A (en) * 2019-08-26 2020-10-30 马上消费金融股份有限公司 Transaction channel selection method, online transaction method and related device
CN111858021B (en) * 2019-08-26 2021-09-03 马上消费金融股份有限公司 Transaction channel selection method, online transaction method and related device
CN112583862A (en) * 2019-09-27 2021-03-30 北京国双科技有限公司 Data concurrent processing method and device, storage medium and equipment
CN111461864A (en) * 2020-03-31 2020-07-28 中国银行股份有限公司 Transaction processing method and device
CN111769982B (en) * 2020-06-22 2023-03-24 上海理想信息产业(集团)有限公司 Large-scale network data acquisition method and device based on timeout factor
CN111769982A (en) * 2020-06-22 2020-10-13 上海理想信息产业(集团)有限公司 Large-scale network data acquisition method and device based on timeout factor
CN113469686A (en) * 2021-07-21 2021-10-01 上海浦东发展银行股份有限公司 Method, device, equipment and storage medium for adjusting business transaction amount
CN113469686B (en) * 2021-07-21 2023-04-07 上海浦东发展银行股份有限公司 Method, device, equipment and storage medium for adjusting business transaction amount

Similar Documents

Publication Publication Date Title
CN104090823A (en) Flow control method and device for computer system
CN108880934B (en) Data flow statistical method and device based on block chain
CN110048907B (en) Global flow control method and device in cluster environment
CN106789141A (en) A kind of gateway device failure processing method and processing device
CN105589782A (en) User behavior collection method based on browser
CN103455600A (en) Video URL (Uniform Resource Locator) grabbing method and device and server equipment
US11288394B2 (en) Webpage content self-protection method and associated server
CN112799923A (en) System abnormality reason determining method, device, equipment and storage medium
CN111680104B (en) Data synchronization method, device, computer equipment and readable storage medium
CN107592274A (en) A kind of control management method of web server computer
CN111694518A (en) Method, device and equipment for automatically migrating data after cluster expansion or contraction
CN111600807A (en) Flow control method and system based on API gateway equipment
CN111181800A (en) Test data processing method and device, electronic equipment and storage medium
CN110069670A (en) Purpose data classifying method, device, equipment and computer readable storage medium
CN101867932A (en) Harmful information filtration system based on mobile Internet and method thereof
CN105162622A (en) Storage method and system
CN105447069A (en) BW platform based account checking platform data synchronization method and system
CN107179979A (en) A kind of acquisition of remote terminal information, analysis method, apparatus and system
US20170064023A1 (en) Page Push Method, Device, Server and System
CN101662389A (en) Method for carrying out statistics on performance data and device applying same
CN104915376A (en) Cloud storage file archiving and compressing method
CN106339265A (en) Method and device for processing combined task
CN101098495A (en) System and method for improving intelligent business on-line statistical task performance
CN108989088A (en) A kind of log method for uploading and communication equipment
US20070245016A1 (en) System and method of single-channel account reporting

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20141008