A method and device for limiting the speed of cluster shared traffic thresholds

Through the speed limit method of cluster sharing traffic threshold, traffic resources are dynamically allocated, which solves the problem of inflexible speed limit in traditional QOS methods in multi-node cluster systems, and achieves fair allocation of traffic and efficient utilization of resources, improving network performance.

CN117896318BActive Publication Date: 2025-08-26CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311721740.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2025-08-26
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

In multi-node, multi-queue, and multi-core cluster systems, traditional QOS methods are difficult to achieve flexible and efficient traffic speed limits, resulting in network congestion, performance degradation and resource waste, and it is impossible to effectively manage traffic and resource utilization in the cluster.

Method used

The speed limit method of cluster shared traffic threshold is adopted, and the coordinated work of the cluster manager, node controller, bandwidth allocation scheduler and token bucket manager is used to dynamically allocate traffic speed limit resources to achieve fair allocation and reasonable speed limits of nodes and queues.

Benefits of technology

It realizes dynamic management of traffic in a distributed environment, avoids nodes or queues from occupying too much resources, ensures network quality and resource utilization efficiency, and improves the overall performance of the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117896318B_ABST
    Figure CN117896318B_ABST
Patent Text Reader

Abstract

The present application relates to a method and apparatus for limiting the speed of a cluster's shared traffic threshold, which is used to achieve effective bandwidth management and allocation between multiple nodes in a cluster and between multiple network card queues within a node. By using a token bucket algorithm, traffic speed limiting resources are dynamically allocated in a distributed environment to ensure that each node and queue can operate within a reasonable speed limit, so as to achieve effective traffic management between each node, queue, and CPU core in the cluster. The present application can balance bandwidth utilization between different nodes and different network card queues on the same node, improve network performance and resource utilization efficiency, and achieve effective bandwidth speed limiting for a cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a method and device for limiting the speed of a cluster shared traffic threshold. Background Art

[0002] In modern computer networks, cluster systems typically consist of multiple nodes. Each node processes packets using multiple queues, each bound to multiple CPU cores, independently and lock-free to improve packet processing performance. In this distributed environment, effectively implementing certain traffic rate limits within a cluster while ensuring network traffic quality and efficient resource utilization becomes a key challenge. Traditional QoS approaches struggle to provide flexible and efficient traffic rate limits in this multi-node, multi-queue, multi-core environment, leading to network congestion, performance degradation, and resource waste. Bandwidth limits cannot be set for the entire cluster. Summary of the Invention

[0003] In view of the shortcomings of the above-mentioned existing technologies, the present invention aims to propose a technology based on cluster-shared traffic rate limit thresholds to achieve effective traffic management between each node, queue, and CPU core in the cluster. The technical solution of this application can dynamically allocate traffic rate limit resources in a distributed environment to ensure that each node and queue can operate within a reasonable rate limit range. At the same time, this technology can achieve fair distribution of traffic within the cluster, preventing a node or queue from occupying too many traffic resources.

[0004] In a first aspect of the present application, a method for limiting the rate of a cluster shared traffic threshold is proposed, the method comprising:

[0005] S1: The cluster manager sends the cluster rate limit threshold of a specified data flow to each node in the network cluster and adds the forwarding process of each node to the multicast to share traffic information between nodes. The forwarding process in the node obtains the cluster rate limit threshold;

[0006] In step S2, the node controller counts and marks the traffic of the specified data flow flowing into the network card per second. It then sends the node's unique identifier and the network card traffic received per second via multicast to share with other nodes in the cluster. It then calculates the node speed limit quota threshold for the node based on the multicast messages received from the cluster.

[0007] S3: The bandwidth allocation scheduler allocates the core speed limit quota threshold for each node based on the bandwidth ratio of each processing queue traffic in the node forwarding process to the total node traffic;

[0008] In S4, the token bucket manager uses the token bucket algorithm to periodically and dynamically adjust the real-time data based on the ratio of traffic processed by each queue in the node to the total bandwidth of the node. It obtains the ratio of each queue in the cluster's speed-limited bandwidth and limits the traffic passing through the queue.

