Public network IP bandwidth speed limiting system, method and device and storage medium

By using the public IP bandwidth speed limit system of K8S cluster in a multipath network environment, dynamically adjusting the bandwidth on different paths, the problem of how to improve bandwidth utilization in a multipath network environment is solved, and efficient bandwidth management and cost control are achieved.

CN119814570APending Publication Date: 2025-04-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411782322.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In a multipath network environment, how to dynamically adjust bandwidth on different paths to improve overall bandwidth utilization within the bandwidth range purchased by users while avoiding additional costs resulting from exceeding bandwidth.

Method used

The public network IP bandwidth speed limit system based on K8S cluster is adopted. Through the main speed limit device node and multiple slave speed limit device nodes work together, the path bandwidth is monitored in real time and the bandwidth allocation is dynamically adjusted to ensure that the total bandwidth configuration is not exceeded.

Benefits of technology

It realizes that the bandwidth on each path is dynamically adjusted without exceeding the total bandwidth configuration purchased by the target user, which improves bandwidth utilization and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814570A_ABST
    Figure CN119814570A_ABST
Patent Text Reader

Abstract

The invention provides a public network IP bandwidth speed limiting system, method and device and a storage medium, and belongs to the technical field of communication. The total bandwidth configuration of a target public network IP corresponding to any target user is configured in the main speed limiting equipment node in the system; the plurality of slave speed-limiting equipment nodes are used for monitoring real-time bandwidths of all paths for a target user to access a target public network IP, and any slave speed-limiting equipment node generates a bandwidth application request according to the real-time bandwidth of any path and sends the bandwidth application request to the master speed-limiting equipment node; the master speed limiting equipment node is used for determining a bandwidth allocation value corresponding to the bandwidth application request and returning the bandwidth allocation value to the slave speed limiting equipment node after responding to any bandwidth application request; and when the master speed limiting equipment node allocates the bandwidth to the slave speed limiting equipment node, the sum of bandwidth allocation values does not exceed the total bandwidth configuration. The invention aims to improve the bandwidth utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of communications, and in particular, to a public network IP bandwidth speed limiting system, method, device and storage medium. Background Art

[0002] A public IP address is an IP address that can be accessed directly on the Internet. It corresponds to a local area network IP address and is assigned to a user or organization by an Internet Service Provider (ISP). It is used to identify the user or organization as a unique identifier on the Internet. A public IP address is the basis for Internet communications and can be used for network access, data transmission, and service provision. In the field of cloud computing and network services, bandwidth is usually used to measure the speed and capacity of network connections. The size of bandwidth directly affects the quality and efficiency of network communications. For cloud service providers, bandwidth is a limited resource and is usually charged based on user demand and usage.

[0003] In a multi-path network environment, public network traffic often passes through multiple intermediate devices or paths before reaching the target server. When a user has purchased a fixed bandwidth, when accessing a public network server in a multi-path network environment, the overall network rate needs to be limited to the bandwidth range purchased by the user to ensure the stability and reliability of network transmission.

[0004] However, in a multi-path network environment, how to limit the real-time overall bandwidth of any user within the purchased bandwidth range while dynamically adjusting the bandwidth on different paths to improve the overall bandwidth utilization is an urgent problem to be solved. Summary of the invention

[0005] The embodiments of the present application provide a public network IP bandwidth speed limiting system, method, device and storage medium, aiming to improve bandwidth utilization.

[0006] In a first aspect, an embodiment of the present application provides a public network IP bandwidth speed limiting system, wherein the public network IP bandwidth speed limiting system is based on a K8S cluster including multiple speed limiting device nodes, wherein the multiple speed limiting device nodes include a master speed limiting device node and multiple slave speed limiting device nodes; The master speed limiting device node is configured with a total bandwidth configuration of a target public network IP corresponding to any target user; The multiple slave rate limiting device nodes are used to monitor the real-time bandwidth of all paths for the target user to access the target public network IP, and any slave rate limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends it to the master rate limiting device node; The master rate limiting device node is used to determine the bandwidth allocation value corresponding to any bandwidth application request and return it to the slave rate limiting device node after responding to the bandwidth application request; When the master rate limiting device node allocates bandwidth to the slave rate limiting device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

[0007] Optionally, any bandwidth application request from the speed-limiting device node carries a bandwidth application value. The calculation formula for determining the bandwidth application value from any speed-limiting device node is: RequestBandWidth = curlFlow × 2 + (ConfigFlow / change preset value) Among them, RequestBandWidth is the bandwidth application value; curlFlow is the real-time bandwidth; ConfigFlow is the total bandwidth configuration of the target public IP corresponding to the target user; and the preset change value is a preset constant value that characterizes the speed of bandwidth change.

[0008] Optionally, the master speed limiting device node is used to respond to the bandwidth application requests sent by the multiple slave speed limiting device nodes respectively, determine the bandwidth allocation value of any slave speed limiting device node according to the total bandwidth configuration of the target public network IP corresponding to the target user, and then return it to the slave speed limiting device node.

[0009] Optionally, the master speed limiting device node is used to determine the bandwidth allocation value of any speed limiting device node as the bandwidth application value when the total bandwidth configuration of the target public IP corresponding to the target user is greater than or equal to the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, and return it to the slave speed limiting device node.

[0010] Optionally, the master speed limiting device node is used to allocate the total bandwidth configuration according to a ratio of the bandwidth application values ​​of the multiple slave speed limiting device nodes when the total bandwidth configuration of the target public IP corresponding to the target user is less than the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, determine the bandwidth allocation value of any speed limiting device node and return it to the slave speed limiting device node.

