CN106612238A - Flow control method, device and system - Google Patents

Flow control method, device and system Download PDF

Info

Publication number
CN106612238A
CN106612238A CN201510689426.7A CN201510689426A CN106612238A CN 106612238 A CN106612238 A CN 106612238A CN 201510689426 A CN201510689426 A CN 201510689426A CN 106612238 A CN106612238 A CN 106612238A
Authority
CN
China
Prior art keywords
current limliting
threshold
current
notified
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510689426.7A
Other languages
Chinese (zh)
Other versions
CN106612238B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510689426.7A priority Critical patent/CN106612238B/en
Publication of CN106612238A publication Critical patent/CN106612238A/en
Application granted granted Critical
Publication of CN106612238B publication Critical patent/CN106612238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a flow control method and device. The flow control method comprises that a present network flow value is detected; the present network flow is compared with preset thresholds; when the present network flow value is greater than a first threshold and lower than a second threshold, a first flow limiting notification is returned to a client which initiates a network request; and when the resent network flow value is greater than the second threshold, a second flow limiting notification is returned to the client which initiates the network request. The first threshold is lower than the second threshold; the first flow limiting notification comprises an adjusted sending time interval and first effective time of the network request, so that the client sends the network request within first effective time according to the sending time interval; and the second flow limiting notification comprises second effective time so that the client stops sending the network request within the second effective time. The method can be used to solve problems when a single threshold is used during flow control.

Description