[0009] Furthermore, when a node receives a multicast message sent by other nodes, it compares the node unique identifier in the multicast message with the node unique identifier of the node itself. If the comparison result is equal, the multicast message is ignored. If the comparison result is not equal, the multicast message is recorded and the node speed limit quota threshold of the node is calculated.

[0010] Furthermore, the calculation formula for the node speed limit quota threshold is as follows:

[0011] speed node(i) =speed cluster *traffic node(i) / traffic node(i)

[0012] Among them, speed cluster Specifies the cluster rate limit threshold for data flow. node(i) The traffic volume of the specified data flow flowing into the node network card of node i within this second. i is the node number, ranging from 1 to N, and N is the number of cluster nodes.

[0013] Furthermore, in step S3, the calculation formula of the core speed limit quota threshold is as follows:

[0014] speed node(i)_lcore(n) =speed node(i) *traffic node(i)_lcore(n) / traffic node(i)_lcore(n)

[0015] Among them, traffic node(i)_lcore(n) The traffic volume of a specified data flow flowing from node i to service core n within this second. i is the node number, ranging from 1 to N, where N is the maximum number of nodes in the cluster. n is the service core number, ranging from 1 to M, where M is the maximum number of service cores.

[0016] In a second aspect of the present application, a rate limiting device for a cluster shared traffic threshold is proposed, which is used to implement the above method, characterized in that the device includes a cluster manager and multiple nodes located in the same network cluster;

[0017] The cluster manager is connected to multiple nodes respectively, and is used to coordinate and manage the entire multi-node cluster, and set, adjust and issue cluster speed limit thresholds according to speed limit requirements;

[0018] A node controller is provided on each of the plurality of nodes and serves as a control main thread of the node forwarding process, and is used to monitor local bandwidth utilization and traffic;

[0019] The bandwidth allocation scheduler is set in the business core of the service process of each node to ensure fair allocation and efficient utilization of bandwidth resources;

[0020] The token bucket manager is set on the thread bound to each queue served by each node. It is used to limit the traffic passing through the queue using the token bucket algorithm to achieve speed limit for the entire cluster.

[0021] Furthermore, the node controller counts the local traffic data flowing into the network card every second, and shares the local traffic data in a multicast manner.

[0022] Furthermore, sharing the local traffic data includes: the node controller sends the local traffic data to each node in the cluster via multicast, the node receives traffic data from other nodes in the cluster, and after excluding its own traffic data, calculates the node's own node speed limit quota threshold based on the traffic ratio.

[0023] Furthermore, ensuring fair allocation and efficient utilization of bandwidth resources specifically includes: the bandwidth allocation scheduler determines the node speed limit quota threshold based on the traffic bandwidth ratio of the nodes in the cluster, and allocates the core speed limit quota threshold of each node based on the bandwidth ratio of the business core of each processing queue traffic and the total traffic of the node in the node forwarding process.

[0024] Furthermore, the token bucket algorithm is used to limit the speed of the traffic passing through the queue, specifically including: the token bucket manager periodically dynamically adjusts the real-time data of the proportion of the traffic processed by each queue in the node to the total bandwidth of the node to obtain the proportion of each queue in the cluster speed limit bandwidth.

[0025] In a third aspect of the present application, an electronic device is proposed, comprising: a memory unit and a processor unit, wherein a computer program is stored in the memory unit, and the processor unit implements the above method when executing the program.

[0026] The beneficial effects of this application are as follows: In the prior art, the traffic speed limit of a cluster is often only limited by the node, without dynamic adjustment based on the traffic, and it is often difficult to achieve accurate speed limit for the entire cluster. This application monitors the traffic bandwidth ratio in real time, effectively and quickly adjusts the speed limit quota between different cores (threads) of the same node process service, and between different nodes of the same cluster, determines the token bucket generation rate of each node and each queue to effectively limit the speed, and regards the entire cluster as a logical token bucket, which is implemented in a way that each core of each node has an independent token bucket, so as to achieve lock-free speed limit for the cluster without affecting the performance of the source traffic processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present application. Throughout the drawings, the same reference numerals represent the same components. Obviously, the drawings described below are only some of the embodiments described in the present application. Those skilled in the art can also obtain other drawings based on these drawings.

