Bandwidth allocation method and device, electronic equipment and storage medium

By obtaining the bandwidth parameters of the computing nodes and containers, and reasonably allocating container bandwidth, the problem of containers seizing bandwidth resources in serverless computing is solved, and the bandwidth resource utilization rate is improved.

CN119945913APending Publication Date: 2025-05-06ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311469951.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the serverless computing scenario, the containers in the computing nodes seize each other's network bandwidth resources, resulting in unreasonable bandwidth allocation and low resource utilization.

Method used

By obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container, the usage bandwidth is allocated to each container based on these parameters.

Benefits of technology

It avoids containers with a large number of network connections to seize too many bandwidth resources, realizes reasonable allocation of bandwidth of computing node content, and improves the utilization rate of bandwidth resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945913A_ABST
    Figure CN119945913A_ABST
Patent Text Reader

Abstract

The invention discloses a bandwidth allocation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a network bandwidth of a computing node and a bandwidth configuration parameter of each container in the computing node; and based on the network bandwidth of the computing node and the bandwidth configuration parameter of each container, allocating a use bandwidth to each container. According to the embodiment of the invention, the technical problems of unreasonable allocation of the container bandwidth in the computing node and relatively low bandwidth resource utilization rate in the related technology can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cloud computing, and in particular to a bandwidth allocation method, apparatus, device and storage medium. Background Art

[0002] In traditional cloud computing scenarios, users purchase computing nodes from cloud operators, who are responsible for running and maintaining the operating systems and applications on the computing nodes. When users purchase node processors and memory specifications, they also obtain the corresponding network bandwidth.

[0003] In the wave of cloud nativeization, more and more cloud users use serverless computing paradigms and container technology to deploy applications. However, in the serverless computing scenario, users can only specify the specifications of the processor and memory owned by the container. Because users are not aware of the computing node resources, containers corresponding to multiple users will be mixed and deployed on the same computing node, sharing the network bandwidth resources of the computing node. Therefore, containers in the same computing node will compete with each other for network bandwidth resources. Under the coordination of the network transmission control protocol (TCP) congestion control algorithm, containers with more network connections will occupy more bandwidth resources in the computing node. This will lead to unreasonable allocation of container bandwidth in the computing node and low bandwidth resource utilization. Summary of the invention

[0004] In view of the above problems, the present application provides a bandwidth allocation method, apparatus, device and storage medium to at least solve the technical problems of unreasonable allocation of container bandwidth in computing nodes and low bandwidth resource utilization in related technologies.

[0005] According to a first aspect of an embodiment of the present application, a bandwidth allocation method is provided, including: obtaining a network bandwidth of a computing node and a bandwidth configuration parameter of each container in the computing node; and allocating bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameter of each container.

[0006] According to a second aspect of an embodiment of the present application, a bandwidth allocation device is provided. The above-mentioned information retrieval optimization device includes: an acquisition unit, which acquires the network bandwidth of a computing node and the bandwidth configuration parameters of each container in the computing node; an allocation unit, which is used to allocate bandwidth for use to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0007] According to a third aspect of an embodiment of the present application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the bandwidth allocation method of the first aspect through the computer program.

[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the bandwidth allocation method of the first aspect when running.

[0009] In an embodiment of the present application, a method is adopted in which the network bandwidth of a computing node and the bandwidth configuration parameters of each container in the computing node are obtained; and bandwidth is allocated to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container. When allocating bandwidth to each container of a computing node, the embodiment of the present application allocates bandwidth to each container based on the bandwidth configuration parameters of each container and the network bandwidth of the computing node, thereby preventing containers with more network connections from occupying more bandwidth resources in the computing node, and not only reasonably allocating the bandwidth of containers in the computing node, but also improving the utilization rate of bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to represent the same components. In the drawings:

[0011] Figure 1 is a schematic diagram of an application environment of an optional bandwidth allocation method according to an embodiment of the present application;

[0012] Figure 2 is a schematic diagram of an application environment of another optional bandwidth allocation method according to an embodiment of the present application;

[0013] Figure 3 is a flow chart of an optional bandwidth allocation method according to an embodiment of the present application;

[0014] Figure 4 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0015] Figure 5 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0016] Figure 6 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0017] Figure 7 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0018] Figure 8 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0019] Fig. 9 is a flow chart of an optional bandwidth allocation method according to an embodiment of the present application;

[0020] Fig.10 is a flowchart of another optional bandwidth allocation method according to an embodiment of the present application;

[0021] Fig.11 It is a structural schematic diagram of a bandwidth allocation device provided in an embodiment of the present application;

[0022] Fig.12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] The following are explanations of the technical terms involved in this application:

[0026] Serverless computing: Serverless computing is a new cloud computing paradigm. In serverless computing, cloud users are not aware of the existence of servers and are not responsible for the maintenance of the operating system, so they can focus more on the development of application logic.

[0027] Container: A container is a lightweight application code package and a collection of dependencies and configurations required to run the application. Containers can be deployed on an operating system and run. Container technology has the advantages of strong portability and good isolation when distributing and deploying software. Containers are the technical foundation of cloud native and serverless computing.

[0028] Node: Node, also known as computing node, is a container deployment platform with independent processor, memory, network and other resources, capable of running a complete operating system. A computing node can be a physical server or a virtual machine.