Flow control methods, device and system
Technical field
The application is related to technical field of data processing, more particularly to a kind of flow control methods, device and system.
Background technology
With the popularization of internet, increasing user carries out information inquiry, shopping at network etc. using internet.Work as client When the number of users at end is a lot, very big flow pressure can be caused to service end.In prior art, typically set in service end A threshold value is put, when flow exceeds the threshold value, service end to client sends error code, and client is received after error code Stop sending network request to service end within a period of time.
But, the scheme that one threshold value is only set in service end can exist poor user experience, single threshold value be difficult to rationally setting, The problems such as service end is easily washed away by burst flow.
The content of the invention
The application is intended at least to solve to a certain extent one of technical problem in correlation technique.
For this purpose, a purpose of the application is to propose a kind of flow control methods, the method can be solved when flow is controlled only The problems referred to above existed during single threshold value are set.
Further object is to propose a kind of volume control device.
Further object is to propose a kind of flow control system.
To reach above-mentioned purpose, the flow control methods that the application first aspect embodiment is proposed, including:The current net of detection Network flow value;The current network flow value of comparison and default multiple threshold values;When current network flow value is more than first threshold And during less than Second Threshold, return the first current limliting to the client for initiating network request and notify;When current network flow value it is big When Second Threshold, return the second current limliting to the client for initiating network request and notify;Wherein, first threshold is less than the second threshold Value;First current limliting notifies to include transmission time interval and the first effective time after the adjustment of network request, so that institute Client is stated within first effective time, network request is sent according to the transmission time interval;Second current limliting is led to Knowing includes:Second effective time, so that the client stops sending network request within second effective time.
The flow control methods that the application first aspect embodiment is proposed, by arranging multiple threshold values, it is possible to achieve classification flow Control, so as to solve some problems of single threshold value presence.
To reach above-mentioned purpose, the flow control methods that the application second aspect embodiment is proposed, including:Receive service end to send out The current limliting sent notifies, the current limliting is notified be the more current network flow value of service end with default multiple threshold values after obtain; Wherein, when current network flow value is more than first threshold and less than Second Threshold, the current limliting notifies it is to include that network please First current limliting of transmission time interval and the first effective time after the adjustment asked notifies, when current network flow value is more than the During two threshold values, the current limliting notifies it is that the second current limliting for including for the second effective time is notified;Wherein, first threshold is less than second Threshold value;Notified to carry out flow control according to the current limliting;Wherein, when it is that the first current limliting is notified that the current limliting is notified, in institute State in the first effective time, network request is sent according to the transmission time interval, notify it is that the second current limliting is led to when the current limliting When knowing, stop sending network request within second effective time.
The flow control methods that the application second aspect embodiment is proposed, by arranging multiple threshold values, it is possible to achieve classification flow Control, so as to solve some problems of single threshold value presence.
To reach above-mentioned purpose, the volume control device that the application third aspect embodiment is proposed, including:Detection module, uses In the current network flow value of detection;Determining module, for relatively more current network flow value and default multiple threshold values;Send out Module is sent, for when current network flow value is more than first threshold and is less than Second Threshold, to the visitor for initiating network request Family end returns the first current limliting and notifies;When current network flow value is more than Second Threshold, to the client for initiating network request Return the second current limliting notice;Wherein, first threshold is less than Second Threshold;First current limliting notifies to include network request Transmission time interval and the first effective time after adjustment, so that the client is within first effective time, according to institute State transmission time interval and send network request;Second current limliting notifies to include:Second effective time, so that the client End stops sending network request within second effective time.
The volume control device that the application third aspect embodiment is proposed, by arranging multiple threshold values, it is possible to achieve classification flow Control, so as to solve some problems of single threshold value presence.
To reach above-mentioned purpose, the volume control device that the application fourth aspect embodiment is proposed, including:Receiver module, uses In the current limliting notice that service end sends is received, it is that the more current network flow value of service end is more with default that the current limliting is notified Obtain after individual threshold value;Wherein, when current network flow value is more than first threshold and less than Second Threshold, the current limliting Notice is to include that transmission time interval and first current limliting of the first effective time after the adjustment of network request are notified, when current When network flow value is more than Second Threshold, the current limliting notifies it is that the second current limliting for including for the second effective time is notified;Wherein, First threshold is less than Second Threshold;Control module, for being notified to carry out flow control according to the current limliting;Wherein, when described When current limliting notice is that the first current limliting is notified, within first effective time, sending network according to the transmission time interval please Ask, when it is that the second current limliting is notified that the current limliting is notified, stop sending network request within second effective time.
The volume control device that the application fourth aspect embodiment is proposed, by arranging multiple threshold values, it is possible to achieve classification flow Control, so as to solve some problems of single threshold value presence.
To reach above-mentioned purpose, the flow control system that the aspect embodiment of the application the 5th is proposed, including:The application third party The volume control device that face embodiment is proposed, and, the volume control device that the application fourth aspect embodiment is proposed.
The flow control system that the aspect embodiment of the application the 5th is proposed, by arranging multiple threshold values, it is possible to achieve classification flow Control, so as to solve some problems of single threshold value presence.
The aspect and advantage that the application is added will be set forth in part in the description, and partly will from the following description become bright It is aobvious, or recognized by the practice of the application.
Description of the drawings
The above-mentioned and/or additional aspect of the application and advantage will be apparent from from the following description of the accompanying drawings of embodiments With it is easy to understand, wherein:
Fig. 1 is the schematic flow sheet of the flow control methods that the embodiment of the application one is proposed;
Fig. 2 is the schematic flow sheet of the flow control methods that another embodiment of the application is proposed;
Fig. 3 is the schematic flow sheet of the flow control methods that another embodiment of the application is proposed;
Fig. 4 is the structural representation of the volume control device that another embodiment of the application is proposed;
Fig. 5 is the structural representation of the volume control device that another embodiment of the application is proposed;
Fig. 6 is the structural representation of the volume control device that another embodiment of the application is proposed;
Fig. 7 is the structural representation of the flow control system that another embodiment of the application is proposed.
Specific embodiment
Embodiments herein is described below in detail, the example of the embodiment is shown in the drawings, wherein identical from start to finish Or similar label represents same or similar module or the module with same or like function.Retouch below with reference to accompanying drawing The embodiment stated is exemplary, is only used for explaining the application, and it is not intended that the restriction to the application.Conversely, this Shen Embodiment please includes all changes, modification and the equivalent fallen in the range of the spirit and intension of attached claims.
Fig. 1 be the embodiment of the application one propose flow control methods schematic flow sheet, the method holding with service end As a example by row flow process, the method includes:
S11:The current network flow value of detection.
Wherein, network flow value can represent that each takes with network request number per second (query per second, QPS) Business device can be with the QPS of real-time detection itself, so as to obtain current network flow value.Each server is detecting the QPS of itself When, for example, server receives the network request that client sends, and to the network request in 1 second quantity statistics is carried out, so as to Obtain QPS.
S12:The current network flow value of comparison and default multiple threshold values.
In the present embodiment, as a example by multiple threshold values of setting are to include first threshold and Second Threshold, wherein, first threshold is less than Second Threshold.
S13:When current network flow value is more than first threshold and is less than Second Threshold, to the client for initiating network request Return the first current limliting notice;When current network flow value is more than Second Threshold, return to the client for initiating network request Second current limliting is notified;Wherein, first threshold is less than Second Threshold.
First current limliting notifies to include transmission time interval and the first effective time after the adjustment of network request, so that institute Client is stated within first effective time, network request is sent according to the transmission time interval;Second current limliting is led to Knowing includes:Second effective time, so that the client stops sending network request within second effective time.
Wherein, client can be pre-configured with consistent current limliting strategy with service end, so as to client can be sent out according to service end The current limliting notification message and default current limliting strategy for sending carries out corresponding flow control.
For the purpose of simplifying the description, current network flow value and the pass between the comparative result and current limliting strategy of default multiple threshold values System can be represented with the relation between state and current limliting strategy.
For example, after first threshold and Second Threshold is arranged, state can be divided into three kinds by first threshold and Second Threshold, point Yong not normal condition, current limiting low-voltage state and high-voltage and current-limitation state representation.
Specifically, if current network flow value is less than first threshold, it is determined that the state being presently in is normal condition, If current network flow value is more than first threshold, and less than Second Threshold, it is determined that the state being presently in is low pressure limit Stream mode, if current network flow value is more than Second Threshold, it is determined that the state being presently in is high-voltage and current-limitation state.
As shown in table 1, the relation between state and current limliting strategy can include:
Table 1
In some embodiments, the service end of the present embodiment specifically refers to single server, and accordingly, default threshold value is basis What separate unit current limit threshold and predetermined coefficient determined, the separate unit current limit threshold is according to cluster whole capability value and cluster service Device sum determines.
Wherein, what service end was generally externally showed is cluster whole capability value, and for example, current QPS is more than cluster entirety energy During force value m, it is determined that the state being presently in is high-voltage and current-limitation state, if machine server sum is n, above-mentioned The corresponding separate unit current limit threshold of two threshold values is m/n, furthermore it is possible to the different server of correspondence arranges different predetermined coefficients, So as to be multiplied by corresponding predetermined coefficient with m/n, the corresponding Second Threshold of every server is obtained.Similar, first threshold Can be determined according to corresponding separate unit current limit threshold and predetermined coefficient.
In the present embodiment, by arranging multiple threshold values, it is possible to achieve classification flow control, so as to solve single threshold value presence Some problems.Further, notified according to the first current limliting that service end sends by client or the second current limliting is notified and default Current limliting strategy carry out flow control, it is possible to achieve client and service end link, and take into account Consumer's Experience and system safety, real Existing system flexibility can use.Further, by the execution of single server, reaction speed can be improved.
In some embodiments, flow control can be divided into global control model and separate service control model, accordingly, above-mentioned Network flow value can include:The network flow value of global network flow value and/or separate service.
Fig. 2 is the schematic flow sheet of the flow control methods that another embodiment of the application is proposed, the present embodiment is with network flow Value includes that the method includes as a example by the network flow value of global network flow value and separate service:
S21:Server receives the network request that client sends.
The present embodiment is by taking the execution of the single server of service end as an example.
Relative to server cluster mode, single server can be independently executed, it is not necessary to which the server in cluster carries out state It is synchronous, thereby may be ensured that the timely rapid of flow control.
S22:Server statistics obtain global QPS, and, obtain multiple threshold values of global traffic control.
For example, correspond to global traffic in server respectively to control to arrange overall situation QPS counters with the flow control of separate service and divide Business QPS counter, further, the different business of correspondence can adopt different separate service QPS counters.
When overall situation QPS is counted, for example, a network request is often received, by original count value of global QPS counters Plus 1, count the request number of times in a second, so as to obtain global QPS, and reset after end per second, so as to follow-up QPS is counted.In time the time by server be defined.
In addition, the initial value of overall situation QPS and separate service QPS could be arranged to 0.
Wherein, global traffic can be pre-configured with server and controls corresponding multiple threshold values, and, separate service control correspondence Multiple threshold values.Global traffic control corresponding multiple threshold values multiple threshold values corresponding with separate service control can with identical or different, Different separate services controls corresponding multiple threshold values can be with identical or different.
S23:Multiple threshold values that the global QPS of comparison is controlled with global traffic.
Assume that multiple threshold values that global traffic is controlled are represented with T11 and T12, wherein, T11 is less than T12, then can be by the overall situation QPS is compared respectively with T11 and T12.
Further it will be understood that global state can be divided into three kinds by T11 and T12, be referred to as global normal condition, Global high-voltage and current-limitation state and global current limiting low-voltage state, if overall situation QPS is less than or equal to T11, it is determined that for the overall situation just Normal state, if overall situation QPS is more than T11 and less than or equal to T12, it is determined that for global current limiting low-voltage state, if entirely Office QPS is more than T12, it is determined that for global high-voltage and current-limitation state.S24:If overall situation QPS is more than T11, to client Send global current limliting to notify.
Wherein, global current limliting notifies that can be divided into global high-voltage and current-limitation notifies and global current limiting low-voltage notice, with above-mentioned first Current limliting notifies corresponding with the second current limliting notice, and global high-voltage and current-limitation is notified and global current limiting low-voltage notifies to can be understood as the overall situation Flow control when the second current limliting notify and the first current limliting notify, specifically, when global QPS be more than T12 when, service end to Client sends global high-voltage and current-limitation and notifies, when global QPS is more than T11 and is less than T12, service end to client sends Global current limiting low-voltage is notified.
Current limliting can include conditional code in notifying, to distinguish, global current limliting is notified and separate service current limliting is notified, furthermore it is also possible to Including status information and corresponding parameter information etc., to distinguish high-voltage and current-limitation and current limiting low-voltage.
As shown in table 2, the form of global current limliting notice is:
Table 2
Wherein, conditional code is used to distinguish global current limliting notice and separate service current limliting is notified, in the present embodiment, represents complete with 4xx Limitation circulation is known, as a example by 4xy represents that separate service current limliting is notified.
X-delay is status information, and for example, -1 represents high-voltage and current-limitation state, is that positive integer represents current limiting low-voltage state, and It is the positive integer that client sends the time interval of network request.
X-expire is effective time.
S25:If overall situation QPS is less than T11, it is determined that the business that the network request belongs to, and statistics obtains the industry Be engaged in corresponding separate service QPS, and, obtain multiple threshold values of the corresponding separate service flow control of the business.
Wherein it is possible to the incidence relation being pre-configured between network request and business, may thereby determine that each network request category In business, such as transaction, pay business.
After corresponding business is determined, by the corresponding separate service QPS counters of corresponding service, it is similar to global QPS's Statistics, can obtain separate service QPS.In addition, the corresponding separate service flow control of every kind of business can be pre-configured with server Multiple threshold values of system, such that it is able to obtain multiple threshold values of the business corresponding separate service flow control, for example, with T21 and T22 is represented.
S26:Multiple threshold values that the comparison separate service QPS is controlled with the separate service flow.
Assume that multiple threshold values that separate service flow is controlled are represented with T21 and T22, wherein, T21 is less than T22, then can divide Business QPS is compared respectively with T21 and T22.
Further it will be understood that separate service state can be divided into three kinds by T21 and T22, separate service is referred to as normal State, separate service high-voltage and current-limitation state and separate service current limiting low-voltage state, if separate service QPS is less than or equal to T21, It is defined as separate service normal condition, if separate service QPS is more than T21 and less than or equal to T22, it is determined that low for separate service Pressure limited current state, if separate service QPS is more than T22, it is determined that for separate service high-voltage and current-limitation state.
S27:If separate service QPS is more than T21, sends separate service current limliting to client and notify.
Wherein, separate service current limliting notifies to be divided into that separate service high-voltage and current-limitation is notified and separate service current limiting low-voltage is notified, and above-mentioned The first current limliting notify it is corresponding with the second current limliting notices, separate service high-voltage and current-limitation notice with separate service current limiting low-voltage notice can manage Solve to be that the second current limliting when separate service flow is controlled is notified and the first current limliting is notified, specifically, when separate service QPS is more than T22 When, service end sends separate service high-voltage and current-limitation and notifies to client, when global QPS is more than T21 and is less than T22, service Hold to client and send separate service current limiting low-voltage notice.
Current limliting can include conditional code in notifying, to distinguish, global current limliting is notified and separate service current limliting is notified, furthermore it is also possible to Including status information and corresponding parameter information etc., to distinguish high-voltage and current-limitation and current limiting low-voltage.
As shown in table 3, the form of separate service current limliting notice is:
Table 3
Wherein, conditional code is used to distinguish global current limliting notice and separate service current limliting is notified, in the present embodiment, represents complete with 4xx Limitation circulation is known, as a example by 4xy represents that separate service current limliting is notified.
X-delay is status information, and for example, -1 represents high-voltage and current-limitation state, is that positive integer represents current limiting low-voltage state, and It is the positive integer that client sends the time interval of network request.
X-expire is effective time.
X-api is service identification.
S28:If separate service QPS is less than T21, network request described in normal process.
In the present embodiment, in current limiting low-voltage, client can continue to send network request with relatively low frequency, not shadow The use of Core Feature is rung, the Consumer's Experience under limited current state is lifted.When service end flow triggering high-voltage and current-limitation, visitor Family end stops sending network request to service end within effective time, to mitigate the pressure of service end, it is ensured that system safety.
Fig. 3 is the schematic flow sheet of the flow control methods that another embodiment of the application is proposed, the method is with client As a example by performing flow process, the method includes:
S31:Receive the current limliting that service end sends to notify, the current limliting is notified be the more current network flow value of service end with it is pre- If multiple threshold values after obtain.
Wherein, when current network flow value is more than first threshold and less than Second Threshold, it is to include net that the current limliting is notified Network request adjustment after transmission time interval and first current limliting of the first effective time notify, when current network flow value it is big When Second Threshold, the current limliting notifies it is that the second current limliting for including for the second effective time is notified;Wherein, first threshold is less than Second Threshold.
S32:Notified to carry out flow control according to the current limliting;
Wherein, when it is that the first current limliting is notified that the current limliting is notified, within first effective time, according to during the transmission Between interval send network request, when the current limliting notify be the second current limliting notify when, within second effective time stop send out SCN Space Cable Network is asked.
Wherein, notify if receiving similar current limliting in effective time, notify to update original limit with the newest current limliting for receiving Circulation is known, notifies to carry out flow control according to the newest current limliting for receiving.
In some embodiments, the current limliting notifies to include:Global current limliting notice, and/or, separate service current limliting is notified.
It is described to be notified to carry out flow control according to the current limliting in some embodiments, including:
Obtain network request to be sent;
If the current limliting that the network request to be sent is matched notifies to include:Global current limliting is notified and separate service current limliting is notified, Notified according to the global current limliting and the separate service current limliting notified, determined send the time next time respectively, obtain two it is next The secondary transmission time;
The maximum corresponding time in two time of transmission next time, to service end the network request to be sent is sent.
For example, client receives global current limliting and notifies, with after separate service current limliting notice, to be preserved respectively, and calculates corresponding The transmission time next time.
For example:Current time is t_now, and client locally has two rules:
(a) global rule:Give out a contract for a project minimum delay 100ms, and effective time does not terminate, and the last transmission time is t1, then next The secondary transmission time is r1=max (t1+100ms, t_now);
(b) separate service rule (current request pending belongs to the business):Give out a contract for a project minimum delay 200ms, and effective time does not terminate, The last transmission time is t2, then send the time next time for r2=max (t2+200ms, t_now);
If network request to be sent only matches global rule, then can finally send time point for r1;If while matching The global and rule of separate service two, then final sent time point is max (r1, r2).
In the present embodiment, by arranging multiple threshold values, it is possible to achieve classification flow control, so as to solve single threshold value presence Some problems.
Fig. 4 is the structural representation of the volume control device that another embodiment of the application is proposed, the device 40 includes:Inspection Survey module 41, determining module 42 and sending module 43.
Detection module 41, for detecting current network flow value;
Wherein, network flow value can represent that each takes with network request number per second (query per second, QPS) Business device can be with the QPS of real-time detection itself, so as to obtain current network flow value.Each server is detecting the QPS of itself When, for example, server receives the network request that client sends, and to the network request in 1 second quantity statistics is carried out, so as to Obtain QPS.
Determining module 42, for relatively more current network flow value and default multiple threshold values;
In the present embodiment, as a example by multiple threshold values of setting are to include first threshold and Second Threshold, wherein, first threshold is less than Second Threshold.
Sending module 43, for when current network flow value is more than first threshold and is less than Second Threshold, to initiation network The client of request returns the first current limliting and notifies;When current network flow value is more than Second Threshold, to initiation network request Client return the second current limliting notify;Wherein, first threshold is less than Second Threshold;
First current limliting notifies to include transmission time interval and the first effective time after the adjustment of network request, so that institute Client is stated within first effective time, network request is sent according to the transmission time interval;Second current limliting is led to Knowing includes:Second effective time, so that the client stops sending network request within second effective time.
Wherein, client can be pre-configured with consistent current limliting strategy with service end, so as to client can be sent out according to service end The current limliting notification message and default current limliting strategy for sending carries out corresponding flow control.
For the purpose of simplifying the description, current network flow value and the pass between the comparative result and current limliting strategy of default multiple threshold values System can be represented with the relation between state and current limliting strategy.
For example, after first threshold and Second Threshold is arranged, state can be divided into three kinds by first threshold and Second Threshold, point Yong not normal condition, current limiting low-voltage state and high-voltage and current-limitation state representation.
Specifically, if current network flow value is less than first threshold, it is determined that the state being presently in is normal condition, If current network flow value is more than first threshold, and less than Second Threshold, it is determined that the state being presently in is low pressure limit Stream mode, if current network flow value is more than Second Threshold, it is determined that the state being presently in is high-voltage and current-limitation state.
Relation between state and current limliting strategy can be as shown in table 1.
In some embodiments, when the current limliting notifies that being divided into global current limliting notifies to be notified with separate service current limliting, the current limliting is led to Also include in knowing:For distinguishing the conditional code that global current limliting is notified and separate service current limliting is notified.
In some embodiments, the threshold value is determined according to separate unit current limit threshold and predetermined coefficient, the separate unit current limiting threshold Value is determined according to cluster whole capability value and cluster server sum.
Wherein, what service end was generally externally showed is cluster whole capability value, and for example, current QPS is more than cluster entirety energy During force value m, it is determined that the state being presently in is high-voltage and current-limitation state, if machine server sum is n, above-mentioned The corresponding separate unit current limit threshold of two threshold values is m/n, furthermore it is possible to the different server of correspondence arranges different predetermined coefficients, So as to be multiplied by corresponding predetermined coefficient with m/n, the corresponding Second Threshold of every server is obtained.Similar, first threshold Can be determined according to corresponding separate unit current limit threshold and predetermined coefficient.
In the present embodiment, by arranging multiple threshold values, it is possible to achieve classification flow control, so as to solve single threshold value presence Some problems.Further, notified according to the first current limliting that service end sends by client or the second current limliting is notified and default Current limliting strategy carry out flow control, it is possible to achieve client and service end link, and take into account Consumer's Experience and system safety, real Existing system flexibility can use.Further, by the execution of single server, reaction speed can be improved.
In some embodiments, flow control can be divided into global control model and separate service control model, accordingly, above-mentioned Network flow value can include:The network flow value of global network flow value and/or separate service.
When the network flow value includes:The network flow value of global network flow value and separate service, and the network flow value When being QPS, referring to Fig. 5, determining module 42 includes:First module 421 and second unit 422, sending module 43 includes: 3rd unit 431 and the 4th unit 432, furthermore it is also possible to including:Processing module 44.
First module 421, for after the network request for receiving client transmission, statistics to obtain global QPS, and, obtain Multiple threshold values of global traffic control;And, multiple threshold values that the global QPS of comparison is controlled with global traffic;
3rd unit 431, if the minimum threshold in the multiple threshold values controlled more than global traffic for overall situation QPS, to Client sends global current limliting and notifies;
Wherein, global current limliting notifies specifically overall situation high-voltage and current-limitation to notify or global current limiting low-voltage notice.
Second unit 422, if the minimum threshold in the multiple threshold values controlled less than global traffic for overall situation QPS, really The business that the fixed network request belongs to, and statistics obtains the corresponding separate service QPS of the business, and, obtain the industry It is engaged in multiple threshold values of corresponding separate service flow control;And, the comparison separate service QPS is controlled with the separate service flow Multiple threshold values;
4th unit 432, if for the minimum threshold in multiple threshold values of the separate service QPS more than the control of separate service flow, Then send separate service current limliting to client to notify;
Wherein, separate service current limliting notifies specifically separate service high-voltage and current-limitation to notify or separate service current limiting low-voltage notice.
Processing module 44, if for the minimum threshold in multiple threshold values of the separate service QPS less than the control of separate service flow, Network request described in normal process.
Particular content may refer to the corresponding description in embodiment of the method, will not be described here.
In the present embodiment, in current limiting low-voltage, client can continue to send network request with relatively low frequency, not shadow The use of Core Feature is rung, the Consumer's Experience under limited current state is lifted.When service end flow triggering high-voltage and current-limitation, visitor Family end stops sending network request to service end within effective time, to mitigate the pressure of service end, it is ensured that system safety.
Fig. 6 is the structural representation of the volume control device that another embodiment of the application is proposed, the device 60 includes:Connect Receive module 61 and control module 62.
Receiver module 61, the current limliting for receiving service end transmission notifies that it is the more current net of service end that the current limliting is notified Obtain after network flow value and default multiple threshold values;
Wherein, when current network flow value is more than first threshold and less than Second Threshold, it is to include net that the current limliting is notified Network request adjustment after transmission time interval and first current limliting of the first effective time notify, when current network flow value it is big When Second Threshold, the current limliting notifies it is that the second current limliting for including for the second effective time is notified;Wherein, first threshold is less than Second Threshold 。
Control module 62, for being notified to carry out flow control according to the current limliting;
Wherein, when it is that the first current limliting is notified that the current limliting is notified, within first effective time, according to during the transmission Between interval send network request, when the current limliting notify be the second current limliting notify when, within second effective time stop send out SCN Space Cable Network is asked.
Wherein, notify if receiving similar current limliting in effective time, notify to update original limit with the newest current limliting for receiving Circulation is known, notifies to carry out flow control according to the newest current limliting for receiving.
In some embodiments, the current limliting notifies to include:Global current limliting notice, and/or, separate service current limliting is notified.
In some embodiments, control module 62 specifically for:
Obtain network request to be sent;
If the current limliting that the network request to be sent is matched notifies to include:Global current limliting is notified and separate service current limliting is notified, Notified according to the global current limliting and the separate service current limliting notified, determined send the time next time respectively, obtain two it is next The secondary transmission time;
The maximum corresponding time in two time of transmission next time, to service end the network request to be sent is sent.
For example, client receives global current limliting and notifies, with after separate service current limliting notice, to be preserved respectively, and calculates corresponding The transmission time next time.
For example:Current time is t_now, and client locally has two rules:
(a) global rule:Give out a contract for a project minimum delay 100ms, and effective time does not terminate, and the last transmission time is t1, then next The secondary transmission time is r1=max (t1+100ms, t_now);
(b) separate service rule (current request pending belongs to the business):Give out a contract for a project minimum delay 200ms, and effective time does not terminate, The last transmission time is t2, then send the time next time for r2=max (t2+200ms, t_now);
If network request to be sent only matches global rule, then can finally send time point for r1;If while matching The global and rule of separate service two, then final sent time point is max (r1, r2).
In the present embodiment, by arranging multiple threshold values, it is possible to achieve classification flow control, so as to solve single threshold value presence Some problems.
Fig. 7 is the structural representation of the flow control system that another embodiment of the application is proposed, the system 70 includes:Visitor Family end device 71 and service terminal device 72.
Wherein, client terminal device 71 can be as shown in Fig. 4 or Fig. 5, and service terminal device 72 can be as shown in Figure 6.
In the present embodiment, by arranging multiple threshold values, it is possible to achieve classification flow control, so as to solve single threshold value presence Some problems.
It should be noted that in the description of the present application, term " first ", " second " etc. are only used for describing purpose, and It is not intended that indicating or implying relative importance.Additionally, in the description of the present application, unless otherwise stated, " multiple " Implication refer at least two.
In flow chart or here any process described otherwise above or method description are construed as, expression includes one Or more module, fragment or parts for being used for the code of executable instruction the step of realize specific logical function or process, And the scope of the preferred embodiment of the application includes other realization, wherein order that is shown or discussing can not be pressed, Including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be by the application's Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof.In above-mentioned reality In applying mode, software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage or Firmware is realizing.For example, if realized with hardware, and in another embodiment, can be with well known in the art Any one of row technology or their combination are realizing:With for realizing the logic gates of logic function to data-signal Discrete logic, the special IC with suitable combinational logic gate circuit, programmable gate array (PGA) is existing Field programmable gate array (FPGA) etc..
Those skilled in the art be appreciated that to realize all or part of step that above-described embodiment method is carried is can Completed with the hardware that correlation is instructed by program, described program can be stored in a kind of computer-readable recording medium, The program upon execution, including one or a combination set of the step of embodiment of the method.
Additionally, each functional unit in the application each embodiment can be integrated in a processing module, or each Individual unit is individually physically present, it is also possible to which two or more units are integrated in a module.Above-mentioned integrated module was both Can be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.If the integrated module with The form of software function module is realized and as independent production marketing or when using, it is also possible to be stored in a computer-readable In taking storage medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specific example ", Or the description of " some examples " etc. means to combine specific features, structure, material or feature that the embodiment or example are described In being contained at least one embodiment of the application or example.In this manual, the schematic representation of above-mentioned term is differed Surely identical embodiment or example are referred to.And, the specific features of description, structure, material or feature can be any One or more embodiments or example in combine in an appropriate manner.
Although embodiments herein has been shown and described above, it is to be understood that above-described embodiment be it is exemplary, It is not intended that the restriction to the application, one of ordinary skill in the art within the scope of application can be to above-described embodiment It is changed, changes, replacing and modification.

