CN110413416A - A kind of current-limiting method and device of distributed server - Google Patents
A kind of current-limiting method and device of distributed server Download PDFInfo
- Publication number
- CN110413416A CN110413416A CN201910698896.8A CN201910698896A CN110413416A CN 110413416 A CN110413416 A CN 110413416A CN 201910698896 A CN201910698896 A CN 201910698896A CN 110413416 A CN110413416 A CN 110413416A
- Authority
- CN
- China
- Prior art keywords
- transaction request
- transaction
- current limliting
- current
- judgment rule
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5044—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The present invention provides the current-limiting method and device of a kind of distributed server, which comprises receives at least one transaction request;If judgement knows at least one described transaction request there is the transaction request for meeting current limliting judgment rule, the transaction request quantity in the unit time is obtained;Wherein, the current limliting judgment rule is preset;If judgement knows that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than the current limit threshold and the transaction request for meeting the current limliting judgment rule.Described device is for executing the above method.The current-limiting method and device of distributed server provided in an embodiment of the present invention improve the stability of distributed server operation.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of current-limiting method and device of distributed server.
Background technique
In recent years, with internet financial industry continue to develop, scale constantly expand, traditional single application framework and hang down
Straight application architecture can not cope with pressure brought by moment high concurrent flow, Distributed Services framework and flowing computing architecture
That applies is more and more extensive.
Currently, the stability of Distributed Services framework operation can reach far away the level of traditional framework.In order to guarantee to be distributed
Formula service system can operation without any confusion, frequently with works such as service degradation, service current limlitings in the application of distributed server
Tool.In the prior art, the current-limiting mode of distributed server is mainly based upon server middleware connection number, concurrent thread control
The methods of realize, these methodological functions are single and flexibility is poor, cannot be completed effectively the current limliting of distributed server, especially
In the high concurrent for facing to uprush, a large amount of transaction access requests.
Therefore, how to propose a kind of current-limiting method of distributed server, can effectively control transaction request quantity, improve
The stability of distributed server operation becomes the important topic that this field needs to solve.
Summary of the invention
For the problems of the prior art, the embodiment of the present invention provides the current-limiting method and dress of a kind of distributed server
It sets.
On the one hand, the present invention proposes a kind of current-limiting method of distributed server, comprising:
Receive at least one transaction request;
If judgement knows at least one described transaction request there is the transaction request for meeting current limliting judgment rule, obtain
Transaction request quantity in unit time;Wherein, the current limliting judgment rule is preset;
If judgement knows that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than the current limliting
Threshold value and the transaction request for meeting the current limliting judgment rule.
On the other hand, the present invention provides a kind of current-limiting apparatus of distributed server, comprising:
First receiving unit, for receiving at least one transaction request;
Judging unit, for knowing at least one described transaction request there is the friendship for meeting current limliting judgment rule in judgement
Easily after request, the transaction request quantity in the unit time is obtained;Wherein, the current limliting judgment rule is preset;
Refuse unit, for after judgement knows that transaction request quantity in the unit time is greater than current limit threshold,
Refusal is more than the current limit threshold and the transaction request for meeting the current limliting judgment rule.
In another aspect, the present invention provides a kind of electronic equipment, including memory, processor and storage are on a memory and can
The computer program run on a processor, the processor realize distribution described in any of the above-described embodiment when executing described program
The step of current-limiting method of formula server.
Another aspect, the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, the calculating
Machine program realizes the step of current-limiting method of distributed server described in any of the above-described embodiment when being executed by processor.
The current-limiting method and device of distributed server provided in an embodiment of the present invention can receive at least one transaction and ask
It asks, knows in judgement single in the presence of obtaining after meeting the transaction request of current limliting judgment rule at least one above-mentioned transaction request
Transaction request quantity in the time of position, and after judgement knows that the transaction request quantity in the unit time is greater than current limit threshold,
Refusal is more than current limit threshold and the transaction request for meeting current limliting judgment rule, by current limliting judgment rule and current limit threshold to unit
Transaction request quantity in time is limited, and transaction request quantity can be effectively controlled, and is avoided transaction request quantity from exceeding and is divided
The processing capacity of cloth server improves the stability of distributed server operation.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.In the accompanying drawings:
Fig. 1 is the structural schematic diagram of the current limiting system for the distributed server that one embodiment of the invention provides.
Fig. 2 is the flow diagram of the current-limiting method for the distributed server that one embodiment of the invention provides.
Fig. 3 be another embodiment of the present invention provides distributed server current-limiting method flow diagram.
Fig. 4 is the structural schematic diagram of the current-limiting apparatus for the distributed server that one embodiment of the invention provides.
Fig. 5 be another embodiment of the present invention provides distributed server current-limiting apparatus structural schematic diagram.
Fig. 6 is the structural schematic diagram of the current-limiting apparatus for the distributed server that further embodiment of this invention provides.
Fig. 7 is the entity structure schematic diagram for the electronic equipment that one embodiment of the invention provides.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, with reference to the accompanying drawing to this hair
Bright embodiment is described in further details.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously
It is not as a limitation of the invention.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature can mutual any combination.
Fig. 1 is the structural schematic diagram of the current limiting system for the distributed server that one embodiment of the invention provides, such as Fig. 1 institute
Show, the current limiting system of distributed server provided in an embodiment of the present invention includes service call end 1, distributed current limiter 2 and divides
Cloth server 3, service call end 1 and distributed current limiter 2 communicate to connect, and distributed current limiter 2 and distributed server 3 are logical
Letter connection.Service call end 1 is the entrance of service call, can initiate business transaction, and service call end 1 is, for example, to be arranged in cabinet
The terminal device of the channels such as face, bank-enterprise interconnection, Internetbank;Service call end 1 can spell every business transaction according to element of transaction
Message is dressed up, transaction request is formed and is sent to distributed current limiter 2.Distributed current limiter 2 receives the transaction request, to described
Transaction request carries out current limliting processing, and the transaction request for not needing to carry out current limliting is transmitted to distributed server 3.Distributed Services
Device 3 handles the transaction request received, and returns to processing result.Distributed current limiter 2 is for executing the present invention
The current-limiting method for the distributed server that embodiment provides.It should be noted that Distributed Services provided in an embodiment of the present invention
The current-limiting method of device is to realize the current limliting to distributed server by controlling transaction request quantity.
Fig. 2 is the flow diagram of the current-limiting method for the distributed server that one embodiment of the invention provides, such as Fig. 2 institute
Show, the current-limiting method of distributed server provided in an embodiment of the present invention, comprising:
S201, at least one transaction request is received;
Specifically, service call end can send at least one transaction request, the distribution current limliting to distributed current limiter
Device can receive the transaction request.Wherein, the transaction request includes element of transaction, and the element of transaction includes but is not limited to hand over
Easy type, Transaction Account number, transaction currency type, transaction amount, trade date etc., the element of transaction is set according to the actual situation
It sets, the embodiment of the present invention is without limitation.
If S202, judgement know at least one described transaction request there is the transaction request for meeting current limliting judgment rule,
Then obtain the transaction request quantity in the unit time;Wherein, the current limliting judgment rule is preset;
Specifically, after the distributed current limiter receives at least one described transaction request, judge it is described at least
Whether each transaction request in one transaction request meets current limliting judgment rule, if there is meeting the current limliting judgment rule
Transaction request, then obtain the unit time in transaction request quantity.Wherein, the current limliting judgment rule is preset.Institute
It states current limliting judgment rule to be configured according to actual needs, the embodiment of the present invention is without limitation;The unit time, for example, 1
Second, it is configured according to actual needs, the embodiment of the present invention is without limitation.Being appreciated that is, judges for being unsatisfactory for the current limliting
The transaction request of rule, the distribution current limiter can be transmitted to distributed server and be handled.The distribution current limiter
It can be set on gateway, proxy server or a distributed server, be configured according to actual needs, the present invention is real
Apply example without limitation.
For example, the current limliting judgment rule includes Rule of judgment: transaction currency type is RMB or dollar.If the transaction
Transaction currency type is RMB or dollar used in request, then the transaction request meets the current limliting judgment rule.Institute
Stating current limliting judgment rule includes Rule of judgment: transaction amount is greater than 100 and less than 1000.If the trade gold of the transaction request
Volume is greater than 100 and less than 1000, then the transaction request meets the current limliting judgment rule.The current limliting judgment rule includes
Rule of judgment: trade date is November 11.If the trade date of the transaction request is November 11, the transaction
Request meets the current limliting judgment rule.The current limliting judgment rule includes Rule of judgment: transaction currency type is dollar and trade gold
Volume is greater than 1000.If the transaction currency type in the transaction request is dollar and transaction amount is greater than 1000, the transaction
Request meets the current limliting judgment rule.It is understood that the current limliting judgment rule may include multiple Rule of judgment.
If S203, judgement know that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than institute
It states current limit threshold and meets the transaction request of the current limliting judgment rule.
Specifically, after the distributed current limiter obtains the transaction request quantity in the unit time, by the list
Transaction request quantity in the time of position is compared with current limit threshold, if the transaction request quantity in the unit time is greater than
That is, the current limit threshold will not then refusal is more than the current limit threshold and the transaction request for meeting the current limliting judgment rule
It will be more than the current limit threshold and meet the transaction request of the current limliting judgment rule and be transmitted to distributed server and handle.
Wherein, the current limit threshold is preset, and the current limit threshold is configured based on practical experience, and the embodiment of the present invention does not limit
It is fixed.
For example, if the transaction request quantity for meeting the transaction request of the current limliting judgment rule is 10, when the unit
In transaction request quantity beyond the current limit threshold quantity be 5, then it is described distribution current limiter will refuse it is described full
5 transaction requests in the transaction request of the foot current limliting judgment rule, remaining 5 transaction request can be sent to Distributed Services
Device is handled.5 transaction requests for meeting the current limliting judgment rule can be randomly selected in the distribution current limiter
Refused, or according to the sending time of each transaction request, 5 later transaction requests of sending time is selected to be refused
Absolutely, it is configured according to actual needs, the embodiment of the present invention is without limitation.
The current-limiting method of distributed server provided in an embodiment of the present invention receives at least one transaction request, is judging
Know at least one above-mentioned transaction request in the presence of after meeting the transaction request of current limliting judgment rule, obtains in the unit time
Transaction request quantity, and after judgement knows that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than limit
Stream threshold value and the transaction request for meeting current limliting judgment rule, by current limliting judgment rule and current limit threshold to the friendship in the unit time
Easy number of requests is limited, and transaction request quantity can be effectively controlled, and avoids transaction request quantity beyond distributed server
Processing capacity, improve distributed server operation stability.
Fig. 3 be another embodiment of the present invention provides distributed server current-limiting method flow diagram, such as Fig. 3 institute
Show on the basis of the various embodiments described above, further, exist completely if the judgement is known at least one described transaction request
The transaction request of sufficient current limliting judgment rule includes:
S2021, at least one element of transaction is extracted from the transaction request;Wherein, the element of transaction is default
's;
Specifically, since the transaction request includes element of transaction, the distribution current limiter can be asked from the transaction
Seek middle at least one element of transaction of extraction.Wherein, the element of transaction is preset.
For example, the distribution current limiter can extract transaction by the way of keyword retrieval from the transaction request
Element.Alternatively, the transaction request is the message formatted, the distribution current limiter can pass through the specific word of the message
Section extracts the element of transaction.
If S2022, judgement know that at least one described element of transaction meets the current limliting judgment rule, it is determined that the friendship
Easily request meets the current limliting judgment rule.
Specifically, the distributed current limiter is after extracting at least one element of transaction in the transaction request,
Judge at least one described element of transaction with the presence or absence of the element of transaction for meeting the current limliting judgment rule, if there is satisfaction
The element of transaction of the current limliting judgment rule, then the corresponding transaction-based requirements of the element of transaction meet the current limliting judgment rule.
On the basis of the various embodiments described above, further, the transaction request quantity obtained in the unit time includes:
It calculates the transaction request quantity forwarded in the unit time and meets the transaction of the current limliting judgment rule
The sum of number of requests, as the transaction request quantity in the unit time.
Specifically, the distributed current limiter counts the transaction request of the transaction request forwarded in the unit time
Quantity can obtain the transaction request quantity forwarded in the unit time;The distribution current limiter counts the list
The transaction request quantity for meeting the transaction request of the current limliting judgment rule in the time of position can obtain full in the unit time
The foot current limliting judgment rule transaction request quantity.Transaction of the distribution current limiter to having been forwarded in the unit time
Number of requests and the transaction request quantity for meeting the current limliting judgment rule are summed, using the result of summation as the unit
Transaction request quantity in time.
On the basis of the various embodiments described above, further, the current limliting of distributed server provided in an embodiment of the present invention
Method further include:
Current limliting configuration is received, the current limliting configuration includes element of transaction, the current limliting judgment rule and the current limit threshold.
Specifically, the distributed current limiter can receive current limliting configuration, and by the current limliting allocating cache to local, institute
Stating current limliting configuration may include element of transaction, the current limliting judgment rule and the current limit threshold.The current limliting configuration can collect
In configured, be then transferred to the distributed current limiter.Wherein, the current limliting configuration is configured based on practical experience,
The embodiment of the present invention is without limitation.
Fig. 4 is the structural schematic diagram of the current-limiting apparatus for the distributed server that one embodiment of the invention provides, such as Fig. 4 institute
Show, the current-limiting apparatus of distributed server provided in an embodiment of the present invention includes the first receiving unit 401,402 and of judging unit
Refuse unit 403, in which:
First receiving unit 401 is for receiving at least one transaction request;Judging unit 402 is used to know in judgement described
Exist after meeting the transaction request of current limliting judgment rule at least one transaction request, obtains the transaction request in the unit time
Quantity;Wherein, the current limliting judgment rule is preset;Refusal unit 403 is used to know in the unit time in judgement
Transaction request quantity is greater than after current limit threshold, and refusal is more than the current limit threshold and the transaction for meeting the current limliting judgment rule
Request.
Specifically, service call end can send at least one transaction request, the first receiving unit 401 to distributed current limiter
The transaction request can be received.Wherein, the transaction request includes element of transaction, and the element of transaction includes but is not limited to trade
Type, Transaction Account number, transaction currency type, transaction amount, trade date etc., the element of transaction is configured according to the actual situation,
The embodiment of the present invention is without limitation.
After judging unit 402 receives at least one described transaction request, at least one described transaction request is judged
In each transaction request whether meet current limliting judgment rule, if there is the transaction request for meeting the current limliting judgment rule,
So obtain the transaction request quantity in the unit time.Wherein, the current limliting judgment rule is preset.The current limliting judgement rule
It is then configured according to actual needs, the embodiment of the present invention is without limitation;The unit time, for example, 1 second, according to practical need
It is configured, the embodiment of the present invention is without limitation.Being appreciated that is, the transaction for being unsatisfactory for the current limliting judgment rule is asked
It asks, judging unit 402 can be transmitted to distributed server and be handled.
After refusal unit 403 obtains the transaction request quantity in the unit time, by the friendship in the unit time
Easy number of requests is compared with current limit threshold, if the transaction request quantity in the unit time is greater than the current limiting threshold
Value, then refusal is more than the current limit threshold and the transaction request for meeting the current limliting judgment rule, i.e., it will not will be more than described
Current limit threshold and the transaction request for meeting the current limliting judgment rule are transmitted to distributed server and are handled.Wherein, described
Current limit threshold be it is preset, the current limit threshold is configured based on practical experience, and the embodiment of the present invention is without limitation.
The current-limiting apparatus of distributed server provided in an embodiment of the present invention receives at least one transaction request, is judging
Know at least one above-mentioned transaction request in the presence of after meeting the transaction request of current limliting judgment rule, obtains in the unit time
Transaction request quantity, and after judgement knows that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than limit
Stream threshold value and the transaction request for meeting current limliting judgment rule, by current limliting judgment rule and current limit threshold to the friendship in the unit time
Easy number of requests is limited, and transaction request quantity can be effectively controlled, and avoids transaction request quantity beyond distributed server
Processing capacity, improve distributed server operation stability.
Fig. 5 be another embodiment of the present invention provides distributed server current-limiting apparatus structural schematic diagram, such as Fig. 5 institute
Show, on the basis of the various embodiments described above, further, judging unit 402 includes extracting subelement 4021 and judgment sub-unit
4022, in which:
Subelement 4021 is extracted for extracting at least one element of transaction from the transaction request;Wherein, the friendship
Easy element is preset;Judgment sub-unit 4022 is used to know that at least one described element of transaction meets the current limliting and sentences in judgement
After disconnected rule, determine that the transaction request meets the current limliting judgment rule.
Specifically, since the transaction request includes element of transaction, extracting subelement 4021 can be from the transaction request
Middle at least one element of transaction of extraction.Wherein, the element of transaction is preset.
After extracting at least one element of transaction in the transaction request, judgment sub-unit 4022 judge it is described extremely
With the presence or absence of the element of transaction for meeting the current limliting judgment rule in a few element of transaction, sentence if there is the current limliting is met
The element of transaction for rule of breaking, then the corresponding transaction-based requirements of the element of transaction meet the current limliting judgment rule.
On the basis of the various embodiments described above, further, judging unit 402 is specifically used for:
It calculates the transaction request quantity forwarded in the unit time and meets the transaction of the current limliting judgment rule
The sum of number of requests, as the transaction request quantity in the unit time.
Specifically, judging unit 402 counts the transaction request quantity of the transaction request forwarded in the unit time,
The transaction request quantity forwarded in the unit time can be obtained;Judging unit 402 counts full in the unit time
The transaction request quantity of the transaction request of the foot current limliting judgment rule, can obtain and meet the current limliting in the unit time
Judgment rule transaction request quantity.Judging unit 402 is to the transaction request quantity and satisfaction forwarded in the unit time
The transaction request quantity of the current limliting judgment rule is summed, and is asked the result of summation as the transaction in the unit time
Seek quantity.
Fig. 6 is the structural schematic diagram of the current-limiting apparatus for the distributed server that further embodiment of this invention provides, such as Fig. 6 institute
Show, on the basis of the various embodiments described above, further, the current-limiting apparatus of distributed server provided in an embodiment of the present invention is also
Including the second receiving unit 404:
Second receiving unit 404 includes element of transaction, current limliting judgement for receiving current limliting configuration, the current limliting configuration
The regular and described current limit threshold.
Specifically, the second receiving unit 404 can receive current limliting configuration, and by the current limliting allocating cache to local, institute
Stating current limliting configuration may include element of transaction, the current limliting judgment rule and the current limit threshold.The current limliting configuration can collect
In configured, be then transferred to the second receiving unit 404.Wherein, the current limliting configuration is configured based on practical experience, this
Inventive embodiments are without limitation.
The embodiment of the current-limiting apparatus of distributed server provided in an embodiment of the present invention specifically can be used for executing above-mentioned
The process flow of each method embodiment, details are not described herein for function, is referred to the detailed description of above method embodiment.
Fig. 7 is the entity structure schematic diagram for the electronic equipment that one embodiment of the invention provides, as shown in fig. 7, the electronics is set
Standby may include: processor (processor) 701,702, memory communication interface (Communications Interface)
(memory) 703 and communication bus 704, wherein processor 701, communication interface 702, memory 703 pass through communication bus 704
Complete mutual communication.Processor 701 can call the logical order in memory 703, to execute following method: receiving extremely
A few transaction request;If judgement knows that there is the transaction for meeting current limliting judgment rule at least one described transaction request asks
It asks, then obtains the transaction request quantity in the unit time;Wherein, the current limliting judgment rule is preset;If institute is known in judgement
It states transaction request quantity in the unit time and is greater than current limit threshold, then refusal is more than the current limit threshold and meets the current limliting and sentence
The transaction request for rule of breaking.
In addition, the logical order in above-mentioned memory 703 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for the technical solution of invention
The form of software product embodies, which is stored in a storage medium, including some instructions to
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation of the present invention
The all or part of the steps of example the method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various
It can store the medium of program code.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating
Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated
When machine executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, receives at least one transaction
Request;If judgement knows at least one described transaction request there is the transaction request for meeting current limliting judgment rule, list is obtained
Transaction request quantity in the time of position;Wherein, the current limliting judgment rule is preset;If judgement was known in the unit time
Transaction request quantity be greater than current limit threshold, then refusal is more than the current limit threshold and meets the transaction of the current limliting judgment rule
Request.
The present embodiment provides a kind of computer readable storage medium, the computer-readable recording medium storage computer journey
Sequence, the computer program make the computer execute method provided by above-mentioned each method embodiment, for example, receive extremely
A few transaction request;If judgement knows that there is the transaction for meeting current limliting judgment rule at least one described transaction request asks
It asks, then obtains the transaction request quantity in the unit time;Wherein, the current limliting judgment rule is preset;If institute is known in judgement
It states transaction request quantity in the unit time and is greater than current limit threshold, then refusal is more than the current limit threshold and meets the current limliting and sentence
The transaction request for rule of breaking.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In the description of this specification, reference term " one embodiment ", " specific embodiment ", " some implementations
Example ", " such as ", the description of " example ", " specific example " or " some examples " etc. mean it is described in conjunction with this embodiment or example
Particular features, structures, materials, or characteristics are included at least one embodiment or example of the invention.In the present specification,
Schematic expression of the above terms may not refer to the same embodiment or example.Moreover, the specific features of description, knot
Structure, material or feature can be combined in any suitable manner in any one or more of the embodiments or examples.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects
Describe in detail it is bright, it should be understood that the above is only a specific embodiment of the present invention, the guarantor being not intended to limit the present invention
Range is protected, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in this
Within the protection scope of invention.
Claims (10)
1. a kind of current-limiting method of distributed server characterized by comprising
Receive at least one transaction request;
If judgement knows at least one described transaction request there is the transaction request for meeting current limliting judgment rule, unit is obtained
Transaction request quantity in time;Wherein, the current limliting judgment rule is preset;
If judgement knows that the transaction request quantity in the unit time is greater than current limit threshold, refusal is more than the current limit threshold
And meet the transaction request of the current limliting judgment rule.
2. the method according to claim 1, wherein if the judgement is known at least one described transaction request
Include: in the presence of the transaction request for meeting current limliting judgment rule
At least one element of transaction is extracted from the transaction request;Wherein, the element of transaction is preset;
If judgement knows that at least one described element of transaction meets the current limliting judgment rule, it is determined that the transaction request meets
The current limliting judgment rule.
3. the method according to claim 1, wherein the transaction request quantity packet obtained in the unit time
It includes:
It calculates the transaction request quantity forwarded in the unit time and meets the transaction request of the current limliting judgment rule
The sum of quantity, as the transaction request quantity in the unit time.
4. method according to any one of claims 1 to 3, which is characterized in that further include:
Current limliting configuration is received, the current limliting configuration includes element of transaction, the current limliting judgment rule and the current limit threshold.
5. a kind of current-limiting apparatus of distributed server characterized by comprising
First receiving unit, for receiving at least one transaction request;
Judging unit, for knowing that there is the transaction for meeting current limliting judgment rule at least one described transaction request asks in judgement
After asking, the transaction request quantity in the unit time is obtained;Wherein, the current limliting judgment rule is preset;
Refuse unit, for refusing after judgement knows that the transaction request quantity in the unit time is greater than current limit threshold
More than the current limit threshold and meet the transaction request of the current limliting judgment rule.
6. device according to claim 5, which is characterized in that the judging unit includes:
Subelement is extracted, for extracting at least one element of transaction from the transaction request;Wherein, the element of transaction is
It is preset;
Judgment sub-unit, for after judgement knows that at least one described element of transaction meets the current limliting judgment rule, really
The fixed transaction request meets the current limliting judgment rule.
7. device according to claim 5, which is characterized in that the judging unit is specifically used for:
It calculates the transaction request quantity forwarded in the unit time and meets the transaction request of the current limliting judgment rule
The sum of quantity, as the transaction request quantity in the unit time.
8. according to the described in any item devices of claim 5 to 7, which is characterized in that further include:
Second receiving unit, for receiving current limliting configuration, current limliting configuration include element of transaction, the current limliting judgment rule and
The current limit threshold.
9. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor
Machine program, which is characterized in that the processor realizes the step of any one of Claims 1-4 the method when executing described program
Suddenly.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The step of any one of Claims 1-4 the method is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910698896.8A CN110413416B (en) | 2019-07-31 | 2019-07-31 | Current limiting method and device for distributed server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910698896.8A CN110413416B (en) | 2019-07-31 | 2019-07-31 | Current limiting method and device for distributed server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110413416A true CN110413416A (en) | 2019-11-05 |
CN110413416B CN110413416B (en) | 2022-05-17 |
Family
ID=68364539
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910698896.8A Active CN110413416B (en) | 2019-07-31 | 2019-07-31 | Current limiting method and device for distributed server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110413416B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111367645A (en) * | 2020-03-18 | 2020-07-03 | 中国建设银行股份有限公司 | Real-time task scheduling control method, system, equipment and readable storage medium |
CN111709731A (en) * | 2020-06-18 | 2020-09-25 | 深圳前海微众银行股份有限公司 | Transaction processing method and device |
CN112036852A (en) * | 2020-08-25 | 2020-12-04 | 北京达佳互联信息技术有限公司 | Payment processing method and device, server and electronic equipment |
CN112492036A (en) * | 2020-12-01 | 2021-03-12 | 成都颜创启新信息技术有限公司 | Information processing method and device, electronic equipment and storage medium |
CN112600801A (en) * | 2020-12-03 | 2021-04-02 | 深圳奥哲网络科技有限公司 | Flow access control method, equipment and storage medium |
CN112925639A (en) * | 2021-02-10 | 2021-06-08 | 中国工商银行股份有限公司 | Self-adaptive transaction current limiting method, device and system |
CN113434735A (en) * | 2021-06-24 | 2021-09-24 | 未鲲(上海)科技服务有限公司 | Self-adaptive current limiting method, device, server and storage medium |
CN114338811A (en) * | 2021-12-30 | 2022-04-12 | 中国农业银行股份有限公司 | Transaction current limiting method, device, server, storage medium and product |
CN114615073A (en) * | 2022-03-22 | 2022-06-10 | 广州方硅信息技术有限公司 | Access flow control method, device, equipment and medium |
CN115242723A (en) * | 2022-07-20 | 2022-10-25 | 中国银行股份有限公司 | Cross-system current limiting method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070198397A1 (en) * | 2004-02-25 | 2007-08-23 | Patsystems (Uk) Ltd | Electronic Trading System |
CN106375472A (en) * | 2016-09-29 | 2017-02-01 | 北京三快在线科技有限公司 | Access request processing method and apparatus, and server |
CN107592300A (en) * | 2017-08-16 | 2018-01-16 | 中国银行股份有限公司 | A kind of method and system of anti-robot attack |
CN107707488A (en) * | 2017-10-25 | 2018-02-16 | 北京数码视讯支付技术有限公司 | Payment online transaction flow control method, flow limiting server and client |
CN108073465A (en) * | 2017-12-29 | 2018-05-25 | 中国平安人寿保险股份有限公司 | Dynamic current limiting method, Nginx servers, storage medium and device |
CN110011977A (en) * | 2019-03-07 | 2019-07-12 | 北京华安普特网络科技有限公司 | A kind of web portal security defence method |
-
2019
- 2019-07-31 CN CN201910698896.8A patent/CN110413416B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070198397A1 (en) * | 2004-02-25 | 2007-08-23 | Patsystems (Uk) Ltd | Electronic Trading System |
CN106375472A (en) * | 2016-09-29 | 2017-02-01 | 北京三快在线科技有限公司 | Access request processing method and apparatus, and server |
CN107592300A (en) * | 2017-08-16 | 2018-01-16 | 中国银行股份有限公司 | A kind of method and system of anti-robot attack |
CN107707488A (en) * | 2017-10-25 | 2018-02-16 | 北京数码视讯支付技术有限公司 | Payment online transaction flow control method, flow limiting server and client |
CN108073465A (en) * | 2017-12-29 | 2018-05-25 | 中国平安人寿保险股份有限公司 | Dynamic current limiting method, Nginx servers, storage medium and device |
CN110011977A (en) * | 2019-03-07 | 2019-07-12 | 北京华安普特网络科技有限公司 | A kind of web portal security defence method |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111367645B (en) * | 2020-03-18 | 2023-12-22 | 中国建设银行股份有限公司 | Real-time task scheduling control method, system, equipment and readable storage medium |
CN111367645A (en) * | 2020-03-18 | 2020-07-03 | 中国建设银行股份有限公司 | Real-time task scheduling control method, system, equipment and readable storage medium |
CN111709731A (en) * | 2020-06-18 | 2020-09-25 | 深圳前海微众银行股份有限公司 | Transaction processing method and device |
CN112036852A (en) * | 2020-08-25 | 2020-12-04 | 北京达佳互联信息技术有限公司 | Payment processing method and device, server and electronic equipment |
CN112492036A (en) * | 2020-12-01 | 2021-03-12 | 成都颜创启新信息技术有限公司 | Information processing method and device, electronic equipment and storage medium |
CN112600801A (en) * | 2020-12-03 | 2021-04-02 | 深圳奥哲网络科技有限公司 | Flow access control method, equipment and storage medium |
CN112925639A (en) * | 2021-02-10 | 2021-06-08 | 中国工商银行股份有限公司 | Self-adaptive transaction current limiting method, device and system |
CN113434735A (en) * | 2021-06-24 | 2021-09-24 | 未鲲(上海)科技服务有限公司 | Self-adaptive current limiting method, device, server and storage medium |
CN114338811A (en) * | 2021-12-30 | 2022-04-12 | 中国农业银行股份有限公司 | Transaction current limiting method, device, server, storage medium and product |
CN114338811B (en) * | 2021-12-30 | 2024-01-30 | 中国农业银行股份有限公司 | Transaction flow limiting method, device, server, storage medium and product |
CN114615073A (en) * | 2022-03-22 | 2022-06-10 | 广州方硅信息技术有限公司 | Access flow control method, device, equipment and medium |
CN115242723A (en) * | 2022-07-20 | 2022-10-25 | 中国银行股份有限公司 | Cross-system current limiting method and device |
CN115242723B (en) * | 2022-07-20 | 2024-03-01 | 中国银行股份有限公司 | Cross-system current limiting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110413416B (en) | 2022-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413416A (en) | A kind of current-limiting method and device of distributed server | |
CN108540536B (en) | Block chain-based network mass service processing method, equipment and storage medium | |
CN106656932B (en) | Service processing method and device | |
CN109783227B (en) | Task allocation method, device and system and computer readable storage medium | |
CN111008075B (en) | Load balancing system, method, device, equipment and medium | |
CN103546388B (en) | A kind of flow control methods and device | |
CN110433496B (en) | Cloud game resource allocation method, electronic device and storage medium | |
CN104243285B (en) | A kind of method and server of message push | |
CN110458572B (en) | User risk determining method and target risk recognition model establishing method | |
US11978025B2 (en) | Method and device for processing virtual cards | |
CN107347015B (en) | Method, device and system for identifying content distribution network | |
CN105978938A (en) | Service processing equipment service status determining method and scheduling equipment | |
CN108847981A (en) | Distributed computer cloud computing processing method | |
CN110365712A (en) | A kind of defence method and system of distributed denial of service attack | |
CN112769943A (en) | Service processing method and device | |
CN104796876B (en) | OCS, PCEF, PCRF and terminal bandwidth control method | |
CN115421922A (en) | Current limiting method, device, equipment, medium and product of distributed system | |
CN110033166A (en) | Risk identification processing method and processing device | |
CN112037019B (en) | Method and device for allocating self-service equipment of banking outlets | |
CN109493040A (en) | A kind of anti-honeysuckle attack processing method and device based on block chain | |
CN110191362B (en) | Data transmission method and device, storage medium and electronic equipment | |
US12074802B2 (en) | Adaptive rate limiting of flow probes | |
CN113365140B (en) | MP4 online playing method, device, equipment, storage medium and program product | |
CN107809551B (en) | Method for controlling processing load of telecommunication service and related device and system | |
CN113590325A (en) | Hotel distributor interface current limiting method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |