CN110880991B - Bandwidth limiting method, device and system - Google Patents

Bandwidth limiting method, device and system Download PDF

Info

Publication number
CN110880991B
CN110880991B CN201911244277.8A CN201911244277A CN110880991B CN 110880991 B CN110880991 B CN 110880991B CN 201911244277 A CN201911244277 A CN 201911244277A CN 110880991 B CN110880991 B CN 110880991B
Authority
CN
China
Prior art keywords
node
service
bandwidth
management
sub
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
CN201911244277.8A
Other languages
Chinese (zh)
Other versions
CN110880991A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911244277.8A priority Critical patent/CN110880991B/en
Publication of CN110880991A publication Critical patent/CN110880991A/en
Priority to PCT/CN2020/121762 priority patent/WO2021109726A1/en
Application granted granted Critical
Publication of CN110880991B publication Critical patent/CN110880991B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability

Abstract

The embodiment of the invention provides a bandwidth limiting method, a device and a system, which are applied to a management node in a bandwidth limiting system and comprise the following steps: determining a target domain name; acquiring the quantity of established links and node bandwidth sent by each management child node, wherein the established links are as follows: the target service child node is connected with the client end, and the target service child node is as follows: providing a service sub-node for accessing a target domain name service; and if the sum of the obtained node bandwidths exceeds a preset bandwidth threshold, sending the determined available bandwidth to each management sub-node according to the obtained quantity of the established links and the node bandwidth, so that each management sub-node limits the occupied bandwidth of the established links corresponding to the service node according to the received available bandwidth. When the scheme provided by the embodiment is applied to carry out bandwidth limitation, the bandwidth in the network can be prevented from being excessively occupied.

Description