[0011] Optionally, the main speed limiting device node is used to obtain the total bandwidth configuration of the target public IP corresponding to the target user, and is configured in the K8S cluster through configMap.

[0012] Optionally, the master rate limiting device node is configured to release the bandwidth allocated to any slave rate limiting device node when the master rate limiting device node does not receive a bandwidth application request from any slave rate limiting device node within a target time period.

[0013] In a second aspect, an embodiment of the present application provides a public network IP bandwidth speed limiting method, the method being applied to the public network IP bandwidth speed limiting system described in the first aspect of the embodiment, the public network IP bandwidth speed limiting system comprising a master speed limiting device node and multiple slave speed limiting device nodes, the method comprising: The multiple slave rate-limiting device nodes monitor the real-time bandwidth of all paths through which the target user accesses the target public network IP; Any slave speed-limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends it to the master speed-limiting device node; After responding to any bandwidth application request, the master rate limiting device node determines a bandwidth allocation value corresponding to the bandwidth application request and returns it to the slave rate limiting device node; When the master rate limiting device node allocates bandwidth to the slave rate limiting device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

[0014] In a third aspect, an embodiment of the present application provides a computer device, comprising: at least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the public network IP bandwidth speed limiting method described in the second aspect of the embodiment is executed.

[0015] In a fourth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the public network IP bandwidth speed limiting method described in the second aspect of the embodiment is executed.

[0016] Beneficial effects: The public network IP bandwidth speed limiting system is based on a K8S cluster including multiple speed limiting device nodes, wherein the multiple speed limiting device nodes include a master speed limiting device node and multiple slave speed limiting device nodes; the master speed limiting device node is configured with the total bandwidth configuration of the target public network IP corresponding to any target user.

[0017] The multiple slave rate limiting device nodes are used to monitor the real-time bandwidth of all paths for the target user to access the target public network IP. Any slave rate limiting device node generates a bandwidth application request based on the real-time bandwidth of any path and sends it to the master rate limiting device node.

[0018] The master speed limiting device node is used to determine, in response to any bandwidth application request, a bandwidth allocation value corresponding to the bandwidth application request and return it to the slave speed limiting device node; when the master speed limiting device node allocates bandwidth to the slave speed limiting device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

[0019] The public IP bandwidth speed limiting system provided in this embodiment can request bandwidth from speed limiting device nodes according to the real-time bandwidth of any path for the target user to access the target public IP, without exceeding the total bandwidth configuration of the target user for the target public IP. This can dynamically adjust the bandwidth on each path of the target user, thereby improving bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 is a schematic diagram of a multipath network environment; Figure 2 It is a structural diagram of a public network IP bandwidth speed limiting system proposed in an embodiment of the present application; Figure 3 This is a flowchart of the steps of the public network IP bandwidth speed limiting method provided by an embodiment of the present application; Figure 4 This is a schematic diagram of applying for bandwidth from a rate-limiting device node proposed in an embodiment of the present application; Figure 5 This is a schematic diagram of bandwidth allocation of a primary rate limiting device node proposed in an embodiment of the present application; Figure 6 is a schematic diagram of a computer device provided by an embodiment of the present application; Figure 7 It is a schematic diagram of a non-volatile readable storage medium proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] Kubernetes, or K8S for short, is a container orchestration platform used to schedule, automatically deploy, manage, and scale containerized applications; IP address: Internet Protocol Address, Internet Protocol address or Internet Protocol address; Elastic IP: A public IP address resource that can be purchased and owned independently and can be bound or unbound to cloud resources such as cloud hosts, NAT gateways, elastic network cards, elastic load balancing, and high-availability virtual IPs at any time.

[0024] Network bandwidth: refers to the amount of data that can be transmitted per unit time (generally 1 second).

[0025] A public IP address refers to an IP address that can be accessed directly on the Internet. Corresponding to a local area network IP, it is an IP address assigned to a user or organization by an Internet Service Provider (ISP) and is used to identify the user or organization as a unique identifier on the Internet. A public IP address is the basis for Internet communications and can be used for network access, data transmission and service provision.

[0026] In the field of cloud computing and network services, bandwidth is usually used to measure the speed and capacity of network connections. The size of bandwidth directly affects the quality and efficiency of network communications. For cloud service providers, bandwidth is a limited resource and is usually charged based on user needs and usage.

[0027] Reference Figure 1 , shows a schematic diagram of a multi-path network environment. In a typical multi-path network environment, when user A purchases a fixed bandwidth and accesses a public IP through multiple clients in the multi-path network environment, the public network traffic often passes through multiple intermediate devices or paths before reaching the target server. At this time, the overall network rate of user A in the multi-path environment needs to be limited to the bandwidth purchased by the user to ensure the stability and reliability of network transmission.

[0028] However, in a multi-path network environment, how to limit the real-time overall bandwidth of any user within the purchased bandwidth range while dynamically adjusting the bandwidth on different paths to improve the overall bandwidth utilization is an urgent problem to be solved.

[0029] At the same time, in order to avoid the extra costs caused by exceeding the bandwidth, cloud service providers will implement bandwidth speed limit rules for public IP addresses with fixed bandwidth. However, the current bandwidth speed limit method has the following main problems: 1. When multiple clients access the server, they have to pass through multiple speed-limiting devices. How to ensure that the total real-time bandwidth of multiple speed-limiting devices meets the public IP bandwidth purchased by the user?