[0029] Optionally, according to one aspect of the embodiments of the present application, a bandwidth allocation method is provided. As an optional implementation, the bandwidth allocation method can be applied to, but is not limited to, Figure 1 In the application environment shown. The application environment may include, but is not limited to: a terminal device 102 for human-computer interaction with a user, a network 110, and a cloud server cluster 112. Various cloud service clients are running in the terminal device 102. The terminal device 102 includes a display 108, a processor 106, and a memory 104. The display 108 is used to present the operation interface of the cloud service. The processor 106 is used to receive a cloud service operation instruction sent by a user, and the cloud service instruction includes the user's demand data or the service information selected by the user. The memory 104 is used to store the user's demand data or the service information selected by the user, as well as the feedback information from the cloud server cluster 112 sent by the cloud control platform 118. The cloud control platform 118 provides an access interface with the terminal device 102. The terminal device 102 sends the user's demand data and the service information selected by the user to the cloud control platform 118 through the network 110 and the access interface. The cloud control platform 118 sends the user's demand data and the service information selected by the user to the cloud server cluster 112 through the data center network. In addition, the cloud server cluster 112 includes a database 114 and a processing engine 116. The database 114 is used to store the user's demand data and the service information selected by the user, as well as the network bandwidth of the computing node and the bandwidth configuration parameters of each container. The processing engine 116 is used to obtain the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node; based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container, the bandwidth is allocated to each container. The feedback information corresponding to the user's request for cloud service is returned to the cloud control platform 118, and the cloud control platform 118 sends the feedback information to the terminal device 102.

[0030] It should be noted that the cloud server cluster 112 may include one or more computing nodes, each computing node includes one or more containers, such as Figure 2As shown, the cloud server cluster 112 includes computing node 1 and computing node 2, and each computing node includes multiple containers. An application program or cloud service program is deployed in each container.

[0031] Optionally, the terminal device 102 includes but is not limited to a mobile phone, a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a desktop computer, a smart TV, etc. The network 110 may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes but is not limited to: Bluetooth, WIFI and other networks that implement wireless communication. The cloud server cluster 112 may be a single server or a cloud server cluster consisting of multiple servers.

[0032] In the related technology, more and more cloud tenants use the serverless computing paradigm and utilize container technology to deploy applications. However, in the serverless computing scenario, users can only specify the specifications of the processor and memory owned by the container. Containers of multiple users will be deployed in the same computing node and share the network bandwidth resources of the computing node. Therefore, containers in the same computing node will compete with each other for network bandwidth resources. Under the coordination of the TCP congestion control algorithm of the network transmission control protocol, the more network connections a container has, the more bandwidth resources it will occupy in the computing node. This will lead to unreasonable allocation of container bandwidth in the computing node and low bandwidth resource utilization.

[0033] In order to solve the above technical problems, as an optional implementation method, Figure 3 As shown, the embodiment of the present application provides a bandwidth allocation method, comprising the following steps:

[0034] S302, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node.

[0035] Specifically, in an embodiment of the present application, the bandwidth configuration parameters of each container in the computing node include but are not limited to the guaranteed bandwidth of each container, the burst bandwidth of each container (maximum quota bandwidth), the real-time bandwidth demand of each container, the reserved bandwidth of the current computing node (not participating in the bandwidth allocation of each container), the minimum allocated bandwidth of the container on the current computing node, and the total bandwidth actually allocated to each container. It should be noted that the bandwidth configuration parameters of each container correspond to the service attributes purchased by the user corresponding to the container. For example, when the service attributes purchased by the user include ordinary instances, the guaranteed bandwidth of the corresponding container is 2GB / s and the burst bandwidth is 5GB / s. When the service attributes purchased by the user include enhanced instances, the guaranteed bandwidth of the corresponding container is 3GB / s and the burst bandwidth is 7GB / s. In another example, the bandwidth configuration parameters of each container can also be configured based on the preset bandwidth.

[0036] S304: Allocate bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0037] Specifically, for example, if the network bandwidth of the current computing node is 10 GB / s, and the current computing node includes two containers, such as container A and container B, then according to the bandwidth configuration parameters of container A and container B, the bandwidth allocated to container A is 2 GB / s, and the bandwidth allocated to container B is 6 GB / s; or the bandwidth allocated to container A is 5 GB / s, and the bandwidth allocated to container B is 5 GB / s. Here, the total bandwidth allocated to container A and container B does not exceed 10 GB / s.

[0038] In an embodiment of the present application, a method is adopted in which the network bandwidth of a computing node and the bandwidth configuration parameters of each container in the computing node are obtained; and bandwidth is allocated to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container. When allocating bandwidth to each container of a computing node, the embodiment of the present application allocates bandwidth to each container based on the bandwidth configuration parameters of each container and the network bandwidth of the computing node, thereby preventing containers with more network connections from occupying more bandwidth resources in the computing node, and not only reasonably allocating the bandwidth of containers in the computing node, but also improving the utilization rate of bandwidth resources.

[0039] In one or more embodiments, Figure 4 As shown, the embodiment of the present application also provides a bandwidth allocation method, comprising the following steps:

[0040] S402, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node.

[0041] S404: when the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtain a current bandwidth demand of a first container, where the first container is any container among the containers;

[0042] S406: Taking the minimum value between the current demand and the guaranteed bandwidth of the first container as the first allocated bandwidth of the first container, and allocating a used bandwidth to the first container based on the first allocated bandwidth of the first container.

[0043] Specifically, in the embodiment of the present application, the input parameter verification module calculates whether the sum of the guaranteed bandwidths of each container is greater than the network bandwidth of the computing node. If the sum of the guaranteed bandwidths of each container is greater than the network bandwidth of the computing node, the container bandwidth allocation cannot guarantee that the configuration of the guaranteed bandwidth is met at any time, and the abnormal input processing module of the system is processed.

