CN110380982A - A kind of flow control methods and relevant apparatus - Google Patents
A kind of flow control methods and relevant apparatus Download PDFInfo
- Publication number
- CN110380982A CN110380982A CN201910701532.0A CN201910701532A CN110380982A CN 110380982 A CN110380982 A CN 110380982A CN 201910701532 A CN201910701532 A CN 201910701532A CN 110380982 A CN110380982 A CN 110380982A
- Authority
- CN
- China
- Prior art keywords
- flow control
- operation system
- processing capacity
- system processing
- assessment cycle
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/29—Flow control; Congestion control using a combination of thresholds
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
This application discloses a kind of flow control methods, the response time including monitoring service request, update flow control assessment cycle based on the response time and predetermined period, and update operation system processing capacity based on updated flow control assessment cycle;Judge to control in assessment cycle in present flow rate, whether the server-side meets operation system processing capacity update condition;If the server-side meets operation system processing capacity update condition, the operation system processing capacity is updated again;Flow control is carried out according to preset flow control strategy when the server-side meets flow control entry condition, and exits flow control when the server-side meets flow control exit criteria.The flow control methods can be improved the adaptive ability of flow control, ensure the precision of flow control.Disclosed herein as well is a kind of volume control device and computer readable storage mediums, all have above-mentioned technical effect.
Description
Technical field
This application involves field of computer technology, in particular to a kind of flow control methods;Further relate to a kind of flow control
Device and computer readable storage medium.
Background technique
In operation system, when the quantity of service request constantly rises and exceeds the design maximum capacity of operation system,
Operation system enters overload.The overload of short time may cause service request and overstock, and service response is slack-off;Prolonged mistake
Load then may cause operation system and paralyse extremely, cause operation system can not normal response service request.For service request mistake
The case where load, currently, the flow control methods based on traffic handing capacity first pass through benchmark test assessment operation system most in advance
Big processing capacity, and then in the actual moving process of operation system, when the quantity of service request is more than maximum processing capability
Just start flow control, refuse the service request exceeded, and after starting flow control, when service request quantity is lower than maximum
When reason ability, flow control is exited.
However, the adaptive ability of the above-mentioned existing flow control methods based on traffic handing capacity is poor, work as business
When configuration change occurs for system, such as work as server-side and hardware dilatation occur, software upgrading, part software and hardware break down software and hardware
When change, the maximum processing capability of operation system may change, and the existing flow control side based on traffic handing capacity
Method but can not flexibly and effectively cope with the change of maximum processing capability, to seriously affect the precision of flow control.
In view of this, how to improve the adaptive ability of flow control, ensure that the precision of flow control has become ability
Field technique personnel technical problem urgently to be resolved.
Summary of the invention
The purpose of the application is to provide a kind of flow control methods, can be improved the adaptive ability of flow control, ensures
The precision of flow control;The another object of the application is to provide a kind of volume control device and computer-readable storage medium
Matter all has above-mentioned technical effect.
In order to solve the above technical problems, this application provides a kind of flow control methods, comprising:
The response time for monitoring service request updates flow control assessment cycle based on the response time and predetermined period
And operation system processing capacity is updated based on updated flow control assessment cycle;
Judge in present flow rate control assessment cycle, whether the server-side, which meets operation system processing capacity, updates item
Part;
If the server-side meets the operation system processing capacity update condition, updated at the operation system again
Reason ability;
Flow control is carried out according to preset flow control strategy when the server-side meets flow control entry condition, and
Flow control is exited when the server-side meets flow control exit criteria.
It is optionally, described that flow control assessment cycle is updated based on the response time and predetermined period, comprising:
According to Tnew=α * ERT
ERT=A+ β * D
A=A+g*Err
Err=M-A
D=D+h (| Err |-D) it obtains the updated value of the flow control assessment cycle and institute is updated based on the updated value
State flow control assessment cycle;
Wherein, the TnewIndicate the updated value of the flow control assessment cycle, the A indicates response time mean value
Estimated value, the g indicate that increment, the M indicate the response time, and the D indicates that mean bias, the h indicate gain, institute
Stating the α and β indicates that coefficient, the ERT indicate estimation transaction time.
Optionally, operation system processing capacity is updated based on updated flow control assessment cycle, comprising:
According toObtain the first updated value of the operation system processing capacity and based on the business
First updated value of system processing capacity updates the operation system processing capacity;
Wherein, the TnewIndicate the updated value of the flow control assessment cycle, ToldIndicate the flow control before updating
The numerical value of assessment cycle processed, the Cnew1Indicate the first updated value of the traffic handing capacity, the ColdIndicate institute before updating
State the numerical value of traffic handing capacity.
Optionally, if the server-side meets operation system processing capacity update condition, the industry is updated again
Business system processing capacity, comprising:
If the server-side meets Δ R >=γ Δ P or S > C, according to Cnew2=λ C+ (1- λ) S obtains the business system
Second updated value of processing capacity of uniting simultaneously updates the operation system processing capacity based on second updated value again;
Wherein, the Δ R indicates received service request quantity and a upper flow in present flow rate control assessment cycle
The difference of received service request quantity in assessment cycle is controlled, the Δ P indicates processing in present flow rate control assessment cycle
Service request quantity and the service request quantity handled in a upper flow control assessment cycle difference, the γ indicates system
Number, the λ indicate that smoothing factor, the S indicate actual treatment speed, and the C indicates the operation system processing before updating again
Ability, the Cnew2Indicate the second updated value of the operation system processing capacity.
Optionally, the flow control entry condition is there is Δ in continuous preset quantity flow control assessment cycle
R≥γΔP;The flow control exit criteria is to exist in continuous preset quantity flow control assessment cycleWherein, the γ with it is describedIndicate coefficient.
Optionally, described to be carried out when the server-side meets flow control entry condition according to preset flow control strategy
Flow control, comprising:
When the server-side meets flow control entry condition, the priority according to the service request carries out flow control
System.
Optionally, flow control is carried out according to the priority of the service request, comprising:
If Δ R≤0.25*C*T, loss priority is the service request of third priority;
If Δ R > 0.5*C*T, loss priority is the service request of third priority and the second priority;
If Δ R > C*T, loss priority is the industry of third priority, the second priority and the first priority
Business request;
Wherein, the T indicates that present flow rate controls assessment cycle, and the C indicates current business system processing capacity.
Optionally, further includes:
Overload error code is controlled to client transmitted traffic after starting flow control, so that the client is receiving
Current limited Control is carried out after stating flow control overload error code.
In order to solve the above technical problems, present invention also provides a kind of volume control devices, comprising:
First update module is based on the response time and predetermined period more for monitoring the response time of service request
New flow controls assessment cycle, and updates operation system processing capacity based on updated flow control assessment cycle;
Judgment module, for judging in present flow rate control assessment cycle, whether the server-side meets at operation system
Manage ability update condition;
Second update module updates again if meeting operation system processing capacity update condition for the server-side
The operation system processing capacity then updates the operation system processing capacity again;
Control module, for when the server-side meets flow control entry condition according to preset flow control strategy into
Row flow control, and flow control is exited when the server-side meets flow control exit criteria.
In order to solve the above technical problems, the computer can present invention also provides a kind of computer readable storage medium
It reads storage medium and is stored with computer program, the computer program is realized as described in any one of the above embodiments when being executed by processor
The step of flow control methods.
Flow control methods provided herein, the response time including monitoring service request, when being based on the response
Between with predetermined period update flow control assessment cycle and based on updated flow control assessment cycle update operation system at
Reason ability;Judge in present flow rate control assessment cycle, whether the server-side meets operation system processing capacity update condition;
If the server-side meets the operation system processing capacity update condition, the operation system processing capacity is updated again;
Flow control is carried out according to preset flow control strategy when the server-side meets flow control entry condition, and works as the clothes
Flow control is exited when meeting flow control exit criteria in business end.As it can be seen that flow control methods provided herein, it can basis
Maximum processing capability, that is, operation system processing capacity of the response condition assessment operation system of service request, realization are accurately flowed
Amount control, has stronger adaptive ability, can preferably cope with operation system configuration change, and stream provided herein
Amount control method adjusts flow control assessment cycle according to the response condition of service request, can effectively avoid flow control starting
It is too fast or too slow.
Volume control device and computer readable storage medium provided herein, all has above-mentioned technical effect.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to institute in the prior art and embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the application
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is a kind of flow diagram of flow control methods provided by the embodiment of the present application;
Fig. 2 is a kind of schematic diagram of volume control device provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide a kind of flow control methods, can be improved the adaptive ability of flow control, ensures
The precision of flow control;Another core of the application is to provide a kind of volume control device and computer-readable storage medium
Matter all has above-mentioned technical effect.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of flow control methods provided by the embodiment of the present application;With reference to
Shown in Fig. 1, which includes:
S101: monitoring the response time of service request, updates flow control assessment week based on response time and predetermined period
Phase, and operation system processing capacity is updated based on updated flow control assessment cycle;
Specifically, flow control methods provided herein are applied to the business middleware of the server-side of operation system,
In operation system operational process, business middleware can real-time monitoring service request response time, the so-called response time, that is, industry
It is engaged in the processing time requested, for from time difference of the service request to finishing service request-reply is received, unit can be the second.
On the basis of the response time of real-time monitoring service request, it is primarily based on response time and predetermined period and updates flow control and comment
Estimate the period.Wherein, the specific value of above-mentioned predetermined period can carry out adaptable setting according to the actual application, to this
Unique restriction is not done in application, for example, in view of OLTP (On-line Transaction Processing, at online things transaction
Reason process) type load the transaction response time usually at 0.1 second or hereinafter, therefore in order to avoid flow control assessment cycle update excessively
Frequently, predetermined period can be set to 10 seconds, i.e., every 10 seconds flow control assessment cycles of update.In addition, being flowed in starting
In the case where amount control, for the service requesting information being dropped, its response time is not monitored.
It is above-mentioned that flow control assessment cycle is updated based on response time and predetermined period in a kind of specific embodiment
It may include according to Tnew=α * ERT, ERT=A+ β * D, A=A+g*Err, Err=M-A, D=D+h (| Err |-D) obtain flow
It controls the updated value of assessment cycle and flow control assessment cycle is updated based on updated value;Wherein, TnewIndicate flow control assessment
The updated value in period, A indicate the estimated value of response time mean value, and g indicates that increment, M indicate the response time, and D indicates mean bias,
H indicates gain, and α and β indicate that coefficient, ERT indicate estimation transaction time.
Specifically, the present embodiment using iterative calculation flow control assessment cycle updated value by the way of, in predetermined period
It is interior, it is every to receive a service request response, the updated value of a flow control assessment cycle is just calculated based on above-mentioned each formula, and
At the end of predetermined period, such as at the end of the predetermined period of 10s, using the updated value that is calculated for the last time as final
Flow control assessment cycle updated value, and flow control is updated based on this final updated value after predetermined period and is commented
Estimate the period.Terminating current 10s, into after next 10s, is being again based on above-mentioned each formula and calculates updated value and flowed
The update of amount control assessment cycle updates a flow control assessment cycle every 10s to realize.Wherein, factor alpha and coefficient
The numerical value of β can carry out otherness setting according to the actual application, for example, factor alpha is 10, factor beta 4.When A indicates response
Between mean value estimated value, the initialization value of A can be the initialization value+0.5 of response time M;D indicates mean bias, and D's is initial
Change value can be the half of the initialization value of A;Increment g and gain h may respectively be 0.125 and 0.25.
On the basis of updating flow control assessment cycle, further, more based on updated flow control assessment cycle
New business system processing capacity.I.e. every update for completing a flow control assessment cycle, just updates a business system accordingly
System processing capacity.
It is above-mentioned to be updated at operation system based on updated flow control assessment cycle in a kind of specific embodiment
Reason ability may include basisObtain the first updated value of operation system processing capacity and based on business system
First updated value of processing capacity of uniting updates operation system processing capacity;Wherein, wherein TnewIndicate flow control assessment cycle
Updated value, ToldIndicate the numerical value of flow control assessment cycle before updating, Cnew1Indicate that the first of traffic handing capacity updates
Value, ColdIndicate the numerical value of traffic handing capacity before updating.
S102: judging in present flow rate control assessment cycle, and whether server-side, which meets operation system processing capacity, updates item
Part;
S103: if server-side meets operation system processing capacity update condition, operation system processing capacity is updated again;
Specifically, judging whether to business after the first time that this step has been intended to rear operation system processing capacity updates
The update again of processing capacity, specifically, judging in present flow rate control assessment cycle, whether server-side meets operation system
Ability update condition, and work as server-side and meet operation system processing capacity update condition, operation system processing capacity is updated again.
On the contrary, no longer updating industry at the end of present flow rate controls assessment cycle if server-side is unsatisfactory for operation system processing capacity
Business system processing capacity.
Wherein, in a kind of specific embodiment, if above-mentioned server-side meets operation system processing capacity update condition,
If then updating operation system processing capacity again may include that server-side meets Δ R >=γ Δ P or S > C, according to Cnew2=λ C
+ (1- λ) S obtains the second updated value of operation system processing capacity and updates operation system processing energy again based on the second updated value
Power;Wherein, Δ R indicates received service request quantity and upper flow control assessment week in present flow rate control assessment cycle
The difference of received service request quantity in phase, Δ P indicate the service request quantity handled in present flow rate control assessment cycle
With the difference of the service request quantity handled in a upper flow control assessment cycle, γ indicates that coefficient, λ indicate smoothing factor, S
Indicate actual treatment speed, C indicates the operation system processing capacity before updating again, Cnew2Indicate operation system processing capacity
Second updated value.
Specifically, operation system processing capacity update condition includes Δ R >=γ Δ P and S > C, server-side in the present embodiment
When meeting above-mentioned any one operation system processing capacity update condition, just at the end of present flow rate controls assessment cycle again
Update operation system processing capacity.Wherein, coefficient gamma can be 1.5, and smoothing factor λ can be 0.9.Actual treatment speed S=
Δ P/ Δ t, Δ t are the difference that present flow rate controlled assessment cycle and a upper flow control assessment cycle.
S104: carrying out flow control according to preset flow control strategy when server-side meets flow control entry condition,
And flow control is exited when server-side meets flow control exit criteria.
Specifically, during operation system operation, once server-side meets flow control entry condition, just according to pre-
If flow control policy carries out flow control, and after starting flow control, when server-side meets flow control exit criteria
Exit flow control.
Wherein, in a kind of specific embodiment, above-mentioned flow control entry condition can be continuous preset quantity
There is Δ R >=γ Δ P in flow control assessment cycle;Flow control exit criteria is that continuous preset quantity flow control is commented
Estimate in the period and existsWherein, γ withIndicate coefficient.
Specifically, the specific value of above-mentioned preset quantity can be configured according to the actual application, for example, can be
3, coefficient lambda withMay respectively be 1.5 withThen flow control entry condition is specially continuous 3 flow controls assessment week
There is the Δ P of Δ R >=1.5 in phase, flow control exit criteria is to exist in continuous 3 flow control assessment cycles
In addition, the above-mentioned foundation when server-side meets flow control entry condition is pre- in a kind of specific embodiment
If it may include when server-side meets flow control entry condition, according to service request that flow control policy, which carries out flow control,
Priority carry out flow control.
Specifically, can the factors such as importance, resource consumption according to service request, priority is carried out to service request and is drawn
Point, so that the priority according to service request carries out flow control after starting flow control, to realize the same of flow control
When, improve the performance of operation system.
Further, on the basis of the above embodiments, above-mentioned according to service request as a kind of specific embodiment
If it may include: Δ R≤0.25*C*T that priority, which carries out flow control, loss priority is that the business of third priority is asked
It asks;If Δ R > 0.5*C*T, loss priority is the service request of third priority and the second priority;If Δ R > C*T,
Then loss priority is the service request of third priority, the second priority and the first priority;Wherein, T indicates current stream
Amount control assessment cycle, C indicate current business system processing capacity.
Specifically, there are three types of priority for the present embodiment setting, i.e. the first priority, the second priority and third are preferential
Grade, the first priority therein are high priority, and the second priority is high medium priority, and third priority is high priority.Into
And as Δ R≤0.25*C*T, loss priority is the service request of third priority;It is abandoned as Δ R > 0.5*C*T excellent
First grade is the service request of third priority and the second priority;As Δ R > C*T, loss priority is third priority, the
The service request of two priority and the first priority abandons all service requests.
Further, the executing subject of flow control methods provided by the various embodiments described above is server-side, in order into one
Step improves the control performance of flow, and in a kind of specific embodiment, which further includes starting flow control
Backward client transmitted traffic control overload error code, so that client is limited after receiving flow control overload error code
Flow control.
Specifically, the present embodiment while server-side carries out flow control, increases client and carries out flow control, work as clothes
It is engaged in after the starting flow control of end, server-side can control overload error code via the interface transmitted traffic of server-side and client, into
And client is set to carry out preliminary current limliting processing after detecting flow control overload error code, such as client is by the industry of sending
The quantity control of business request is at twice or so of the service response received.
In conclusion flow control methods provided herein, can assess business according to the response condition of service request
The maximum processing capability of system, that is, operation system processing capacity, realize it is accurate carry out flow control, have it is stronger it is adaptive should be able to
Power can preferably cope with operation system configuration change, and flow control methods provided herein, according to service request
Response condition adjusts flow control assessment cycle, and it is too fast or too slow to can effectively avoid flow control starting.
Present invention also provides a kind of volume control device, the device described below can be with method as described above phase
Mutually to should refer to.It please refers to shown in Fig. 2, which includes:
First update module 10 is updated for monitoring the response time of service request based on response time and predetermined period
Flow control assessment cycle, and operation system processing capacity is updated based on updated flow control assessment cycle;
Judgment module 20, for judging in present flow rate control assessment cycle, whether server-side meets operation system processing
Ability update condition;
Second update module 30 updates industry if meeting operation system processing capacity update condition for server-side again
Business system processing capacity, then update operation system processing capacity again;
Control module 40, for being carried out when server-side meets flow control entry condition according to preset flow control strategy
Flow control, and flow control is exited when server-side meets flow control exit criteria.
On the basis of the above embodiments, optionally, the first update module 10 is specifically used for according to Tnew=α * ERT, ERT
=A+ β * D, A=A+g*Err, Err=M-A, D=D+h (| Err |-D) it obtains the updated value of flow control assessment cycle and is based on
Updated value updates flow control assessment cycle;Wherein, TnewIndicate the updated value of flow control assessment cycle, A indicates the response time
The estimated value of mean value, g indicate that increment, M indicate the response time, and D indicates that mean bias, h indicate gain, and α and β indicate coefficient, ERT
Indicate estimation transaction time.
On the basis of the above embodiments, the first update module 10 is specifically used for basisObtain business
First updated value of system processing capacity and the first updated value based on operation system processing capacity update operation system and handle energy
Power;Wherein, TnewIndicate the updated value of flow control assessment cycle, ToldIndicate the numerical value of flow control assessment cycle before updating,
Cnew1Indicate the first updated value of traffic handing capacity, ColdIndicate the numerical value of traffic handing capacity before updating.
On the basis of the above embodiments, optionally, if the second update module 30 is specifically used for server-side and meets Δ R >=γ
Δ P or S > C, then according to Cnew2=λ C+ (1- λ) S obtains the second updated value of operation system processing capacity and updates based on second
Value updates operation system processing capacity again;Wherein, Δ R indicates received service request number in present flow rate control assessment cycle
The difference of amount and received service request quantity in a upper flow control assessment cycle, Δ P indicate present flow rate control assessment
The difference of the service request quantity handled in the service request quantity handled in period and a upper flow control assessment cycle, γ
Indicating that coefficient, λ indicate that smoothing factor, S indicate actual treatment speed, C indicates the operation system processing capacity before updating again,
Cnew2Indicate the second updated value of operation system processing capacity.
On the basis of the above embodiments, optionally, control module 40 is specifically used for opening when server-side meets flow control
When dynamic condition, the priority according to service request carries out flow control.
On the basis of the above embodiments, further includes:
Sending module controls overload error code to client transmitted traffic after flow control for starting, so that client
Current limited Control is carried out after receiving flow control overload error code.
Present invention also provides a kind of computer readable storage medium, calculating is stored on the computer readable storage medium
Machine program, the computer program realize following step when being executed by processor:
The response time for monitoring service request updates flow control assessment cycle based on response time and predetermined period, and
Operation system processing capacity is updated based on updated flow control assessment cycle;Judge in present flow rate control assessment cycle,
Whether server-side meets operation system processing capacity update condition;If server-side meets operation system processing capacity update condition,
Operation system processing capacity is then updated again;When server-side meets flow control entry condition according to preset flow control strategy
Flow control is carried out, and exits flow control when server-side meets flow control exit criteria.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-OnlyMemory,
ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
Above method embodiment is please referred to for the introduction of computer readable storage medium provided by the present invention, the present invention
This will not be repeated here.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment, set
For standby and computer readable storage medium, since it is corresponded to the methods disclosed in the examples, so the comparison of description is simple
Single, reference may be made to the description of the method.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Flow control methods provided herein, device and computer readable storage medium have been carried out in detail above
It introduces.Specific examples are used herein to illustrate the principle and implementation manner of the present application, the explanation of above embodiments
It is merely used to help understand the present processes and its core concept.It should be pointed out that for the ordinary skill people of the art
Member for, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improve and
Modification also falls into the protection scope of the claim of this application.
Claims (10)
1. a kind of flow control methods, which is characterized in that be applied to server-side, comprising:
The response time for monitoring service request updates flow control assessment cycle based on the response time and predetermined period, and
Operation system processing capacity is updated based on updated flow control assessment cycle;
Judge in present flow rate control assessment cycle, whether the server-side meets operation system processing capacity update condition;
If the server-side meets the operation system processing capacity update condition, the operation system processing energy is updated again
Power;
Flow control is carried out according to preset flow control strategy when the server-side meets flow control entry condition, and works as institute
It states when server-side meets flow control exit criteria and exits flow control.
2. flow control methods according to claim 1, which is characterized in that described based on the response time and default week
Phase updates flow control assessment cycle, comprising:
According to Tnew=α * ERT
ERT=A+ β * D
A=A+g*Err
Err=M-A
D=D+h (| Err |-D) it obtains the updated value of the flow control assessment cycle and the stream is updated based on the updated value
Amount control assessment cycle;
Wherein, the TnewIndicate the updated value of the flow control assessment cycle, the A indicates the estimation of response time mean value
Value, the g indicate that increment, the M indicate the response time, and the D indicates that mean bias, the h indicate gain, the α
Indicate that coefficient, the ERT indicate estimation transaction time with the β.
3. flow control methods according to claim 2, which is characterized in that be based on updated flow control assessment cycle
Update operation system processing capacity, comprising:
According toObtain the first updated value of the operation system processing capacity and based on the operation system
First updated value of processing capacity updates the operation system processing capacity;
Wherein, the TnewIndicate the updated value of the flow control assessment cycle, ToldIndicate that the flow control is commented before updating
Estimate the numerical value in period, the Cnew1Indicate the first updated value of the traffic handing capacity, the ColdIndicate the industry before updating
The numerical value for processing capacity of being engaged in.
4. flow control methods according to claim 3, which is characterized in that if the server-side meets operation system
Processing capacity update condition then updates the operation system processing capacity again, comprising:
If the server-side meets Δ R >=γ Δ P or S > C, according to Cnew2=λ C+ (1- λ) S obtains the operation system processing
Second updated value of ability simultaneously updates the operation system processing capacity based on second updated value again;
Wherein, the Δ R indicates received service request quantity and a upper flow control in present flow rate control assessment cycle
The difference of received service request quantity in assessment cycle, the Δ P indicate the industry handled in present flow rate control assessment cycle
The difference of the service request quantity handled in number of requests of being engaged in and a upper flow control assessment cycle, the γ indicate coefficient,
The λ indicates that smoothing factor, the S indicate actual treatment speed, and the C indicates that the operation system before updating again handles energy
Power, the Cnew2Indicate the second updated value of the operation system processing capacity.
5. flow control methods according to claim 4, which is characterized in that the flow control entry condition is continuous pre-
If there is Δ R >=γ Δ P in quantity flow control assessment cycle;The flow control exit criteria is continuous preset quantity
Exist in a flow control assessment cycleWherein, the γ with it is describedIndicate coefficient.
6. flow control methods according to any one of claims 1 to 5, which is characterized in that described when the server-side is full
Flow control is carried out according to preset flow control strategy when sufficient flow control entry condition, comprising:
When the server-side meets flow control entry condition, the priority according to the service request carries out flow control.
7. flow control methods according to claim 6, which is characterized in that the priority according to the service request carries out
Flow control, comprising:
If Δ R≤0.25*C*T, loss priority is the service request of third priority;
If Δ R > 0.5*C*T, loss priority is the service request of third priority and the second priority;
If Δ R > C*T, loss priority is that the business of third priority, the second priority and the first priority is asked
It asks;
Wherein, the T indicates that present flow rate controls assessment cycle, and the C indicates current business system processing capacity.
8. flow control methods according to claim 7, which is characterized in that further include:
Overload error code is controlled to client transmitted traffic after starting flow control, so that the client is receiving the stream
Current limited Control is carried out after amount control overload error code.
9. a kind of volume control device characterized by comprising
First update module is updated based on the response time and predetermined period and is flowed for monitoring the response time of service request
Amount control assessment cycle, and operation system processing capacity is updated based on updated flow control assessment cycle;
Judgment module, for judging in present flow rate control assessment cycle, whether the server-side meets operation system processing energy
Power update condition;
Second update module, if meeting operation system processing capacity update condition for the server-side, again described in update
Operation system processing capacity then updates the operation system processing capacity again;
Control module, for being flowed when the server-side meets flow control entry condition according to preset flow control strategy
Amount control, and flow control is exited when the server-side meets flow control exit criteria.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence, the computer program realize the step of flow control methods as claimed in any one of claims 1 to 8 when being executed by processor
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910701532.0A CN110380982B (en) | 2019-07-31 | 2019-07-31 | Flow control method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910701532.0A CN110380982B (en) | 2019-07-31 | 2019-07-31 | Flow control method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110380982A true CN110380982A (en) | 2019-10-25 |
CN110380982B CN110380982B (en) | 2022-10-14 |
Family
ID=68257281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910701532.0A Active CN110380982B (en) | 2019-07-31 | 2019-07-31 | Flow control method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110380982B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111966502A (en) * | 2020-09-21 | 2020-11-20 | 北京百度网讯科技有限公司 | Method and device for adjusting number of instances, electronic equipment and readable storage medium |
CN113079189A (en) * | 2020-01-03 | 2021-07-06 | 中国移动通信集团广东有限公司 | Capacity control method and device for capacity open platform and electronic equipment |
WO2023240506A1 (en) * | 2022-06-15 | 2023-12-21 | 北京小米移动软件有限公司 | Request processing method and apparatus, server, and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1780265A (en) * | 2004-11-17 | 2006-05-31 | 华为技术有限公司 | Flow controlling method for message system |
CN103957251A (en) * | 2014-04-28 | 2014-07-30 | 迈普通信技术股份有限公司 | Method and system for achieving server load balancing |
CN108282501A (en) * | 2017-01-05 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of Cloud Server resource information synchronous method, device and system |
CN108574727A (en) * | 2018-03-07 | 2018-09-25 | 天津麒麟信息技术有限公司 | A kind of improved load balance scheduling system based on platform of soaring |
WO2018227157A1 (en) * | 2017-06-09 | 2018-12-13 | University Of Southern California | Adaptive traffic control |
CN110032576A (en) * | 2019-03-12 | 2019-07-19 | 平安科技(深圳)有限公司 | A kind of method for processing business and device |
-
2019
- 2019-07-31 CN CN201910701532.0A patent/CN110380982B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1780265A (en) * | 2004-11-17 | 2006-05-31 | 华为技术有限公司 | Flow controlling method for message system |
CN103957251A (en) * | 2014-04-28 | 2014-07-30 | 迈普通信技术股份有限公司 | Method and system for achieving server load balancing |
CN108282501A (en) * | 2017-01-05 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of Cloud Server resource information synchronous method, device and system |
WO2018227157A1 (en) * | 2017-06-09 | 2018-12-13 | University Of Southern California | Adaptive traffic control |
CN108574727A (en) * | 2018-03-07 | 2018-09-25 | 天津麒麟信息技术有限公司 | A kind of improved load balance scheduling system based on platform of soaring |
CN110032576A (en) * | 2019-03-12 | 2019-07-19 | 平安科技(深圳)有限公司 | A kind of method for processing business and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113079189A (en) * | 2020-01-03 | 2021-07-06 | 中国移动通信集团广东有限公司 | Capacity control method and device for capacity open platform and electronic equipment |
CN113079189B (en) * | 2020-01-03 | 2023-04-25 | 中国移动通信集团广东有限公司 | Capacity control method and device of capacity open platform and electronic equipment |
CN111966502A (en) * | 2020-09-21 | 2020-11-20 | 北京百度网讯科技有限公司 | Method and device for adjusting number of instances, electronic equipment and readable storage medium |
WO2023240506A1 (en) * | 2022-06-15 | 2023-12-21 | 北京小米移动软件有限公司 | Request processing method and apparatus, server, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110380982B (en) | 2022-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110380982A (en) | A kind of flow control methods and relevant apparatus | |
CN110099009B (en) | Dynamic current limiting method based on interface response time trend and computer readable medium | |
CN109936511B (en) | Token obtaining method, device, server, terminal equipment and medium | |
US20120173709A1 (en) | Seamless scaling of enterprise applications | |
EP3758325B1 (en) | Traffic limiting method, node and system | |
CN109144700A (en) | Determination method, apparatus, server and the data processing method of overtime duration | |
US8966086B2 (en) | License redistributing method, moderator and license controlling system thereof | |
JP6081812B2 (en) | Demand response request device, demand response request method, program, and electric vehicle management system | |
EP3262587B1 (en) | Adaptive quota management system | |
CN112422440B (en) | Flow control method applied to server and related device | |
CN112068934B (en) | Control system and method for shrinking container cloud service instance | |
CN108984288A (en) | Thread pool capacity adjustment method, device and equipment based on system response time | |
CN106464733A (en) | Method and device for adjusting virtual resources in cloud computing | |
CN104820616A (en) | Task scheduling method and device | |
JP2003084856A (en) | Device for changing processing performance of computer | |
JP5459579B2 (en) | Job management system, method and program thereof | |
CN103442087B (en) | A kind of Web service system visit capacity based on response time trend analysis controls apparatus and method | |
JP2013200615A (en) | Virtual machine movement control system, virtual machine movement method, and program | |
JP4008699B2 (en) | Method for service level estimation in an operating computer system | |
CN108920264A (en) | A kind of command timeout processing method and system | |
JP6031051B2 (en) | Job execution planning device | |
CN112822119B (en) | Flow control method, flow control equipment and storage medium based on reverse token bucket | |
CN110727518B (en) | Data processing method and related equipment | |
CN106131187B (en) | Authorization control method and device | |
CN109495588A (en) | Task processing method, device, computer equipment and the storage medium of front end processor |
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 |