[0030] 2. If a certain speed-limiting device accounts for a large proportion of the speed limit, but suddenly becomes unavailable due to a failure, can the bandwidth restricted by the device be quickly evacuated to other devices?

[0031] 3. Due to the significant increase in the number of users and bandwidth requirements, the functions and quantity of the existing speed-limiting devices are unable to provide efficient and reliable services for the entire resource pool. Can new speed-limiting devices be added quickly and seamlessly to ensure the availability of the public network services of the entire resource pool?

[0032] In order to solve the above problems, the embodiments of the present application provide a public network IP bandwidth speed limiting method and a public network IP bandwidth speed limiting system.

[0033] Reference Figure 2 , showing a structural schematic diagram of a public network IP bandwidth speed limiting system in an embodiment of the present application, wherein the public network IP bandwidth speed limiting system is based on a K8S cluster including multiple speed limiting device nodes, wherein the multiple speed limiting device nodes include a master speed limiting device node and multiple slave speed limiting device nodes.

[0034] The system includes two threads, one is a bandwidth management and allocation thread, which is used for unified management and allocation of bandwidth, and the other is a bandwidth application thread, which is used for monitoring the real-time bandwidth of the path and applying for bandwidth.

[0035] In the actual implementation process, when the public IP bandwidth speed limiting system is constructed based on the K8S cluster, a bandwidth management allocation thread is deployed on a node of the K8S cluster. Specifically, the bandwidth management allocation thread is deployed on a node of the K8S cluster in the form of Deployment, and the node serves as the main speed limiting device node of the public IP bandwidth speed limiting system.

[0036] Then, the bandwidth application thread is deployed on each node in K8s in the form of DaemonSet. For example, the bandwidth application thread can be deployed on all nodes other than the master speed-limiting device node, and these nodes are all used as slave speed-limiting device nodes. If the performance of the master speed-limiting device node is better, the bandwidth application thread can also be deployed on the master speed-limiting device node. At this time, the master speed-limiting device node can perform unified bandwidth management and allocation, and can also monitor the real-time bandwidth of the path and apply for bandwidth.

[0037] In the actual implementation process, it can be deployed according to the needs of the actual application, and the embodiments of the present application are not limited.

[0038] The main rate limiting device node is configured with the total bandwidth configuration of the target public network IP corresponding to any target user.

[0039] Among them, the target public IP can be a device that can be accessed by users and provided by any cloud service provider, such as a resource server, etc.; the target user refers to the user who has purchased the bandwidth of the target public IP of the cloud service provider. For example, the total bandwidth of the target public IP purchased by target user A is 1000M, and the total bandwidth of the target public IP purchased by target user B is 2G, etc.

[0040] After any target user purchases bandwidth, the target user's total bandwidth configuration for the target public IP is uploaded to the main speed limit device node, or the main speed limit device node obtains the target user's total bandwidth configuration for the target public IP through the access interface of the cloud service provider's bandwidth management platform.

[0041] In the actual implementation process, when the total bandwidth purchased by the target user is gigabit, both the upstream and downstream bandwidths are gigabit. Then, the target user's total bandwidth configuration for the target public IP is stored in the K8S cluster through ConfigMap configuration, so that the total bandwidth configuration can be decoupled from the application, which can more flexibly adapt to different deployment environments, modify and update the public IP bandwidth speed limit value, and facilitate unified management, viewing and dynamic update of configuration information.

[0042] The multiple slave rate-limiting device nodes are used to monitor the real-time bandwidth of all paths for the target user to access the target public network IP.

[0043] For example, when multiple clients of target user A access the target public IP at the same time, multiple slave rate-limiting device nodes are used to monitor the real-time bandwidth of all access paths. For example, if the clients of target user A accessing the target public IP include client 1, client 2, and client 3, then three slave rate-limiting device nodes can monitor the real-time bandwidth of the paths of client 1, client 2, and client 3 accessing the target public IP accordingly.

[0044] In the actual implementation process, the real-time traffic monitoring mode of the iftop tool can be called from the speed-limiting device node to capture the traffic data of all network interfaces, classify and summarize them according to the source IP and destination IP of the traffic records, and calculate the real-time total upstream / downstream traffic of each IP.

[0045] Further, any slave rate-limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends the request to the master rate-limiting device node to try to request an increase in bandwidth.

[0046] The bandwidth application request of any slave speed-limiting device node carries a bandwidth application value, and the calculation formula for determining the bandwidth application value by any slave speed-limiting device node is: RequestBandWidth = curlFlow × 2 + (ConfigFlow / change preset value) Among them, RequestBandWidth is the bandwidth application value; curlFlow is the real-time bandwidth; ConfigFlow is the total bandwidth configuration of the target public IP corresponding to the target user; and the preset change value is a preset constant value that characterizes the speed of bandwidth change.

[0047] The smaller the preset change value, the greater the bandwidth change, and the larger the preset change value, the slower the bandwidth change. The size of the preset change value can represent the smoothness of the change curve of the speed limit bandwidth value of any slave speed limit device node at each moment, that is, the smaller the preset change value, the steeper the bandwidth change curve, and the larger the preset change value, the smoother the bandwidth change curve.

[0048] In the actual implementation process, the change preset value can be customized according to the needs of the actual application. For example, in this embodiment, the change preset value can be set to 32.