[0044] In one example, if the reserved bandwidth of the current computing node is configured with a corresponding value, the value obtained by subtracting the reserved bandwidth from the network bandwidth of the computing node is used as the allocated bandwidth resource of each container. It should be noted that when the preset minimum allocated bandwidth on the computing node is configured with a corresponding value, the maximum value of the sum of the guaranteed bandwidth of each container and the sum of the preset minimum allocated bandwidth of each container is determined, and the input parameter verification module is used to calculate whether the maximum value is greater than the network bandwidth of the computing node. If it is greater than the network bandwidth of the computing node, the bandwidth allocation of the container cannot guarantee that the bandwidth demand of the container is always met. At this time, the abnormal input processing module of the system can be entered for processing.

[0045] For example, the current computing node includes three containers, container A, whose guaranteed bandwidth is 1GB / s; container B, whose guaranteed bandwidth is 2GB / s; container C, whose guaranteed bandwidth is 3GB / s. The sum of the guaranteed bandwidths of the above containers is 6GB / s. When the sum of the guaranteed bandwidths of the above containers is less than or equal to the network bandwidth of the computing node 8GB / s, the current demand for bandwidth of the above containers is obtained, container A is 1.5GB / s, container B is 2.5GB / s, and container C is 2.5GB / s; the first allocated bandwidth of container A is 1GB / s, the first allocated bandwidth of container B is 2GB / s, and the first allocated bandwidth of container C is 2.5GB / s. The first allocated bandwidth of each of the above containers is determined as the usage bandwidth of the first container. Based on the above technical method, the bandwidth of the computing node can be reasonably allocated according to the guaranteed bandwidth and real-time required bandwidth corresponding to each container.

[0046] The above step S402 has been clearly explained in the previous text and will not be repeated here.

[0047] In one or more embodiments, Figure 5As shown, the embodiment of the present application also provides a bandwidth allocation method, comprising the following steps:

[0048] S502: Obtain the network bandwidth of a computing node and bandwidth configuration parameters of each container in the computing node.

[0049] S504: When the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtain a current bandwidth demand of a first container, where the first container is any container among the containers.

[0050] S506: Taking the minimum value between the current demand and the guaranteed bandwidth of the first container as the first allocated bandwidth of the first container;

[0051] S508: Determine a maximum value between the first allocated bandwidth and a preset minimum allocated bandwidth of the first container as a used bandwidth of the first container.

[0052] Specifically, in an embodiment of the present application, when the preset minimum allocated bandwidth on the computing node is configured with a corresponding value, by configuring the preset minimum allocated bandwidth, the situation where the container is interrupted due to a system bandwidth allocation error can be avoided. The preset minimum allocated bandwidth corresponding to each container on the computing node can be the same or different. Specifically, for example, the minimum value of the demand before container A in the current computing node and the guaranteed bandwidth of the first container is 2GB / s, container B is 3GB / s, and container C is 0.5GB / s. By configuring the preset minimum allocated bandwidth of 1.5GB / s, the bandwidth used by container C can be adjusted to 1.5GB / s, thereby avoiding network congestion or network interruption in container C.

[0053] The above steps S502 to S506 have been clearly explained in the previous text and will not be repeated here.

[0054] In one or more embodiments, Figure 6 As shown, the embodiment of the present application also provides a bandwidth allocation method, comprising the following steps:

[0055] S602, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node.

[0056] S604: When the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtain a current bandwidth demand of a first container, where the first container is any container among the containers.

[0057] S606: Use a minimum value between the current demand and the guaranteed bandwidth of the first container as a first allocated bandwidth of the first container.

[0058] S608, determining a first sum value obtained by adding the first allocated bandwidths of the containers, and determining a difference value obtained by subtracting the first sum value from the network bandwidth of the computing node as a first remaining bandwidth of the computing node;

[0059] S610: When the first remaining bandwidth is greater than zero, calculate a second allocated bandwidth of the first container based on the first remaining bandwidth, a current demand of the first container, and the first allocated bandwidth of the first container; wherein the second allocated bandwidth of the first container is less than or equal to a preset maximum quota bandwidth of the first container.

[0060] S612: Determine a used bandwidth of the first container based on the sum of the first allocated bandwidth and the second allocated bandwidth of the first container.

[0061] Specifically, in the embodiment of the present application, for example, the current computing node includes three containers, A, B, and C. The first allocated bandwidth of container A is 1 GB / s, the first allocated bandwidth of container B is 2 GB / s, and the first allocated bandwidth of container C is 2 GB. The first sum value obtained by adding the first allocated bandwidths of each container is 5 GB / s. The difference obtained by subtracting the first sum value 5 GB / s from the network bandwidth of the computing node 8 GB / s is 3 GB / s, and the first remaining bandwidth of the computing node is 3 GB / s. Based on the first remaining bandwidth, the current demand of containers A, B, and C, the preset maximum quota bandwidth of containers A, B, and C, and the first allocated bandwidth of each container, the second allocated bandwidth of containers A, B, and C is calculated.

