CN117896318B - A method and device for limiting the speed of cluster shared traffic thresholds - Google Patents

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

Info

Publication number
CN117896318B
CN117896318B CN202311721740.XA CN202311721740A CN117896318B CN 117896318 B CN117896318 B CN 117896318B CN 202311721740 A CN202311721740 A CN 202311721740A CN 117896318 B CN117896318 B CN 117896318B
Authority
CN
China
Prior art keywords
node
cluster
traffic
speed limit
bandwidth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311721740.XA
Other languages
Chinese (zh)
Other versions
CN117896318A (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 Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology 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 Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202311721740.XA priority Critical patent/CN117896318B/en
Publication of CN117896318A publication Critical patent/CN117896318A/en
Priority to PCT/CN2024/136673 priority patent/WO2025124250A1/en
Application granted granted Critical
Publication of CN117896318B publication Critical patent/CN117896318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • 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/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation

Landscapes

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

Abstract

本申请涉及一种集群共享流量阈值的限速方法及装置,用于在集群中多个节点之间和节点内多个网卡队列之间实现有效的带宽管理和分配。通过使用令牌桶算法,在分布式环境中动态地分配流量限速资源,确保各节点和队列都能够在合理的限速范围内运行,以便在集群中的每个节点、队列和CPU核心之间实现有效的流量管理。本申请能够平衡不同节点、相同节点不同网卡队列之间的带宽利用,提高网络性能和资源利用效率,实现对于一个集群进行有效的带宽限速。

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.

Description

Speed limiting method and device for cluster shared flow threshold
Technical Field
The application belongs to the technical field of networks, and particularly relates to a speed limiting method and device for a cluster shared flow threshold.
Background
In modern computer networks, cluster systems are typically composed of multiple nodes, each processing a packet using multiple queues to bind multiple CPU core data independently without locks to improve packet processing performance. In such a distributed environment, to effectively implement a cluster to limit the speed of a certain type of traffic, ensuring the quality of network traffic and efficient utilization of resources is a key challenge. The traditional QOS method is difficult to provide flexible and efficient flow rate limiting in the environment with multiple nodes, multiple queues and multiple cores, thereby causing network congestion, performance degradation and resource waste, and the bandwidth rate limiting cannot be set for the whole cluster.
Disclosure of Invention
In view of the above deficiencies of the prior art, the present application is directed to a technique for cluster-based sharing of traffic speed limit thresholds to achieve efficient traffic management between each node, queue and CPU core in a cluster. The technical scheme of the application can dynamically allocate the flow rate limiting resources in the distributed environment so as to ensure that each node and each queue can operate within a reasonable rate limiting range. Meanwhile, the technology can realize fair distribution of traffic in the cluster, and avoid that a certain node or queue occupies excessive traffic resources.
The first aspect of the present application provides a method for limiting a cluster shared traffic threshold, which includes:
S1, a cluster manager transmits a cluster speed limit threshold of a specified data stream to each node in a network cluster, and adds a forwarding process of each node into multicast so as to share flow information among the nodes, wherein the forwarding process in the node acquires the cluster speed limit threshold;
S2, the node controller counts and marks the flow of the appointed data flow flowing into the network card every second, sends out the unique node identification and the network card flow received every second in a multicast mode to be shared to other nodes in the cluster, and calculates the node speed limit quota threshold of the node according to the multicast message received from the cluster;
s3, the bandwidth allocation scheduler allocates a core speed limit quota threshold of each node according to the bandwidth ratio of each service core processing the queue flow and the total flow of the node in the node forwarding process;
And S4, the token bucket manager uses a token bucket algorithm to periodically and dynamically adjust according to the real-time data of the ratio of the flow processed by each queue in the node to the total bandwidth of the node, so as to obtain the ratio of each queue in the cluster speed-limiting bandwidth, and speed-limiting the flow passing by the queue.
Further, when the node receives the multicast message sent by other nodes, comparing the node unique identifier in the multicast message with the node unique identifier of the node itself, if the comparison result is equal, ignoring the multicast message, if the comparison result is unequal, recording the multicast message, and calculating the node speed limit quota threshold of the node.
Further, the calculation formula of the node speed limit quota threshold is as follows:
speednode(i)=speedcluster*trafficnode(i)/ trafficnode(i)
Speed cluster is a cluster speed limit threshold of a designated data stream, traffic node(i) is the flow of the designated data stream flowing into the node network card in the second, i is the node number, the value is 1-N, and N is the number of the cluster nodes.
Further, in step S3, the calculation formula of the core speed limit quota threshold is as follows:
speednode(i)_lcore(n)=speednode(i)*trafficnode(i)_lcore(n)/trafficnode(i)_lcore(n)
the traffic node(i)_lcore(n) is the flow of the designated data flow flowing into the service core n in the second, i is the node number, the value is 1-N, N is the maximum node number of the cluster, n is the service core number, the value is 1-M, and M is the maximum number of the service core.
The second aspect of the present application proposes a speed limiting device for a cluster shared traffic threshold, the device being configured to implement the above method, wherein the device includes a cluster manager and a plurality of nodes located in a same network cluster;
the cluster manager is respectively connected with the plurality of nodes and is used for coordinating and managing the whole multi-node cluster, and setting, adjusting and issuing a cluster speed limit threshold according to the speed limit requirement;
the node controller is arranged on each node in the plurality of nodes and used as a control main thread of a node forwarding process and is used for monitoring the local bandwidth utilization condition and flow;
The bandwidth allocation scheduler is arranged in a service core of the service process of each node and used for ensuring the fair allocation and utilization efficiency of bandwidth resources;
The token bucket manager is arranged on each queue binding thread served by each node and is used for limiting the speed of the flow passing by the queues by using a token bucket algorithm so as to limit the speed of the whole cluster.
Furthermore, the node controller counts the local flow data flowing into the network card every second, and shares the local flow data in a multicast mode.
Further, sharing the local traffic data includes the node controller sending the local traffic data to each node in the cluster in a multicast manner, the node receiving traffic data from other nodes in the cluster, and calculating a node speed limit quota threshold of the node according to a traffic proportion after excluding the own traffic data.
Further, the bandwidth resource fair allocation and utilization efficiency is ensured, and the bandwidth allocation scheduler specifically comprises a node speed limit quota threshold value determined according to the traffic bandwidth condition ratio of nodes in the cluster, and a core speed limit quota threshold value of each node is allocated according to the bandwidth ratio of each service core processing the queue traffic and the total traffic of the nodes in the node forwarding process.
The token bucket manager periodically and dynamically adjusts the duty ratio of the traffic processed by each queue in the node to the total bandwidth of the node according to the duty ratio real-time data of the traffic processed by each queue in the node to obtain the duty ratio of each queue in the cluster speed-limiting bandwidth.
In a third aspect the application provides an electronic device comprising a memory unit and a processor unit, the memory unit having stored thereon a computer program, the processor unit implementing the above method when executing the program.
In the prior art, the flow rate limiting of the cluster is limited only by the nodes, and the flow rate is not dynamically regulated, so that the accurate integral speed limiting of the cluster is difficult to achieve. The application effectively and rapidly adjusts the speed limit quota dynamically among different cores (threads) served by the same node process and among different nodes of the same cluster by monitoring the traffic bandwidth ratio in real time, determines each node, effectively limits the generation speed of the token bucket of each queue, regards the whole cluster as a logical token bucket, realizes the speed limit of the cluster in a mode of independent token bucket of each core of each node, and does not influence the performance of cause traffic processing.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the application, like reference numerals being used to refer to like parts throughout the several views. It is apparent that the drawings in the following description are only some of the embodiments described in the embodiments of the present application, and that other drawings may be obtained from these drawings by those of ordinary skill in the art.
FIG. 1 is a schematic diagram of a cluster controller;
FIG. 2 is a schematic diagram of a node controller;
Fig. 3 is a schematic flow diagram of a process of a bandwidth allocation scheduler and a token bucket manager.
Detailed Description
In order to make the technical solutions of the embodiments of the present application better understood by those skilled in the art, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. It should be understood that the description is only illustrative and is not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, shall fall within the scope of the application.
In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
In the description of the present application, it should be noted that unless explicitly stated and limited otherwise, the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The terms "mounted," "connected," "coupled," and "connected" are to be construed broadly, and may, for example, be fixedly connected, detachably connected, or integrally connected, mechanically connected, electrically connected, directly connected, indirectly connected via an intermediate medium, or communicate between the two elements. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of methods and systems that are consistent with aspects of the application as detailed in the accompanying claims.
The meaning of the technical terms cited in the technical scheme is first described below:
Cluster (Cluster) refers to an architecture in which multiple computers (also called nodes or servers) are connected together to collectively perform computing tasks
The Node (Node) is a server Node in the cluster, and refers to each independent computer or server in the cluster. Each node is a separate entity.
QoS (quality of service) refers to a technology that a network can provide better service capability for specified network communication by using various basic technologies, and is a security mechanism of the network, which is used to solve the problems of network delay and blocking.
The forwarding process is a main service process running in the cluster node and is responsible for forwarding the data packet from one network node to another network node, and is a host process realized by the speed limiting method of the invention.
In a first aspect, the present application proposes a token bucket algorithm-based cluster sharing flow threshold speed limiting device, as shown in fig. 1, where the device includes a cluster manager and a plurality of nodes located in the same network cluster;
the cluster manager is respectively connected with the plurality of nodes and is used for coordinating and managing the whole multi-node cluster, and setting, adjusting and issuing a cluster speed limit threshold according to the speed limit requirement;
the node controller is arranged on each node in the plurality of nodes and used as a control main thread of a node forwarding process and is used for monitoring the local bandwidth utilization condition and flow;
The bandwidth allocation scheduler is arranged in a service core of the service process of each node and used for ensuring the fair allocation and utilization efficiency of bandwidth resources;
the token bucket manager is arranged on each queue binding thread served by each node and is used for limiting the speed of the flow passing through the queues by using a token bucket algorithm so as to limit the speed of the whole cluster;
the node controller counts the local flow data flowing into the network card every second, and shares the local flow data in a multicast mode;
The node controller sends the local flow data to each node in the cluster in a multicast mode, the node receives the flow data from other nodes in the cluster, and after the self flow data is eliminated, the node speed limit quota threshold of the node is calculated according to the flow proportion;
The bandwidth allocation scheduler determines a node speed limit quota threshold according to the traffic bandwidth condition ratio of nodes in a cluster, and allocates a core speed limit quota threshold of each node according to the bandwidth ratio of each service core processing queue traffic and the total traffic of the nodes in a node forwarding process;
the token bucket manager periodically and dynamically adjusts the rate of the flow processed by each queue in the node and the ratio of the total bandwidth of the node according to the real-time data of the rate processed by each queue in the node to obtain the ratio of the rate-limiting bandwidth of each queue in the cluster;
in a second aspect, the present application proposes a method for cluster sharing traffic threshold based on token bucket algorithm, the method comprising the steps of:
S1, a cluster manager transmits a cluster speed limit threshold of a specified data stream to each node in a network cluster, and adds a forwarding process of each node into multicast so as to share flow information among the nodes, wherein the forwarding process in the node acquires the cluster speed limit threshold;
in the above step, the cluster manager issues a certain traffic speed limit threshold, such as a traffic speed limit threshold of UDP, TCP-SYN, TCP-ACK, ICMP, etc., where, taking speed limit cluster TCP-SYN as an example, a traffic threshold identified by speed limit cluster TCP-SYN is speed cluster (unit bit/s), and forwarding processes running on N nodes in the cluster obtain cluster TCP-SYN traffic speed limit speed cluster, as shown in fig. 1.
In the above steps, this is achieved by adding the forwarding process of the node to the multicast address, such as multicast address 224.0.1.100;
S2, the node controller counts and marks the flow of the appointed data flow flowing into the network card every second, sends out the unique node identification and the network card flow received every second in a multicast mode to be shared to other nodes in the cluster, and calculates the node speed limit quota threshold of the node according to the multicast message received from the cluster;
In the above step, a node speed limit quota threshold of the present node is calculated according to a multicast message received from the cluster, which specifically includes:
When a node receives a multicast message sent by other nodes, comparing the node unique identifier of the multicast message with the node unique identifier of the node, if the comparison result is equal, ignoring the multicast message, if the comparison result is unequal, recording the multicast message, and calculating the node speed limit quota threshold of the node, wherein the calculation formula is as follows:
speed cluster is a cluster speed limit threshold of a designated data stream, traffic node(i) is the flow of the designated data stream flowing into a node network card in the second, i is the node number, the value is 1-N, and N is the number of the cluster nodes;
Continuing with the description of the foregoing example in steps, the node forwarding process counts the TCP-SYN traffic flowing into the network card every second (by parsing so that the network card queues traffic packets, determining that the transport layer protocol number in the IP packet is 6 is TCP protocol traffic, determining that the Flag field SYN of the TCP layer header is 1 and the other fields of the Flag are all 0, marking the counted TCP-SYN traffic as traffic node1、trafficnode2、......trafficnodeN, sending the node unique identifier ID nodeN and the received network card traffic nodeN every second to other nodes sharing the cluster by multicast, the node receives the multicast message received by other nodes, ignores the multicast message according to the comparison of the unique node identifier ID nodeN in the multicast message and the unique node identifier ID nodeN in the node, and then excludes the identifier ID from being sent by the node, otherwise records the comparison by calculating the flow proportion of the node to the sum of the incremental TCP-SYN flow traffics node(i) flowing into the network card of the node in the second of the node and the incremental TCP-SYN flow flowing into the intranet card in the second of all the nodes of the cluster (I is the number of the node, the value is 1-N, N is the number of the cluster nodes), and the threshold value of the speed limit quota of the node is calculated as
S3, the bandwidth allocation scheduler allocates a core speed limit quota threshold of each node according to the bandwidth ratio of each service core processing the queue flow and the total flow of the node in the node forwarding process;
the calculation formula of the core speed limit quota threshold is as follows:
wherein traffic node(i)_lcore(n) is the flow of the designated data flow flowing into the service core n in the second by the node i, i is the node number, the value is 1-N, N is the maximum node number of the cluster, n is the service core number, the value is 1-M, and M is the maximum number of the service cores;
In the above steps, the description will be continued with the examples in the above steps. The speed limit quota of TCP-SYN identification flow flowing into each queue of each node network card is obtained, wherein each network card queue n (n is a network card queue number, taking Intel network card 82599 as an example, 16 queues of the network card, and n is 0-15) of each node network card is independently allocated with a service core thread to process lcore (n) and bind to CPU (n) for exclusive processing, each second of the service core thread of lcore (n) counts TCP-SYN flow flowing into the bound network card queue n correspondingly (by analyzing the queue n flow message, judging that the protocol number of a transmission layer in an IP message is 6 as TCP protocol flow, judging that the Flag field SYN bit of a TCP layer header is 1 and the other field bits of Flag are all 0, the TCP-SYN flow conforming to statistics) is identified as traffic node1_lcore1,trafficnode1_lcore2,trafficnode1_lcoreM, and a certain service core flow speed limit quota of each node can be calculated
S4, the token bucket manager uses a token bucket algorithm to periodically and dynamically adjust the duty ratio of the traffic processed by each queue in the node and the total bandwidth of the node according to the duty ratio real-time data, so as to obtain the duty ratio of each queue in the cluster speed-limiting bandwidth, and speed-limit the traffic passing by the queues;
The bucket depth size lcore(i)=speednode(i)_lcore(n) of the token bucket, the token generation rate lcore(i)=speednode(i)_lcore(n) of the token bucket, and the token number token of the token bucket are initialized lcore(i)=speednode(i)_lcore(n)
In the above steps, the description will be continued with the examples in the above steps. The score (n) thread creates or adjusts a token bucket for the traffic identified by the TCP-SYN every second, the depth size lcore(i)=speednode(i)_lcore(n) of the bucket, the bucket token generation rate lcore(i)=speednode(i)_lcore(n), initializes the token bucket token number token lcore(i)=speednode(i)_lcore(n), generates the token number rate lcore(i) every second according to the TCP-SYN message length pkt of each passing bucket of the token bucket algorithm, the bucket depth does not exceed the size lcore(i), if the token length in the bucket is greater than length pkt, the message is discarded if the token length is greater than the token length and the token=token-length pkt,lengthpkt is greater than the token length, the score (n) thread can limit the traffic rate of the queue according to the dynamically adjusted quota every second, and thus the TCP-SYN traffic configured for the cluster reaches the cluster rate limiting result, as shown in fig. 3. The token count of the bucket minus the message length is the total length of the remaining available messages after each pass of a message length, the token represents that the changed token count of the current bucket is a dynamic variable, and the token lcore(i) represents the initial value of the token bucket in the process of initializing.
When the node service is abnormal, the node is withdrawn or newly added, and the node controller in the forwarding process can still dynamically adjust through the multicast message received in the period time.
In summary, the present application adopts the flow control method of the token bucket algorithm, combines the communication and coordination mechanism inside the cluster, and through the data interaction between the cluster manager and the node controller, the present application can monitor the flow condition of each node and the queue in real time, and perform dynamic token generation and allocation according to the shared flow speed limit threshold inside the cluster. Meanwhile, the application can adaptively adjust the flow rate limiting strategy according to the states of the nodes and the queues in the cluster so as to adapt to different load conditions and demand changes.
In a third aspect, the present application is directed to an electronic device comprising a memory and one or more processors.
The memory has stored therein one or more applications adapted to be executed by the one or more processors to implement the method of the first aspect.
An electronic device includes a processor and a memory. Wherein the processor is coupled to the memory, such as via a bus.
The structure of the electronic device is not limited to the embodiment of the present application.
The processor may be a CPU, general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
A bus may include a path that communicates information between the components. The bus may be a PCI bus or an EISA bus, etc. The buses may be divided into address buses, data buses, control buses, etc.
The memory may be, but is not limited to, ROM or other type of static storage device, RAM or other type of dynamic storage device, which can store static information and instructions, EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disc, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In a fourth aspect, the present application proposes a computer readable storage medium having stored thereon a computer program which is loadable and executable by a processor for the method according to the first aspect.
While the applicant has described and illustrated the embodiments of the present application in detail with reference to the drawings, it should be understood by those skilled in the art that the above embodiments are only preferred embodiments of the present application, and the detailed description is only for the purpose of helping the reader to better understand the spirit of the present application, and not to limit the scope of the present application, but any improvements or modifications based on the spirit of the present application should fall within the scope of the present application.

Claims (9)

1.一种集群共享流量阈值的限速方法,其特征在于,该方法包括:1. A method for limiting the rate of a cluster shared traffic threshold, characterized in that the method comprises: S1,集群管理器下发指定数据流的集群限速阈值至网络集群中的每一个节点,并将每一个节点的转发进程加入组播以在节点之间共享流量信息,所述节点中的转发进程获取到所述集群限速阈值;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; S2,节点控制器统计每秒流入网卡的指定数据流的流量并进行标记,将节点唯一标识和每秒接收的网卡流量通过组播的方式发送出去以共享给集群中的其他节点,根据从集群中接收的组播报文计算本节点的节点限速配额阈值;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,带宽分配调度器根据节点转发进程中的每个处理队列流量的业务核与节点总流量的带宽占比来分配每个节点的核限速配额阈值;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; S4,令牌桶管理器使用令牌桶算法根据节点中各个队列处理的流量与节点总带宽的占比实时数据,周期性动态调整,得到每个队列在集群限速带宽的占比,对队列经过的流量进行限速;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. 在步骤S2中,根据从集群中接收的组播报文计算本节点的节点限速配额阈值,具体包括: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.根据权利要求1所述的方法,其特征在于,所述节点限速配额阈值的计算公式如下:2. The method according to claim 1, wherein the calculation formula of the node speed limit quota threshold is as follows: 其中,speedcluster为指定数据流的集群限速阈值,trafficnode(i)为节点i在这一秒内流入节点网卡的指定数据流的流量,i为节点编号,取值1~N,N为集群节点数。Where speed cluster is the cluster speed limit threshold for the specified data flow, traffic node(i) is 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.根据权利要求2所述的方法,其特征在于,在步骤S3中,所述核限速配额阈值的计算公式如下: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: 其中,trafficnode(i)_lcore(n)为节点i在这一秒内流入业务核n的指定数据流的流量,i为节点编号,取值1~N,N为集群最大节点数,n为业务核编号,取值1~M,M为业务核的最大数。traffic node(i)_lcore(n) is the traffic volume of the 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.一种集群共享流量阈值的限速装置,该装置用于实现权利要求1至3任一项所述的方法,其特征在于,该装置包括位于同一个网络集群的集群管理器和多个节点;4. A rate limiting device for a cluster shared traffic threshold, the device being used to implement the method according to any one of claims 1 to 3, characterized in that the device comprises a cluster manager and multiple 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.根据权利要求4所述的装置,其特征在于,所述节点控制器每秒统计流入网卡的本机流量数据,并通过组播的方式共享所述本机流量数据。5. The device according to claim 4 is characterized in that the node controller counts the local traffic data flowing into the network card every second and shares the local traffic data through multicast. 6.根据权利要求5所述的装置,其特征在于,共享所述本机流量数据包括:所述节点控制器将本机流量数据通过组播方式发送给集群中的每一个节点,所述节点接收来自集群其他节点的流量数据,在排除了自身流量数据之后,根据流量比例计算出节点自身的节点限速配额阈值。6. The device according to claim 5 is 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's own node speed limit quota threshold based on the traffic ratio. 7.根据权利要求4所述的方法,其特征在于,所述确保带宽资源公平分配和利用效率,具体包括:所述带宽分配调度器根据集群中节点的流量带宽情况占比来确定节点限速配额阈值,并根据节点转发进程中的每个处理队列流量的业务核与节点总流量的带宽占比来分配每个节点的核限速配额阈值。7. The method according to claim 4 is characterized in that ensuring fair allocation and utilization efficiency 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 in the node forwarding process to the total traffic of the node. 8.根据权利要求4所述的方法,其特征在于,所述使用令牌桶算法对队列经过的流量进行限速,具体包括:所述令牌桶管理器根据节点中各个队列处理的流量与节点总带宽的占比实时数据,周期性动态调整,得到每个队列在集群限速带宽的占比。8. The method according to claim 4 is characterized in that the use of a token bucket algorithm to limit the speed of traffic passing through a queue specifically includes: the token bucket manager periodically and dynamically adjusts the real-time data of the ratio of traffic processed by each queue in the node to the total bandwidth of the node to obtain the ratio of each queue in the cluster speed limit bandwidth. 9.一种电子设备,包括:存储器单元和处理器单元,所述存储器单元上存储有计算机程序,其特征在于,所述处理器单元执行所述程序时实现如权利要求1至3中任一项所述的方法。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.
CN202311721740.XA 2023-12-14 2023-12-14 A method and device for limiting the speed of cluster shared traffic thresholds Active CN117896318B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311721740.XA CN117896318B (en) 2023-12-14 2023-12-14 A method and device for limiting the speed of cluster shared traffic thresholds
PCT/CN2024/136673 WO2025124250A1 (en) 2023-12-14 2024-12-04 Cluster shared traffic threshold-based rate limiting method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311721740.XA CN117896318B (en) 2023-12-14 2023-12-14 A method and device for limiting the speed of cluster shared traffic thresholds

Publications (2)

Publication Number Publication Date
CN117896318A CN117896318A (en) 2024-04-16
CN117896318B true CN117896318B (en) 2025-08-26

Family

ID=90641723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311721740.XA Active CN117896318B (en) 2023-12-14 2023-12-14 A method and device for limiting the speed of cluster shared traffic thresholds

Country Status (2)

Country Link
CN (1) CN117896318B (en)
WO (1) WO2025124250A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117896318B (en) * 2023-12-14 2025-08-26 天翼云科技有限公司 A method and device for limiting the speed of cluster shared traffic thresholds
CN120811980B (en) * 2025-09-15 2025-11-11 济南浪潮数据技术有限公司 A bandwidth limiting method, apparatus, device, medium, and product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865675A (en) * 2020-07-09 2020-10-30 广州虎牙科技有限公司 Method, device and system for limiting receiving and transmitting speed of container
CN112751691A (en) * 2019-10-29 2021-05-04 北京金山云网络技术有限公司 Network flow rate limiting method and device, central control equipment and gateway

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7602721B1 (en) * 2003-12-22 2009-10-13 Extreme Networks, Inc. Methods and systems for fine grain bandwidth allocation in a switched network element
CN104980359A (en) * 2014-04-04 2015-10-14 中兴通讯股份有限公司 Flow control method of fiber channel over Ethernet (FCoE), flow control device of FCoE and flow control system of FCoE
WO2018150223A1 (en) * 2017-02-14 2018-08-23 Telefonaktiebolaget Lm Ericsson (Publ) A method and system for identification of traffic flows causing network congestion in centralized control plane networks
CN109587072A (en) * 2019-01-04 2019-04-05 中企动力科技股份有限公司 Distributed system overall situation speed limiting system and method
CN111835655B (en) * 2020-07-13 2022-06-28 北京轻网科技有限公司 Shared bandwidth speed limiting method, device and storage medium
CN112671667B (en) * 2020-12-03 2022-06-28 中国科学院计算技术研究所 A forwarding rate limiting method and system for a virtual forwarding device
CN113747597B (en) * 2021-08-30 2024-07-09 上海智能网联汽车技术中心有限公司 Network data packet scheduling method and system based on mobile 5G network
CN117896318B (en) * 2023-12-14 2025-08-26 天翼云科技有限公司 A method and device for limiting the speed of cluster shared traffic thresholds

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112751691A (en) * 2019-10-29 2021-05-04 北京金山云网络技术有限公司 Network flow rate limiting method and device, central control equipment and gateway
CN111865675A (en) * 2020-07-09 2020-10-30 广州虎牙科技有限公司 Method, device and system for limiting receiving and transmitting speed of container

Also Published As

Publication number Publication date
WO2025124250A9 (en) 2025-08-21
CN117896318A (en) 2024-04-16
WO2025124250A1 (en) 2025-06-19

Similar Documents

Publication Publication Date Title
CN117896318B (en) A method and device for limiting the speed of cluster shared traffic thresholds
US9497125B2 (en) Congestion control enforcement in a virtualized environment
US6839767B1 (en) Admission control for aggregate data flows based on a threshold adjusted according to the frequency of traffic congestion notification
Apostolaki et al. Fab: Toward flow-aware buffer sharing on programmable switches
US20070280277A1 (en) Method and system for adaptive queue and buffer control based on monitoring in a packet network switch
CN109412958B (en) Congestion control method and device for data center
US12021756B2 (en) Multi-queue packet processing performed by an intermediate device in a communication network
US9794127B2 (en) Virtual bandwidth management deployment architectures
CN111224884A (en) Processing method for congestion control, message forwarding device and message receiving device
Li et al. OPTAS: Decentralized flow monitoring and scheduling for tiny tasks
US11870708B2 (en) Congestion control method and apparatus
Wang et al. Low complexity multi-resource fair queueing with bounded delay
WO2021098368A1 (en) Method, apparatus and system for controlling congestion
WO2021174236A2 (en) In-band signaling for latency guarantee service (lgs)
Nandhini et al. Exploration and evaluation of congestion control algorithms for data center networks
US10187317B1 (en) Methods for traffic rate control and devices thereof
CN104919768A (en) Identify data flows based on actions based on quality of service policies
CN118612172A (en) A switch buffer management method suitable for mixed traffic in data center networks
US8542602B2 (en) Apparatus and method for a multi-level enmeshed policer
Wei et al. EC4: ECN and credit-reservation converged congestion control
CN114884884A (en) Congestion control method and device
Wu et al. Adaptive data transmission in the cloud
Adesanmi et al. Controlling TCP Incast congestion in data centre networks
CN120075136B (en) Active congestion control method based on credit mechanism, electronic equipment and storage medium
Das et al. Low-state fairness: Lower bounds and practical enforcement

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