[0049] Based on the calculation formula of the bandwidth application value, when monitoring a path of the target user from the speed limit device node, the real-time bandwidth is 0. The bandwidth requested from the main speed limit device node can be the basic bandwidth according to the calculation formula of the bandwidth application value, that is, the total bandwidth configuration / change preset value. After monitoring the real-time bandwidth at any time from the speed limit device node, the bandwidth can be gradually and dynamically requested according to the real-time bandwidth.

[0050] For example, if the total bandwidth of the target user is configured to be 1000M, and the preset change value is set to 32, and the speed-limiting device node A starts monitoring the real-time bandwidth of a path at time t0, the bandwidth application value generated by the bandwidth application request from the speed-limiting device node A at time t0 is 1000 / 32=31.24M.

[0051] When the real-time bandwidth of a path monitored by the speed-limiting device node A at time t1 is 20M, the bandwidth application value generated for the bandwidth application request at time t1 is 20M×2+1000 / 32M=71.25M; When the real-time bandwidth of a path monitored by the speed-limiting device node A at time t2 is 10M, the bandwidth application value generated for the bandwidth application request at time t1 is 10M×2+1000 / 32M=51.25M.

[0052] If the total bandwidth of the target user is configured as 1000M, and the preset change value is set to 32, and the speed-limiting device node B starts monitoring the real-time bandwidth of a path at time t0, the bandwidth application value generated by the speed-limiting device node B at time t0 is 1000 / 32=31.24M.

[0053] When the real-time bandwidth of a path monitored by the speed-limiting device node B at time t1 is 100M, the bandwidth application value generated for the bandwidth application request at time t1 is 100M×2+1000 / 32M=231.25M; When the real-time bandwidth of a path monitored by the speed-limiting device node B at time t2 is 90.1M, the bandwidth application value of the bandwidth application request generated at time t2 is 90.1M×2+1000 / 32M=211.45M.

[0054] It can be seen that when applying for bandwidth from the speed-limiting device node, the speed-limiting bandwidth can be dynamically requested according to the real-time bandwidth size of the target user's access path, so as to dynamically apply to increase or decrease the bandwidth according to the monitored real-time bandwidth. This formula can ensure that when the real-time bandwidth is small, the bandwidth speed limit value can be quickly increased, and it can quickly converge to the bandwidth setting value under the control of the main node bandwidth allocation module, without affecting the user's network experience.

[0055] The master speed limiting device node is used to determine, in response to any bandwidth application request, a bandwidth allocation value corresponding to the bandwidth application request and return it to the slave speed limiting device node; wherein, when the master speed limiting device node allocates bandwidth to the slave speed limiting device node, the sum of the bandwidth allocation values ​​does not exceed the total bandwidth configuration.

[0056] Then, the master speed limiting device node is used to respond to the bandwidth application requests sent by the multiple slave speed limiting device nodes respectively, determine the bandwidth allocation value of any slave speed limiting device node according to the total bandwidth configuration of the target public network IP corresponding to the target user, and then return it to the slave speed limiting device node.

[0057] In a feasible implementation manner, the master speed limiting device node is used to determine the bandwidth allocation value of any speed limiting device node as the bandwidth application value when the total bandwidth configuration of the target public IP corresponding to the target user is greater than or equal to the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, and return it to the slave speed limiting device node.

[0058] For example, assuming that the total bandwidth of the target public IP corresponding to the target user is configured to be 1000M, and the target user has a total of 3 clients accessing the target public IP, the speed limiting device node 1, the speed limiting device node 2, and the speed limiting device node 3 respectively monitor the path of a client accessing the target public IP, and monitor the real-time bandwidth on the access path in real time.

[0059] At the initialization time t0, there is no real-time bandwidth monitoring for the slave speed-limited device nodes 1-3, so 1000 / 32=31.24M is allocated to each of them; At time t1, the real-time bandwidth monitored from the speed-limiting device node 1 is 50M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 1 is 50M×2+1000 / 32M=131.24M; At time t1, the real-time bandwidth monitored from the speed-limiting device node 2 is 20.1M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 2 is 20.1M×2+1000 / 32M=71.45M. At time t1, the real-time bandwidth monitored from the speed-limiting device node 3 is 40.35M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 3 is 40.35M×2+1000 / 32M=111.95M; That is, at time t1, the sum of bandwidth application values ​​requested from the speed-limiting device node 1, the speed-limiting device node 2, and the speed-limiting device node 3 to the master speed-limiting device node is 131.24M+71.45M+111.95M=314.64M.

[0060] Because the total bandwidth configuration of 1000M is greater than the sum of the bandwidth application values ​​of the three slave speed-limiting device nodes, 314.64M, the bandwidth allocation value of any speed-limiting device node can be returned to the slave speed-limiting device node as the bandwidth application value.

[0061] That is, the bandwidth allocation value determined by the master speed limit device node for slave speed limit device node 1 is 131.24M, the bandwidth allocation value determined for slave speed limit device node 2 is 71.45M, and the bandwidth allocation value determined for slave speed limit device node 3 is 111.95M, so that at time t1, the sum of the bandwidth allocation values ​​determined by the master speed limit device node for multiple slave speed limit device nodes does not exceed the total bandwidth configuration.

[0062] The master speed limiting device node is used to allocate the total bandwidth configuration according to the ratio of the bandwidth application values ​​of the multiple slave speed limiting device nodes when the total bandwidth configuration of the target public IP corresponding to the target user is less than the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, determine the bandwidth allocation value of any speed limiting device node and return it to the slave speed limiting device node.