[0062] In one example, the second allocated bandwidth of the containers A, B, and C is calculated based on the maximum-minimum fairness algorithm, including but not limited to. Assume that the current bandwidth demands of the containers A, B, and C are 1.6 GB / s, 3.1 GB / s, and 3.5 GB / s, respectively, and the unsatisfied bandwidth demands of the three containers are 0.6 GB / s, 1.1 GB / s, and 1.5 GB / s, respectively. The present application continues to allocate bandwidth to the current containers A, B, and C through multiple rounds of calculations: in the first round, the first remaining bandwidth of 3 GB / s is temporarily divided into three resources of 1 GB / s and allocated to containers A, B, and C. Since this round of allocation exceeds the demand of container A, in the second round, the excess bandwidth of 0.4 GB / S of container A is evenly allocated to containers B and C, and 0.2 GB / S of bandwidth is given to each container B and C. This round of allocation exceeds the demand of container B by 0.1 GB / S, and container C still lacks 0.3 GB / S of bandwidth. The bandwidth of 0.1 GB / S is allocated to container C, and the second allocated bandwidths of containers A, B, and C are 0.6 GB / s, 1.1 GB / s, and 1.3 GB / s, respectively.

[0063] In another example, a weighted maximum-minimum fair allocation algorithm may be used to calculate the second allocated bandwidth of the containers A, B, and C. For example, assuming that the current bandwidth demands of containers A, B, and C are 1.6 GB / s, 3.1 GB / s, and 3.5 GB / s, respectively, and the unmet bandwidth demands of the three containers are 0.6 GB / s, 1.1 GB / s, and 1.5 GB / s, respectively, and the corresponding weights of the three containers are 1, 0.5, and 1.5, respectively. The first step is to standardize the weights, and set the minimum weight to 1, so that the weight set is updated to 2, 1, and 3. Assume that the required bandwidth resources are not 3 portions but 2+1+3=6 portions. Therefore, the bandwidth is divided into 6 portions. In each round of bandwidth allocation, resources are divided according to the proportion of weights; therefore, in the first round, containers A, B, and C obtain bandwidths of 1 GB / s, 0.5 GB / s, and 1.5 GB / s, respectively, and container A obtains a bandwidth of 1 GB / s, but only 0.6 GB / s is required, so there is an extra 0.4 GB / s. Container B is short of 0.6 GB / s, and container C just meets the demand, so 0.4 GB / s is allocated to container B. The second allocated bandwidths of containers A, B, and C are 0.6 GB / s, 0.9 GB / s, and 1.5 GB / s, respectively. In the embodiment of the present application, the weight corresponding to the above container can be the guaranteed bandwidth of the container or the preset maximum quota bandwidth of the container.

[0064] It should be noted that the bandwidth allocated to the container at this stage does not exceed the preset maximum quota bandwidth (burst bandwidth) of the container. According to the sum of the first allocated bandwidth and the second allocated bandwidth of the first container, the bandwidth used by each container can be accurately obtained.

[0065] Steps S602-S606 in the embodiment of the present application have been clearly explained in the previous text and will not be repeated here.

[0066] In one or more embodiments, calculating the second allocated bandwidth of the first container based on the first remaining bandwidth, the current demand of the first container, and the first allocated bandwidth of the first container includes:

[0067] Determining a bandwidth demand difference of each container based on the current demand of each container and the first allocated bandwidth;

[0068] According to the bandwidth requirement difference of each container, based on the maximum-minimum-fairness algorithm and the first remaining bandwidth, a second allocated bandwidth corresponding to the first container is determined.

[0069] Specifically, the embodiment of the present application calculates the second allocated bandwidth of containers A, B and C in the current computing node based on the maximum-minimum fairness algorithm. Assume that the current bandwidth demands of containers A, B and C are 1.6 GB / s, 3.1 GB / s and 3.5 GB / s respectively; the first allocated bandwidth of container A is 1 GB / s, the first allocated bandwidth of container B is 2 GB / s, and the first allocated bandwidth of container C is 2 GB; the unmet bandwidth demands (bandwidth demand differences) of the three containers are 0.6 GB / s, 1.1 GB / s and 1.5 GB / s respectively. The present application continues to allocate bandwidth to the current containers A, B, and C through multiple rounds of calculations: in the first round, the first remaining bandwidth of 3 GB / s is temporarily divided into three resources of 1 GB / s and allocated to containers A, B, and C. Since this round of allocation exceeds the demand of container A, in the second round, the excess bandwidth of 0.4 GB / S of container A is evenly allocated to containers B and C, and 0.2 GB / S of bandwidth is given to each container B and C. This round of allocation exceeds the demand of container B by 0.1 GB / S, and container C still lacks 0.3 GB / S of bandwidth. The bandwidth of 0.1 GB / S is allocated to container C, and the second allocated bandwidths of containers A, B, and C are 0.6 GB / s, 1.1 GB / s, and 1.3 GB / s, respectively.

[0070] In one or more embodiments, Figure 7 As shown, the embodiment of the present application also provides a bandwidth allocation method, comprising the following steps:

[0071] S702, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node.

[0072] S704: When the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtain a current bandwidth demand of a first container, where the first container is any container among the containers.

[0073] S706: Use a minimum value between the current demand and the guaranteed bandwidth of the first container as a first allocated bandwidth of the first container.

[0074] S708, determining a first sum value obtained by adding the first allocated bandwidths of the containers, and determining a difference value obtained by subtracting the first sum value from the network bandwidth of the computing node as a first remaining bandwidth of the computing node;

[0075] S710: When the first remaining bandwidth is greater than zero, calculate a second allocated bandwidth of the first container based on the first remaining bandwidth, a current demand of the first container, and the first allocated bandwidth of the first container.

[0076] S712: Determine a second sum value obtained by adding the second allocated bandwidths of each container, and determine a difference value obtained by subtracting the second sum value from the first remaining bandwidth as a second remaining bandwidth of the computing node;

[0077] S714: When the second remaining bandwidth is greater than zero, determine a third allocated bandwidth of the first container;

[0078] S716: Determine the sum of the first allocated bandwidth, the second allocated bandwidth, and the third allocated bandwidth of the first container as the used bandwidth of the first container.

