The present application relates to a cluster shared traffic threshold-based
rate limiting method and apparatus, which are used for achieving effective
bandwidth management and allocation among a plurality of nodes in a cluster and among a plurality of network card queues in the nodes. The method comprises: S1, a cluster manager issuing a cluster
rate limiting threshold of a specified
data stream to each node in a network cluster, and adding the forwarding process of each node into a
multicast to share traffic information between the nodes, the cluster
rate limiting threshold being acquired in the forwarding process of the node; S2, a node controller collecting statistics about the traffic of the specified
data stream flowing into a network card per second, performing marking, sending out, by means of multicasting, a
unique identifier of the node and network card traffic received per second to be shared to other nodes in the cluster, and on the basis of a
multicast packet received from the cluster, calculating a node rate limiting quota threshold of the present node; S3, on the basis of each service core for
processing traffic of queues in the forwarding process of the node and the bandwidth proportion of the total traffic of the nodes, a
bandwidth allocation scheduler allocating a core rate limiting quota threshold of each node; and S4, on the basis of real-
time data of the processed traffic of each
queue in the nodes and the proportion of the total bandwidth of the nodes, a
token bucket manager performing periodical and dynamical adjustment by means of a
token bucket algorithm to obtain the proportion of each
queue in a cluster rate limiting bandwidth, so as to limit the rate of the traffic passing through the
queue.