[0063] For example, assuming that the total bandwidth of the target public IP corresponding to the target user is configured to be 1000M, and the target user has a total of 3 clients accessing the target public IP, the speed limiting device node 1, the speed limiting device node 2, and the speed limiting device node 3 respectively monitor the path of a client accessing the target public IP, and monitor the real-time bandwidth on the access path in real time.

[0064] At time t1, the real-time bandwidth monitored from the speed-limiting device node 1 is 232M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 1 is 232M×2+1000 / 32M=495.25M. At time t1, the real-time bandwidth monitored from the speed-limiting device node 2 is 157M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 2 is 157M×2+1000 / 32M=345.25M; At time t1, the real-time bandwidth monitored from the speed-limiting device node 3 is 375M. According to the bandwidth application value calculation formula, it can be determined that the bandwidth application value requested from the speed-limiting device node 3 is 375M×2+1000 / 32M=781.25M. That is, at time t1, the sum of bandwidth application values ​​requested from the speed-limiting device node 1, the speed-limiting device node 2, and the speed-limiting device node 3 to the master speed-limiting device node is 495.25M+345.25M+781.25M=1621.75M.

[0065] Because the total bandwidth configuration of 1000M is less than the sum of the bandwidth application values ​​of the three slave speed limiting device nodes, 1621.75M, in order to ensure that the sum of the bandwidth allocation values ​​determined by the master speed limiting device node for multiple slave speed limiting device nodes does not exceed the total bandwidth configuration, the bandwidth allocation value of any speed limiting device node can be determined according to the ratio of the bandwidth application values ​​of the three slave speed limiting device nodes.

[0066] That is, the ratio of the bandwidth application values ​​of slave speed-limited device node 1, slave speed-limited device node 2, and slave speed-limited device node 3 is 495.25:345.25:781.25, and the total bandwidth configuration is 1000M according to the ratio.

[0067] The bandwidth allocation value determined for the slave rate-limiting device node 1 is: 1000×495.25 / 1621.75M=305.37M; The bandwidth allocation value determined for the slave speed-limiting device node 2 is: 1000×345.25M / 1621.75M=212.88M; The bandwidth allocation value determined for the slave rate-limiting device node 3 is: 1000×781.25 / 1621.75M=481.73M; After proportional allocation, the total bandwidth allocation value of slave speed limit device node 1, slave speed limit device node 2, and slave speed limit device node 3 is 305.37M+212.88M+481.73M=999.98M, which does not exceed the total bandwidth configuration of 1000M.

[0068] By determining the bandwidth allocation value for each slave rate-limiting device node through this method, the bandwidth of each slave rate-limiting device node can be quickly converged to the bandwidth setting value and will not exceed the total bandwidth configuration.

[0069] When any slave speed limit device node receives the bandwidth allocation value returned by the master speed limit device node, it makes corresponding bandwidth speed limit adjustments. In the actual implementation process, the slave speed limit device node can use the TrafficControl tool to limit the upstream / downstream bandwidth speed of the path for the corresponding target user to access the target public IP.

[0070] In a feasible implementation manner, the master rate limiting device node is further configured to release the bandwidth allocated to any slave rate limiting device node when no bandwidth application request is received from any slave rate limiting device node within the target time period.

[0071] When the master speed limiting device node does not receive any bandwidth application request from any slave speed limiting device node within the target time period, it indicates that the slave speed limiting device node may be offline, and the bandwidth allocated to the slave speed limiting device node is released, and other slave speed limiting device nodes are switched to continue monitoring the bandwidth of this path.

[0072] After the offline slave speed limiting device node comes back online, the slave speed limiting device node can continue to apply for bandwidth from the master speed limiting device node according to the calculation formula of the bandwidth application value.

[0073] Therefore, this system, which is deployed in containers based on the K8s cluster, has high service availability, can elastically scale up and down as the rate-limited device cluster increases / decreases, automatically completes failover, and reduces operation and maintenance costs through highly automated operation and maintenance.

[0074] Reference Figure 3 , shows a flowchart of the steps of a public network IP bandwidth speed limiting method in an embodiment of the present application, the method is applied to the public network IP bandwidth speed limiting system described in the embodiment, the public network IP bandwidth speed limiting system includes a master speed limiting device node and multiple slave speed limiting device nodes, and the method may specifically include the following steps: S101: The plurality of slave rate-limiting device nodes monitor the real-time bandwidth of all paths for the target user to access the target public IP.

[0075] The target public IP address can be a device provided by any cloud service provider and accessible to users, such as a resource server. The target user refers to a user who has purchased the bandwidth of the target public IP address of the cloud service provider.

[0076] The total bandwidth configuration of the target user for the target public IP is stored in the ConfigMap configuration storage in the K8S cluster.

[0077] ConfigMap‌ is a resource object in a K8S cluster that is used to store non-sensitive configuration data; it allows configuration information to be decoupled from the container image, so that the configuration can be managed and updated independently of the application without rebuilding the image‌.

[0078] By storing the target user's total bandwidth configuration for the target public IP in the ConfigMap configuration storage in the K8S cluster, the total bandwidth configuration can be decoupled from the application, which can more flexibly adapt to different deployment environments, modify and update the public IP bandwidth speed limit value, and facilitate unified management, viewing and dynamic update of configuration information.

[0079] For example, when target user A, who has a target public IP with 1000M bandwidth, purchases another 1000M bandwidth, the newly added bandwidth will be updated and added to the ConfigMap, which will not affect the current bandwidth monitoring process or the user's bandwidth usage, thus improving the user experience.