[0079] Specifically, in an embodiment of the present application, for example, the current computing node includes three containers, A, B, and C. The second allocated bandwidth of container A is 0.5 GB / s, the second allocated bandwidth of container B is 0.7 GB / s, and the second allocated bandwidth of container C is 1.3 GB. The first sum value obtained by adding the second allocated bandwidths of each container is 2.5 GB / s. The first remaining bandwidth of the computing node is 3 GB / s minus the first sum value 2.5 GB / s to obtain a second remaining bandwidth of 0.5 GB / s. The third allocated bandwidth of containers A, B, and C is determined according to the second remaining bandwidth. Finally, the sum of the first allocated bandwidth, the second allocated bandwidth, and the third allocated bandwidth of the three containers A, B, and C is determined as the usage bandwidth of the above-mentioned containers A, B, and C.

[0080] The above steps S702-S710 have been clearly explained in the previous text and will not be repeated here.

[0081] In one or more embodiments, determining the third allocated bandwidth of the first container includes: determining the third allocated bandwidth of the first container to be zero based on the usage bandwidth of the first container being greater than or equal to the current demand of the first container.

[0082] Specifically, in the embodiment of the present application, assuming that the current computing node includes three containers, namely, containers A, B, and C, and when the currently allocated bandwidth is greater than or equal to the current demand for bandwidth of each container, there is no need to allocate the remaining bandwidth of the current computing node to the above three containers A, B, and C.

[0083] In one or more embodiments, determining the third allocated bandwidth of the first container includes: calculating a ratio of the second remaining bandwidth to the total number of containers of each container, and determining the ratio as the third allocated bandwidth of the first container;

[0084] Alternatively, the guaranteed bandwidth or the preset maximum quota bandwidth of each container is used as the weight corresponding to each container, and the second remaining bandwidth is allocated based on the weight of each container to obtain the third allocated bandwidth of the first container.

[0085] Specifically, in the embodiment of the present application, assuming that the current computing node includes three containers A, B and C, and the second remaining bandwidth of the current computing node is 0.6 GB / s, 0.6 GB / s can be evenly distributed to the three containers A, B and C. That is, the third allocated bandwidths of the three containers A, B and C are all 0.2 GB / s.

[0086] In another example, the guaranteed bandwidth or the preset maximum quota bandwidth of each container is used as the weight corresponding to each container, assuming that the guaranteed bandwidths of containers A, B and C are their corresponding weights, and the weights of containers A, B and C are 1, 2 and 3. Based on the weight, the second remaining bandwidth of 0.6 GB / s is allocated, and the third allocated bandwidths of containers A, B and C are 0.1 GB / s, 0.2 GB / s and 0.3 GB / s respectively.

[0087] In one or more embodiments, Figure 8 As shown, the embodiment of the present application also provides a bandwidth allocation method, comprising the following steps:

[0088] S802, when the time interval between the current moment and the last bandwidth allocation moment reaches a preset time length, the step of obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is executed; after the execution is completed, the step goes to step S806;

[0089] S804: When it is detected that the network of the computing node is in a congested state, the step of obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is executed.

[0090] S806: Allocate bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0091] Specifically, in one example, assuming that the preset duration is 100 ms (milliseconds), when the time interval between the current moment and the previous bandwidth allocation moment reaches 100 ms, the acquisition of the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is executed, and then based on the acquired network bandwidth and the bandwidth configuration parameters of each container, the bandwidth is allocated to each container respectively.

[0092] In another example, when it is detected that the network of the computing node is in a congested state, that is, data loss or increased network queue delay occurs, or when it is detected that the bandwidth configuration of the container has changed, the acquisition of the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is performed, and then based on the acquired network bandwidth and the bandwidth configuration parameters of each container, the bandwidth is allocated to each container.

[0093] Steps S802-S804 in the embodiment of the present application have been clearly explained in the previous text and will not be repeated here.

[0094] In one or more embodiments, Fig. 9 As shown, the embodiment of the present application also provides a reverse bandwidth allocation method, comprising the following steps:

[0095] S902, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node.

[0096] S904: When the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtain a current bandwidth demand of a first container, where the first container is any container among the containers.

[0097] S906: Use a minimum value between the current demand and the guaranteed bandwidth of the first container as a first allocated bandwidth of the first container.

[0098] S908: Determine the maximum value of the first allocated bandwidth and the preset minimum allocated bandwidth of the first container as the used bandwidth of the first container. After step S908 is completed, execute step S910 or step S912.

[0099] S910: When the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, display a prompt message indicating that the bandwidth configuration parameters of the containers are incorrect.

[0100] S912: When the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, obtain the current bandwidth demand of the first container; use the minimum value of the current demand and the guaranteed bandwidth of the first container as the first allocated bandwidth of the first container; and when it is determined that the sum of the first allocated bandwidths of the containers is less than or equal to the network bandwidth of the computing node, allocate the used bandwidths of the containers to the containers respectively.

[0101] Specifically, the embodiments of the present application include but are not limited to processing abnormal data through an abnormal input processing module. For example, when the sum of the guaranteed bandwidths of each container is greater than the network bandwidth of the computing node, that is, the network bandwidth of the current computing node cannot guarantee the guaranteed bandwidth of its previous container in real time, a prompt message indicating that the bandwidth configuration parameters of each container are incorrect is displayed.

[0102] In one example, if the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, the operation of allocating bandwidth usage to the containers can be performed according to the steps in the above embodiment to obtain the bandwidth usage of each container. It should be noted that the bandwidth usage of each container can be allocated to each container only when it is determined that the sum of the first allocated bandwidths of the containers is less than or equal to the network bandwidth of the computing node.