Claims (11)

1. a kind of flow control methods, it is characterised in that include:
The current network flow value of detection;
The current network flow value of comparison and default multiple threshold values;
When current network flow value is more than first threshold and is less than Second Threshold, return to the client for initiating network request First current limliting is notified;When current network flow value is more than Second Threshold, to the client for initiating network request second is returned Current limliting is notified;Wherein, first threshold is less than Second Threshold;
First current limliting notifies to include transmission time interval and the first effective time after the adjustment of network request, so that institute Client is stated within first effective time, network request is sent according to the transmission time interval;Second current limliting is led to Knowing includes:Second effective time, so that the client stops sending network request within second effective time.
2. method according to claim 1, it is characterised in that the network flow value includes:
Global network flow value;And/or,
The network flow value of separate service.
3. method according to claim 2, it is characterised in that when the network flow value includes:Global network flow The network flow value of value and separate service, and the network flow value is when being QPS, the current network flow value of the detection;Than More current network flow value and default multiple threshold values, including:
After receiving the network request of client transmission, statistics obtains global QPS, and, obtain many of global traffic control Individual threshold value;
When the minimum threshold in multiple threshold values of the global QPS less than global traffic control, determine what the network request belonged to Business, and statistics obtains the corresponding separate service QPS of the business, and, obtain the corresponding separate service flow control of the business Multiple threshold values of system;
Multiple threshold values that the comparison separate service QPS is controlled with the separate service flow;
Methods described also includes:
When the minimum threshold in multiple threshold values of the separate service QPS less than the control of separate service flow,
Network request described in normal process.
4. method according to claim 2, it is characterised in that when the network flow value includes global network flow value During with the network flow value of separate service, also include during first current limliting is notified and second current limliting is notified:It is complete for distinguishing The conditional code notified with separate service current limliting is known in limitation circulation.
5. the method according to any one of claim 1-4, it is characterised in that the threshold value is according to separate unit current limit threshold And predetermined coefficient determination, the separate unit current limit threshold is determined according to cluster whole capability value and cluster server sum.
6. a kind of flow control methods, it is characterised in that include:
Receive the current limliting that service end sends to notify, the current limliting is notified be the more current network flow value of service end with it is default Obtain after multiple threshold values;
Wherein, when current network flow value is more than first threshold and less than Second Threshold, it is to include net that the current limliting is notified Network request adjustment after transmission time interval and first current limliting of the first effective time notify, when current network flow value it is big When Second Threshold, the current limliting notifies it is that the second current limliting for including for the second effective time is notified;Wherein, first threshold is less than Second Threshold;
Notified to carry out flow control according to the current limliting;
Wherein, when it is that the first current limliting is notified that the current limliting is notified, within first effective time, according to during the transmission Between interval send network request, when the current limliting notify be the second current limliting notify when, within second effective time stop send out SCN Space Cable Network is asked.
7. method according to claim 6, it is characterised in that the current limliting notifies to include:Global current limliting notice, and / or, separate service current limliting is notified.
8. method according to claim 7, it is characterised in that described to be notified to carry out flow control according to the current limliting, Including:
Obtain network request to be sent;
If the current limliting that the network request to be sent is matched notifies to include:Global current limliting is notified and separate service current limliting is notified, Notified according to the global current limliting and the separate service current limliting notified, determined send the time next time respectively, obtain two it is next The secondary transmission time;
The maximum corresponding time in two time of transmission next time, to service end the network request to be sent is sent.
9. a kind of volume control device, it is characterised in that include:
Detection module, for detecting current network flow value;
Determining module, for relatively more current network flow value and default multiple threshold values;
Sending module, for when current network flow value is more than first threshold and is less than Second Threshold, asking to network is initiated The client asked returns the first current limliting and notifies;When current network flow value is more than Second Threshold, to initiation network request Client returns the second current limliting and notifies;Wherein, first threshold is less than Second Threshold;
First current limliting notifies to include transmission time interval and the first effective time after the adjustment of network request, so that institute Client is stated within first effective time, network request is sent according to the transmission time interval;Second current limliting is led to Knowing includes:Second effective time, so that the client stops sending network request within second effective time.
10. a kind of volume control device, it is characterised in that include:
Receiver module, the current limliting for receiving service end transmission notifies that it is the more current network of service end that the current limliting is notified Obtain after flow value and default multiple threshold values;Wherein, when current network flow value is more than first threshold and less than second During threshold value, the current limliting notifies it is include that first of transmission time interval and the first effective time after the adjustment of network request limits Circulation knows that, when current network flow value is more than Second Threshold, it is included for the second effective time second that the current limliting is notified Current limliting is notified;Wherein, first threshold is less than Second Threshold;
Control module, for being notified to carry out flow control according to the current limliting;Wherein, when the current limliting notifies it is the first current limliting During notice, within first effective time, network request is sent according to the transmission time interval, when the current limliting is notified When being that the second current limliting is notified, stop sending network request within second effective time.
11. a kind of flow control systems, it is characterised in that include:
Device as claimed in claim 9, and,
Device as claimed in claim 10.
CN201510689426.7A 2015-10-21 2015-10-21 Flow control method, device and system Active CN106612238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510689426.7A CN106612238B (en) 2015-10-21 2015-10-21 Flow control method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510689426.7A CN106612238B (en) 2015-10-21 2015-10-21 Flow control method, device and system

