CN110380982B - Flow control method and related device - Google Patents

Flow control method and related device Download PDF

Info

Publication number
CN110380982B
CN110380982B CN201910701532.0A CN201910701532A CN110380982B CN 110380982 B CN110380982 B CN 110380982B CN 201910701532 A CN201910701532 A CN 201910701532A CN 110380982 B CN110380982 B CN 110380982B
Authority
CN
China
Prior art keywords
flow control
updating
service system
evaluation period
service
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.)
Active
Application number
CN201910701532.0A
Other languages
Chinese (zh)
Other versions
CN110380982A (en
Inventor
陈炽卉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Power Commercial Systems Co Ltd
Original Assignee
Inspur Power Commercial Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Power Commercial Systems Co Ltd filed Critical Inspur Power Commercial Systems Co Ltd
Priority to CN201910701532.0A priority Critical patent/CN110380982B/en
Publication of CN110380982A publication Critical patent/CN110380982A/en
Application granted granted Critical
Publication of CN110380982B publication Critical patent/CN110380982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow 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

The application discloses a flow control method, which comprises the steps of monitoring the response time of a service request, updating a flow control evaluation period based on the response time and a preset period, and updating the processing capacity of a service system based on the updated flow control evaluation period; judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period; if the server side meets the service system processing capacity updating condition, updating the service system processing capacity again; and when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits. The flow control method can improve the self-adaptive capacity of flow control and guarantee the accuracy of flow control. The application also discloses a flow control device and a computer readable storage medium, which have the technical effects.

Description

Flow control method and related device
Technical Field
The present application relates to the field of computer technology, and in particular, to a flow control method; it also relates to a flow control device and a computer readable storage medium.
Background
In a traffic system, when the number of traffic requests is increasing beyond the maximum design capacity of the traffic system, the traffic system enters an overload state. Short-time overload may cause backlog of service requests and slow service response; the long-time overload may cause abnormal paralysis of the service system, so that the service system cannot respond to the service request normally. For the condition of service request overload, currently, a traffic control method based on service processing capability evaluates the maximum processing capability of a service system in advance through a benchmark test, and then in the actual operation process of the service system, when the number of service requests exceeds the maximum processing capability, the traffic control is started, the exceeded service requests are rejected, and after the traffic control is started, when the number of service requests is lower than the maximum processing capability, the traffic control is exited.
However, the above existing traffic control method based on service processing capability has poor adaptive capability, and when a configuration of a service system is changed, for example, when a service end has software and hardware changes, such as hardware expansion, software upgrade, and a failure of part of the software and hardware, the maximum processing capability of the service system may be changed, but the existing traffic control method based on service processing capability cannot flexibly and effectively cope with the change of the maximum processing capability, thereby seriously affecting the accuracy of traffic control.
In view of this, how to improve the adaptive capability of flow control and ensure the accuracy of flow control has become a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a flow control method, which can improve the self-adaptive capacity of flow control and ensure the accuracy of flow control; it is another object of the present application to provide a flow control device and a computer readable storage medium, each having the above technical effects.
In order to solve the above technical problem, the present application provides a flow control method, including:
monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period;
judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period;
if the server side meets the updating condition of the processing capacity of the service system, updating the processing capacity of the service system again;
and when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits.
Optionally, the updating the flow control evaluation period based on the response time and the preset period includes:
according to T new =α*ERT
ERT=A+β*D
A=A+g*Err
Err=M-A
D = D + h (| Err | -D) obtaining an updated value of the flow control evaluation period and updating the flow control evaluation period based on the updated value;
wherein, T is new An updated value representing the flow control evaluation period, A represents an estimated value of a mean of response times, g represents an increment, M represents the response time, D represents a mean deviation, h represents a gain, and a is compared with the gainBeta represents a coefficient and the ERT represents an estimated transaction time.
Optionally, updating the processing capability of the service system based on the updated flow control evaluation period includes:
according to
Figure BDA0002150952150000021
Obtaining a first updated value of the processing capacity of the service system and updating the processing capacity of the service system based on the first updated value of the processing capacity of the service system;
wherein, the T is new An updated value, T, representing said flow control evaluation period old A value representing the flow control evaluation period before update, said C new1 A first update value representing said service handling capacity, said Co ld A value representing the business processing capability before updating.
Optionally, if the service end satisfies a service system processing capability update condition, updating the service system processing capability again includes:
if the server side meets the condition that delta R is more than or equal to gamma delta P or S is more than C, according to C new2 = λ C + (1- λ) S gets a second updated value of the service system processing capability and updates the service system processing capability again based on the second updated value;
wherein Δ R represents a difference between the number of service requests received in the current flow control evaluation period and the number of service requests received in the previous flow control evaluation period, Δ P represents a difference between the number of service requests processed in the current flow control evaluation period and the number of service requests processed in the previous flow control evaluation period, γ represents a coefficient, λ represents a smoothing factor, S represents an actual processing speed, C represents a service system processing capacity before re-update, and C represents a service system processing capacity before re-update new2 A second updated value representing the processing capacity of the business system.
Optionally, the flow control starting condition is that Δ R is greater than or equal to γ Δ P in a preset number of flow control evaluation periods; the flow control exit condition is a continuous preset numberAll exist in a flow control evaluation period
Figure BDA0002150952150000031
Wherein said γ is different from said
Figure BDA0002150952150000032
The coefficients are represented.
Optionally, when the server side meets the flow control starting condition, performing flow control according to a preset flow control policy, including:
and when the service end meets the flow control starting condition, carrying out flow control according to the priority of the service request.
Optionally, the performing flow control according to the priority of the service request includes:
if Δ R is less than or equal to 0.25 × c × t, discarding the service request with the priority of the third priority;
if Δ R > 0.5 × c × t, discarding the service requests with priorities of the third priority and the second priority;
if Δ R > C × T, discarding the service request with the priority of the third priority, the second priority and the first priority;
wherein, the T represents the current flow control evaluation period, and the C represents the current service system processing capacity.
Optionally, the method further includes:
and sending a flow control overload error code to a client after starting flow control so that the client performs flow control limitation after receiving the flow control overload error code.
In order to solve the above technical problem, the present application further provides a flow control device, including:
the first updating module is used for monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period;
the judging module is used for judging whether the server side meets the updating condition of the processing capacity of the service system in the current flow control evaluation period;
the second updating module is used for updating the processing capacity of the service system again if the service end meets the updating condition of the processing capacity of the service system, and updating the processing capacity of the service system again;
and the control module is used for carrying out flow control according to a preset flow control strategy when the server side meets the flow control starting condition and quitting the flow control when the server side meets the flow control quitting condition.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the flow control method according to any one of the above.
The flow control method comprises the steps of monitoring the response time of a service request, updating a flow control evaluation period based on the response time and a preset period, and updating the processing capacity of a service system based on the updated flow control evaluation period; judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period; if the server side meets the updating condition of the processing capacity of the business system, the processing capacity of the business system is updated again; and when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits. Therefore, the flow control method provided by the application can evaluate the maximum processing capacity of the service system, namely the processing capacity of the service system, according to the response condition of the service request, realize accurate flow control, has strong self-adaptive capacity, and can better cope with the configuration change of the service system.
The flow control device and the computer readable storage medium provided by the application have the technical effects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the prior art and the embodiments are briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a flow control method according to an embodiment of the present disclosure;
fig. 2 is a schematic view of a flow control device according to an embodiment of the present disclosure.
Detailed Description
The core of the application is to provide a flow control method which can improve the self-adaptive capacity of flow control and ensure the accuracy of flow control; another core of the present application is to provide a flow control apparatus and a computer readable storage medium, which have the above technical effects.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a flow control method according to an embodiment of the present disclosure; referring to fig. 1, the flow control method includes:
s101: monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period;
specifically, the traffic control method provided by the present application is applied to a service middleware at a service end of a service system, and during an operation process of the service system, the service middleware may monitor a response time of a service request in real time, where the response time is a processing time of the service request, and is a time difference from receiving the service request to completing a service request response, and a unit of the processing time may be second. On the basis of monitoring the response time of the service request in real time, the flow control evaluation period is updated based on the response time and the preset period. For example, since the On-line Transaction Processing (OLTP) type load Transaction response time is usually 0.1 second or less, the preset period may be set to 10 seconds, that is, the flow control evaluation period is updated every 10 seconds in order to avoid that the flow control evaluation period is updated too frequently. In addition, when flow control is started, the response time of the discarded service request information is not monitored.
In a specific embodiment, the updating the flow control evaluation period based on the response time and the preset period may include updating the flow control evaluation period according to T new -ERT = a + β + D, a = a + g + Err, err = M-a, D = D + h (| Err | -D) obtaining an updated value of the flow control evaluation period and updating the flow control evaluation period based on the updated value; wherein, T new Represents the updated value of the flow control evaluation period, a represents the estimated value of the mean value of the response time, g represents the increment, M represents the response time, D represents the mean deviation, h represents the gain, α and β represent the coefficients, and ERT represents the estimated transaction time.
Specifically, in this embodiment, a manner of iteratively calculating an update value of a flow control evaluation period is adopted, in a preset period, each time a service request response is received, an update value of the flow control evaluation period is calculated based on the above formulas, and when the preset period ends, for example, when the preset period of 10s ends, the update value obtained by the last calculation is used as a final update value of the flow control evaluation period, and after the preset period ends, the flow control evaluation period is updated based on the final update value. After the current 10s is finished and the next 10s is entered, the updating value is calculated again based on the above formulas and the updating of the flow control evaluation period is performed, so that the flow control evaluation period is updated every 10 s. The values of the coefficient α and the coefficient β may be set differently according to practical application requirements, for example, the coefficient α is 10, and the coefficient β is 4.A represents the estimated value of the mean value of the response time, and the initialized value of A can be the initialized value of the response time M plus 0.5; d represents the mean deviation, and the initialized value of D can be one half of the initialized value of A; the increment g and gain h may be 0.125 and 0.25, respectively.
And on the basis of updating the flow control evaluation period, further updating the processing capacity of the service system based on the updated flow control evaluation period. Namely, each time the updating of the flow control evaluation period is completed, the processing capacity of the service system is correspondingly updated.
In a specific embodiment, the evaluating the periodic update of the processing capacity of the business system based on the updated flow control may include evaluating the periodic update of the processing capacity of the business system based on the updated flow control
Figure BDA0002150952150000061
Obtaining a first update value of the processing capacity of the service system and updating the processing capacity of the service system based on the first update value of the processing capacity of the service system; wherein, T is new Updated value, T, representing flow control evaluation period old A value representing a flow control evaluation period before update, C new1 A first update value, C, representing the traffic handling capacity old A value representing the traffic handling capacity before updating.
S102: judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period;
s103: if the server side meets the updating condition of the processing capacity of the service system, the processing capacity of the service system is updated again;
specifically, the step is to determine whether to perform the re-update of the service processing capability after the first update of the processing capability of the service system, specifically, determine whether the service end satisfies the service system capability update condition in the current flow control evaluation period, and update the processing capability of the service system again when the service end satisfies the service system processing capability update condition. On the contrary, if the service end does not satisfy the processing capacity of the service system, the processing capacity of the service system is not updated when the current flow control evaluation period is finished.
In a specific embodiment, if the service end satisfies the service system processing capability updating condition, then updating the service system processing capability again may include if the service end satisfies Δ R ≧ γ Δ P or S > C, according to C new2 = λ C + (1- λ) S gets a second updated value of the service system processing capacity and updates the service system processing capacity again based on the second updated value; wherein Δ R represents a difference between the number of service requests received in the current flow control evaluation period and the number of service requests received in the previous flow control evaluation period, Δ P represents a difference between the number of service requests processed in the current flow control evaluation period and the number of service requests processed in the previous flow control evaluation period, γ represents a coefficient, λ represents a smoothing factor, S represents an actual processing speed, C represents a processing capability of a service system before re-update, and C represents a processing capability of a service system before re-update new2 A second updated value representing the processing power of the business system.
Specifically, in this embodiment, the service system processing capability updating condition includes that Δ R is greater than or equal to γ Δ P and S is greater than C, and when the server side meets any one of the service system processing capability updating conditions, the service system processing capability is updated again when the current flow control evaluation period is finished. Wherein the coefficient γ may be 1.5 and the smoothing factor λ may be 0.9. The actual processing speed S = Δ P/Δ t, Δ t being a difference between the current flow control evaluation period and the previous flow control evaluation period.
S104: and when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits.
Specifically, in the process of operating the service system, once the service end meets the flow control starting condition, the flow control is performed according to a preset flow control strategy, and after the flow control is started, the flow control is exited when the service end meets the flow control exiting condition.
In a specific embodiment, the flow control starting condition may be that Δ R is greater than or equal to γ Δ P in a preset number of flow control evaluation periods; the flow control exit condition is that the flow control exit conditions exist in a continuous preset number of flow control evaluation periods
Figure BDA0002150952150000071
Wherein, gamma is in combination with
Figure BDA0002150952150000072
The coefficients are represented.
Specifically, the specific value of the preset number may be set according to the actual application requirement, for example, the number of the preset number may be 3, and the coefficients λ and λ
Figure BDA0002150952150000073
Can be respectively 1.5 and
Figure BDA0002150952150000074
the flow control starting condition is that Δ R is greater than or equal to 1.5 Δ P in 3 continuous flow control evaluation periods, and the flow control quitting condition is that Δ R is greater than or equal to 1.5 Δ P in 3 continuous flow control evaluation periods
Figure BDA0002150952150000075
In addition, in a specific embodiment, the performing, when the server side meets the flow control starting condition, flow control according to a preset flow control policy may include performing, when the server side meets the flow control starting condition, flow control according to a priority of the service request.
Specifically, the service request can be prioritized according to factors such as importance and resource consumption of the service request, so that after the flow control is started, the flow control is performed according to the priority of the service request, and the performance of a service system is improved while the flow control is realized.
Further, on the basis of the foregoing embodiment, as a specific implementation manner, the performing flow control according to the priority of the service request may include: if the delta R is less than or equal to 0.25C T, the service request with the priority of the third priority is discarded; if Δ R > 0.5 × c × t, discarding the service requests with the priorities of the third priority and the second priority; if delta R is more than C x T, discarding the service requests with the priorities of the third priority, the second priority and the first priority; wherein, T represents the current flow control evaluation period, and C represents the current service system processing capacity.
Specifically, the present embodiment is provided with three priorities, namely, a first priority, a second priority and a third priority, where the first priority is a high priority, the second priority is a medium priority, and the third priority is a high priority. Further, when Δ R is less than or equal to 0.25 × c × t, discarding the service request with the priority of the third priority; when the delta R is more than 0.5C T, the service requests with the priorities of the third priority and the second priority are discarded; and when the delta R is more than C, the service requests with the priorities of the third priority, the second priority and the first priority are discarded, namely all the service requests are discarded.
Further, all the execution main bodies of the flow control method provided in the foregoing embodiments are service ends, and in order to further improve the performance of controlling the flow, in a specific implementation manner, the flow control method further includes sending a flow control overload error code to the client after starting the flow control, so that the client performs flow control limitation after receiving the flow control overload error code.
Specifically, in this embodiment, when the server performs flow control, the client is added to perform flow control, and after the server starts flow control, the server may send a flow control overload error code through an interface between the server and the client, so that the client performs preliminary flow limiting processing after detecting the flow control overload error code, for example, the client controls the number of the sent service requests to be about twice of the received service responses.
In summary, the flow control method provided by the present application can evaluate the maximum processing capability of the service system, i.e., the processing capability of the service system, according to the response condition of the service request, so as to implement accurate flow control, have strong adaptive capability, and better cope with the configuration change of the service system.
The present application also provides a flow control device, which is described below and to which the above-described method may be mutually referenced. Referring to fig. 2, the flow control device includes:
a first updating module 10, configured to monitor response time of the service request, update the flow control evaluation period based on the response time and a preset period, and update processing capability of the service system based on the updated flow control evaluation period;
the judging module 20 is configured to judge whether the service end satisfies a service system processing capability updating condition in the current flow control evaluation period;
the second updating module 30 is configured to update the processing capability of the service system again if the service end meets the update condition of the processing capability of the service system, and update the processing capability of the service system again;
and the control module 40 is configured to perform flow control according to a preset flow control policy when the server satisfies a flow control starting condition, and quit the flow control when the server satisfies a flow control quitting condition.
On the basis of the above embodiments, optionally, the first updating module 10 is specifically used for updating according to T new -ERTs = a + β × D, a = a + g ×, err = M-a, D = D + h (| Err | -D) obtaining an updated value of the flow control evaluation period and updating the flow control evaluation period based on the updated value; wherein, T new Represents the updated value of the flow control evaluation period, a represents the estimated value of the mean value of the response time, g represents the increment, M represents the response time, D represents the mean deviation, h represents the gain, α and β represent the coefficients, and ERT represents the estimated transaction time.
On the basis of the above-described embodiment, the first updating module 10 is specifically configured according to
Figure BDA0002150952150000091
Obtaining a first update value of the processing capacity of the service system and updating the processing capacity of the service system based on the first update value of the processing capacity of the service system; wherein, T new Updated value, to, representing flow control evaluation period ld A value representing a flow control evaluation period before update, C new1 A first update value, co, representing the service processing capacity ld A value representing the traffic handling capacity before updating.
On the basis of the foregoing embodiment, optionally, the second updating module 30 is specifically configured to, if the server side satisfies Δ R ≧ γ Δ P or S > C, according to C new2 = λ C + (1- λ) S gets a second updated value of the service system processing capability and updates the service system processing capability again based on the second updated value; wherein Δ R represents a difference between the number of service requests received in the current flow control evaluation period and the number of service requests received in the previous flow control evaluation period, Δ P represents a difference between the number of service requests processed in the current flow control evaluation period and the number of service requests processed in the previous flow control evaluation period, γ represents a coefficient, λ represents a smoothing factor, S represents an actual processing speed, C represents a processing capability of a service system before re-update, and C represents a processing capability of a service system before re-update new2 A second updated value representing the processing power of the business system.
On the basis of the foregoing embodiment, optionally, the control module 40 is specifically configured to perform flow control according to the priority of the service request when the service side meets the flow control starting condition.
On the basis of the above embodiment, the method further includes:
and the sending module is used for sending the flow control overload error code to the client after starting the flow control so that the client performs flow control limitation after receiving the flow control overload error code.
The present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period; judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period; if the server side meets the updating condition of the processing capacity of the service system, the processing capacity of the service system is updated again; and when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. The device, the apparatus and the computer-readable storage medium disclosed by the embodiments correspond to the method disclosed by the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The flow control method, apparatus, and computer-readable storage medium provided in the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (7)

1. A flow control method is applied to a server and comprises the following steps:
monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period;
judging whether the service end meets the updating condition of the processing capacity of the service system in the current flow control evaluation period;
if the server side meets the updating condition of the processing capacity of the service system, updating the processing capacity of the service system again;
when the server side meets the flow control starting condition, flow control is carried out according to a preset flow control strategy, and when the server side meets the flow control quitting condition, the flow control quits;
wherein updating the flow control evaluation period based on the response time and a preset period comprises:
according to T new =α*ERT
ERT=A+β*D
A=A+g*Err
Err=M-A
D = D + h (| Err | -D) gets an updated value of the flow control evaluation period and updates the flow control evaluation period based on the updated value;
wherein, T is new An updated value representing the flow control evaluation period, a representing an estimated value of a mean of response times, g representing an increment, M representing the response time, D representing a mean deviation, h representing a gain, a and β representing coefficients, and ERT representing an estimated transaction time;
wherein the updating the service system processing capacity based on the updated flow control evaluation period comprises:
according to
Figure FDA0003678979250000011
Obtaining a first updated value of the processing capacity of the service system and updating the processing capacity of the service system based on the first updated value of the processing capacity of the service system;
wherein, the T is new An updated value, T, representing the flow control evaluation period old A value representing the flow control evaluation period before update, said C new1 A first update value representing said traffic handling capability, said C old A value representing the business processing capability before updating;
if the server side meets the service system processing capacity updating condition, updating the service system processing capacity again, wherein the updating comprises the following steps:
if the server side meets the condition that delta R is more than or equal to gamma delta P or S is more than C, according to C new2 = λ C + (1- λ) S gets a second updated value of the service system processing capability and updates the service system processing capability again based on the second updated value;
wherein Δ R represents a difference between the number of service requests received in the current flow control evaluation period and the number of service requests received in the previous flow control evaluation period, and Δ P represents the number of service requests processed in the current flow control evaluation period and the previous flow control evaluation periodThe difference of the number of service requests processed in a period, gamma is a coefficient, lambda is a smoothing factor, S is an actual processing speed, C is a service system processing capacity before updating again, and C is a service system processing capacity before updating again new2 A second updated value representing the processing capacity of the business system.
2. The flow control method according to claim 1, wherein the flow control starting condition is that Δ R ≧ γ Δ P exists in a preset number of flow control evaluation periods in succession; the flow control quitting condition is that the flow control quitting conditions exist in a continuous preset number of flow control evaluation periods
Figure FDA0003678979250000021
Wherein said γ is different from said
Figure FDA0003678979250000022
The coefficients are represented.
3. The method according to any one of claims 1 to 2, wherein the performing flow control according to a preset flow control policy when the server side meets a flow control starting condition includes:
and when the service end meets the flow control starting condition, carrying out flow control according to the priority of the service request.
4. The flow control method according to claim 3, wherein the performing flow control according to the priority of the service request comprises:
if Δ R is less than or equal to 0.25 × c × t, discarding the service request with the priority of the third priority;
if Δ R > 0.5 × c × t, discarding the service requests with the priorities of the third priority and the second priority;
if Δ R > C × T, discarding the service requests with priorities of a third priority, a second priority and a first priority;
wherein, T represents a current flow control evaluation period, C represents a current service system processing capacity, and Δ R represents a difference between a number of service requests received in the current flow control evaluation period and a number of service requests received in a previous flow control evaluation period.
5. The flow control method according to claim 4, characterized by further comprising:
and sending a flow control overload error code to a client after starting flow control so that the client performs flow control limitation after receiving the flow control overload error code.
6. A flow control device, comprising:
the first updating module is used for monitoring the response time of the service request, updating the flow control evaluation period based on the response time and a preset period, and updating the processing capacity of the service system based on the updated flow control evaluation period;
the judging module is used for judging whether the server side meets the updating condition of the processing capacity of the service system in the current flow control evaluation period;
the second updating module is used for updating the processing capacity of the service system again if the service end meets the updating condition of the processing capacity of the service system, and updating the processing capacity of the service system again;
the control module is used for carrying out flow control according to a preset flow control strategy when the server side meets a flow control starting condition and quitting the flow control when the server side meets a flow control quitting condition;
the first updating module is specifically configured to:
according to T new =α*ERT
ERT=A+β*D
A=A+g*Err
Err=M-A
D = D + h (| Err | -D) gets an updated value of the flow control evaluation period and updates the flow control evaluation period based on the updated value;
wherein, T is new Representing an updated value of the flow control evaluation period, a representing an estimated value of a mean of response times, g representing an increment, M representing the response time, D representing a mean deviation, h representing a gain, a and β representing a coefficient, and ERT representing an estimated transaction time;
wherein the first update module is specifically configured to:
according to
Figure FDA0003678979250000031
Obtaining a first updated value of the processing capacity of the service system and updating the processing capacity of the service system based on the first updated value of the processing capacity of the service system;
wherein, T is new An updated value, T, representing the flow control evaluation period old A value representing the flow control evaluation period before update, said C new1 A first update value representing said service handling capacity, said C old A value representing the business processing capability before updating;
wherein the second update module is specifically configured to:
if the server side meets the condition that delta R is more than or equal to gamma delta P or S is more than C, according to C new2 = λ C + (1- λ) S gets a second updated value of the service system processing capability and updates the service system processing capability again based on the second updated value;
wherein Δ R represents a difference between the number of service requests received in the current flow control evaluation period and the number of service requests received in the previous flow control evaluation period, Δ P represents a difference between the number of service requests processed in the current flow control evaluation period and the number of service requests processed in the previous flow control evaluation period, γ represents a coefficient, λ represents a smoothing factor, S represents an actual processing speed, C represents a service system processing capacity before re-update, and C represents a service system processing capacity before re-update new2 A second updated value representing the processing capacity of the business system.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the steps of the flow control method according to any one of claims 1 to 5.
CN201910701532.0A 2019-07-31 2019-07-31 Flow control method and related device Active CN110380982B (en)

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 CN110380982A (en) 2019-10-25
CN110380982B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079189B (en) * 2020-01-03 2023-04-25 中国移动通信集团广东有限公司 Capacity control method and device of capacity open platform and electronic equipment
CN117716736A (en) * 2022-06-15 2024-03-15 北京小米移动软件有限公司 Request processing method, device, server side and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100518149C (en) * 2004-11-17 2009-07-22 华为技术有限公司 Flow controlling method for message system
CN103957251A (en) * 2014-04-28 2014-07-30 迈普通信技术股份有限公司 Method and system for achieving server load balancing
CN108282501B (en) * 2017-01-05 2021-03-09 阿里巴巴集团控股有限公司 Cloud server resource information synchronization 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
CN110032576B (en) * 2019-03-12 2023-06-16 平安科技(深圳)有限公司 Service processing method and device

Also Published As

Publication number Publication date
CN110380982A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
US7644162B1 (en) Resource entitlement control system
CN110380982B (en) Flow control method and related device
US9755935B2 (en) Method, system and computer storage medium for bandwidth optimization of network application
EP3557418B1 (en) Resource management of resource-controlled system
CN112527544A (en) Server, and method and device for triggering fusing
CN114153679A (en) Simulation environment-based substation gateway accessory equipment testing method and system
JP4449929B2 (en) Transaction apparatus, delay fault detection apparatus and method, and program
CN111555987B (en) Current limiting configuration method, device, equipment and computer storage medium
CN112269591A (en) Version release method, device, equipment and storage medium
CN111258854A (en) Model training method, alarm method based on prediction model and related device
WO2019244507A1 (en) Quality estimation device, quality estimation method, and program
JP4008699B2 (en) Method for service level estimation in an operating computer system
CN107689877B (en) Parameter adjusting method and device
CN111130933B (en) Page flow estimation method and device and computer readable storage medium
CN114419033A (en) Defect identification method, defect identification device, electronic device and readable storage medium
JP2006012065A (en) Resource load adjustment management system
JP2005086566A (en) Traffic volume estimation method and packet discard prevention method using the estimation method
JP2007052621A (en) File transfer time estimation device and method, and program
CN115659377B (en) Interface abnormal access identification method and device, electronic equipment and storage medium
AU2018405724A1 (en) Processing apparatus, processing method, and program
CN115022206B (en) Network stability determination method and device, computer equipment and readable storage medium
CN115061722B (en) Method, apparatus, and medium for configuring resources for a new version of an application
JP4353155B2 (en) Transaction device, monitoring time determination device and method, and program
JP5603836B2 (en) Maintenance management device, maintenance management method, and maintenance management program
WO2022044211A1 (en) Management device, management method, and management program

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