[0028] Figure 1 It is a schematic diagram of the structure of the cluster controller;

[0029] Figure 2 It is a structural diagram of the node controller;

[0030] Figure 3 Schematic diagram of the processing flow of the bandwidth allocation scheduler and token bucket manager. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without making creative work should fall within the scope of protection of this application.

[0032] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in this application.

[0033] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. In addition, the terms "first", "second" and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. The terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0034] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of methods and systems consistent with certain aspects of the present application, as detailed in the appended claims.

[0035] The following first explains the meaning of the technical terms cited in the technical solution:

[0036] Cluster: refers to an architecture that connects multiple computers (also called nodes or servers) to jointly complete computing tasks.

[0037] Node: A server node in a cluster refers to each independent computer or server in the cluster. Each node is an independent entity.

[0038] QoS (Quality of Service) refers to a network's ability to use various basic technologies to provide better service for specified network communications. It is a network security mechanism and a technology used to solve problems such as network delay and congestion.

[0039] Forwarding process: refers to the main service process running in the cluster node, which is responsible for forwarding data packets from one network node to another network node. Here, it is the host process implemented by the rate limiting method of the present invention.

[0040] In the first aspect, the present application proposes a speed limiting device for cluster shared traffic threshold based on token bucket algorithm, such as Figure 1 As shown, the device includes a cluster manager and multiple nodes located in the same network cluster;

[0041] The cluster manager is connected to multiple nodes respectively, and is used to coordinate and manage the entire multi-node cluster, and set, adjust and issue cluster speed limit thresholds according to speed limit requirements;

[0042] A node controller is provided on each of the plurality of nodes and serves as a control main thread of the node forwarding process, and is used to monitor local bandwidth utilization and traffic;

[0043] The bandwidth allocation scheduler is set in the business core of the service process of each node to ensure fair allocation and efficient utilization of bandwidth resources;

[0044] The token bucket manager is set on the thread bound to each queue served by each node. It is used to limit the traffic passing through the queue using the token bucket algorithm, thereby achieving speed limit for the entire cluster.

[0045] The node controller counts the local traffic data flowing into the network card every second and shares the local traffic data through multicast;

[0046] Sharing the local traffic data includes: the node controller sending the local traffic data to each node in the cluster via multicast; the node receiving the traffic data from other nodes in the cluster, excluding its own traffic data, and calculating the node speed limit quota threshold of the node according to the traffic ratio;

[0047] Ensuring fair allocation and efficient utilization of bandwidth resources specifically includes: the bandwidth allocation scheduler determines the node speed limit quota threshold based on the traffic bandwidth ratio of the nodes in the cluster, and allocates the core speed limit quota threshold of each node based on the bandwidth ratio of the service core of each processing queue traffic in the node forwarding process to the total traffic of the node;

[0048] The token bucket algorithm is used to limit the speed of traffic passing through the queue, specifically including: the token bucket manager periodically and dynamically adjusts the proportion of traffic processed by each queue in the node to the total bandwidth of the node according to real-time data, to obtain the proportion of each queue in the cluster speed limit bandwidth;

[0049] In a second aspect, the present application proposes a method for cluster shared traffic threshold based on a token bucket algorithm, the method comprising the following steps:

[0050] S1: The cluster manager sends the cluster rate limit threshold of a specified data flow to each node in the network cluster and adds the forwarding process of each node to the multicast to share traffic information between nodes. The forwarding process in the node obtains the cluster rate limit threshold;

[0051] In the above steps, the cluster manager issues a certain traffic speed limit threshold, such as the traffic speed limit threshold of UDP, TCP-SYN, TCP-ACK, ICMP, etc. Here, the traffic threshold of the speed limit cluster TCP-SYN is the speed cluster (unit: bit / s) as an example, the forwarding process running on N nodes in the cluster obtains the cluster TCP-SYN traffic speed limit speed cluster , as attached Figure 1 shown.