[0103] Steps S902-S908 in the embodiment of the present application have been clearly explained in the previous text and will not be repeated here.

[0104] Based on the above embodiment, as an optional implementation method, Fig.10 As shown, the embodiment of the present application also provides a data processing method, comprising the following steps:

[0105] 1) Bandwidth input parameter verification

[0106] The input parameter verification module calculates whether the sum of the guaranteed bandwidth (request) of each container is less than the available bandwidth of the computing node. If it is greater than the available bandwidth of the computing node, the bandwidth allocation of each container cannot always ensure that the configuration of the guaranteed bandwidth is met, and then enters the abnormal input processing module.

[0107] If the optional parameter reserved (reserved bandwidth of the computing node) is configured with a value, the corresponding reserved bandwidth of the computing node will not participate in the bandwidth allocation.

[0108] If the optional parameter minGuarantee (preset minimum allocated bandwidth) is configured with a value, determine the maximum value of the sum of the guaranteed bandwidth of each container and the sum of the preset minimum allocated bandwidth of each container, and calculate whether the maximum value is greater than the network bandwidth of the computing node through the input parameter verification module. If it is greater than the network bandwidth of the computing node, the bandwidth allocation of the container cannot guarantee that the bandwidth demand of the container is always met. At this time, the system's abnormal input processing module can be entered for processing.

[0109] 2) Phase I Bandwidth Allocation

[0110] During the bandwidth allocation in Phase I, when allocating the network bandwidth of the computing node to meet the real-time bandwidth requirements of the container, the minimum value between the current demand of each container and the guaranteed bandwidth of each container is used as the first allocated bandwidth of each container, and the first allocated bandwidth is determined as the used bandwidth of the container. After the allocation in this phase is completed, the remaining bandwidth to be allocated is the network bandwidth of the computing node minus the sum of the first allocated bandwidth of each container. It can be expressed as: rest_I = cap-∑allocate_I, where rest_I represents the remaining unallocated bandwidth of the computing node after the phase-I bandwidth allocation is completed, and cap represents the network bandwidth of the computing node.

[0111] Σallocate_I represents the sum of the first allocated bandwidths of each container.

[0112] If the optional parameter minGuarnatee is configured, the bandwidth allocated to the container in this phase must meet the following requirements: the maximum value between the above minimum value and minGuarnatee is used as the bandwidth used by the container.

[0113] 3) Phase II Bandwidth Allocation

[0114] Phase II complex allocation computes the unallocated bandwidth of the nodes in Phase I to meet the burst bandwidth requirements of each container. The embodiment of the present invention uses the maximum-min fairness algorithm (MMF) to allocate this part of the unallocated bandwidth. At the same time, the bandwidth allocated to the container in this phase should not exceed the burst bandwidth (maximum quota bandwidth) of the container. Therefore, the bandwidth allocated to each container in this phase is allocate_II i =MMF(rest_I,min(demand i , limit i ))-allocate_I i ). Where i is the number of the container, demand i is the current bandwidth requirement of container i, limit i is the burst bandwidth of container i, and the remaining bandwidth to be allocated is rest_II=cap-∑allocate_II.

[0115] 4) Phase III Bandwidth Allocation

[0116] Phase III is responsible for allocating the remaining bandwidth after the bandwidth allocation of computing nodes in Phase II. Before the allocation in this phase, if the allocation result has met the real-time bandwidth requirements of each container, during the allocation process in this phase, you can choose to keep this part of the bandwidth and not participate in the bandwidth allocation of the container; or allocate this part of the bandwidth evenly to each container; or use request (guaranteed bandwidth of the container) or limit (burst bandwidth of the container) as the weight, and allocate the remaining bandwidth of the computing node to each container based on the weight of each container.

[0117] The final bandwidth allocation result of each container is the sum of the bandwidth allocated in the three stages, that is, allocate_ i =allocate_I i +allocate_II i +allocate_III i .

[0118] 5) Abnormal input processing

[0119] When the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, a prompt message indicating that the bandwidth configuration parameters of the containers are incorrect is displayed; or, if the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, the operation of allocating bandwidth usage to the containers can be performed according to the steps in the above embodiment to obtain the bandwidth usage of each container. It should be noted that only when it is determined that the sum of the first allocated bandwidths of the containers is less than or equal to the network bandwidth of the computing node can the bandwidth usage of the containers be allocated to the containers respectively, and the output result of this embodiment is an executable node bandwidth allocation plan.

[0120] The above technical solution of the present application has the following beneficial technical effects:

[0121] 1. The embodiments of the present application not only have the ability to adjust the bandwidth allocation of the network in real time and dynamically, but also can provide the container with the ability to configure burst bandwidth.

[0122] 2. The embodiment of the present application implements a node bandwidth allocation method at a single container granularity, and can also quantitatively control bandwidth allocation.

[0123] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0124] According to another aspect of the embodiments of the present application, a bandwidth allocation device for implementing the above-mentioned bandwidth allocation method is also provided. Fig.11 As shown, the device comprises:

[0125] An acquiring unit 1102 acquires the network bandwidth of a computing node and bandwidth configuration parameters of each container in the computing node;

[0126] The allocating unit 1104 is configured to allocate bandwidth to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0127] In an embodiment of the present application, a method is adopted in which the network bandwidth of a computing node and the bandwidth configuration parameters of each container in the computing node are obtained; and bandwidth is allocated to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container. When allocating bandwidth to each container of a computing node, the embodiment of the present application allocates bandwidth to each container based on the bandwidth configuration parameters of each container and the network bandwidth of the computing node, thereby preventing containers with more network connections from occupying more bandwidth resources in the computing node, and not only reasonably allocating the bandwidth of containers in the computing node, but also improving the utilization rate of bandwidth resources.