[0080] S102: Any slave rate limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends it to the master rate limiting device node.

[0081] For example, the real-time traffic monitoring mode of the iftop tool can be called from the rate-limiting device node to capture the traffic data of all network interfaces, classify and summarize them according to the source IP and destination IP of the traffic record, and calculate the real-time total upstream / downstream traffic of each IP.

[0082] Any slave rate-limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends the request to the master rate-limiting device node to try to request an increase in bandwidth.

[0083] Any bandwidth request from a speed-limited device node carries a bandwidth request value, and the bandwidth request value is calculated as follows: RequestBandWidth = curlFlow × 2 + (ConfigFlow / change preset value) Among them, RequestBandWidth is the bandwidth application value; curlFlow is the real-time bandwidth; ConfigFlow is the total bandwidth configuration of the target public IP corresponding to the target user; and the preset change value is a preset constant value that characterizes the speed of bandwidth change.

[0084] When monitoring a path of a target user from a speed limiting device node, the bandwidth requested from the main speed limiting device node is the basic bandwidth, that is, the total bandwidth configuration / change preset value. After monitoring the real-time bandwidth at any time from the speed limiting device node, the bandwidth can be dynamically requested.

[0085] When applying for bandwidth request from the speed limit device node, the speed limit bandwidth is dynamically requested according to the real-time bandwidth size of the target user's access path. When the real-time bandwidth is small, the bandwidth speed limit value can also be quickly increased and quickly converged to the bandwidth setting value under the control of the main node bandwidth allocation module.

[0086] S103: After responding to any bandwidth application request, the master speed limit device node determines a bandwidth allocation value corresponding to the bandwidth application request and returns it to the slave speed limit device node; when the master speed limit device node allocates bandwidth to the slave speed limit device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

[0087] The master speed limiting device node responds to the bandwidth application requests respectively sent by the multiple slave speed limiting device nodes, determines the bandwidth allocation value of any slave speed limiting device node according to the total bandwidth configuration of the target public network IP corresponding to the target user, and returns it to the slave speed limiting device node.

[0088] When the total bandwidth configuration of the target public IP corresponding to the target user is greater than or equal to the sum of the bandwidth application values ​​of multiple slave speed limit device nodes, the bandwidth allocation value of any speed limit device node is determined to be the bandwidth application value and returned to the slave speed limit device node.

[0089] When the total bandwidth configuration of the target public IP corresponding to the target user is less than the sum of the bandwidth application values ​​of the multiple slave speed-limiting device nodes, the total bandwidth configuration is allocated according to the ratio of the bandwidth application values ​​of the multiple slave speed-limiting device nodes, and the bandwidth allocation value of any speed-limiting device node is determined and returned to the slave speed-limiting device node; thereby, the bandwidth of each slave speed-limiting device node can be quickly converged to the bandwidth setting value and will not exceed the total bandwidth configuration.

[0090] When any slave speed limit device node receives the bandwidth allocation value returned by the master speed limit device node, it makes corresponding bandwidth speed limit adjustments. In the actual implementation process, the slave speed limit device node can use the TrafficControl tool to limit the upstream / downstream bandwidth speed of the path for the corresponding target user to access the target public IP.

[0091] Reference Figure 4 , shows a schematic diagram of applying for bandwidth from a speed-limited device node provided in an embodiment of the present application, wherein a bandwidth application thread is deployed in the speed-limited device node, and the process of applying for bandwidth from any speed-limited device node includes the following steps: A1: Monitor the real-time bandwidth of all paths used by target users to access the target public IP.

[0092] For example, the real-time traffic monitoring mode of the iftop tool can be called from the rate-limiting device node to capture the traffic data of all network interfaces, classify and summarize them according to the source IP and destination IP of the traffic record, and calculate the real-time total upstream / downstream traffic of each IP.

[0093] A2: Calculate the bandwidth application value, and send a bandwidth application request carrying the bandwidth application value to the main rate limiting device node.

[0094] Specifically, the calculation formula for the bandwidth application value is: RequestBandWidth = curlFlow × 2 + (ConfigFlow / change preset value) Among them, RequestBandWidth is the bandwidth application value; curlFlow is the real-time bandwidth; ConfigFlow is the total bandwidth configuration of the target public IP corresponding to the target user; and the preset change value is a preset constant value that characterizes the speed of bandwidth change.

[0095] A3: After receiving the bandwidth allocation value returned by the main speed limit device node, make corresponding bandwidth speed limit adjustments.

[0096] For example, assuming that the speed limit bandwidth for the target user in the path to access the target public IP: xxx.xxx.xx.x from the speed limit device node is 100M, and the bandwidth application value in the bandwidth application request is 150M, when it is determined that the bandwidth allocation value returned by the main speed limit device node is also 150M, the speed limit bandwidth for the target user in the path to access the target public IP: xxx.xxx.xx.x from the speed limit device node is adjusted to 150M.

[0097] By dynamically requesting the speed limit bandwidth from the speed limit device node according to the real-time bandwidth size of the access path of the target user, the bandwidth speed limit value can be quickly increased when the real-time bandwidth is small.

[0098] Reference Figure 5 , shows a schematic diagram of bandwidth allocation of a master speed limiting device node provided in an embodiment of the present application, a bandwidth management allocation thread is deployed in the master speed limiting device node, and the process of bandwidth allocation of the master speed limiting device node includes the following steps: B1: Obtain the total bandwidth configuration of the target user for the target public IP.