[0052] In the above steps, this is achieved by adding the node's forwarding process to the multicast address, such as the multicast address 224.0.1.100;

[0053] In step S2, the node controller counts and marks the traffic of the specified data flow flowing into the network card per second. It then sends the node's unique identifier and the network card traffic received per second via multicast to share with other nodes in the cluster. It then calculates the node speed limit quota threshold for the node based on the multicast messages received from the cluster.

[0054] In the above steps, the node rate limit quota threshold is calculated based on the multicast packets received from the cluster. Specifically, the calculation includes:

[0055] When a node receives a multicast message from another node, it compares the node unique identifier in the multicast message with its own node unique identifier. If the comparison result is equal, the node ignores the multicast message. If the comparison result is not equal, the node records the multicast message and calculates the node rate limit quota threshold for the node. The calculation formula is as follows:

[0056]

[0057] Among them, speed cluster Specifies the cluster rate limit threshold for data flow. node(i) The traffic volume of the specified data flow flowing into the node network card of node i within this second. i is the node number, ranging from 1 to N, and N is the number of cluster nodes.

[0058] Continuing with the example in the previous steps, the node forwarding process counts the TCP-SYN traffic flowing into the network card every second (by parsing all the network card queue traffic packets, judging that the transport layer protocol number in the IP packet is 6, which is TCP protocol traffic, and judging that the SYN bit of the Flag field in the TCP layer header is 1 and the other fields of the Flag are all 0, then the TCP-SYN traffic that meets the statistics is marked as traffic) node1 、traffic node2 、......traffic nodeN and uniquely identify the node ID nodeN And receive network card traffic per second nodeN It is sent out through multicast to share with other nodes in the cluster. When a node receives the multicast message received by other nodes, it will receive the unique node ID in the multicast message. nodeN Unique ID of this node nodeN If the comparison is equal, the multicast message is ignored and the ID is excluded from being sent by the node. The others are recorded and the traffic ratio of the node is calculated as the incremental TCP-SYN traffic flowing into the node network card within this second. node(i) Divide by the sum of the incremental TCP-SYN traffic flowing into the network cards of all nodes in the cluster within this second (i is the node number, ranging from 1 to N, where N is the number of cluster nodes). The speed limit quota threshold for this node is calculated as

[0059]

[0060] S3: The bandwidth allocation scheduler allocates the core speed limit quota threshold for each node based on the bandwidth ratio of each processing queue traffic in the node forwarding process to the total node traffic;

[0061] The calculation formula for the core speed limit quota threshold is as follows:

[0062]

[0063] Among them, traffic node(i)_lcore(n) The traffic volume of a specified data flow flowing from node i to service core n within this second. i is the node number, ranging from 1 to N, where N is the maximum number of nodes in the cluster. n is the service core number, ranging from 1 to M, where M is the maximum number of service cores.

[0064] In the above steps, continue to use the examples in the previous steps for explanation. Get the speed limit quota of TCP-SYN traffic flowing into each queue of each node network card: each network card queue n (n is the network card queue number, taking Intel network card 82599 as an example, the network card has 16 queues, and n is 0-15) of the node forwarding process is independently assigned a business core thread to process lcore(n) and bound to CPU(n) for exclusive processing. The lcore(n) business core thread counts the corresponding TCP-SYN traffic flowing into the bound network card queue n every second (by parsing the queue n traffic message, judging that the transport layer protocol number in the IP message is 6 for TCP protocol traffic, judging that the SYN bit of the TCP layer header Flag field is 1 and the other fields of the Flag are all 0, then the TCP-SYN traffic that meets the statistics is marked as traffic) node1_lcore1 , traffic node1_lcore2 , traffic node1_lcoreM , you can calculate the speed limit quota threshold of a certain business core flow of each node

[0065]