Publications (2)

Publication Number Publication Date
CN106612238A true CN106612238A (en) 2017-05-03
CN106612238B CN106612238B (en) 2020-11-27

Family

ID=58610269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510689426.7A Active CN106612238B (en) 2015-10-21 2015-10-21 Flow control method, device and system

Country Status (1)

Country Link
CN (1) CN106612238B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107086932A (en) * 2017-05-22 2017-08-22 安徽电信规划设计有限责任公司 A kind of cloud platform virtualizes traffic security monitoring system
CN108173938A (en) * 2017-12-28 2018-06-15 泰康保险集团股份有限公司 Server load shunt method and device
CN108573013A (en) * 2017-12-08 2018-09-25 北京金山云网络技术有限公司 Request processing method, device, electronic equipment and computer readable storage medium
CN108683605A (en) * 2018-06-12 2018-10-19 阿里巴巴集团控股有限公司 A kind of current-limiting method and device of service call
CN108848037A (en) * 2018-05-31 2018-11-20 平安医疗科技有限公司 Service request processing method, device, computer equipment and storage medium
CN109284229A (en) * 2018-10-17 2019-01-29 武汉斗鱼网络科技有限公司 A kind of dynamic adjusting method and relevant device based on QPS
CN109921962A (en) * 2019-04-16 2019-06-21 腾讯科技(深圳)有限公司 Bandwidth Measurement Method, device, computer readable storage medium and computer equipment
WO2019174509A1 (en) * 2018-03-15 2019-09-19 阿里巴巴集团控股有限公司 Rate control method, apparatus and electronic device
CN110659898A (en) * 2018-06-28 2020-01-07 腾讯科技(深圳)有限公司 Data control method, device and storage medium
CN110933241A (en) * 2018-09-19 2020-03-27 中移信息技术有限公司 Method, device, equipment and medium for sending online charging request
CN111555987A (en) * 2020-04-28 2020-08-18 深圳前海微众银行股份有限公司 Current limiting configuration method, device, equipment and computer storage medium
CN113472492A (en) * 2020-03-30 2021-10-01 维沃移动通信有限公司 Transmission method and device of flow control message
CN113923163A (en) * 2021-10-20 2022-01-11 广东亿迅科技有限公司 Long connection message channel based current limiting method and system
US11425051B2 (en) 2017-05-31 2022-08-23 Huawei Technologies Co., Ltd. Flow control method and system, and device
CN115865820A (en) * 2022-11-23 2023-03-28 四川天邑康和通信股份有限公司 Alarm clock reminding system and method based on optical modem flow monitoring

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030926A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for controlling network data flow of global microwave access inter-operation
CN101286937A (en) * 2008-05-16 2008-10-15 华为技术有限公司 Network flow control method, device and system
US20110158248A1 (en) * 2009-12-24 2011-06-30 Juniper Networks, Inc. Dynamic prioritized fair share scheduling scheme in over-subscribed port scenario
US20110264516A1 (en) * 2010-04-27 2011-10-27 Yahoo! Inc. Limiting latency due to excessive demand in ad exchange
CN103905327A (en) * 2012-12-25 2014-07-02 中国科学院声学研究所 Stream state information based content-centric network congestion control method and system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030926A (en) * 2006-02-28 2007-09-05 华为技术有限公司 Method for controlling network data flow of global microwave access inter-operation
CN101286937A (en) * 2008-05-16 2008-10-15 华为技术有限公司 Network flow control method, device and system
US20110158248A1 (en) * 2009-12-24 2011-06-30 Juniper Networks, Inc. Dynamic prioritized fair share scheduling scheme in over-subscribed port scenario
US20110264516A1 (en) * 2010-04-27 2011-10-27 Yahoo! Inc. Limiting latency due to excessive demand in ad exchange
CN103905327A (en) * 2012-12-25 2014-07-02 中国科学院声学研究所 Stream state information based content-centric network congestion control method and system thereof

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107086932A (en) * 2017-05-22 2017-08-22 安徽电信规划设计有限责任公司 A kind of cloud platform virtualizes traffic security monitoring system
US11425051B2 (en) 2017-05-31 2022-08-23 Huawei Technologies Co., Ltd. Flow control method and system, and device
CN108573013A (en) * 2017-12-08 2018-09-25 北京金山云网络技术有限公司 Request processing method, device, electronic equipment and computer readable storage medium
CN108173938A (en) * 2017-12-28 2018-06-15 泰康保险集团股份有限公司 Server load shunt method and device
CN108173938B (en) * 2017-12-28 2021-01-29 泰康保险集团股份有限公司 Server load distribution method and device
WO2019174509A1 (en) * 2018-03-15 2019-09-19 阿里巴巴集团控股有限公司 Rate control method, apparatus and electronic device
CN108848037B (en) * 2018-05-31 2023-06-20 平安医疗科技有限公司 Service request processing method, device, computer equipment and storage medium
CN108848037A (en) * 2018-05-31 2018-11-20 平安医疗科技有限公司 Service request processing method, device, computer equipment and storage medium
CN108683605A (en) * 2018-06-12 2018-10-19 阿里巴巴集团控股有限公司 A kind of current-limiting method and device of service call
CN108683605B (en) * 2018-06-12 2021-08-24 创新先进技术有限公司 Current limiting method and device for service call
CN110659898A (en) * 2018-06-28 2020-01-07 腾讯科技(深圳)有限公司 Data control method, device and storage medium
CN110933241A (en) * 2018-09-19 2020-03-27 中移信息技术有限公司 Method, device, equipment and medium for sending online charging request
CN110933241B (en) * 2018-09-19 2021-03-23 中移信息技术有限公司 Method, device, equipment and medium for sending online charging request
CN109284229B (en) * 2018-10-17 2022-02-22 武汉斗鱼网络科技有限公司 Dynamic adjustment method based on QPS and related equipment
CN109284229A (en) * 2018-10-17 2019-01-29 武汉斗鱼网络科技有限公司 A kind of dynamic adjusting method and relevant device based on QPS
CN109921962B (en) * 2019-04-16 2021-03-23 腾讯科技(深圳)有限公司 Bandwidth measuring method, device, computer readable storage medium and computer equipment
CN109921962A (en) * 2019-04-16 2019-06-21 腾讯科技(深圳)有限公司 Bandwidth Measurement Method, device, computer readable storage medium and computer equipment
CN113472492A (en) * 2020-03-30 2021-10-01 维沃移动通信有限公司 Transmission method and device of flow control message
CN113472492B (en) * 2020-03-30 2023-04-07 维沃移动通信有限公司 Transmission method and device of flow control message
CN111555987A (en) * 2020-04-28 2020-08-18 深圳前海微众银行股份有限公司 Current limiting configuration method, device, equipment and computer storage medium
CN113923163A (en) * 2021-10-20 2022-01-11 广东亿迅科技有限公司 Long connection message channel based current limiting method and system
CN115865820A (en) * 2022-11-23 2023-03-28 四川天邑康和通信股份有限公司 Alarm clock reminding system and method based on optical modem flow monitoring
CN115865820B (en) * 2022-11-23 2024-05-28 四川天邑康和通信股份有限公司 Alarm clock reminding system and method based on light cat flow monitoring