[0128] In one or more embodiments, the bandwidth configuration parameter includes a guaranteed bandwidth of the container; the allocation unit 1104 includes:

[0129] A first acquisition module, configured to acquire a current bandwidth demand of a first container when the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, the first container being any container among the containers;

[0130] The first determining module is configured to use a minimum value between the current demand and the guaranteed bandwidth of the first container as a first allocated bandwidth of the first container, and allocate a used bandwidth to the first container based on the first allocated bandwidth of the first container.

[0131] In one or more embodiments, the bandwidth configuration parameter further includes a preset minimum allocated bandwidth of the container, and the first determining module includes:

[0132] The first determining subunit is configured to use a maximum value between the first allocated bandwidth and a preset minimum allocated bandwidth of the first container as a bandwidth of the first container.

[0133] In one or more embodiments, the bandwidth configuration parameter further includes a preset maximum quota bandwidth of the container, and the first determination module further includes:

[0134] A second determining subunit is configured to determine a sum value obtained by adding the first allocated bandwidths of the containers, and determine a difference value obtained by subtracting the sum value from the network bandwidth of the computing node as a first remaining bandwidth of the computing node;

[0135] a first calculation subunit, configured to calculate a second allocated bandwidth of the first container based on the first remaining bandwidth, the current demand of the first container, and the first allocated bandwidth of the first container when the first remaining bandwidth is greater than zero; wherein the second allocated bandwidth of the first container is less than or equal to a preset maximum quota bandwidth of the first container;

[0136] The third determining subunit is configured to determine a used bandwidth of the first container based on a sum of a first allocated bandwidth and a second allocated bandwidth of the first container.

[0137] In one or more embodiments, the third determining subunit includes:

[0138] A first determination submodule, configured to determine a bandwidth requirement difference of each container based on a current requirement of each container and a first allocated bandwidth;

[0139] The second determining submodule is configured to determine a second allocated bandwidth corresponding to the first container according to the bandwidth requirement difference of each container, based on a maximum-minimum-fairness algorithm and the first remaining bandwidth.

[0140] In one or more embodiments, the third determining subunit further includes:

[0141] A third determining submodule is configured to determine a second sum value obtained by adding the second allocated bandwidths of the containers, and determine a difference value obtained by subtracting the second sum value from the first remaining bandwidth as a second remaining bandwidth of the computing node;

[0142] a fourth determining submodule, configured to determine a third allocated bandwidth of the first container when the second remaining bandwidth is greater than zero;

[0143] The fifth determining submodule is configured to determine the sum of the first allocated bandwidth, the second allocated bandwidth, and the third allocated bandwidth of the first container as the used bandwidth of the first container.

[0144] In one or more embodiments, the fourth determining submodule includes:

[0145] The determining subunit is configured to determine that the third allocated bandwidth of the first container is zero based on the fact that the currently allocated bandwidth of the first container is greater than or equal to the current demand of the first container.

[0146] In one or more embodiments, the fourth determining submodule includes:

[0147] a first calculating and determining subunit, configured to calculate a ratio of the second remaining bandwidth to the total number of containers of each container, and determine the ratio as a third allocated bandwidth of the first container; or

[0148] The weight allocation submodule is used to use the guaranteed bandwidth or the preset maximum quota bandwidth of each container as the weight corresponding to each container, allocate the second remaining bandwidth based on the weight of each container, and obtain the third allocated bandwidth of the first container.

[0149] In one or more embodiments, the acquiring unit 1102 includes:

[0150] A first execution unit is configured to execute the step of obtaining the network bandwidth of a computing node and the bandwidth configuration parameters of each container in the computing node when the time interval between the current moment and the last bandwidth allocation moment reaches a preset time length; or

[0151] The second execution unit is configured to execute the step of obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node when it is detected that the network of the computing node is in a congested state.

[0152] In one or more embodiments, the bandwidth allocation device further includes:

[0153] A display unit is configured to display a prompt message indicating that the bandwidth configuration parameters of each container are incorrect when the sum of the guaranteed bandwidths of each container is greater than the network bandwidth of the computing node; or

[0154] The third execution unit is configured to obtain, when the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, a current demand for bandwidth by a first container, where the first container is any container among the containers; use a minimum value between the current demand and the guaranteed bandwidth of the first container as a first allocated bandwidth for the first container; and when it is determined that the sum of the first allocated bandwidths of the containers is less than or equal to the network bandwidth of the computing node, allocate the used bandwidths of the containers to the containers respectively.

[0155] According to another aspect of the embodiment of the present application, an electronic device for implementing the above bandwidth allocation method is also provided. The electronic device may be Figure 1 The cloud control platform or cloud server cluster shown in the figure includes one or more cloud servers. This embodiment takes the electronic device as a cloud server cluster as an example. Fig.12As shown, the cloud server includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.

[0156] Optionally, in this embodiment, the cloud server may be at least one network device among a plurality of network devices of a computer network.

[0157] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0158] S1, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node;

[0159] S2: Allocate bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0160] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the bandwidth allocation method and device in the embodiment of the present application. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, the above-mentioned bandwidth allocation method is realized. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely arranged relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. Among them, the memory 1202 can be specifically used, but not limited to, for storing data to be allocated bandwidth, and bandwidth allocation results.