Bandwidth limiting method, device and system
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method, an apparatus, and a system for bandwidth limitation.
Background
When the occupied bandwidth in the network is high, the data transmission efficiency is also reduced, thereby affecting the network quality. In order to ensure the network quality, in the prior art, the bandwidth limitation is generally performed on the basis of a single link.
Specifically, the server in the network is used for realizing specific services, and when each client needs to request the server for services, a single link is established between each client and the server. For each single link, when the occupied bandwidth of the single link exceeds a preset bandwidth threshold, the occupied bandwidth of the single link is limited.
For each single link, bandwidth limitation may be achieved by applying the above approach. However, for the whole network, the number of clients establishing single links with each server is variable and uncontrollable, so that bandwidth limitation can be implemented only for each single link by applying the above method, and when the number of single links is too large, the bandwidth occupation of the whole network is still high.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method, an apparatus, and a system for limiting bandwidth, so as to prevent bandwidth in a network from being excessively occupied. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a bandwidth limiting method, which is applied to a management node in a bandwidth limiting system, where the bandwidth limiting system further includes: a service node comprising a management sub-node and a service sub-node, the method comprising:
determining a target domain name, and sending the target domain name to each management sub-node;
obtaining the number of established links and node bandwidth sent by each management child node, wherein the established links are as follows: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
if the total occupied bandwidth exceeds a preset bandwidth threshold, determining available bandwidth corresponding to each service node according to the obtained quantity of established links and node bandwidth, and sending the determined available bandwidth to each management sub-node, so that each management sub-node limits the occupied bandwidth of the established links corresponding to the service node according to the received available bandwidth, wherein the total occupied bandwidth is as follows: and the sum of the obtained node bandwidths.
In an embodiment of the present invention, the determining an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth includes:
according to the obtained quantity of established links and node bandwidth, calculating available bandwidth quote corresponding to each service node according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
In an embodiment of the present invention, after the determining the target domain name, the method further includes:
and determining information of a service response strategy based on the new link corresponding to the target domain name, and sending the obtained information to each management sub-node, so that each management sub-node informs the target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
In a second aspect, an embodiment of the present invention provides a bandwidth limiting method, which is applied to a management child node included in a service node in a bandwidth limiting system, where the bandwidth limiting system further includes: a management node, the service node further comprising a service child node, the method comprising:
receiving a target domain name sent by the management node;
obtaining the number of established links and the node bandwidth, wherein the established links are as follows: the link established between the target service sub-node and the client in the service node where the management sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link;
sending the obtained quantity of the established links and the node bandwidth to the management node, so that the management node determines the available bandwidth corresponding to each service node according to the received quantity of the established links and the node bandwidth;
and receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management sub-node is located, and limiting the occupied bandwidth of the established link according to the received available bandwidth.
In an embodiment of the present invention, the limiting the occupied bandwidth of the established link according to the received available bandwidth includes:
determining the available bandwidth of each established link according to the received available bandwidth and the number of the established links;
and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
In an embodiment of the present invention, the method further includes:
obtaining information based on a service response strategy of the new link sent by the management node;
and informing the target service sub-node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold, wherein the total occupied bandwidth is the sum of the node bandwidths received by the management node.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at the service request sent by the client based on the new link, wherein the response contains a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
In a third aspect, an embodiment of the present invention provides a bandwidth limiting apparatus, which is applied to a management node in a bandwidth limiting system, where the bandwidth limiting system further includes: a service node comprising a management sub-node and a service sub-node, the apparatus comprising:
the target domain name determining module is used for determining a target domain name and sending the target domain name to each management sub-node;
a quantity and bandwidth receiving module, configured to obtain the quantity of established links and node bandwidth sent by each management child node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
if the total occupied bandwidth exceeds a preset bandwidth threshold, triggering an available bandwidth sending module, where the available bandwidth sending module is used to determine an available bandwidth corresponding to each service node according to the obtained number of established links and node bandwidth, and sending the determined available bandwidth to each management sub-node, so that each management sub-node limits the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth, where the total occupied bandwidth is: and the sum of the obtained node bandwidths.
In an embodiment of the present invention, the available bandwidth sending module includes:
and the available bandwidth calculation submodule is used for calculating the available bandwidth quote corresponding to each service node according to the obtained number of the established links and the node bandwidth and the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node;
an available bandwidth sending sub-module, configured to send the determined available bandwidth to each management sub-node, so that each management sub-node limits, according to the received available bandwidth, an occupied bandwidth of an established link corresponding to the serving node where the management sub-node is located, where the total occupied bandwidth is: and the sum of the obtained node bandwidths.
In an embodiment of the present invention, after the target domain name determining module, the method further includes:
and the information sending module is used for determining information of a service response strategy based on the new link corresponding to the target domain name and sending the obtained information to each management sub-node so that each management sub-node informs the target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
In a fourth aspect, an embodiment of the present invention provides a bandwidth limiting apparatus, which is applied to a management child node included in a service node in a bandwidth limiting system, where the bandwidth limiting system further includes: a management node, the service node further comprising a service child node, the apparatus comprising:
the target domain name receiving module is used for receiving a target domain name sent by the management node;
a quantity and bandwidth obtaining module, configured to obtain a quantity of established links and a node bandwidth, where the established links are: the link established between the target service sub-node and the client in the service node where the management sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link;
a quantity and bandwidth sending module, configured to send the obtained quantity of established links and node bandwidth to the management node, so that the management node determines an available bandwidth corresponding to each service node according to the received quantity of established links and node bandwidth,
and the bandwidth limiting module is used for receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management sub-node is located, and limiting the occupied bandwidth of the established link according to the received available bandwidth.
In an embodiment of the present invention, the bandwidth limiting module includes:
the bandwidth receiving submodule is used for receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management node is located;
an available bandwidth determining submodule, configured to determine an available bandwidth of each established link according to the received available bandwidth and the obtained number of established links;
and the bandwidth limiting submodule is used for limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
In an embodiment of the present invention, the apparatus further includes:
the information obtaining module is used for obtaining the information of the service response strategy based on the new link sent by the management node;
and the service sub-node notification module is used for notifying the target service sub-node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold, wherein the total occupied bandwidth is the sum of the node bandwidths received by the management node.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at the service request sent by the client based on the new link, wherein the response contains a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
In a fifth aspect, an embodiment of the present invention provides a bandwidth limiting system, which includes a management node and a service node, where the service node includes a management sub-node and a service sub-node for providing a service,
the management node is used for determining a target domain name and sending the target domain name to each management sub-node;
each management sub-node is configured to obtain the number of established links and a node bandwidth, and send the obtained number of established links and the node bandwidth to the management node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
the management node is further configured to receive the number of established links and the node bandwidth sent by each management sub-node, determine, according to the obtained number of established links and the node bandwidth, an available bandwidth corresponding to each service node if the total occupied bandwidth exceeds a preset bandwidth threshold, and send the determined available bandwidth to each management sub-node, where the total occupied bandwidth is: the sum of the obtained node bandwidths;
each management sub-node is further configured to receive the available bandwidth sent by the management node, and limit the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth.
In an embodiment of the present invention, the determining an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth includes:
according to the obtained quantity of established links and node bandwidth, calculating available bandwidth quote corresponding to each service node according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
In an embodiment of the present invention, the management node is further configured to determine, after determining the target domain name, information based on a new linked service response policy corresponding to the target domain name, and send the obtained information to each management child node;
each management sub-node is further configured to notify a target service sub-node in the service node to respond to the service based on the new link according to the service response policy when the total occupied bandwidth exceeds a preset bandwidth threshold.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
In an embodiment of the present invention, the limiting the occupied bandwidth of the established link corresponding to the serving node according to the received available bandwidth includes:
determining the available bandwidth of each established link according to the received available bandwidth and the number of the established links;
and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
In a sixth aspect, an embodiment of the present invention provides an electronic device, where the electronic device serves as a management node, and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface are used, and the memory completes mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the method steps of the second aspect when executing the program stored in the memory.
A seventh aspect of the present invention provides an electronic device, where the electronic device serves as a management child node, and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface are used, and the memory completes mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the method steps of the second aspect when executing the program stored in the memory.
In an eighth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps described in the first aspect.
In a ninth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of the second aspect.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to perform bandwidth limitation, the management node receives the number of established links and the node bandwidth sent by the management child node in each service node, determines the available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sends the available bandwidth to the management child node in each service node. Therefore, the management node receives data and transmits available bandwidth in units of service nodes. Compared with the client involved in the prior art, the number of the service nodes is controllable and has less variation. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a bandwidth limiting system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a first bandwidth limiting method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a second bandwidth limiting method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a third bandwidth limiting method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a first bandwidth limiting device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second bandwidth limiting device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a third bandwidth limiting apparatus according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating another bandwidth limiting system according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a second electronic device according to an embodiment of the invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, a bandwidth limiting system applied to an embodiment of the present invention will be described. Referring to fig. 1, fig. 1 is a schematic diagram of a bandwidth limiting system according to an embodiment of the present invention, which includes a bandwidth limiting user interface, a configuration node, a management node, a service node 1, and a service node 2, where the service node 1 includes a management child node 1, a service child node 11, a service child node 12, … …, and a service child node 1n, and the service node 2 includes a management child node 2, a service child node 21, a service child node 22, a service child node … …, and a service child node 2 n.
The service sub-node 11, the service sub-node 12, … … and the service sub-node 1n are used for providing services for users and interacting data with the management sub-node 1. Likewise, the service sub-node 21, the service sub-node 22, … …, and the service sub-node 2n are also used to provide services to users, and perform data interaction with the management sub-node 2. Each service child node may be one electronic device or a plurality of electronic devices.
The management sub-node 1 and the management sub-node 2 perform data interaction with each service sub-node on one hand and perform data interaction with the management node on the other hand. The processes of the above two aspects can be performed simultaneously by two threads. The management sub-node 1 and the management sub-node 2 may be electronic devices independent of the service sub-node in the service node to which they belong, or may be electronic devices serving as the service sub-node in the service node to which they belong, that is, one electronic device serves as both the management sub-node and the service sub-node. Specifically, a hash value of each electronic device identifier serving as a service child node may be calculated by a hash algorithm, and then one electronic device may be selected from the electronic devices serving as the service child node as a management child node according to the calculated hash value.
The bandwidth limiting user interface is: and the interface displayed on the client used by the staff or the user is used for inputting the bandwidth limitation information such as domain names, bandwidth thresholds and the like.
The configuration node is used for receiving bandwidth limitation information sent by a client used by a worker or a user and storing the bandwidth limitation information.
The management node is used for carrying out data interaction with each management sub-node and acquiring bandwidth limitation information set by staff or users from the configuration node.
The following describes a bandwidth limiting method provided by an embodiment of the present invention.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first bandwidth limiting method applied to a management node in a bandwidth limiting system according to an embodiment of the present invention, where the method includes S201 to S203.
S201: and determining a target domain name and sending the target domain name to each management child node.
The target domain name may be a single domain name, for example: www.xxx.com or www.xxx.cn. The target domain name may also be a plurality of domain names belonging to a domain name group, for example: the suffix is a plurality of domain names of.com.
The target domain name may be a domain name input by a user or a worker on the bandwidth limitation user interface, or may be a domain name selected from various domain names provided by the user or the worker on the bandwidth limitation user interface. And may also be information selected from information of various service response policies provided on the bandwidth limited user interface by the user or staff. The bandwidth limitation user interface sends information configured by a user or a worker to the configuration node, the configuration node stores the configured information, and the management node acquires a target domain name configured by the user or the worker stored in the configuration node at a fixed time or according to a preset interval time.
The management node may send the target domain name obtained within a preset time interval to each management child node.
S202: and acquiring the quantity of established links sent by each management sub-node and the node bandwidth.
The established links are: managing the established link between the target service sub-node and the client in the service node where the sub-node is located, wherein the target service sub-node is: a service child node is provided that accesses the target domain name service.
Specifically, since the target service sub-node is used for providing access to the target domain name service, when the user accesses the target domain name on the client used by the user, the client establishes a link with the target service sub-node. For example: when the user accesses the target domain name www.xxx.com on the client used by the user, the target service sub-node accessing the target domain name www.xxx.com is provided as the service sub-node A, and then the client establishes a link with the service sub-node A.
The node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management child node is located. Specifically, the node bandwidth may be an occupied bandwidth of each established link, or may be a total occupied bandwidth of the established links corresponding to the service node where the management child node is located.
The established links corresponding to the service nodes are as follows: and the established link between the target service child node in the service node and the client.
After each management sub-node receives the target domain name sent by the management node, each management sub-node determines a service sub-node for providing access to the target domain name service, namely the target service sub-node, counts the number of established links between the target service sub-node and the client, and obtains the node bandwidth. Each management sub-node may send the counted number of established links and node bandwidth to the management node according to a preset interval time.
S203: if the total occupied bandwidth exceeds a preset bandwidth threshold, determining the available bandwidth corresponding to each service node according to the obtained quantity of established links and the node bandwidth, and sending the determined available bandwidth to each management sub-node, so that each management sub-node limits the occupied bandwidth of the established links corresponding to the service node according to the received available bandwidth.
The total occupied bandwidth is as follows: and the sum of the obtained node bandwidths. For example: the bandwidth limiting system includes a service node 1 and a service node 2, a node bandwidth corresponding to the service node 1 is 100Mbps (megabits per second), a node bandwidth corresponding to the service node 2 is 200Mbps, and then a total occupied bandwidth is 100Mbps +200Mbps, which is 300 Mbps.
When the target domain name is a single domain name, the total occupied bandwidth is the sum of the bandwidths occupied by the established links corresponding to the single domain name; when the target domain name belongs to a plurality of domain names in the domain name group, the total occupied bandwidth is the sum of the occupied bandwidths of the established links corresponding to the plurality of domain names. The established link corresponding to the domain name can be understood as: a link between a service child node accessing the domain name service and the client is provided.
The preset bandwidth threshold may be set on a bandwidth limiting user interface by a user or a worker, and the management node obtains the preset bandwidth threshold set on the bandwidth limiting user interface by the user or the worker. For example: the preset bandwidth threshold may be 1000 Mbps.
When the total occupied bandwidth exceeds a preset bandwidth threshold value, the total occupied bandwidth is high.
When the number of links established between each target service sub-node in the service node and the client is large, the number of clients accessing the target domain name is large, so that more available bandwidth can be determined for the service node to ensure that the service sub-node can provide normal service for accessing the target domain name; similarly, when the link established between each target service sub-node in the service node and the client occupies a higher bandwidth, it indicates that the data volume transmitted between each target service sub-node and the client is larger, so that more available bandwidth can be determined for the service node, and normal data transmission between each target service sub-node and the client is determined. Therefore, the available bandwidth corresponding to each service node is determined from two aspects, and the network state in each service node is fully considered, so that the normal data transmission of each established link in each service node and the normal service provided by each service sub-node can be ensured while the bandwidth is limited.
In an embodiment of the present invention, according to the obtained number of established links and node bandwidth, the available bandwidth quote corresponding to each service node can be calculated according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
Therefore, the available bandwidth corresponding to each service node is calculated according to the calculation formula, and the available bandwidth corresponding to each service node can be determined more accurately.
Specifically, the management node may send a message including the determined available bandwidth to each management child node, where the message may further include an identifier that the total occupied bandwidth exceeds a preset bandwidth threshold. In this way, the management child node can perform bandwidth limitation on the established link according to the available bandwidth and the identifier that the total occupied bandwidth carried in the message exceeds the preset bandwidth threshold.
In addition, the message may be a message generated according to a preset message format.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to perform bandwidth limitation, the management node receives the number of established links and the node bandwidth sent by the management child node in each service node, determines the available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sends the available bandwidth to the management child node in each service node. Therefore, the management node receives data and transmits available bandwidth in units of service nodes. Compared with the client involved in the prior art, the number of the service nodes is controllable and has less variation. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In an embodiment of the present invention, after the determining the target domain name in S201, the method may further include:
and determining information of a service response strategy based on the new link corresponding to the target domain name, and sending the obtained information to each management sub-node, so that each management sub-node informs the target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
The new link described above can be understood as: and providing a link newly established between the target service sub-node accessing the target domain name and the client.
The information of the service response policy based on the new link corresponding to the target domain name may be identification information of the service response policy based on the new link corresponding to the target domain name, or may be specific content of the service response policy based on the new link corresponding to the target domain name.
Specifically, the information of the service response policy based on the new link corresponding to the target domain name may be information input by the user or the staff on the bandwidth-limited user interface, or information selected from information of each service response policy provided by the user or the staff on the bandwidth-limited user interface. The bandwidth limitation user interface sends information configured by a user or a worker to the configuration node, the configuration node stores the configured information, and the management node acquires the information of the service response strategy configured by the user or the worker stored in the configuration node at a fixed time or according to a preset interval time.
In an embodiment of the present invention, the service response policy may include one of the following policies:
the first method comprises the following steps: and sending a response to the client aiming at the service request sent by the client based on the new link.
The first strategy described above can be understood as: when the client sends a service request to the target service child node based on the new link, the target service child node rejects the policy to provide the service to the client.
The response contains a status code and information indicating denial of service.
The status code is used to indicate the reason for denial of service. For example: the status code may be 403, which indicates that the service child node understands the content of the service request, but rejects to execute the service request sent by the client based on the new link; the status code may also be 404. 404 indicates that the content that the client wishes to be served based on the service request sent by the new link is not stored on the serving child node. The status code may be stored in a header of the response message denying the provision of the service.
Therefore, service is refused to be provided for the client, extra occupied bandwidth of the network is not increased, the existing occupied bandwidth of the network is guaranteed to be unchanged, and the reason for refusing to respond to the client to send the request can be determined according to the state code returned to the client.
And the second method comprises the following steps: and sending a service response based on the newly linked service request to the client according to the preset bandwidth.
The second strategy described above can be understood as: when the client sends a service request to the target service child node based on the new link, the target service child node may send a policy of the provided service response to the client according to the preset bandwidth.
When the target service child node sends the service response based on the newly linked service request to the client, the service response can be sent according to a preset bandwidth, and the service response can also be sent according to a bandwidth which does not exceed the preset bandwidth.
Therefore, data transmission is carried out according to the preset bandwidth, and the whole occupied bandwidth of the network can be limited.
And the third is that: and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
The third strategy described above can be understood as: when the client sends the service request to the target service sub-node based on the new link, the target service sub-node forwards the service request to the preset service sub-node, so that the preset service sub-node sends the policy of the provided service response to the client.
Specifically, the target service child node may change the destination IP address or the target domain name carried in the service request to an IP address or a domain name of a preset service child node, so that the service request may be forwarded to the preset service child node. Therefore, the service request is forwarded to the preset service sub-node, the service request sent by the client based on the new link can be normally responded, and the quality of the service provided for the user is ensured.
In this way, since the service response policy can be a plurality of service response policies, the service child node in the service node where the management child node is located can flexibly respond to the service request based on the new link.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second bandwidth limiting method according to an embodiment of the present invention, which is applied to a management child node included in a service node in a bandwidth limiting system, where the method includes S301 to S302.
S301: and receiving the target domain name sent by the management node.
S302: the number of established links and the node bandwidth are obtained.
Specifically, the management sub-node may monitor each target service sub-node included in the service node where the management sub-node is located, and after monitoring the target service sub-node establishing a link with the client, record the link established between the target service sub-node and the client and an occupied bandwidth of the link established between the target service sub-node and the client, thereby determining the number of established links and the node bandwidth.
S303: and sending the obtained quantity of the established links and the node bandwidth to the management node, so that the management node determines the available bandwidth corresponding to each service node according to the received quantity of the established links and the node bandwidth.
S304: and receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management sub-node is located, and limiting the occupied bandwidth of the established link according to the received available bandwidth.
When the available bandwidth received by the management sub-node is the available bandwidth of each established link corresponding to the service node where the management sub-node is located, the management sub-node may limit the occupied bandwidth of each established link according to the available bandwidth.
In an embodiment of the present invention, when the available bandwidth received by the management sub-node is the total available bandwidth corresponding to the serving node, the management sub-node may determine the available bandwidth of each established link according to the received available bandwidth and the obtained number of established links; and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
Specifically, the management child node determines the available bandwidth of each established link according to the received available bandwidth and the number of established links, and there may be the following two determination manners.
The first mode is as follows: the available bandwidth for each established link is evenly distributed based on the received available bandwidth and the number of established links. For example: when the available bandwidth received by the management sub-node is 1000Mbps and the number of established links is 10, the available bandwidth of each established link is 100 Mbps.
The second mode is as follows: the available bandwidth of each established link is calculated according to the received available bandwidth and the number of the established links. For example: when the available bandwidth received by the management sub-node is 1000Mbps, the number of established links is 2, and the weight of the established link 1 is 0.4, the available bandwidth of the established link 1 is 400Mbps, and the weight of the established link 2 is 0.6, the available bandwidth of the established link 2 is 600 Mbps. In this way, the management sub-node can flexibly determine the available bandwidth of each established link, thereby limiting the occupied bandwidth of each established link.
When the occupied bandwidth of the established link corresponding to the service node is limited, the occupied bandwidth parameter information of each established link can be modified into the received available bandwidth.
As can be seen from the above, when the scheme provided by this embodiment is applied to perform bandwidth limitation, the management child node in the service node sends the number of established links and the node bandwidth to the management node, and receives the available bandwidth sent by the management node and determined according to the received number of established links and the node bandwidth. Therefore, the management node receives data and sends available bandwidth in units of service nodes, and compared with the client related to the prior art, the number of the service nodes is controllable and less variable. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In an embodiment of the present invention, referring to fig. 4, fig. 4 is a flowchart illustrating a third bandwidth limiting method according to the embodiment of the present invention, and after S304, S305 to S306 may be further included.
S305: and obtaining the information which is sent by the management node and is based on the service response strategy of the new link.
S306: and informing a target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
When the total occupied bandwidth exceeds the preset bandwidth threshold, the management sub-node may send a request for executing the service response policy to each target service sub-node, and each target service sub-node responds to the service based on the new link according to the service response policy.
As can be seen from the above, when the scheme provided by this embodiment is applied to perform bandwidth limitation, the service response policy may be multiple service response policies, so that the service child node in the service node where the management child node is located can flexibly respond to the service request based on the new link.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at the service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service; therefore, the whole occupied bandwidth in the network can be ensured, and the reason for refusing to respond to the request sent by the client can be determined according to the status code returned to the client.
Sending a service response based on the newly linked service request to the client according to the preset bandwidth; therefore, data transmission is carried out according to the preset bandwidth, and the whole occupied bandwidth of the network can be limited.
And forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request. Therefore, the service request is forwarded to the preset service sub-node, the service request sent by the client based on the new link can be normally responded, and the quality of the service provided for the user is ensured.
Referring to fig. 5, which is a schematic structural diagram of a first bandwidth limiting apparatus provided in an embodiment of the present invention, applied to a management node in a bandwidth limiting system, where the bandwidth limiting system further includes: a service node comprising a management sub-node and a service sub-node, the apparatus comprising:
a target domain name determining module 501, configured to determine a target domain name and send the target domain name to each management child node;
a quantity and bandwidth receiving module 502, configured to obtain the quantity of established links and node bandwidth sent by each management child node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
if the total occupied bandwidth exceeds a preset bandwidth threshold, triggering an available bandwidth sending module 503, where the available bandwidth sending module 503 is configured to determine an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sending the determined available bandwidth to each management subnode, so that each management subnode limits the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth, where the total occupied bandwidth is: and the sum of the obtained node bandwidths.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to perform bandwidth limitation, the management node receives the number of established links and the node bandwidth sent by the management child node in each service node, determines the available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sends the available bandwidth to the management child node in each service node. Therefore, the management node receives data and transmits available bandwidth in units of service nodes. Compared with the client involved in the prior art, the number of the service nodes is controllable and has less variation. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In an embodiment of the present invention, the available bandwidth sending module 503 includes:
and the available bandwidth calculation submodule is used for calculating the available bandwidth quote corresponding to each service node according to the obtained number of the established links and the node bandwidth and the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node;
an available bandwidth sending sub-module, configured to send the determined available bandwidth to each management sub-node, so that each management sub-node limits, according to the received available bandwidth, an occupied bandwidth of an established link corresponding to the serving node where the management sub-node is located, where the total occupied bandwidth is: and the sum of the obtained node bandwidths.
Therefore, the available bandwidth corresponding to each service node is calculated according to the calculation formula, and the available bandwidth corresponding to each service node can be determined more accurately.
In an embodiment of the present invention, after the target domain name determining module 501, the method further includes:
and the information sending module is used for determining information of a service response strategy based on the new link corresponding to the target domain name and sending the obtained information to each management sub-node so that each management sub-node informs the target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
In this way, since the service response policy can be a plurality of service response policies, the service child node in the service node where the management child node is located can flexibly respond to the service request based on the new link.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service; therefore, the whole occupied bandwidth in the network can be ensured, and the reason for refusing to respond to the request sent by the client can be determined according to the status code returned to the client.
Sending a service response based on the newly linked service request to the client according to the preset bandwidth; therefore, data transmission is carried out according to the preset bandwidth, and the whole occupied bandwidth of the network can be limited.
And forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request. Therefore, the service request is forwarded to the preset service sub-node, the service request sent by the client based on the new link can be normally responded, and the quality of the service provided for the user is ensured.
Referring to fig. 6, which is a schematic structural diagram of a second bandwidth limiting apparatus provided in an embodiment of the present invention, applied to a management child node included in a service node in a bandwidth limiting system, where the bandwidth limiting system further includes: a management node, the service node further comprising a service child node, the apparatus comprising:
a target domain name receiving module 601, configured to receive a target domain name sent by the management node;
a quantity and bandwidth obtaining module 602, configured to obtain a quantity of established links and a node bandwidth, where the established links are: the link established between the target service sub-node and the client in the service node where the management sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link;
a quantity and bandwidth sending module 603, configured to send the obtained quantity of established links and node bandwidth to the management node, so that the management node determines an available bandwidth corresponding to each service node according to the received quantity of established links and node bandwidth,
a bandwidth limiting module 604, configured to receive an available bandwidth, which is sent by the management node and corresponds to the service node where the management sub-node is located, and limit, according to the received available bandwidth, an occupied bandwidth of the established link.
As can be seen from the above, when the scheme provided in this embodiment is applied to perform bandwidth limitation, the management child node in the service node sends the number of established links and the node bandwidth to the management node, and receives the available bandwidth sent by the management node and determined according to the received number of established connections and the node bandwidth. Therefore, the management node receives data and sends available bandwidth in units of service nodes, and compared with the client related to the prior art, the number of the service nodes is controllable and less variable. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In an embodiment of the invention, the bandwidth limiting module 604 includes:
the bandwidth receiving submodule is used for receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management node is located;
an available bandwidth determining submodule, configured to determine an available bandwidth of each established link according to the received available bandwidth and the number of established links;
and the bandwidth limiting submodule is used for limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
In this way, the management sub-node can flexibly determine the available bandwidth of each established link, thereby limiting the occupied bandwidth of each established link.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a third bandwidth limiting apparatus according to an embodiment of the present invention, which further includes 605 and 606 after the bandwidth limiting module 604.
An information obtaining module 605, configured to obtain information of the service response policy based on the new link sent by the management node;
a service sub-node notifying module 606, configured to notify a target service sub-node in the service nodes to respond to a service based on a new link according to the service response policy when the total occupied bandwidth exceeds a preset bandwidth threshold, where the total occupied bandwidth is a sum of node bandwidths received by the management node.
As can be seen from the above, when the scheme provided by this embodiment is applied to perform bandwidth limitation, the service response policy may be multiple service response policies, so that the service child node in the service node where the management child node is located can flexibly respond to the service request based on the new link.
In an embodiment of the present invention, the service response policy includes one of the following policies:
sending a response to the client aiming at the service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service; therefore, the whole occupied bandwidth in the network can be ensured, and the reason for refusing to respond to the request sent by the client can be determined according to the status code returned to the client.
Sending a service response based on the newly linked service request to the client according to the preset bandwidth; therefore, data transmission is carried out according to the preset bandwidth, and the whole occupied bandwidth of the network can be limited.
And forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request. Therefore, the service request is forwarded to the preset service sub-node, the service request sent by the client based on the new link can be normally responded, and the quality of the service provided for the user is ensured.
Referring to fig. 8, fig. 8 is a schematic diagram of a bandwidth limiting system according to an embodiment of the present invention, where the bandwidth limiting system includes a management node and a service node, the service node includes a management sub-node and a service sub-node,
the management node is used for determining a target domain name and sending the target domain name to each management sub-node;
each management sub-node is configured to obtain the number of established links and a node bandwidth, and send the obtained number of established links and the node bandwidth to the management node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
the management node is further configured to receive the number of established links and the node bandwidth sent by each management sub-node, determine, according to the obtained number of established links and the node bandwidth, an available bandwidth corresponding to each service node if the total occupied bandwidth exceeds a preset bandwidth threshold, and send the determined available bandwidth to each management sub-node, where the total occupied bandwidth is: the sum of the obtained node bandwidths;
each management sub-node is further configured to receive the available bandwidth sent by the management node, and limit the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth.
As can be seen from the above, when the bandwidth limiting system provided by the embodiment of the present invention is applied to perform bandwidth limitation, the management node receives the number of established links and the node bandwidth sent by the management child node in each service node, determines an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sends the available bandwidth to the management child node in each service node. Therefore, the management node receives data and transmits available bandwidth in units of service nodes. Compared with the client involved in the prior art, the number of the service nodes is controllable and has less variation. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In an embodiment of the present invention, the determining, by the management node, an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth includes:
according to the obtained quantity of established links and node bandwidth, calculating available bandwidth quote corresponding to each service node according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
Therefore, the available bandwidth corresponding to each service node is calculated according to the calculation formula, and the available bandwidth corresponding to each service node can be determined more accurately.
In an embodiment of the present invention, after determining the target domain name, the management node is further configured to determine information, corresponding to the target domain name, based on a new linked service response policy, and send the obtained information to each management child node;
each management sub-node is further configured to notify a target service sub-node in the service node to respond to the service based on the new link according to the service response policy when the total occupied bandwidth exceeds a preset bandwidth threshold.
In this way, since the service response policy can be a plurality of service response policies, the service child node in the service node where the management child node is located can flexibly respond to the service request based on the new link.
In one embodiment of the invention, the service response policy comprises one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service; therefore, the whole occupied bandwidth in the network can be ensured, and the reason for refusing to respond to the request sent by the client can be determined according to the status code returned to the client.
Sending a service response based on the newly linked service request to the client according to the preset bandwidth; therefore, data transmission is carried out according to the preset bandwidth, and the whole occupied bandwidth of the network can be limited.
And forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request. Therefore, the service request is forwarded to the preset service sub-node, the service request sent by the client based on the new link can be normally responded, and the quality of the service provided for the user is ensured.
In an embodiment of the present invention, the limiting the occupied bandwidth of the established link corresponding to the serving node according to the received available bandwidth includes:
determining the available bandwidth of each established link according to the received available bandwidth and the number of the established links;
and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
In this way, the management sub-node can flexibly determine the available bandwidth of each established link, thereby limiting the occupied bandwidth of each established link.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a first electronic device serving as a management node according to an embodiment of the present invention, where the electronic device includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the bandwidth limiting method applied to the management node, which is provided in the embodiment of the present invention, when executing the program stored in the memory 903.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a second electronic device serving as a management child node according to an embodiment of the present invention, where the electronic device includes a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, where the processor 1001, the communication interface 1002, and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the bandwidth limiting method applied to the management child node according to the embodiment of the present invention when executing the program stored in the memory 1003.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In still another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the bandwidth limiting method applied to a management node provided by the embodiment of the present invention.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the bandwidth limitation method applied to the management sub-node provided by the embodiment of the present invention.
In another embodiment provided by the present invention, a computer program product containing instructions is also provided, which when executed on a computer causes the computer to implement the bandwidth limitation method applied to a management node provided by the embodiment of the present invention.
In another embodiment provided by the present invention, a computer program product containing instructions is also provided, which when executed on a computer, causes the computer to implement the bandwidth limitation method applied to the management sub-node provided by the embodiment of the present invention.
As can be seen from the above, when the bandwidth limiting system provided by the embodiment of the present invention is applied to perform bandwidth limitation, the management node receives the number of established links and the node bandwidth sent by the management child node in each service node, determines an available bandwidth corresponding to each service node according to the obtained number of established links and the node bandwidth, and sends the available bandwidth to the management child node in each service node. Therefore, the management node receives data and transmits available bandwidth in units of service nodes. Compared with the client involved in the prior art, the number of the service nodes is controllable and has less variation. Therefore, when the available bandwidth is determined by taking the service nodes as a unit, the bandwidth in the network is not easily occupied too much due to the uncontrollable number of the service nodes.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the system, the electronic device, and the computer-readable storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (19)