[0066] In step 4, the token bucket manager uses a token bucket algorithm to periodically adjust the traffic flow of each queue based on the real-time data of the ratio of the traffic flow to the total bandwidth of the node. This algorithm determines the proportion of each queue in the cluster's speed-limited bandwidth and sets the speed limit for the traffic passing through the queue.

[0067] Bucket depth size of the token bucket lcore(i) =speed node(i)_lcore(n) , token generation rate of the token bucket lcore(i) =speed node(i)_lcore(n) Initialize the token bucket with the token number token lcore(i) =speed node(i)_lcore(n)

[0068] In the above steps, continue to use the examples in the previous steps for explanation. The lcore(n) thread creates or adjusts the token bucket for the traffic identified by TCP-SYN every second. The depth of the bucket is size lcore(i) =speed node(i)_lcore(n) , bucket token generation rate rate lcore(i) =speed node(i)_lcore(n) Initialize the token bucket token number token lcore(i) =speed node(i)_lcore(n) According to the token bucket algorithm, the length of each TCP-SYN message passing through the bucket is length pkt , the number of tokens generated per second rate lcore(i) , the bucket depth does not exceed size lcore(i) If the length of the token in the bucket is greater than lengthpkt Then pass and token=token-length pkt , length pkt If the length of the packet is greater than the token length, the packet will be discarded. The lcore(n) thread can limit the flow rate of the queue according to the dynamically adjusted speed limit quota every second, thereby limiting the TCP-SYN flow configured in the cluster to the cluster speed limit result, as shown in the attached figure. Figure 3 As shown. Each time a message length is passed, the number of tokens in the bucket minus the message length is the total length of the message that can pass. The token above indicates that the number of tokens in the current bucket is a dynamic variable. lcore(i) Indicates the initial value of the token bucket when it is initialized.

[0069] When a node service exits abnormally or a new node is added, the node controller in the forwarding process can still make dynamic adjustments based on the multicast messages received within the periodic time.

[0070] In summary, this application uses a token bucket algorithm for flow control, combined with the communication and coordination mechanisms within the cluster. Through data exchange between the cluster manager and the node controller, this technology can monitor the flow of each node and queue in real time, and dynamically generate and allocate tokens based on the shared flow rate limit threshold within the cluster. At the same time, this application can also adaptively adjust the flow rate limit strategy based on the status of the nodes and queues within the cluster to adapt to different load conditions and demand changes.

[0071] In a third aspect, the present application proposes an electronic device comprising: a memory and one or more processors.

[0072] One or more application programs are stored in the memory, and the one or more application programs are suitable for being executed by the one or more processors to implement the method described in the first aspect.

[0073] The electronic device includes a processor and a memory, wherein the processor and the memory are connected, for example, via a bus.

[0074] The structure of the electronic device does not constitute a limitation to the embodiments of the present application.

[0075] A processor can be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. A processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0076] A bus may include a path for transmitting information between the above components. A bus may be a PCI bus or an EISA bus, etc. A bus may be divided into an address bus, a data bus, a control bus, etc.

[0077] The memory may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, CD-ROM or other optical disk storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0078] In a fourth aspect, the present application proposes a computer-readable storage medium having a computer program stored thereon, which can be loaded by a processor and executed in accordance with the method described in the first aspect.

[0079] The applicant of this application has made detailed explanations and descriptions of the implementation examples of this application in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation plans of this application, and the detailed description is only to help readers better understand the spirit of this application, and is not a limitation on the scope of protection of this application. On the contrary, any improvements or modifications based on the inventive spirit of this application should fall within the scope of protection of this application.

Claims