[0099] For example, the main speed limit device node obtains the total bandwidth configuration of the target user for the target public IP through the access interface of the bandwidth management platform of the cloud service provider, and the configuration is stored in the ConfigMap configuration storage in the K8S cluster.

[0100] B2: Receive any bandwidth request.

[0101] After any slave rate-limiting device node generates a bandwidth request based on the real-time bandwidth of any path, it will send it to the master rate-limiting device node to try to request dynamic bandwidth adjustment.

[0102] Figure 5 The middle rectangular block is used to represent the sum of bandwidth application values ​​of each slave rate-limiting device node.

[0103] B3: Calculate bandwidth allocation.

[0104] The master rate limiting device node may determine the bandwidth allocation value allocated to each slave rate limiting device node according to a fixed time window algorithm; the fixed time window algorithm is provided with a total bandwidth configuration of the target user.

[0105] like Figure 5 , the sum of the bandwidth application values ​​of each slave speed-limiting device node at time t1, time t3, and time t4 does not exceed the total bandwidth configuration, and the bandwidth can be allocated according to the bandwidth application value of each slave speed-limiting device node.

[0106] The sum of the bandwidth application values ​​received at time t2 exceeds the total bandwidth configuration, so the bandwidth cannot be allocated according to the bandwidth application values ​​of each slave rate-limiting device node.

[0107] The master speed limiting device node allocates the total bandwidth configuration according to the proportion of the bandwidth application values ​​of each slave speed limiting device node, and obtains the bandwidth allocation value corresponding to each slave speed limiting device node.

[0108] B4: Return the bandwidth allocation value to any slave speed-limiting device node.

[0109] The main speed limiting device can ensure that the allocated bandwidth does not exceed the total bandwidth of the target public IP purchased by the target user.

[0110] In a feasible implementation manner, the test results of different test scenarios based on the public network IP bandwidth speed limiting system and method provided in this embodiment include: Scenario 1: Multiple clients of the same user access the same public IP through multiple paths (speed-limiting devices) and bandwidth is limited; The total bandwidth is configured to 1000 Mb / s. After 4 clients perform stress testing for 5 minutes at the same time, the speed limit bandwidth value of client 1 is 21.5 Mb, the speed limit bandwidth value of client 2 is 623 Mb, the speed limit bandwidth value of client 3 is 306 Mb, and the speed limit bandwidth value of client 4 is 21.4 Mb. The actual speed limit bandwidth value is 971.9 Mb, which is less than or equal to the total bandwidth configuration of 1000 Mb / s.

[0111] Scenario 2: Multiple clients of the same user access the same public IP through multiple paths (rate-limiting devices) and implement PPS (Packet Per Second) rate limiting; The total bandwidth is configured to 1000 Mb / s. Four clients perform a 5-minute UDP stress test at the same time. The speed limit bandwidth value of client 1 is 102 Mb, the speed limit bandwidth value of client 2 is 444 Mb, the speed limit bandwidth value of client 3 is 341 Mb, and the speed limit bandwidth value of client 4 is 73.1 Mb. The actual speed limit bandwidth value is 960.1 Mb, which is less than or equal to the total bandwidth configuration of 1000 Mb / s.

[0112] Scenario 3: Multiple clients of the same user access multiple public IP addresses through multiple paths (speed-limiting devices) and bandwidth is limited.

[0113] Specifically, access three public IPs, the bandwidth corresponding to public IP1 is configured to 1000Mb / s, the bandwidth corresponding to public IP2 is configured to 2Gb / s, and the bandwidth corresponding to public IP3 is configured to 3000Kb / s. After the four clients perform a stress test for 5 minutes at the same time: For public network IP 1, the speed limit bandwidth value of client 1 is 376Mb, the speed limit bandwidth value of client 2 is 170Mb, the speed limit bandwidth value of client 3 is 51.8Mb, and the speed limit bandwidth value of client 4 is 442Mb. The actual speed limit bandwidth value is 1039.8Mb / s, which slightly exceeds the total bandwidth configuration of 1000Mb / s. For public network IP2, the speed limit bandwidth value of client 1 is 46.7Mb, the speed limit bandwidth value of client 2 is 1.93Gb, the speed limit bandwidth value of client 3 is 49.3Mb, and the speed limit bandwidth value of client 4 is 50.2Mb. The actual speed limit bandwidth value is 2.0762Gb / s, which slightly exceeds the total bandwidth configuration of 2Gb / s. For public network IP3, the speed limit bandwidth value of client 1 is 293Kb, the speed limit bandwidth value of client 2 is 197Kb, the speed limit bandwidth value of client 3 is 286Kb, and the speed limit bandwidth value of client 4 is 2.17Mb. The actual speed limit bandwidth value is 2946Kb / s, which is less than the total bandwidth configuration of 3000Kb / s.

[0114] It can be seen that the public IP bandwidth speed limiting system and method provided in this embodiment have excellent speed limiting performance in different test scenarios. Even in some cases where multiple clients of the same user access multiple public IPs via multiple paths, the actual speed limit bandwidth value exceeds the total bandwidth configuration, but the excess is very small.