1. A bandwidth limiting method applied to a management node in a bandwidth limiting system, wherein the bandwidth limiting system further comprises: a service node comprising a management sub-node and a service sub-node, the method comprising:
determining a target domain name, and sending the target domain name to each management sub-node;
obtaining the number of established links and node bandwidth sent by each management child node, wherein the established links are as follows: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
if the total occupied bandwidth exceeds a preset bandwidth threshold, determining available bandwidth corresponding to each service node according to the obtained quantity of established links and node bandwidth, and sending the determined available bandwidth to each management sub-node, so that each management sub-node limits the occupied bandwidth of the established links corresponding to the service node according to the received available bandwidth, wherein the total occupied bandwidth is as follows: and the sum of the obtained node bandwidths.
2. The method of claim 1, wherein determining available bandwidth corresponding to each serving node according to the obtained number of established links and node bandwidth comprises:
according to the obtained quantity of established links and node bandwidth, calculating available bandwidth quote corresponding to each service node according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
3. The method of claim 1, further comprising, after the determining the target domain name:
and determining information of a service response strategy based on the new link corresponding to the target domain name, and sending the obtained information to each management sub-node, so that each management sub-node informs the target service sub-node in the service node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold.
4. The method of claim 3,
the service response policy comprises one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
5. A bandwidth limiting method is applied to a management sub-node included in a service node in a bandwidth limiting system, and the bandwidth limiting system further includes: a management node, the service node further comprising a service child node, the method comprising:
receiving a target domain name sent by the management node;
obtaining the number of established links and the node bandwidth, wherein the established links are as follows: the link established between the target service sub-node and the client in the service node where the management sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link;
sending the obtained quantity of the established links and the node bandwidth to the management node, so that the management node determines the available bandwidth corresponding to each service node according to the received quantity of the established links and the node bandwidth;
and receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management sub-node is located, and limiting the occupied bandwidth of the established link according to the received available bandwidth.
6. The method of claim 5, wherein the limiting the occupied bandwidth of the established link according to the received available bandwidth comprises:
determining the available bandwidth of each established link according to the received available bandwidth and the number of the established links;
and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
7. The method of claim 5, further comprising:
obtaining information based on a service response strategy of the new link sent by the management node;
and informing the target service sub-node to respond to the service based on the new link according to the service response strategy when the total occupied bandwidth exceeds a preset bandwidth threshold, wherein the total occupied bandwidth is the sum of the node bandwidths received by the management node.
8. The method of claim 7,
the service response policy comprises one of the following policies:
sending a response to the client aiming at the service request sent by the client based on the new link, wherein the response contains a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
9. A bandwidth limiting apparatus, applied to a management node in a bandwidth limiting system, wherein the bandwidth limiting system further comprises: a service node comprising a management sub-node and a service sub-node, the apparatus comprising:
the target domain name determining module is used for determining a target domain name and sending the target domain name to each management sub-node;
a quantity and bandwidth receiving module, configured to obtain the quantity of established links and node bandwidth sent by each management child node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
if the total occupied bandwidth exceeds a preset bandwidth threshold, triggering an available bandwidth sending module, where the available bandwidth sending module is used to determine an available bandwidth corresponding to each service node according to the obtained number of established links and node bandwidth, and sending the determined available bandwidth to each management sub-node, so that each management sub-node limits the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth, where the total occupied bandwidth is: and the sum of the obtained node bandwidths.
10. A bandwidth limiting apparatus, applied to a management child node included in a service node in a bandwidth limiting system, the bandwidth limiting system further comprising: a management node, the service node further comprising a service child node, the apparatus comprising:
the target domain name receiving module is used for receiving a target domain name sent by the management node;
a quantity and bandwidth obtaining module, configured to obtain a quantity of established links and a node bandwidth, where the established links are: the link established between the target service sub-node and the client in the service node where the management sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link;
a quantity and bandwidth sending module, configured to send the obtained quantity of established links and node bandwidth to the management node, so that the management node determines, according to the received quantity of established links and node bandwidth, an available bandwidth corresponding to each service node;
and the bandwidth limiting module is used for receiving the available bandwidth which is sent by the management node and corresponds to the service node where the management sub-node is located, and limiting the occupied bandwidth of the established link according to the received available bandwidth.
11. A bandwidth limiting system comprising a management node and a service node, the service node comprising a management sub-node and a service sub-node for providing a service, wherein,
the management node is used for determining a target domain name and sending the target domain name to each management sub-node;
each management sub-node is configured to obtain the number of established links and a node bandwidth, and send the number of established links and the node bandwidth to the management node, where the established links are: managing established links between a target service sub-node and a client in a service node where the sub-node is located, wherein the target service sub-node is as follows: providing a service sub-node for accessing the target domain name service, wherein the node bandwidth represents the bandwidth occupied by the established link corresponding to the service node where the management sub-node is located;
the management node is further configured to receive the number of established links and the node bandwidth sent by each management sub-node, determine, according to the obtained number of established links and the node bandwidth, an available bandwidth corresponding to each service node if the total occupied bandwidth exceeds a preset bandwidth threshold, and send the determined available bandwidth to each management sub-node, where the total occupied bandwidth is: the sum of the obtained node bandwidths;
each management sub-node is further configured to receive the available bandwidth sent by the management node, and limit the occupied bandwidth of the established link corresponding to the service node according to the received available bandwidth.
12. The system according to claim 11, wherein determining available bandwidth corresponding to each serving node according to the obtained number of established links and node bandwidth comprises:
according to the obtained quantity of established links and node bandwidth, calculating available bandwidth quote corresponding to each service node according to the following formula:
Quota=[(a/A)*X+(b/B)*Y]*C
the method comprises the steps that a is the number of established links sent by management sub-nodes included by a service node, A is the sum of the number of established links sent by each management sub-node acquired by the management node, B is the node bandwidth sent by the management sub-nodes included by the service node, B is the total occupied bandwidth, C is a preset bandwidth threshold, X is a first weight corresponding to the service node, and Y is a second weight corresponding to the service node.
13. The system of claim 11,
the management node is further configured to determine information based on a new link service response policy corresponding to the target domain name after determining the target domain name, and send the obtained information to each management child node;
each management sub-node is further configured to notify a target service sub-node in the service node to respond to the service based on the new link according to the service response policy when the total occupied bandwidth exceeds a preset bandwidth threshold.
14. The system of claim 13,
the service response policy comprises one of the following policies:
sending a response to the client aiming at a service request sent by the client based on the new link, wherein the response comprises a status code and information for indicating that the service is refused to be provided, and the status code is used for indicating the reason for refusing to provide the service;
sending a service response based on the newly linked service request to the client according to the preset bandwidth;
and forwarding the service request to a preset service sub-node aiming at the service request sent by the client based on the new link, so that the preset service sub-node responds to the service request.
15. The system according to claim 13, wherein said limiting the occupied bandwidth of the established link corresponding to the serving node according to the received available bandwidth comprises:
determining the available bandwidth of each established link according to the received available bandwidth and the number of the established links;
and limiting the occupied bandwidth of each established link according to the determined available bandwidth of each established link.
16. The electronic equipment is characterized by serving as a management node and comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
17. The electronic equipment is characterized by serving as a management sub-node and comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 5 to 8 when executing a program stored in the memory.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
19. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 5-8.
CN201911244277.8A 2019-12-06 2019-12-06 Bandwidth limiting method, device and system Active CN110880991B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911244277.8A CN110880991B (en) 2019-12-06 2019-12-06 Bandwidth limiting method, device and system
PCT/CN2020/121762 WO2021109726A1 (en) 2019-12-06 2020-10-19 Bandwidth limitation method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911244277.8A CN110880991B (en) 2019-12-06 2019-12-06 Bandwidth limiting method, device and system