1. A method for limiting the rate of a cluster shared traffic threshold, characterized in that: The method includes: S1: The cluster manager sends the cluster rate limit threshold of a specified data flow to each node in the network cluster and adds the forwarding process of each node to the multicast to share traffic information between nodes. The forwarding process in the node obtains the cluster rate limit threshold; In step S2, the node controller counts and marks the traffic of the specified data flow flowing into the network card per second. It then sends the node's unique identifier and the network card traffic received per second via multicast to share with other nodes in the cluster. It then calculates the node speed limit quota threshold for the node based on the multicast messages received from the cluster. S3: The bandwidth allocation scheduler allocates the core speed limit quota threshold for each node based on the bandwidth ratio of each processing queue traffic in the node forwarding process to the total node traffic; In step 4, the token bucket manager uses a token bucket algorithm to periodically adjust the traffic flow of each queue based on the real-time data of the ratio of the traffic flow to the total bandwidth of the node. This algorithm determines the proportion of each queue in the cluster's speed-limited bandwidth and sets the speed limit for the traffic passing through the queue. In step S2, the node rate limit quota threshold of the local node is calculated based on the multicast message received from the cluster, specifically including: When a node receives a multicast message from another node, it compares the node unique identifier in the multicast message with its own node unique identifier. If the comparison result is equal, the node ignores the multicast message. If the comparison result is unequal, the node records the multicast message and calculates the node rate limit quota threshold for the node.

2. The method according to claim 1, characterized in that The calculation formula for the node speed limit quota threshold is as follows: Among them, speed cluster Specifies the cluster rate limit threshold for data flow. node(i) The traffic volume of the specified data flow flowing into the node network card of node i within this second. i is the node number, ranging from 1 to N, and N is the number of cluster nodes.

3. The method according to claim 2, characterized in that In step S3, the calculation formula of the core speed limit quota threshold is as follows: Among them, traffic node(i)_lcore(n) The traffic volume of a specified data flow flowing from node i to service core n within this second. i is the node number, ranging from 1 to N, where N is the maximum number of nodes in the cluster. n is the service core number, ranging from 1 to M, where M is the maximum number of service cores.

4. A cluster shared traffic threshold rate limiting device, the device is used to implement the method according to any one of claims 1 to 3, characterized in that: The apparatus includes a cluster manager and a plurality of nodes located in the same network cluster; The cluster manager is connected to multiple nodes respectively, and is used to coordinate and manage the entire multi-node cluster, and set, adjust and issue cluster speed limit thresholds according to speed limit requirements; A node controller is provided on each of the plurality of nodes and serves as a control main thread of the node forwarding process, and is used to monitor local bandwidth utilization and traffic; The bandwidth allocation scheduler is set in the business core of the service process of each node to ensure fair allocation and efficient utilization of bandwidth resources; The token bucket manager is set on the thread bound to each queue served by each node. It is used to limit the traffic passing through the queue using the token bucket algorithm to achieve speed limit for the entire cluster.

5. The device according to claim 4, characterized in that The node controller counts the local traffic data flowing into the network card every second and shares the local traffic data in a multicast manner.

6. The device according to claim 5, characterized in that Sharing the local traffic data includes: the node controller sends the local traffic data to each node in the cluster via multicast, the node receives traffic data from other nodes in the cluster, and after excluding its own traffic data, calculates the node speed limit quota threshold of the node itself according to the traffic ratio.

7. The method according to claim 4, characterized in that The ensuring of fair allocation and utilization efficiency of bandwidth resources specifically includes: the bandwidth allocation scheduler determines the node speed limit quota threshold according to the traffic bandwidth ratio of the nodes in the cluster, and allocates the core speed limit quota threshold of each node according to the bandwidth ratio of the business core of each processing queue traffic and the total traffic of the node in the node forwarding process.

8. The method according to claim 4, characterized in that The token bucket algorithm is used to limit the speed of the traffic passing through the queue, specifically including: the token bucket manager periodically dynamically adjusts the real-time data of the proportion of the traffic processed by each queue in the node to the total bandwidth of the node to obtain the proportion of each queue in the cluster speed limit bandwidth.

9. An electronic device comprising: A memory unit and a processor unit, wherein a computer program is stored in the memory unit, and wherein the processor unit implements the method according to any one of claims 1 to 3 when executing the program.

Citation Information

Patent Citations

  • Transceiving speed limiting method, device and system for container

    CN111865675A

  • Network flow rate limiting method and device, central control equipment and gateways

    CN112751691A