[0115] The public network IP bandwidth speed limiting system and method provided in this embodiment have at least the following effects: 1. The allocated speed-limited bandwidth does not exceed the total bandwidth configuration of the target user for the target public IP; 2. Each slave speed-limiting device node can request bandwidth based on the real-time bandwidth of any path for the target user to access the target public IP, thereby dynamically adjusting the bandwidth on each path of the target user and improving bandwidth utilization; 3. Based on the calculation formula of bandwidth application value, it can ensure that when the real-time bandwidth is small, the bandwidth speed limit value can be quickly increased, and quickly converge to the bandwidth setting value under the control of the main node bandwidth allocation module, without affecting the user's network experience; 4. This system, which is deployed in containers based on K8s cluster, has high service availability, can elastically scale up and down as the speed-limited device cluster increases / decreases, automatically completes failover, and reduces operation and maintenance costs through highly automated operation and maintenance; 5. Use ConfigMap configuration to store the total bandwidth configuration in the K8S cluster, which can decouple the total bandwidth configuration from the application, and can more flexibly adapt to different deployment environments, modify and update the public IP bandwidth speed limit value, and facilitate unified management, viewing and dynamic update of configuration information.

[0116] Reference Figure 6 , shows a schematic diagram of a computer device provided in an embodiment of the present application, including: at least one processor 601, and a memory 602, wherein the memory 602 stores a computer program that can be run on the processor 601, wherein the processor 601 executes the public network IP bandwidth speed limiting method described in the embodiment when executing the computer program.

[0117] Reference Figure 7 , shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application, wherein the non-volatile readable storage medium 700 stores a computer program 701, wherein when the computer program 701 is executed by a processor, the public network IP bandwidth speed limiting method described in the embodiment is executed.

[0118] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0119] It should be understood by those skilled in the art that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0120] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0124] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0125] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A public network IP bandwidth speed limiting system, characterized in that: The public network IP bandwidth speed limiting system is based on a K8S cluster including multiple speed limiting device nodes, wherein the multiple speed limiting device nodes include a master speed limiting device node and multiple slave speed limiting device nodes; The master speed limiting device node is configured with a total bandwidth configuration of a target public network IP corresponding to any target user; The multiple slave rate limiting device nodes are used to monitor the real-time bandwidth of all paths for the target user to access the target public network IP, and any slave rate limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends it to the master rate limiting device node; The master rate limiting device node is used to determine the bandwidth allocation value corresponding to any bandwidth application request and return it to the slave rate limiting device node after responding to the bandwidth application request; When the master rate limiting device node allocates bandwidth to the slave rate limiting device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

2. The system according to claim 1, characterized in that Any bandwidth application request from the speed-limiting device node carries a bandwidth application value. The calculation formula for determining the bandwidth application value from any speed-limiting device node is: RequestBandWidth = curlFlow × 2 + (ConfigFlow / change preset value) Among them, RequestBandWidth is the bandwidth application value; curlFlow is the real-time bandwidth; ConfigFlow is the total bandwidth configuration of the target public IP corresponding to the target user; and the preset change value is a preset constant value that characterizes the speed of bandwidth change.

3. The system according to claim 1, characterized in that The master speed limiting device node is used to respond to the bandwidth application requests sent by the multiple slave speed limiting device nodes respectively, determine the bandwidth allocation value of any slave speed limiting device node according to the total bandwidth configuration of the target public network IP corresponding to the target user, and then return it to the slave speed limiting device node.

4. The system according to claim 3, characterized in that The master speed limiting device node is used to determine the bandwidth allocation value of any speed limiting device node as the bandwidth application value when the total bandwidth configuration of the target public network IP corresponding to the target user is greater than or equal to the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, and return it to the slave speed limiting device node.

5. The system according to claim 3, characterized in that The master speed limiting device node is used to allocate the total bandwidth configuration according to the ratio of the bandwidth application values ​​of the multiple slave speed limiting device nodes when the total bandwidth configuration of the target public network IP corresponding to the target user is less than the sum of the bandwidth application values ​​of the multiple slave speed limiting device nodes, and determine the bandwidth allocation value of any speed limiting device node and return it to the slave speed limiting device node.

6. The system according to claim 3, characterized in that The main speed limit device node is used to obtain the total bandwidth configuration of the target public IP corresponding to the target user, and is configured in the K8S cluster through configMap.

7. The system according to claim 1, characterized in that The master speed limiting device node is used to release the bandwidth allocated to any slave speed limiting device node when no bandwidth application request is received from the slave speed limiting device node within the target time period.

8. A method for limiting the speed of public network IP bandwidth, characterized in that: The method is applied to the public network IP bandwidth speed limiting system according to any one of claims 1 to 7, wherein the public network IP bandwidth speed limiting system includes a master speed limiting device node and multiple slave speed limiting device nodes, and the method includes: The multiple slave rate-limiting device nodes monitor the real-time bandwidth of all paths for the target user to access the target public network IP; Any slave speed-limiting device node generates a bandwidth application request according to the real-time bandwidth of any path and sends it to the master speed-limiting device node; After the master rate limiting device node responds to any bandwidth application request, it determines a bandwidth allocation value corresponding to the bandwidth application request and returns it to the slave rate limiting device node; When the master rate limiting device node allocates bandwidth to the slave rate limiting device node, the total bandwidth allocation value does not exceed the total bandwidth configuration.

9. A computer device, characterized in that: include: At least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein the processor executes the public network IP bandwidth speed limiting method according to claim 8 when executing the computer program.

10. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, executes the public network IP bandwidth speed limiting method according to claim 8.

Citation Information

Patent Citations

  • A method and device for controlling bandwidth allocation

    CN110708262A

  • Bandwidth speed limiting method, system and device for Rsocket library and storage medium

    CN113556245A

  • Systems and methods for allocating network bandwidth

    US20080219170A1