Publications (2)

Publication Number Publication Date
CN110880991A CN110880991A (en) 2020-03-13
CN110880991B true CN110880991B (en) 2021-09-03

Family

ID=69730688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911244277.8A Active CN110880991B (en) 2019-12-06 2019-12-06 Bandwidth limiting method, device and system

Country Status (2)

Country Link
CN (1) CN110880991B (en)
WO (1) WO2021109726A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110880991B (en) * 2019-12-06 2021-09-03 北京金山云网络技术有限公司 Bandwidth limiting method, device and system
CN111654561B (en) * 2020-06-04 2022-09-02 北京金山云网络技术有限公司 Method and device for determining IP address number, electronic equipment and storage medium
CN114826922A (en) * 2021-01-27 2022-07-29 北京金山云网络技术有限公司 Bandwidth adjusting method, device, server and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889451A (en) * 2017-12-06 2019-06-14 贵州白山云科技股份有限公司 The system and method and server of network speed limit

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547478B (en) * 2009-05-12 2011-09-21 华为技术有限公司 Node band width management method, device and system
CN101977159A (en) * 2010-11-26 2011-02-16 重庆金美通信有限责任公司 Management method of bandwidth resources of narrow band network
US9800483B2 (en) * 2012-04-13 2017-10-24 CirrusWorks, Inc. Method and apparatus for dynamic bandwidth allocation for optimizing network utilization
CN103414648B (en) * 2013-07-15 2016-02-03 阔地教育科技有限公司 A kind of communication flow rate control method and system
CN103746933A (en) * 2013-12-24 2014-04-23 乐视网信息技术(北京)股份有限公司 Node distribution method and control center
CN104994037A (en) * 2015-07-07 2015-10-21 上海斐讯数据通信技术有限公司 Automatic distributing system and distributing method for bandwidth
CN109412977B (en) * 2018-10-18 2022-05-17 网宿科技股份有限公司 Domain name bandwidth adjusting method and related equipment
CN109462879B (en) * 2018-12-17 2020-07-31 中国科学院计算技术研究所 Admission control method and system
CN110519183B (en) * 2019-09-29 2022-12-02 北京金山云网络技术有限公司 Node speed limiting method and device, electronic equipment and storage medium
CN110880991B (en) * 2019-12-06 2021-09-03 北京金山云网络技术有限公司 Bandwidth limiting method, device and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889451A (en) * 2017-12-06 2019-06-14 贵州白山云科技股份有限公司 The system and method and server of network speed limit

