CN112104567A - Flow control method, device, equipment and medium - Google Patents

Flow control method, device, equipment and medium Download PDF

Info

Publication number
CN112104567A
CN112104567A CN202010917034.2A CN202010917034A CN112104567A CN 112104567 A CN112104567 A CN 112104567A CN 202010917034 A CN202010917034 A CN 202010917034A CN 112104567 A CN112104567 A CN 112104567A
Authority
CN
China
Prior art keywords
node
application
borrowing
application node
request
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
CN202010917034.2A
Other languages
Chinese (zh)
Other versions
CN112104567B (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202010917034.2A priority Critical patent/CN112104567B/en
Publication of CN112104567A publication Critical patent/CN112104567A/en
Application granted granted Critical
Publication of CN112104567B publication Critical patent/CN112104567B/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/215Flow control; Congestion control using token-bucket
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Abstract

The invention discloses a flow control method, a flow control device, flow control equipment and a flow control medium. The flow control method comprises the following steps: receiving a first query request sent by a first application node; obtaining historical traffic data of a second application node associated with the first application node in response to the first query request; the second application node is the same as the node group to which the first application node belongs; selecting a first detachable borrowing node from the second application nodes according to historical flow data; sending a first node identification corresponding to the first borrowable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node. According to the embodiment of the invention, the flow control of the distributed system can be carried out integrally.

Description

Flow control method, device, equipment and medium
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a flow control method, a flow control device, flow control equipment and a flow control medium.
Background
With the development of mobile internet services, flow control of a distributed system becomes a key issue regarding system availability.
At present, to prevent an instantaneous high-concurrency scenario from exceeding the carrying capacity of a distributed system, a token bucket algorithm is generally used to perform traffic peak clipping so as to ensure stable operation of the distributed system. However, if the cluster size of the distributed system is large, the management and issuance of the token bucket may become a performance bottleneck, and when the flow control is performed on a large-scale distributed cluster, the flow control cannot be performed on the distributed system as a whole.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for controlling a flow, which can perform an overall flow control on a distributed system.
In a first aspect, an embodiment of the present invention provides a flow control method, applied to a target application node, including:
receiving a first query request sent by a first application node;
obtaining historical traffic data of a second application node associated with the first application node in response to the first query request; the second application node is the same as the node group to which the first application node belongs;
selecting a first detachable borrowing node from the second application nodes according to historical flow data;
sending a first node identification corresponding to the first borrowable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
In a second aspect, an embodiment of the present invention provides a flow control method, applied to an application node, including:
sending a first query request to a target application node; the first query request is used for enabling a target application node to feed back a first node identifier corresponding to a first detachable node in a second application node, and the second application node is an application node which is the same as a node group to which the target application node belongs;
receiving a first node identifier fed back by a target application node;
sending a first borrowing request to a first borrowable node according to the first node identifier; wherein the first borrowing request is used for enabling the first borrowing node to feed back the first borrowing token amount;
and receiving the first borrowable token amount fed back by the first borrowable node.
In a third aspect, an embodiment of the present invention provides a flow control device, which is applied to a target application node, and includes:
the first receiving module is used for receiving a first query request sent by a first application node;
a first obtaining module, configured to obtain, in response to a first query request, historical traffic data of a second application node associated with a first application node; the second application node is the same as the node group to which the first application node belongs;
the first selection module is used for selecting a first detachable borrowing node from the second application nodes according to historical flow data;
the first sending module is used for sending a first node identifier corresponding to the first borrowable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
In a fourth aspect, an embodiment of the present invention provides a flow control device, which is applied to an application node, and includes:
the second sending module is used for sending the first query request to the target application node; the first query request is used for enabling a target application node to feed back a first node identifier corresponding to a first detachable node in a second application node, and the second application node is an application node which is the same as a node group to which the target application node belongs;
the second receiving module is used for receiving the first node identification fed back by the target application node;
a third sending module, configured to send the first borrowing request to the first removable borrowing node according to the first node identifier; wherein the first borrowing request is used for enabling the first borrowing node to feed back the first borrowing token amount;
and the third receiving module is used for receiving the first removable borrowing token amount fed back by the first removable borrowing node.
In a fifth aspect, an embodiment of the present invention provides a flow control apparatus, where the apparatus includes: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a flow control method as described in the first or second aspect.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which computer program instructions are stored, and when executed by a processor, the computer program instructions implement the flow control method according to the first aspect or the second aspect.
The flow control method, apparatus, device and medium of the embodiments of the present invention can, after receiving a first query request sent by a first application node, responding to the first query request, acquiring historical flow data of a second application node which is the same as a node group to which the first application node belongs, selecting a first detachable node from the second application node according to the historical flow data, further sending a first node identification corresponding to the first borrowing node to the first application node, so that the first application node sends a first borrowing request to the first borrowing node according to the first node identification, and the first borrowing node feeds back a first borrowing token amount to the first application node, therefore, mutual borrowing of the token quota among a plurality of application nodes in the same node group can be realized, and the overall flow control of the distributed system is carried out.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of flow control of a main flow cluster in the related art;
FIG. 2 is a block diagram of a flow control architecture according to an embodiment of the present invention;
fig. 3 is a schematic view of an application scenario of flow control according to an embodiment of the present invention;
fig. 4 is a flowchart of a flow control method according to an embodiment of the present invention;
FIG. 5 is a diagram of a flow control scenario provided by an embodiment of the present invention;
fig. 6 is a schematic flow chart of a flow control method according to another embodiment of the present invention;
FIG. 7 is a schematic diagram of a flow control device according to an embodiment of the present invention;
FIG. 8 is a schematic view of a flow control device according to another embodiment of the present invention;
fig. 9 is a schematic hardware structure diagram of a flow control device according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
At present, in a general scheme of flow control of a distributed system, flow shaping is generally performed through a leaky bucket algorithm, peak clipping is performed through a token bucket algorithm, and flow preheating during application program starting is ensured through a cold start (arm up) mode.
Here, when the flow control component of the mainstream application is the open source current limiting component Sentinal, the above-mentioned vulnerability algorithm and token bucket algorithm and the scheme corresponding to the algorithm can be applied to the standalone mode of the Sentinal component, so that the flow control problem of the standalone application is improved to a certain extent. The flow control scheme corresponding to the Sentinal component mainly uses a Token bucket algorithm, namely, a specific Token Server such as a Token Server is defined to govern a plurality of Token clients such as Token clients, and the Token buckets are managed and issued, so that the cluster flow control effect is achieved. To facilitate understanding of the flow control scheme of the current mainstream cluster, it can be illustrated by the following example.
As shown in fig. 1, the flow control scheme of the current mainstream cluster relates to a function of a flow control mechanism in a group, and has two aspects. The method comprises the steps of applying and managing a token bucket (namely a token bucket consisting of a plurality of tokens) on one hand, and collecting, summarizing and presenting traffic monitoring data on the other hand.
Wherein the intra-group flow control mechanism may comprise a node group comprising node 1, node 2 and node 3. Here, node 1 is set as a group node of the node group, and node 1, node 2, and node 3 are set as basic application nodes of the node group. If the time period t (e.g., 1 second) is an observation window, t is generally divided into several control windows (e.g., 5 200 ms). The traffic control indicator p (e.g., 10000tps) on the traffic is divided into 5 control windows (e.g., the total credit of each control window is 2000 token transactions).
Based on this, under such a flow control mechanism, tokens can be allocated as follows. That is, at the start time of each control window, the base application node needs to initiate a token batch application to the group node. If the total number of applied tokens is 300, for example, each basic application node applies 100. Here, the number of 100 tokens requested is much smaller than the total amount 2000 of the control window.
Then, if the basic application node consumes 100 tokens in the control window (for example, a request corresponding to token processing), it needs to initiate a token batch application to the group node again, and the group node determines whether to satisfy the token batch application of the basic application node according to whether there is a remainder in the total amount 2000 of the basic application node in the control window. If the application is refused because the total amount of the basic application node is used up, the flow consumption of the basic application node in the control window reaches the upper limit, and the basic application node enters the flow control logic.
Therefore, in the current flow control scheme of the mainstream cluster, each basic application node sends a token batch application to a group node at least once in each control window, and if the token consumption speed is high, multiple token batch applications need to be made. This increases the communication and computational load of the group nodes in the flow control of the cluster, and also increases the communication and computational load of the underlying application nodes in the flow unsaturated state.
In addition, the above-mentioned flow control scheme is not applicable in some scenarios, for example, when a device cluster (i.e. a cluster including a Client and a Server, or a cluster including a Client) is large, if one Token Server is used to administer all Token clients, the Token Server manages and issues Token buckets, which may become a performance bottleneck, and the Token Server is difficult to expand laterally. If Token servers and Token clients are grouped, a plurality of Token servers are generally adopted to manage and issue Token buckets in the Token clients in a group by group, and the division of the group is difficult to accept. If the divided groups are too small, the number of groups is large, and the groups become single-machine flow control, so that the control on the cluster flow integrity is lacked.
In summary, the current flow control method cannot perform effective and integrated flow control on the distributed system.
Based on this, the flow control provided by the embodiment of the present invention is described in detail below with reference to fig. 2 to 5 through specific embodiments and application scenarios thereof.
First, the flow control architecture will be described with reference to fig. 2. Specifically, as shown in fig. 2, the application cluster includes 9 nodes, each of which may represent an application, and the 9 nodes are grouped according to the topology rule. Wherein the topology rule may include at least one of:
(1) the layer height of the topology is not higher than m, wherein m is an adjustable parameter which can be set according to an actual application scene; as shown in fig. 2, m is 3.
(2) The number of nodes in each group of the topology is not higher than n, n is an adjustable parameter, and the adjustable parameter can be set according to an actual application scene; as shown in fig. 2, n is 3.
(3) The base nodes (e.g., nodes 1-9) in the topology may be actual application nodes, the group nodes are selected nodes from the base nodes, and the global group nodes are selected nodes from the group nodes.
As shown in fig. 2, the group nodes (e.g., node 1, node 4, and node 9) are selected from the base nodes, and the group node (e.g., node 1, node 4, and node 9), i.e., the global group node (e.g., node 1), is selected from the group nodes (e.g., node 1, node 4, and node 9).
(4) The whole packet topology forms an initial topology according to the topology rules, in the operation process, if the group nodes can not work normally, the new group nodes can be selected dynamically according to the distributed consistency protocol, and the old group nodes are added into the group again according to the identity of the basic application nodes after being recovered. If a base application node is down, it is temporarily removed from the group until it recovers and is added to the group.
It should be noted that, in the embodiment of the present invention, the generation and management of the topology (or the initial topology) may be determined according to the above topology rules, or may be automatically and intelligently generated according to the historical traffic of each node. For example, the topology may determine the topology or perform structural deformation according to the traffic change of the nodes in actual operation.
Based on the above framework, an application scenario of flow control provided by the embodiment of the present invention is described with reference to fig. 3.
As shown in fig. 3, the ingress traffic is transmitted to the F5 server through Hypertext Transfer Protocol over Secure Socket Layer (Http), the F5 server performs SSL washing and/or TLS Protocol offloading, converts into a Hypertext Transfer Protocol (Http) and transmits to two nginx servers, and the two nginx servers reverse proxy to nine Application (APP) nodes (e.g., APP1 to APP9), which are hereinafter referred to as Application nodes. Wherein, nine application nodes perform cluster flow control on the access flow.
The flow control device based on the borrowed adaptive cluster provided by the embodiment of the invention is integrated into an application process by nine application nodes in a jar packet or so component mode, and configuration parameters such as topology parameters, flow parameters, window parameters, weight parameters and the like are loaded into the application process. The nine application nodes build the initial topology in the manner shown in fig. 2. Wherein the initial topology may be generated according to a topology rule. The topology rule under the scene comprises at least one of the following:
(1) the communication between the application nodes may adopt a Transmission Control Protocol (TCP) or a User Datagram Protocol (UDP).
In the case of using UDP, there are mechanisms for confirming message reliability and retransmitting the message. In the operation process, if a group node is down, a new group node is dynamically elected according to a distributed consistency protocol, and a Paxos protocol or a Raft protocol can be specifically adopted. The old group node rejoins the group after recovery with the identity of the base application node. If a base application node is down, it is temporarily removed from the group until it recovers and is added to the group.
(2) And when a certain group of nodes is down and before a new group of nodes is not elected, the operation mode of the group is degraded from the cluster flow control mode to the single-machine flow control mode. At this time, if the global group node (e.g., node 1 in fig. 2) cannot receive the traffic data report of the group node, the overall traffic is calculated according to the full traffic of the group, and the group is removed from the inter-group borrowing list. The above measures are carried out until the recovery of the group of nodes is finished.
Wherein, the related traffic data may include at least one of the following data: the total number of the entrance requests, the number of the passing requests and the number of the refusal requests, so that the global group node (or the group node) determines the operation condition of each basic application node according to the traffic data, and the number of the consumed tokens under the normal condition.
(3) And when a certain basic application node is down, the group where the basic application node is located cannot receive the traffic data report of the group of nodes, calculating the overall traffic according to the full traffic of the basic application node, and removing the basic application node from the internal borrowing list of the group. The above measures are carried out until the recovery of the basic application node is finished. The full traffic referred to above may be understood as the maximum traffic that the node can handle.
Here, the reason why the group node downtime and the basic application node downtime are processed according to the full traffic is that the judgment of the downtime is not accurate and sufficient, the network abnormality can cause the downtime completely, and according to the pessimistic control strategy of the cluster flow control, the outage ratio is not well controlled, so the processing is performed according to the full traffic.
Based on the above-mentioned flow control architecture and application scenario, the flow control method provided by the embodiment of the present invention is described with reference to fig. 4 and fig. 5 (i.e., taking one node group, i.e., node 1, node 2, and node 3, of the 3 groups shown in fig. 2 as an example).
First, fig. 4 is a flowchart of a flow control method according to an embodiment of the present invention.
As shown in fig. 4, an embodiment of the present invention provides a flow control method, where the flow control method is applied to a group node in fig. 5, that is, a target application node, such as node 1. The method may include S410-S440.
The method includes the steps that S410, a first query request sent by a first application node is received;
next, S420, in response to the first query request, obtaining historical traffic data of a second application node associated with the first application node; the second application node is the same as the node group to which the first application node belongs;
furthermore, S430, selecting a first detachable node from the second application nodes according to the historical flow data;
then, S440, sending a first node identifier corresponding to the first detachable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
Therefore, after a first query request sent by a first application node is received, responding to the first query request, obtaining historical flow data of a second application node which is the same as a node group to which the first application node belongs, selecting a first detachable borrowing node from the second application node according to the historical flow data, and further sending a first node identifier corresponding to the first detachable borrowing node to the first application node, so that the first application node sends a first detaching request to the first detachable borrowing node according to the first node identifier, and the first detachable borrowing node feeds back a first detachable borrowing token amount to the first application node.
Based on this, the above S410 to S440 will be described in detail with reference to fig. 5:
referring first to S410, as shown in fig. 5, the first application node may be node 1, node 2, or node 3.
It should be noted that, in the embodiment provided by the present invention, the node 1 is both a group node and a basic application node, so the node 1 may perform flow control, and may also determine an borrowing scheme between nodes and regulate and control a token on the node based on flow data of each node.
Based on this, as shown in fig. 5, in the embodiment of the present invention, if the time period t (e.g., 1 second) is an observation window, t is generally divided into a plurality of control windows (e.g., 5 200 milliseconds). The flow control index p (e.g. 10000tps) on the traffic is divided into 5 control windows (e.g. 2000 token transactions per control window) in one observation window to achieve the time smoothness of the flow control.
In this way, the first query request sent by the first application node is received under the condition that the remaining token quota of the first application node is smaller than or equal to the rated threshold, and the token quota is acquired by the first application node in the control window period. For example, in the case of traffic saturation, the pre-allocated token amount of the base application node (i.e. the first application node such as node 1, node 2 or node 3) is 2000 tokens, if the rated threshold is 0, i.e. the self pre-allocated amount of tokens such as 2000 tokens is consumed, the query request of the token lending node is initiated to the group node (e.g. node 1), or if the rated threshold is 5, i.e. the consumed pre-allocated token amount is 1995 tokens, the query request of the token lending node is initiated to the group node (e.g. node 1). It should be noted that the pre-allocated token quota, such as 2000 tokens, contains the remaining token quota, where the pre-allocated token quota (which is equivalent to the total token quota including the remaining token quota) is obtained by the base application node during the control window period.
Here, the node 1 may receive a first query request sent by the node 1, the node 2 or the node 3, the first query request being used for querying a second application node associated with the first application node and determining a node identification and a detachable token amount of a detachable node in the second application node.
Here, in order to reduce the communication load and the computation load, in an embodiment of the present invention, the base application node initiates a token borrowing node query at most once within one control window.
On the contrary, under the condition that the traffic is not saturated, each basic application node reports the traffic data to the node 1 in each control window, and at this time, the first query request does not need to be sent, so that the communication load is reduced.
It should be noted that the preset token quota is a preset token quota determined by a system corresponding to the application program cluster for each node. In a possible embodiment, the embodiment of the present invention further provides a method for determining a preset token quota in a manner other than that the flow control index mentioned above is a total quota divided by the number of nodes for balanced distribution, that is, automatic and intelligent distribution is performed by a group of nodes according to the historical flow of each node. In order to ensure that the flow rate change of each node is detected, so as to perform automatic and intelligent correction on the distribution of the flow control index to each node according to the flow rate change and the borrowing condition in actual operation, before S410, the method may further include:
acquiring the total number of nodes in a node group to which a first application node belongs and a total token amount corresponding to the node group to which the first application node belongs;
determining a preset token limit corresponding to the first application node according to the total number of the nodes and the total token limit;
and sending a preset token limit to the first application node.
Here, generally, the ingress load balancer distributes traffic to each basic application node in the cluster roughly equally, and an unbalanced situation occurs, but the unbalanced situation is not a significant deviation and is not a long-time persistent state, and it is not necessary to apply for a token batch to a group node every time. Based on this point, the method in the embodiment of the present invention adopts a scheme of pre-allocation and borrowing, and can pre-allocate all quota to each basic application node in advance in each control window period, and each basic application node is pre-loaded in a memory as a parameter in proportion. Therefore, under the condition that the flow is not saturated enough, the basic application node hardly needs to carry out batch borrowing of tokens among the nodes, and the communication overhead and the calculation processing overhead of the group of nodes are greatly saved.
Next, referring to S420, an example is described in conjunction with fig. 5, that is, when the first application node is node 2, the second application node is node 1 and node 3 belonging to the same node group as node 2.
Furthermore, referring to S430, in order to effectively reduce the communication load and the computation load of the group node in the cluster flow control, the embodiment of the present invention provides a packet borrowing scheme, that is, an intra-group borrowing scheme is implemented. In the embodiment of the present invention, two ways of selecting the first detachable borrowing node are provided, which are specifically as follows:
in a first manner, when the historical traffic data determined in S420 includes a first traffic value in a preset historical time period, a second traffic value in a previous observation window period, and a third traffic value in a previous control window period, S430 may specifically include:
s4301, carrying out weighted summation calculation on the first flow value, the second flow value and the third flow value to obtain a flow empirical value of the second application node;
and S4302, selecting a first detachable node from the second application nodes according to the flow experience value.
In the embodiment of the present invention, the first weight corresponding to the first flow value is smaller than the second weight corresponding to the second flow value, and the second weight is smaller than the third weight corresponding to the third flow value.
For example, the group node calculates the number of the basic application node within three with the lightest load on the current experience probability according to the historical traffic reported by the basic application nodes, namely node 1, node 2 and node 3, the traffic in the previous observation window period and the traffic in the previous control window period, and returns the number to node 2 initiating the token borrowing query, so that node 2 finds the corresponding node according to the node number and performs node borrowing.
In a second mode, in order to ensure aggregate monitoring and information output of traffic, in each control window, a group node needs to receive traffic data in a primary window period reported by each basic application node. In addition, the group node provided in the embodiment of the present invention needs to perform an important step of calculating a flow rate empirical value corresponding to each second application node, where S4302 related to the first equation may be further specifically described, and S4302 includes:
s43021, determining the priority corresponding to each second application node according to the flow experience value corresponding to each second application node;
s43022, arranging the second application nodes according to the sequence of the priorities from big to small to obtain an application node sequence;
s43023, select a preset number of first detachable nodes from the application node sequence.
And the preset number is less than or equal to the product of the number of the nodes of the second application node and the preset percentage.
Here, the above possibility can be achieved by executing the following formula (1):
empirical flow rate value a1 historical flow rate + a2 flow rate in previous observation window period + a3 flow rate data in previous control window period (1)
In this way, the empirical flow rate value (where the weight is a configurable parameter, i.e., a1< a2< a3) is calculated by weighting the historical flow rate in the flow rate data reported by each basic application node, the flow rate in the previous observation window period, and the flow rate data in the previous control window period, and the priority sequence of the number of the basic application node with the lightest load on the current empirical probability (i.e., not more than 40% of the total number of nodes) is selected.
It should be noted that the above calculation process is executed once in each control window, and if the basic application node consumes its pre-allocated quota each time, it initiates token borrowing node query to the group node, and the group node directly returns the calculation result in a round-robin manner. For example: the priority returned by the last query is the node 1, the node 2 and the node 3, and the priority returned by the current query is the node 4, the node 5 and the node 6.
Therefore, the problem of high communication and processing overhead of the group nodes can be effectively solved through the first mode and the second mode, and the lateral expansibility of the cluster flow control is greatly improved. Thus, in the case of traffic unsaturation, the group node processes only one report of traffic data per base application node during a control window period. Under the condition of flow saturation, the group node is added with the query request of the basic application node which needs to be borrowed at most once, so that the load is light, and the lateral expansibility is good.
Then, referring to S440, the node 1 may send a first node identifier corresponding to the first borrowing node to the first application node according to the selected first borrowing node, so that the first application node sends a first borrowing request to the first borrowing node according to the first node identifier, and makes the first borrowing node feed back the first borrowing token amount to the first application node through the first borrowing request, so as to process a corresponding number of requests according to the first borrowing token amount.
In addition, in addition to implementing the intra-group lending scheme as shown in the above S430, an implementation-group lending scheme is also provided in the embodiment of the present invention. The principle of the borrowing scheme between groups is similar to that of the borrowing scheme in the groups, and only the group nodes are changed into the role of basic application nodes, and a group node for managing the group nodes is elected additionally. Therefore, the method is suitable for various practical application programs and is convenient for engineering application implementation. In addition, the problem that the overall flow control cooperation between groups is lacked in the current flow control scheme can be solved.
Thus, the following describes the implementation of the inter-group lending scheme.
In a possible embodiment, before S43023 in case 1, the flow control method in the embodiment of the present invention may further include S510-S520, wherein,
s510, determining a request number of the first query request in the current control window period;
s520, dividing the second application nodes into a plurality of application node groups according to the sequence order of the application node sequence; wherein each application node group comprises a preset number of application nodes.
Based on this, S43023 may specifically include:
and in the case that the request number is less than or equal to the group number of the application node group, taking the application node in the application node group with the same sequence number as the request number as the first detachable node.
Otherwise, under the condition that the request number is larger than the group number, a second query request is sent to the third application node; the second query request is used for enabling a third application node to feed back a second node identifier corresponding to a second borrowable node in a fourth application node, the third application node is an application node different from a node group to which the first application node belongs, and the fourth application node is an application node which is the same as the node group to which the third application node belongs;
receiving a second node identification;
sending a second borrowing request to a second borrowing node according to the second node identifier; wherein the second borrowing request is used for enabling the second borrowing node to feed back the second borrowing token amount;
receiving a second removable borrowing token amount fed back by a second removable borrowing node;
and send the second removable token amount to the first application node.
Therefore, the embodiment of the invention carries out grouping management by setting a plurality of Token servers so as to realize the adjustment and control of the flow quota between groups according to the group node of an additionally elected management group node. The scheme of intra-group borrowing and inter-group borrowing provided by the embodiment of the invention better solves the integrity problem of the cluster flow control.
Here, in a case where the number of the second lendable node is multiple, the sending of the second lending request to the second lendable node according to the second node identifier may specifically include:
and sequentially sending a second borrowing request to each second borrowing node according to the sequence of the priorities of the second borrowing nodes from high to low and according to the second node identification until a first preset condition is met.
The first preset condition involved in the embodiment of the present invention includes at least one of the following:
having sent a second borrowing request to all second borrowable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
Therefore, in order to effectively reduce communication load and calculation load, the embodiment of the invention can be used for at most three loan attempts, the quota is balanced when the loan is successfully borrowed, and the basic application node initiating the request still has the quota to process the service request; and if the borrowing fails, the basic application node which initiates the request enters a flow control state. Therefore, the communication load and the calculation load of the group node in the cluster flow control are effectively reduced, and the communication load and the calculation load of the basic application node are also effectively reduced in the unsaturated flow state. Therefore, when the cluster flow is controlled, a sink node is not needed to distribute all token buckets, and the problem of lack of lateral expansibility when one cluster is used for one group is solved.
In addition, an embodiment of the present invention further provides a flow control method, which is applied to the above-mentioned basic application node (e.g., node 1, node 2, or node 3 in fig. 5), and a specific method may include S610 to S640, so as to correspond to the above-mentioned method applied to the group node.
The following describes in detail a flow control method based on a basic application node according to an embodiment of the present invention with reference to fig. 6, which is specifically as follows:
first, S610 sends a first query request to a target application node (e.g., a group node corresponding to a base application node, i.e., node 1); the first query request is used for enabling a target application node to feed back a first node identifier corresponding to a first detachable node in a second application node, and the second application node is an application node which is the same as a node group to which the target application node belongs;
next, S620, receiving a first node identifier fed back by the target application node;
furthermore, S630, according to the first node identifier, sends a first borrowing request to the first borrowable node; wherein the first borrowing request is used for enabling the first borrowing node to feed back the first borrowing token amount;
then, S640, the first borrowable token amount fed back by the first borrowable node is received. So as to process the request according to the detachable token amount.
Therefore, a first query request can be sent to the target application node, so that the target application node feeds back a first node identifier corresponding to a first detachable borrowing node in a second application node which is the same as a node group to which the target application node belongs, the first node identifier fed back by the target application node is received, and then a first borrowing request is sent to the first detachable borrowing node according to the first node identifier, so that the first detachable borrowing node feeds back a first detachable borrowing token amount, and finally the first detachable borrowing token amount fed back by the first detachable borrowing node is received.
Here, the embodiment of the present invention provides two conditions for triggering execution of S610:
condition 1: the method comprises the step of sending a first query request to a target application node under the condition that the residual token amount of a basic application node is less than or equal to a rated threshold value, wherein the total token amount comprising the residual token amount is acquired by the basic application node within a control window period. Thus, before S610, the method may further include:
determining the remaining token limit, wherein the token limit is obtained in the control window period;
wherein sending the first query request to the target application node comprises:
and sending a first query request to the target application node under the condition that the remaining token amount is less than or equal to the rated threshold value.
Therefore, the embodiment of the invention can send the first query request to the target application node under the condition that the remaining token amount is less than or equal to the rated threshold, and on the contrary, only the flow data needs to be reported to the group node under the condition that the remaining token amount is greater than the rated threshold, so as to reduce the communication load among the nodes.
Condition 2: if the basic application node determines that the demand token amount is greater than the remaining token amount, the method may further include, before S610, sending a first query request to the target application node:
determining a demand token amount and a remaining token amount;
wherein sending the first query request to the target application node comprises:
and sending a first query request to the target application node under the condition that the demand token limit is larger than the rest token limit.
Therefore, the embodiment of the invention can send the first query request to the target application node under the condition that the demand token limit is larger than the remaining token limit, and on the contrary, only the flow data needs to be reported to the group node under the condition that the demand token limit is smaller than or equal to the remaining token limit, so as to reduce the communication load among the nodes.
The demand token limit here refers to the condition that the number of requests to be processed on the basic node is larger than the expected required token limit under the remaining token limit.
In addition, when the number of the first lendable node is multiple, the sending of the first lending request to the first lendable node according to the first node identifier may specifically include:
and sequentially sending a first borrowing request to each first borrowing node according to the sequence of the priority of the first borrowing node from high to low and according to the first node identification until a second preset condition is met.
Wherein, the second preset condition in the embodiment of the present invention includes at least one of the following:
having sent a first borrowing request to all first borrowable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
Fig. 7 is a schematic structural diagram of a flow control device according to an embodiment of the present invention.
In some embodiments of the present invention, the apparatus shown in fig. 7 may be disposed in a target application node, which may be a group node of a node group, for example, the target application node may be node 1 in the architecture shown in fig. 5.
As shown in fig. 7, the flow control apparatus 700 may include a first receiving module 710, a first obtaining module 720, a first selecting module 730, and a first sending module 740.
The first receiving module 710 may be configured to receive a first query request sent by a first application node.
The first obtaining module 720 may be configured to obtain, in response to the first query request, historical traffic data of a second application node associated with the first application node; the second application node is the same as the node group to which the first application node belongs.
The first selecting module 730 may be configured to select the first lendable node from the second application node according to the historical traffic data.
The first sending module 740 may be configured to send a first node identifier corresponding to the first lendable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
In the embodiment of the invention, after receiving a first query request sent by a first application node, in response to the first query request, historical traffic data of a second application node which is the same as a node group to which the first application node belongs is obtained, and according to the historical traffic data, a first detachable borrowing node is selected from the second application nodes, and then a first node identifier corresponding to the first detachable borrowing node is sent to the first application node, so that the first application node sends a first borrowing request to the first detachable borrowing node according to the first node identifier, and the first detachable borrowing node feeds back a first detachable token quota to the first application node, and therefore, mutual borrowing of the token quotas among a plurality of application nodes in the same node group can be realized, and overall flow control is performed on a distributed system.
In some embodiments of the present invention, the first receiving module 710 may be specifically configured to receive a first query request sent by a first application node when a remaining token amount of the first application node is smaller than a rated threshold, where the token amount is obtained by the first application node within a control window period.
In some embodiments of the present invention, the historical flow data may include a first flow value over a preset historical time period, a second flow value over a previous observation window period, and a third flow value over a previous control window period.
Accordingly, the first selection module 730 may include a first calculation unit and a first selection unit.
The first calculation unit may be configured to perform weighted summation calculation on the first flow value, the second flow value, and the third flow value to obtain a flow experience value of the second application node.
The first selecting unit may be configured to select the first borrowable node from the second application nodes according to the experience value of the traffic.
In some embodiments of the present invention, the first weight corresponding to the first flow value may be smaller than the second weight corresponding to the second flow value, and the second weight may be smaller than the third weight corresponding to the third flow value.
In some embodiments of the present invention, the first selecting unit may specifically be configured to: determining the priority corresponding to each second application node according to the flow experience value corresponding to each second application node; arranging the second application nodes according to the sequence of the priorities from big to small to obtain an application node sequence; a preset number of first borrowable nodes are selected from the application node sequence.
In some embodiments of the present invention, the preset number may be less than or equal to a product of the number of nodes of the second application node and the preset percentage.
In some embodiments of the present invention, the flow control apparatus 700 may further include a first determining module and a first grouping module.
The first determination module may be to determine a request number of the first query request within a current control window period.
The first grouping module may be configured to group the second application nodes into a plurality of groups of application nodes according to a sequence order of the application node sequence; wherein each application node group comprises a preset number of application nodes.
Correspondingly, the first selecting unit may be specifically configured to: and in the case that the request number is less than or equal to the group number of the application node group, taking the application node in the application node group with the same sequence number as the request number as the first detachable node.
In some embodiments of the present invention, the flow control device 700 may further include a fourth sending module, a fourth receiving module, a fifth sending module and a fifth receiving module.
The fourth sending module may be configured to send the second query request to the third application node when the request number is greater than the group number; the second query request is used for enabling a third application node to feed back a second node identifier corresponding to a second borrowable node in a fourth application node, the third application node is an application node different from a node group to which the first application node belongs, and the fourth application node is an application node which is the same as the node group to which the third application node belongs.
The fourth receiving module may be configured to receive a second node identification.
The fifth sending module may be configured to send a second borrowing request to the second borrowing node according to the second node identifier; wherein the second borrowing request is used for enabling the second borrowing node to feed back the second borrowing token amount.
The fifth receiving module may be configured to receive a second borrowing token amount fed back by the second borrowing node.
In some embodiments of the present invention, the flow control device 700 may further include a sixth sending module.
The sixth sending module may be configured to send the second removable token amount to the first application node.
In some embodiments of the invention, the number of second lendable nodes may be plural.
Accordingly, the fifth sending module may be specifically configured to: and sequentially sending a second borrowing request to each second borrowing node according to the sequence of the priorities of the second borrowing nodes from high to low and according to the second node identification until a first preset condition is met.
In some embodiments of the invention, the first preset condition may comprise at least one of:
having sent a second borrowing request to all second borrowable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
It should be noted that the data processing apparatus 700 shown in fig. 7 may execute each step in the method embodiment shown in fig. 4, and implement each process and effect in the method embodiment shown in fig. 4, which are not described herein again.
Fig. 8 is a schematic structural view of a flow control device according to another embodiment of the present invention.
In some embodiments of the present invention, the flow control device shown in fig. 8 may be disposed in the first application node, which may be any node in the node group, that is, the first application node may be a group node or a base node of the node group, for example, the first application node may be any one of node 1, node 2 and node 3 in the architecture shown in fig. 5.
As shown in fig. 8, the flow control apparatus 800 may include a second transmitting module 810, a second receiving module 820, a third transmitting module 830, and a third receiving module 840.
The second sending module 810 may be configured to send the first query request to the target application node; the first query request is used for enabling the target application node to feed back a first node identifier corresponding to a first borrowable node in a second application node, and the second application node is an application node which is the same as a node group to which the target application node belongs.
The second receiving module 820 may be configured to receive the first node identifier fed back by the target application node.
The third sending module 830 may be configured to send the first borrowing request to the first borrowing node according to the first node identifier; wherein the first borrowing request is used for enabling the first borrowing node to feed back the first borrowing token amount.
The third receiving module 840 may be configured to receive the first removable loan token amount fed back by the first removable loan node.
In the embodiment of the present invention, a first query request may be sent to a target application node, so that the target application node feeds back a first node identifier corresponding to a first removable borrowing node in a second application node in a node group to which the target application node belongs, and receives the first node identifier fed back by the target application node, and then, according to the first node identifier, a first borrowing request may be sent to the first removable borrowing node, so that the first removable borrowing node feeds back a first removable borrowing token amount, and finally, the first removable borrowing token amount fed back by the first removable borrowing node is received, thereby, mutual borrowing of token amounts among multiple application nodes in the same node group may be implemented, so as to perform overall flow control on a distributed system.
In some embodiments of the present invention, the flow control device 800 may further include a third determining module.
The third determination module may be configured to determine a remaining amount of the token, the remaining amount of the token being obtained within the control window.
Accordingly, the second sending module 810 may be specifically configured to: and sending a first query request to the target application node under the condition that the remaining token amount is less than the rated threshold value.
In some embodiments of the invention, the number of first borrowable nodes may be plural.
Accordingly, the third sending module 830 may be specifically configured to: and sequentially sending a first borrowing request to each first borrowing node according to the sequence of the priority of the first borrowing node from high to low and according to the first node identification until a second preset condition is met.
In some embodiments of the invention, the second preset condition may comprise at least one of:
having sent a first borrowing request to all first borrowable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
It should be noted that the data processing apparatus 800 shown in fig. 8 may execute each step in the method embodiment shown in fig. 6, and implement each process and effect in the method embodiment shown in fig. 6, which is not described herein again.
Fig. 9 is a schematic diagram illustrating a hardware structure of a flow control device according to an embodiment of the present invention.
The flow control device may comprise a processor 901 and a memory 902 storing computer program instructions.
Specifically, the processor 901 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing the embodiments of the present invention.
Memory 902 may include mass storage for data or instructions. By way of example, and not limitation, memory 902 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 902 may include removable or non-removable (or fixed) media, where appropriate. The memory 902 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 902 is a non-volatile solid-state memory. In a particular embodiment, the memory 902 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 901 realizes any one of the flow control methods in the above embodiments by reading and executing computer program instructions stored in the memory 902.
In one example, the flow control device may also include a communication interface 903 and a bus 910. As shown in fig. 9, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 910 to complete communication with each other.
The communication interface 903 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 910 includes hardware, software, or both to couple the components of the flow control device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 910 can include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
The flow control device may execute the flow control method in the embodiment of the present invention, so as to implement the flow control method and apparatus described in conjunction with fig. 5 to 8.
In addition, in combination with the flow control method in the foregoing embodiment, the embodiment of the present invention may be implemented by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the flow control methods in the above embodiments.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (19)

1. A flow control method is applied to a target application node and comprises the following steps:
receiving a first query request sent by a first application node;
obtaining historical traffic data of a second application node associated with the first application node in response to the first query request; the second application node is the same as the node group to which the first application node belongs;
selecting a first detachable borrowing node from the second application nodes according to the historical flow data;
sending a first node identifier corresponding to the first borrowable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
2. The method of claim 1, wherein the receiving a first query request sent by a first application node comprises:
receiving a first query request sent by a first application node under the condition that the remaining token amount of the first application node is less than or equal to a rated threshold value,
the token quota is obtained by the first application node within a control window period.
3. The method of claim 1 or 2, wherein the historical flow data comprises a first flow value over a preset historical time period, a second flow value over a last observation window period, and a third flow value over a last control window period;
wherein, the selecting a first borrowable node from the second application nodes according to the historical traffic data comprises:
carrying out weighted summation calculation on the first flow value, the second flow value and the third flow value to obtain a flow experience value of the second application node;
and selecting the first detachable node from the second application node according to the flow experience value.
4. The method of claim 3, wherein a first weight corresponding to the first flow value is less than a second weight corresponding to the second flow value, the second weight being less than a third weight corresponding to the third flow value.
5. The method of claim 3, wherein said selecting said first borrowing node from said second application node based on said traffic experience value comprises:
determining the priority corresponding to each second application node according to the flow experience value corresponding to each second application node;
arranging the second application nodes according to the sequence of the priorities from big to small to obtain an application node sequence;
and selecting a preset number of the first borrowable nodes from the application node sequence.
6. The method of claim 5, wherein the preset number is less than or equal to a product of a preset percentage and a number of nodes of the second application node.
7. The method of claim 5, wherein prior to said selecting a preset number of said first borrowable nodes in said sequence of application nodes, the method further comprises:
determining a request number of the first query request in a current control window period;
dividing the second application nodes into a plurality of groups of application nodes according to the sequence order of the application node sequence; wherein each of the application node groups includes the preset number of application nodes;
wherein the selecting a preset number of the first borrowable nodes in the application node sequence includes:
and when the request number is less than or equal to the group number of the application node group, taking the application node in the application node group with the same sequence number as the request number as the first detachable node.
8. The method of claim 7, wherein after said dividing the second application node into a plurality of application node groups in the sequence order of the sequence of application nodes, the method further comprises:
sending a second query request to a third application node under the condition that the request number is greater than the group number; the second query request is used for enabling the third application node to feed back a second node identifier corresponding to a second borrowable node in a fourth application node, the third application node is an application node different from a node group to which the first application node belongs, and the fourth application node is an application node which is the same as the node group to which the third application node belongs;
receiving the second node identification;
sending a second borrowing request to the second detachable node according to the second node identifier; wherein the second borrowing request is used for enabling the second borrowing node to feed back a second borrowing token amount;
and receiving the second detachable token quota fed back by the second detachable node.
9. The method of claim 8, wherein after said receiving said second borrowing token amount fed back by said second borrowing node, said method further comprises:
and sending the second removable token quota to the first application node.
10. The method as claimed in claim 8, wherein the second borrowing node is plural in number;
wherein the sending a second borrowing request to the second borrowable node according to the second node identifier comprises:
and according to the sequence of the priorities of the second borrowing nodes from high to low, the second borrowing request is sequentially sent to each second borrowing node according to the second node identification until a first preset condition is met.
11. The method of claim 10, wherein the first preset condition comprises at least one of:
the second lending request has been sent to all of the second lendable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
12. A flow control method is applied to an application node and comprises the following steps:
sending a first query request to a target application node; the first query request is used for enabling the target application node to feed back a first node identifier corresponding to a first borrowable node in a second application node, wherein the second application node is an application node which is the same as a node group to which the target application node belongs;
receiving the first node identification fed back by the target application node;
sending a first borrowing request to the first detachable node according to the first node identification; wherein the first borrowing request is used for enabling the first borrowing node to feed back a first borrowing token amount;
and receiving the first removable borrowing token amount fed back by the first removable borrowing node.
13. The method of claim 12, wherein prior to sending the first query request to the target application node, the method further comprises:
determining the remaining token limit, wherein the token limit is obtained in a control window period;
wherein the sending the first query request to the target application node comprises:
and sending a first query request to a target application node under the condition that the remaining token amount is less than or equal to a rated threshold value.
14. The method as claimed in claim 12, wherein the first borrowable node is plural in number;
wherein the sending a first borrowing request to the first borrowable node according to the first node identifier comprises:
and according to the sequence of the priority of the first borrowing node from high to low, the first borrowing request is sequentially sent to each first borrowing node according to the first node identification until a second preset condition is met.
15. The method of claim 14, wherein the second preset condition comprises at least one of:
having sent the first borrowing request to all of the first borrowable nodes;
the received accumulated value of the detachable token credit line reaches the preset token detachable credit line.
16. A flow control device comprising:
the first receiving module is used for receiving a first query request sent by a first application node;
a first obtaining module, configured to obtain, in response to the first query request, historical traffic data of a second application node associated with the first application node; the second application node is the same as the node group to which the first application node belongs;
the first selection module is used for selecting a first detachable borrowing node from the second application nodes according to the historical flow data;
a first sending module, configured to send a first node identifier corresponding to the first borrowable node to the first application node; the first node identification is used for the first application node to send a first borrowing request to the first detachable node, and the first borrowing request is used for enabling the first detachable node to feed back a first detachable token amount to the first application node.
17. A flow control device comprising:
the second sending module is used for sending the first query request to the target application node; the first query request is used for enabling the target application node to feed back a first node identifier corresponding to a first borrowable node in a second application node, wherein the second application node is an application node which is the same as a node group to which the target application node belongs;
a second receiving module, configured to receive the first node identifier fed back by the target application node;
a third sending module, configured to send a first borrowing request to the first removable borrowing node according to the first node identifier; wherein the first borrowing request is used for enabling the first borrowing node to feed back a first borrowing token amount;
and the third receiving module is used for receiving the first detachable borrowing token amount fed back by the first detachable borrowing node.
18. A flow control apparatus, characterized in that the apparatus comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the flow control method of any of claims 1-15.
19. A computer-readable storage medium having computer program instructions stored thereon which, when executed by a processor, implement the flow control method of any one of claims 1-15.
CN202010917034.2A 2020-09-03 2020-09-03 Flow control method, device, equipment and medium Active CN112104567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010917034.2A CN112104567B (en) 2020-09-03 2020-09-03 Flow control method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010917034.2A CN112104567B (en) 2020-09-03 2020-09-03 Flow control method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN112104567A true CN112104567A (en) 2020-12-18
CN112104567B CN112104567B (en) 2022-11-18

Family

ID=73757666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010917034.2A Active CN112104567B (en) 2020-09-03 2020-09-03 Flow control method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112104567B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180589A1 (en) * 2014-05-29 2015-12-03 阿里巴巴集团控股有限公司 Login method for terminal device, terminal device and cloud server
CN105764091A (en) * 2016-02-19 2016-07-13 杭州敦崇科技股份有限公司 Method of effectively utilizing wireless bandwidth
WO2017084618A1 (en) * 2015-11-18 2017-05-26 中兴通讯股份有限公司 Method for monitoring node communication of shared storage cluster file system, and monitoring node
CN107786460A (en) * 2017-09-08 2018-03-09 北京科东电力控制系统有限责任公司 A kind of management of electricity transaction system request and current-limiting method based on token bucket algorithm
CN108494703A (en) * 2018-03-08 2018-09-04 腾讯科技(深圳)有限公司 A kind of access frequency control method, device and storage medium
CN109787915A (en) * 2018-12-14 2019-05-21 北京三快在线科技有限公司 Flow control methods, device, electronic equipment and the storage medium of network access
CN109859031A (en) * 2019-01-21 2019-06-07 北京沃东天骏信息技术有限公司 A kind of information processing method, node and the storage medium of block chain network
WO2019148568A1 (en) * 2018-02-02 2019-08-08 网宿科技股份有限公司 Method and system for sending request for acquiring data resource
CN110213173A (en) * 2019-06-06 2019-09-06 北京百度网讯科技有限公司 Flow control methods and device, system, server, computer-readable medium
US20200051069A1 (en) * 2018-08-10 2020-02-13 tZERO Group, Inc. Upgradeable security token
CN111343102A (en) * 2020-02-03 2020-06-26 中国银联股份有限公司 Flow rate control method, server-side server, client-side server and system
CN111373429A (en) * 2017-09-26 2020-07-03 贝宝公司 Secure offline transaction system using digital token and secure ledger database

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180589A1 (en) * 2014-05-29 2015-12-03 阿里巴巴集团控股有限公司 Login method for terminal device, terminal device and cloud server
WO2017084618A1 (en) * 2015-11-18 2017-05-26 中兴通讯股份有限公司 Method for monitoring node communication of shared storage cluster file system, and monitoring node
CN105764091A (en) * 2016-02-19 2016-07-13 杭州敦崇科技股份有限公司 Method of effectively utilizing wireless bandwidth
CN107786460A (en) * 2017-09-08 2018-03-09 北京科东电力控制系统有限责任公司 A kind of management of electricity transaction system request and current-limiting method based on token bucket algorithm
CN111373429A (en) * 2017-09-26 2020-07-03 贝宝公司 Secure offline transaction system using digital token and secure ledger database
WO2019148568A1 (en) * 2018-02-02 2019-08-08 网宿科技股份有限公司 Method and system for sending request for acquiring data resource
CN108494703A (en) * 2018-03-08 2018-09-04 腾讯科技(深圳)有限公司 A kind of access frequency control method, device and storage medium
US20200051069A1 (en) * 2018-08-10 2020-02-13 tZERO Group, Inc. Upgradeable security token
CN109787915A (en) * 2018-12-14 2019-05-21 北京三快在线科技有限公司 Flow control methods, device, electronic equipment and the storage medium of network access
CN109859031A (en) * 2019-01-21 2019-06-07 北京沃东天骏信息技术有限公司 A kind of information processing method, node and the storage medium of block chain network
CN110213173A (en) * 2019-06-06 2019-09-06 北京百度网讯科技有限公司 Flow control methods and device, system, server, computer-readable medium
CN111343102A (en) * 2020-02-03 2020-06-26 中国银联股份有限公司 Flow rate control method, server-side server, client-side server and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
任浩等: "采用节点优先级的对等网络流媒体请求量分配算法", 《西安交通大学学报》 *
郭小雪等: "一种费用最优令牌缓冲流量调度负载控制方法", 《微型机与应用》 *
骆建歆等: "一个基于令牌桶的带宽动态分配研究", 《广东通信技术》 *

Also Published As

Publication number Publication date
CN112104567B (en) 2022-11-18

Similar Documents

Publication Publication Date Title
CN102724103B (en) Proxy server, hierarchical network system and distributed workload management method
EP3547625B1 (en) Method and system for sending request for acquiring data resource
CN109246229A (en) A kind of method and apparatus of distribution resource acquisition request
CN111600967B (en) Access pressure-based load balancing system among block chain nodes
CN109981744B (en) Data distribution method and device, storage medium and electronic equipment
CN104243405A (en) Request processing method, device and system
CN112217725B (en) Delay optimization method based on edge calculation
CN112104559B (en) SD-WAN network routing jitter mitigation method and SD-WAN network controller
CN112711479A (en) Load balancing system, method and device of server cluster and storage medium
CN110858986A (en) Bandwidth adjusting method, device, communication equipment and computer readable storage medium
EP2863597B1 (en) Computer-implemented method, computer system, computer program product to manage traffic in a network
CN112104567B (en) Flow control method, device, equipment and medium
CN111897659B (en) Method, system and device for controlling service processing frequency and electronic equipment
CN103595552B (en) Analysis method and analysis system for cluster storage network parallel load
CN111512594A (en) Virtual network function management
CN114448838B (en) System reliability evaluation method
CN114745278A (en) Method and device for expanding and contracting capacity of business system, electronic equipment and storage medium
CN114896296A (en) Cloud service resource configuration method and device, electronic equipment and computer readable medium
CN114612037A (en) Warehouse information management method and system
CN106170767B (en) Device and method for determining number adjustment operation of virtual machines
US20170153924A1 (en) Method for request scheduling and scheduling device
CN111817890A (en) Data synchronization processing method and device, computer equipment and storage medium
KR101506448B1 (en) Method And Apparatus for Managing Machine to Machine Traffic
CN116055496B (en) Monitoring data acquisition method and device, electronic equipment and storage medium
CN106850287B (en) Service degradation method based on prediction in power data communication network

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