[0161] As an example, Fig.12 As shown, the memory 1202 may include, but is not limited to, the acquisition unit 1102 and the allocation unit 1104 in the bandwidth allocation device. In addition, it may also include, but is not limited to, other module units in the bandwidth allocation device, which will not be described in detail in this example.

[0162] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0163] In addition, the electronic device mentioned above further includes: a connection bus 1208, which is used to connect various module components in the electronic device mentioned above.

[0164] In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0165] In one or more embodiments, the present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned bandwidth allocation method. The computer program is configured to execute the steps of any of the above-mentioned method embodiments when it is run.

[0166] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0167] S1, obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node;

[0168] S2: Allocate bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

[0169] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0170] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0171] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.

[0172] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0173] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0176] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

[0177] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims

1. A bandwidth allocation method, characterized in that: The method comprises: Obtaining the network bandwidth of a computing node and bandwidth configuration parameters of each container in the computing node; Based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container, bandwidth is allocated to each container.

2. The method according to claim 1, characterized in that: The bandwidth configuration parameters include the guaranteed bandwidth of the container; the bandwidth is allocated to each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container, including: When the sum of the guaranteed bandwidths of the containers is less than or equal to the network bandwidth of the computing node, obtaining a current bandwidth demand of a first container, where the first container is any container among the containers; The minimum value between the current demand and the guaranteed bandwidth of the first container is used as the first allocated bandwidth of the first container, and a used bandwidth is allocated to the first container based on the first allocated bandwidth.

3. The method according to claim 2, characterized in that The bandwidth configuration parameter also includes a preset minimum allocated bandwidth of the container, and the allocating bandwidth for the first container based on the first allocated bandwidth includes: A maximum value between the first allocated bandwidth and a preset minimum allocated bandwidth of the first container is determined as a used bandwidth of the first container.

4. The method according to claim 2, characterized in that: The bandwidth configuration parameter also includes a preset maximum quota bandwidth of the container, and the allocating bandwidth for the first container based on the first allocated bandwidth includes: Determine a first sum value obtained by adding the first allocated bandwidths of the containers, and determine a difference value obtained by subtracting the first sum value from the network bandwidth of the computing node as a first remaining bandwidth of the computing node; When the first remaining bandwidth is greater than zero, a second allocated bandwidth of the first container is calculated based on the first remaining bandwidth, the current demand of the first container, and the first allocated bandwidth of the first container; wherein the second allocated bandwidth of the first container is less than or equal to the preset maximum quota bandwidth of the first container; The used bandwidth of the first container is determined based on the sum of the first allocated bandwidth and the second allocated bandwidth of the first container.

5. The method according to claim 4, characterized in that The calculating the second allocated bandwidth of the first container based on the first remaining bandwidth, the current demand of the first container, and the first allocated bandwidth of the first container includes: Determining a bandwidth demand difference of each container based on the current demand of each container and the first allocated bandwidth; According to the bandwidth requirement difference of each container, based on the maximum-minimum-fairness algorithm and the first remaining bandwidth, a second allocated bandwidth corresponding to the first container is determined.

6. The method according to claim 4, characterized in that The determining the used bandwidth of the first container based on the sum of the first allocated bandwidth and the second allocated bandwidth of the first container includes: Determine a second sum value obtained by adding the second allocated bandwidths of each container, and determine a difference value obtained by subtracting the second sum value from the first remaining bandwidth as the second remaining bandwidth of the computing node; When the second remaining bandwidth is greater than zero, determining a third allocated bandwidth of the first container; The sum of the first allocated bandwidth, the second allocated bandwidth, and the third allocated bandwidth of the first container is determined as the used bandwidth of the first container.

7. The method according to claim 6, characterized in that The determining the third allocated bandwidth of the first container includes: Based on the fact that the used bandwidth of the first container is greater than or equal to the current demand of the first container, it is determined that the third allocated bandwidth of the first container is zero.

8. The method according to claim 6, characterized in that The determining the third allocated bandwidth of the first container includes: calculating a ratio of the second remaining bandwidth to the total number of containers of each container, and determining the ratio as a third allocated bandwidth of the first container; or The guaranteed bandwidth or the preset maximum quota bandwidth of each container is used as the weight corresponding to each container, and the second remaining bandwidth is allocated based on the weight of each container to obtain the third allocated bandwidth of the first container.

9. The method according to any one of claims 1 to 7, characterized in that The obtaining of the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node includes: When the time interval between the current moment and the last bandwidth allocation moment reaches a preset time length, the step of obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is executed; or, When it is detected that the network of the computing node is in a congested state, the step of obtaining the network bandwidth of the computing node and the bandwidth configuration parameters of each container in the computing node is performed.

10. The method according to claim 2, characterized in that The method further comprises: When the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, displaying a prompt message indicating that the bandwidth configuration parameters of the containers are incorrect; or When the sum of the guaranteed bandwidths of the containers is greater than the network bandwidth of the computing node, a current demand for bandwidth of a first container is obtained, where the first container is any container among the containers; a minimum value between the current demand and the guaranteed bandwidth of the first container is used as a first allocated bandwidth of the first container; and when it is determined that the sum of the first allocated bandwidths of the containers is less than or equal to the network bandwidth of the computing node, the used bandwidths of the containers are respectively allocated to the containers.

11. A bandwidth allocation device, characterized in that: The device comprises: An acquisition unit, which acquires the network bandwidth of a computing node and bandwidth configuration parameters of each container in the computing node; The allocation unit is used to allocate bandwidth for each container based on the network bandwidth of the computing node and the bandwidth configuration parameters of each container.

12. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 10.