Also Published As

Publication number Publication date
CN110880991A (en) 2020-03-13
WO2021109726A1 (en) 2021-06-10

Similar Documents

Publication Publication Date Title
CN110880991B (en) Bandwidth limiting method, device and system
US20190182351A1 (en) Route selection method and system, network acceleration node, and network acceleration system
US8953479B2 (en) System and method for license enforcement for data center monitoring applications
JP6563936B2 (en) Method, system, and computer-readable medium for cloud-based virtual orchestrator
JP7383113B2 (en) Node speed limiting methods, devices, electronic devices and storage media
US7929552B2 (en) Automated IP pool management
US8195815B2 (en) Efficient network monitoring and control
KR20090121327A (en) Parameterized quality of service in a network
CN101132373A (en) Method of providing qos for a flow
US10587524B2 (en) Multi-tagged multi-tenant rate limiting
CN109787827B (en) CDN network monitoring method and device
CN109005126B (en) Data stream processing method, device and computer readable storage medium
WO2014127591A1 (en) Trunk management method for video monitoring system and device for same
CN110099292B (en) Data center node determination method and device and electronic equipment
CN109802879B (en) Data stream routing method and device
CN113840330B (en) Connection establishment method, gateway equipment, network system and dispatching center
CN111147468A (en) User access method, device, electronic equipment and storage medium
CN111245740B (en) Service quality strategy method and device for configuration service and computing equipment
CN109981462B (en) Message processing method and device
CN115580568B (en) Method and system for realizing network service quality guarantee based on IPv6 flow label
CN108156086B (en) Policy rule issuing method and device
CN116112572A (en) Service processing method, device, network equipment and storage medium
US11870707B2 (en) Bandwidth management and configuration method for cloud service, and related apparatus
JP2001216282A (en) Server, client, client-server system, load distribution method, and recording medium
US11375446B2 (en) User management device, BNG, and BNG user internet access method and system

Legal Events

Date Code Title Description
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