Also Published As

Publication number Publication date
CN106612238B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN106612238A (en) Flow control method, device and system
EP3298824B1 (en) Method and apparatus for managing buffer in wireless communication system
CN105577530B (en) Group chat information overview method and device
CN107295354A (en) Connect the live method for building up of wheat and device in a kind of network direct broadcasting
CN106155780A (en) A kind of time-based node electoral machinery and device
CN108633106A (en) A kind of random access after random access backoff and indicating means, device
CN111061560A (en) Cloud rendering resource scheduling method and device, electronic equipment and storage medium
CN108206958A (en) A kind of method for obtaining video recording resource and association turn server
CN110011926B (en) Method, device, equipment and storage medium for adjusting message sending time
CN108650667A (en) Terminal scheduling method and apparatus
CN110831039A (en) Data transmission method and transmission server in multi-path concurrent system
CN105898882A (en) Data transmission method, sending terminal, reception terminal and data transmission system
CN108683528A (en) A kind of data transmission method, central server, server and data transmission system
CN110287135A (en) A kind of bus polling method and device
CN110019386A (en) A kind of stream data processing method and equipment
CN111064552A (en) Intelligent device control method and device, electronic device and storage medium
CN108234143B (en) Method, device and equipment for processing messages in live broadcast
CN108712494A (en) Handle the method, apparatus and equipment of asynchronous message
CN106708761A (en) Service message processing method and device
CN102056095B (en) Method, system and device for controlling short message transmitting flow rate
CN111815059B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN107743077B (en) Method and device for evaluating network performance of information-physical fusion system
CN106169979A (en) A kind of method for processing business and equipment
CN106790729B (en) Device and method for communicating with client
CN106126640B (en) Content-data method for pushing and device

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