Virtual switch rate limiting configuration methods, devices, equipment, media and products
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-04-03
AI Technical Summary
Existing methods for configuring rate limiting on virtual switches suffer from delays in the timely distribution of rate limiting configurations, especially given the complexity of rate limiting parameters across different scenarios and types, making it difficult to achieve timely and consistent configuration.
By generating rate-limiting group information, different rate-limiting object types are integrated to generate unified rate-limiting configuration parameters. The token bucket mechanism is used to limit network bandwidth in the virtual switch, and the bandwidth resource allocation is optimized by combining the bandwidth usage points mechanism.
It enables timely and consistent configuration of virtual switch rate limiting, improves the operational efficiency of the cloud platform, and ensures the rational allocation and utilization of bandwidth resources.
Smart Images

Figure CN120880998B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for configuring rate limiting of a virtual switch. Background Technology
[0002] A virtual switch is a software-based switching component used to enable data exchange between multiple virtual machines on a physical host and manage the port traffic for each virtual machine. Due to network bandwidth limitations, not all virtual machine users can enjoy sufficient bandwidth, and rate limiting configuration on virtual switches is a common QoS (Quality of Service) measure. In current technologies, rate limiting configuration for virtual switches typically requires separate configuration for different scenarios and types of rate limiting parameters. However, due to the complexity of rate limiting scenarios and the diversity of rate limiting types, the timely distribution of rate limiting configurations for virtual switches can easily lead to problems. Summary of the Invention
[0003] This invention provides a method, apparatus, device, medium, and product for configuring rate limiting on a virtual switch, in order to solve the technical problem that existing methods for configuring rate limiting on virtual switches do not distribute the configuration in a timely manner.
[0004] To address the aforementioned technical problems, a first aspect of this invention provides a method for configuring rate limiting on a virtual switch, comprising:
[0005] Based on the bandwidth demand information of each virtual machine user, at least one rate-limiting group information is generated; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object;
[0006] The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate-limiting group information.
[0007] As a preferred embodiment, generating at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user specifically includes:
[0008] Based on the bandwidth requirement information of each virtual machine user, determine the required bandwidth specifications of each virtual machine user and its corresponding required bandwidth object;
[0009] Based on the required bandwidth specification, determine the rate limiting configuration parameters corresponding to the required bandwidth specification;
[0010] Based on the bandwidth demand object, determine the rate limiting object corresponding to each bandwidth demand specification;
[0011] At least one rate-limiting object corresponding to the same bandwidth requirement is bound to the rate-limiting configuration parameter corresponding to the same bandwidth requirement to generate the rate-limiting group information; wherein, each rate-limiting object in the rate-limiting group information is of the same type.
[0012] As a preferred embodiment, determining the rate limiting configuration parameters corresponding to the required bandwidth specifications specifically includes:
[0013] When the bandwidth requirement object is a virtual private cloud, the rate limiting configuration parameters of the virtual private cloud are determined according to the bandwidth requirement specifications of the virtual private cloud.
[0014] Based on the number of virtual machines on each computing node of the virtual private cloud and the rate limiting configuration parameters, determine the node rate limiting configuration parameters corresponding to each computing node.
[0015] The type of the rate-limiting object is the rate-limiting group information corresponding to the virtual private cloud type, which includes the rate-limiting configuration parameters of each virtual private cloud and the node rate-limiting configuration parameters.
[0016] As a preferred embodiment, the step of sending the rate-limiting group information to the virtual switch to instruct the virtual switch to perform network rate limiting on each of the virtual machine users based on the rate-limiting group information specifically includes:
[0017] The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to create a token bucket based on the rate-limiting group information; the token bucket is used to limit the network bandwidth of the virtual machine user.
[0018] As a preferred embodiment, the method further includes:
[0019] When it is detected that there are remaining bandwidth resources and the current network load of at least one target rate-limiting object reaches the rate-limiting configuration parameter, the bandwidth usage points of the target rate-limiting group corresponding to each target rate-limiting object are obtained; wherein, the bandwidth usage points decrease when the rate-limiting object in the rate-limiting group uses the remaining bandwidth resources, and increase when all rate-limiting objects in the rate-limiting group do not use the remaining bandwidth resources.
[0020] Based on the bandwidth usage score of the target rate-limiting group, the remaining bandwidth resources are allocated to each of the target rate-limiting objects.
[0021] As a preferred embodiment, allocating the current remaining bandwidth resources to each of the target rate-limiting objects based on the bandwidth usage points of the target rate-limiting group specifically includes:
[0022] Based on the current remaining bandwidth resources, adjust the target rate limiting group information corresponding to the target rate limiting group with the highest bandwidth usage points, and send the adjusted target rate limiting group information to the virtual switch;
[0023] When it is detected that the target rate limiting group after the current target rate limiting group information adjustment has stopped using the remaining bandwidth or the bandwidth usage score of the target rate limiting group after the target rate limiting group information adjustment is 0, the adjusted target rate limiting group information is restored to the initial target rate limiting group information, and the initial target rate limiting group information is sent to the virtual switch.
[0024] Repeat the aforementioned steps until the number of the target speed limit groups is 0.
[0025] As a preferred embodiment, the method specifically detects whether the current network load of the rate-limiting object reaches the rate-limiting configuration parameter through the following steps:
[0026] If the rate-limiting target is the virtual private cloud, then obtain the current network load of at least one virtual machine on each computing node of the virtual private cloud.
[0027] When the current network load of all virtual machines on any compute node reaches the node rate limiting configuration parameter corresponding to any compute node, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is taken as the target rate limiting object.
[0028] If the rate-limiting object is not the virtual private cloud, then obtain the current network load of at least one virtual machine corresponding to the rate-limiting object;
[0029] When the current network load of all virtual machines reaches the rate limiting configuration parameter corresponding to the rate limiting object, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is used as the target rate limiting object.
[0030] As a preferred embodiment, the method specifically increases the bandwidth usage integral through the following steps:
[0031] When it is detected that all rate-limited objects in the rate-limiting group are not using the remaining bandwidth resources, obtain the cloud resource information, current network load, and current remaining bandwidth resource usage interval for each rate-limited object in the rate-limiting group;
[0032] Based on the cloud resource information, current network load, and current remaining bandwidth resource usage interval of each of the rate-limited objects, determine the additional points value corresponding to each of the rate-limited objects;
[0033] The bandwidth usage points of the rate-limited group are increased according to the newly added value of each of the aforementioned points; wherein the initial value of the bandwidth usage points is 0.
[0034] As a preferred embodiment, the method specifically reduces the bandwidth usage integral through the following steps:
[0035] When it is detected that at least one elastic rate limiting object in the target rate limiting group is using the current remaining bandwidth resources, the remaining bandwidth resource usage information of each elastic rate limiting object in the target rate limiting group is obtained;
[0036] Based on the remaining bandwidth resource usage information of each elastic rate limiting object, determine the integral reduction value corresponding to each elastic rate limiting object;
[0037] Based on each of the stated reduction values, the bandwidth usage points of the target rate-limited group are reduced.
[0038] A second aspect of this invention provides a rate-limiting configuration device for a virtual switch, comprising:
[0039] A rate-limiting group information generation module is used to generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object;
[0040] The rate limiting configuration module is used to send the rate limiting group information to the virtual switch, so as to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate limiting group information.
[0041] A third aspect of the present invention provides an electronic device, including 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 rate limiting configuration method for a virtual switch as described in any of the first aspects.
[0042] A fourth aspect of the present invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the rate-limiting configuration method of the virtual switch as described in any of the first aspects.
[0043] A fifth aspect of the present invention provides a computer program product, including a computer program / instructions, wherein when the computer program / instructions are executed by a processor, the steps of the rate limiting configuration method for a virtual switch as described in any of the first aspects are implemented.
[0044] Compared with the prior art, the beneficial effect of the embodiments of the present invention is that by generating rate limiting group information, it is possible to integrate various types of rate limiting configuration parameters of different rate limiting objects and realize unified rate limiting configuration of virtual switches, thereby ensuring the timeliness of the distribution of rate limiting configuration of virtual switches. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the rate limiting configuration method for a virtual switch in an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of the speed limiting configuration device of the virtual switch in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of the electronic device in an embodiment of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Please see Figure 1 The first aspect of this invention provides a method for configuring rate limiting on a virtual switch, comprising the following steps S1 and S2:
[0050] Step S1: Generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object;
[0051] Step S2: The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate-limiting group information.
[0052] It is worth noting that when virtual machine users order virtual machine services on the cloud platform, they will select based on their own bandwidth requirements. Different bandwidth specification ordering schemes can be pre-created by the cloud platform for virtual machine users to choose directly, or virtual machine users can customize the required bandwidth specifications. This embodiment does not make specific limitations here. The virtual machine creation request from a virtual machine user carries bandwidth requirement information, i.e., the bandwidth specification selected by the virtual machine user. Since bandwidth determines the maximum amount of data that can be transmitted per unit time, the bandwidth specification determines the specific rate limit value of the rate limiting configuration parameter. In this embodiment, based on the bandwidth requirement information of each virtual machine user, the corresponding various rate limiting configuration parameters can be directly determined, such as maximum BPS (Bits per second), maximum PPS (Packets per second), maximum CPS (Connects per second), and special message rate limiting parameters, etc. This embodiment does not make specific limitations here. Among them, maximum BPS is used to represent the maximum number of bits that can be transmitted per second, maximum PPS is used to represent the maximum number of data packets that can be forwarded per second, maximum CPS is used to represent the maximum number of new connections that can be established per second, and special message rate limiting parameters refer to rate limiting parameters for specific types of messages, such as rate limiting parameters for various routing protocol messages. This can be set according to actual needs, and this embodiment does not make limitations here. By integrating various rate-limiting configuration parameters under the same bandwidth requirement and binding them with rate-limiting objects that have the same bandwidth requirement, a unified rate-limiting group information is generated. Each rate-limiting object in the rate-limiting group information belongs to the same rate-limiting group and corresponds to the same rate-limiting configuration parameters.
[0053] In one optional embodiment, the rate limiting priority for packets is set to be lower than the rate limiting priority for BPS, PPS and CPS, thereby ensuring the effectiveness of network rate limiting for each virtual machine user while achieving uniformity across multiple rate limiting scenarios.
[0054] Furthermore, the rate-limiting objects in this embodiment include at least ports, subnets, entire machines, and VPCs (Virtual Private Clouds). This can be determined directly based on the bandwidth requirements of virtual machine users. For example, if a virtual machine user selects a bandwidth of 10Gbps for the entire machine when purchasing bandwidth specifications, then the rate-limiting object is the entire machine, and the required bandwidth specification is 10Gbps. This embodiment will not elaborate further here.
[0055] Furthermore, since the information of each rate limiting group has integrated the rate limiting configuration parameters for different rate limiting scenarios and different types, when issuing rate limiting configurations to virtual switches, it is no longer necessary to issue rate limiting configuration information separately for each type of rate limiting configuration parameter and each rate limiting object. Instead, it is only necessary to issue the rate limiting group information to the virtual switch to complete the unified issuance and configuration of different rate limiting objects and different types of rate limiting configuration parameters, thereby ensuring the timeliness of rate limiting configuration for virtual switches.
[0056] Furthermore, when maintenance personnel need to perform cloud platform maintenance, they only need to identify the rate-limiting object to find the corresponding rate-limiting group on the virtual switch side, thereby obtaining all rate-limiting configuration parameters and corresponding rate-limiting statistics for that rate-limiting object. Compared to the conventional rate-limiting configuration scheme, which requires finding the corresponding virtual switch port information separately and then obtaining different types of rate-limiting information through the virtual switch port, this embodiment significantly improves the maintenance efficiency of the cloud platform.
[0057] The virtual switch rate limiting configuration method provided in this embodiment of the invention can integrate various types of rate limiting configuration parameters for different rate limiting objects by generating rate limiting group information, and realize unified rate limiting configuration for virtual switches, thereby ensuring the timeliness of the distribution of rate limiting configurations for virtual switches.
[0058] As a preferred embodiment, generating at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user specifically includes:
[0059] Based on the bandwidth requirement information of each virtual machine user, determine the required bandwidth specifications of each virtual machine user and its corresponding required bandwidth object;
[0060] Based on the required bandwidth specification, determine the rate limiting configuration parameters corresponding to the required bandwidth specification;
[0061] Based on the bandwidth demand object, determine the rate limiting object corresponding to each bandwidth demand specification;
[0062] At least one rate-limiting object corresponding to the same bandwidth requirement is bound to the rate-limiting configuration parameter corresponding to the same bandwidth requirement to generate the rate-limiting group information; wherein, each rate-limiting object in the rate-limiting group information is of the same type.
[0063] Specifically, in this embodiment, the bandwidth requirement of each virtual machine user and its corresponding bandwidth requirement object are first obtained from the bandwidth requirement information of the virtual machine user. For example, if the bandwidth requirement information of the virtual machine user is that the VPC bandwidth is 1000Mbps, then the bandwidth requirement object is VPC and the bandwidth requirement is 1000Mbps.
[0064] Furthermore, the bandwidth requirement determines the maximum amount of data that can be transmitted per unit of time. Therefore, based on the bandwidth requirement of each virtual machine user, the corresponding rate limiting configuration parameters can be directly determined. The corresponding rate limiting object is determined based on the bandwidth requirement object. For example, when the bandwidth requirement object is a VPC, the rate limiting object is the VPC; when the bandwidth requirement object is a subnet, the rate limiting object is the subnet. This embodiment will not elaborate further.
[0065] Furthermore, in order to integrate the rate limiting configuration parameters, this embodiment binds at least one rate limiting object corresponding to the same required bandwidth specification with the rate limiting configuration parameter corresponding to that required bandwidth specification to generate rate limiting group information.
[0066] Furthermore, in this embodiment, the types of all rate-limiting objects in the rate-limiting group information are the same. It can be understood that the rate-limiting object bound to the rate-limiting group information determines the rate-limiting level of the rate-limiting group. Since common rate-limiting levels can be unified with rate-limiting objects such as ports, subnets, and entire machines in terms of granularity, the rate-limiting object in this embodiment represents the rate-limiting level of the corresponding rate-limiting group information. For example, in a port-level rate-limiting scenario, the rate-limiting object bound to the rate-limiting group information is the port; while in a subnet-level rate-limiting scenario, the rate-limiting object bound to the rate-limiting group information is the logical subnet object, which is the collection of ports under the subnet. This embodiment will not elaborate further. For subnets, VPCs, and entire machines, ports belonging to the same VPC, the same subnet, or the same entire machine can be grouped into the same set on the virtual switch side.
[0067] As a preferred embodiment, determining the rate limiting configuration parameters corresponding to the required bandwidth specifications specifically includes:
[0068] When the bandwidth requirement object is a virtual private cloud, the rate limiting configuration parameters of the virtual private cloud are determined according to the bandwidth requirement specifications of the virtual private cloud.
[0069] Based on the number of virtual machines on each computing node of the virtual private cloud and the rate limiting configuration parameters, determine the node rate limiting configuration parameters corresponding to each computing node.
[0070] The type of the rate-limiting object is the rate-limiting group information corresponding to the virtual private cloud type, which includes the rate-limiting configuration parameters of each virtual private cloud and the node rate-limiting configuration parameters.
[0071] Specifically, a Virtual Private Cloud (VPC) is a logically isolated network space defined on cloud resources; it is a network space that can be customized by the lessee. Within the same VPC, multiple servers running virtual machines (VMs) can be deployed, serving as VM hosts. Each server is a compute node, and each server can create multiple VMs. When the rate-limiting target is a VPC, since multiple VMs within the same VPC may be distributed across different compute nodes, this embodiment requires further bandwidth resource allocation for different compute nodes.
[0072] First, this embodiment determines the overall rate limiting configuration parameters of the Virtual Private Cloud (VPN) based on its required bandwidth specifications. Then, according to the ratio of the number of virtual machines on each compute node to the total number of virtual machines, the bandwidth resource allocation weight for each compute node is determined. Therefore, based on the overall rate limiting configuration parameters and the bandwidth resource allocation weights for each compute node, the node rate limiting configuration parameters for each compute node can be directly determined. For each type of rate limiting configuration parameter, the sum of the rate limiting configuration parameters for each node cannot exceed the overall rate limiting configuration parameter for the corresponding type, thus enabling bandwidth resource allocation across different compute nodes.
[0073] As a preferred embodiment, the step of sending the rate-limiting group information to the virtual switch to instruct the virtual switch to perform network rate limiting on each of the virtual machine users based on the rate-limiting group information specifically includes:
[0074] The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to create a token bucket based on the rate-limiting group information; the token bucket is used to limit the network bandwidth of the virtual machine user.
[0075] In one optional embodiment, the process of sending rate-limiting group information to the virtual switch specifically involves: sending the rate-limiting group information to a message queue, enabling the virtual switch to retrieve the rate-limiting group information from the message queue, creating a corresponding rate-limiting group based on the rate-limiting group information, and then binding each rate-limiting object in the rate-limiting group information to the rate-limiting group. In addition, for different types of rate-limiting configuration parameters, the virtual switch will create corresponding token buckets. It can be understood that a token bucket is a technology that achieves traffic control through a token generation and consumption mechanism. Based on the token bucket, various network traffic parameters of virtual machine users, such as BPS, PPS, and CPS, can be rate-limited, thereby limiting the network bandwidth of virtual machine users.
[0076] As a preferred embodiment, the method further includes:
[0077] When it is detected that there are remaining bandwidth resources and the current network load of at least one target rate-limiting object reaches the rate-limiting configuration parameter, the bandwidth usage points of the target rate-limiting group corresponding to each target rate-limiting object are obtained; wherein, the bandwidth usage points decrease when the rate-limiting object in the rate-limiting group uses the remaining bandwidth resources, and increase when all rate-limiting objects in the rate-limiting group do not use the remaining bandwidth resources.
[0078] Based on the bandwidth usage score of the target rate-limiting group, the remaining bandwidth resources are allocated to each of the target rate-limiting objects.
[0079] Specifically, the rate-limiting group information sets uniform and fixed rate-limiting conditions for each rate-limiting object it corresponds to. However, in the actual operation of each rate-limiting object, some rate-limiting objects may not actually use the maximum bandwidth resource limit specified by the rate-limiting group information. Even if the actual bandwidth resource used by other rate-limiting objects reaches the maximum bandwidth resource limit specified by the rate-limiting group information, these rate-limiting objects cannot use additional bandwidth resources for data transmission due to the rate-limiting conditions specified by the rate-limiting group information, thus resulting in a waste of bandwidth resources.
[0080] To fully utilize remaining bandwidth resources and prevent virtual machine users from occupying bandwidth resources beyond their subscribed specifications for extended periods, this embodiment assigns bandwidth usage points to each rate-limiting group. These points determine which rate-limiting groups can currently utilize the remaining bandwidth resources. Specifically, when remaining bandwidth resources are detected and at least one target rate-limiting object's current network load reaches the rate-limiting configuration parameters, it indicates that the basic bandwidth resources of at least one target rate-limiting object are fully utilized, and there may be a demand for remaining bandwidth resources. In this case, the bandwidth usage points of the target rate-limiting groups corresponding to each target rate-limiting object are obtained. Understandably, to ensure fairness in the allocation of remaining bandwidth resources, in this embodiment, bandwidth usage points decrease when a rate-limited object in a rate-limiting group uses remaining bandwidth resources; that is, the more remaining bandwidth resources a rate-limited object occupies and the longer it occupies them, the fewer bandwidth usage points it receives. Conversely, when all rate-limited objects in a rate-limiting group are not using remaining bandwidth resources, bandwidth usage points increase; that is, the longer the remaining bandwidth resources are not used, the more bandwidth usage points they receive. Therefore, when allocating current remaining bandwidth resources, rate-limiting groups that have not used remaining bandwidth resources for a long time should have their remaining bandwidth resource usage needs prioritized, while rate-limiting groups that have excessively occupied remaining bandwidth resources in a short period should have lower priority in the use of their remaining bandwidth resources.
[0081] In this embodiment, network load can be the number of bits transmitted per unit time, such as BPS, the number of data packets forwarded per unit time, such as PPS, the number of newly established connections per unit time, such as CPS, or the number of a certain type of message sent per unit time. This embodiment does not make any specific limitations here.
[0082] It is understood that the speed limit group in this embodiment is a collection of speed limit objects in the same speed limit group information.
[0083] As a preferred embodiment, allocating the current remaining bandwidth resources to each of the target rate-limiting objects based on the bandwidth usage points of the target rate-limiting group specifically includes:
[0084] Based on the current remaining bandwidth resources, adjust the target rate limiting group information corresponding to the target rate limiting group with the highest bandwidth usage points, and send the adjusted target rate limiting group information to the virtual switch;
[0085] When it is detected that the target rate limiting group after the current target rate limiting group information adjustment has stopped using the remaining bandwidth or the bandwidth usage score of the target rate limiting group after the target rate limiting group information adjustment is 0, the adjusted target rate limiting group information is restored to the initial target rate limiting group information, and the initial target rate limiting group information is sent to the virtual switch.
[0086] Repeat the aforementioned steps until the number of the target speed limit groups is 0.
[0087] Specifically, in this embodiment, the remaining bandwidth resources are allocated to the target rate-limiting group with the highest bandwidth usage points. Combined with the original basic bandwidth resources of the target rate-limiting group, the changed rate-limiting configuration parameters after the remaining bandwidth resources are allocated can be directly confirmed. Based on the changed rate-limiting configuration parameters, the target rate-limiting group information can be adjusted, and then the adjusted target rate-limiting group information is sent to the virtual switch, thereby realizing the allocation of remaining bandwidth resources. The rate-limiting objects in the target rate-limiting group can use the current remaining bandwidth resources.
[0088] When it is detected that the current network load of each rate-limiting group in the adjusted target rate-limiting group is less than or equal to the rate-limiting configuration parameter, it indicates that the target rate-limiting group has stopped using the current remaining bandwidth. The adjusted target rate-limiting group information is then restored to the initial target rate-limiting group information and sent to the virtual switch so that the target rate-limiting group no longer occupies the current remaining bandwidth. Furthermore, when it is detected that the bandwidth usage score of the adjusted target rate-limiting group is 0, it indicates that the target rate-limiting group has occupied the current remaining bandwidth resources for too long and cannot continue to use them. Therefore, the adjusted target rate-limiting group information is also restored to the initial target rate-limiting group information and sent to the virtual switch.
[0089] Furthermore, based on the target rate-limiting group with the highest current bandwidth usage points, the aforementioned steps are repeated to continue allocating the remaining bandwidth resources to this group. This ensures that the remaining bandwidth resources are fully utilized, significantly improving bandwidth resource utilization. This process continues until the number of target rate-limiting groups reaches zero, indicating that the basic bandwidth resources of each rate-limiting group are sufficient to meet the bandwidth requirements of each rate-limiting object. Therefore, the remaining bandwidth resource allocation process is no longer executed.
[0090] In one preferred embodiment, while restoring the adjusted target rate limiting group information of any target rate limiting group to the initial target rate limiting group information, the bandwidth usage score of the target rate limiting group is set to 0, so as to avoid the target rate limiting group having the highest remaining bandwidth usage score after stopping the use of the current remaining bandwidth resources, thereby repeatedly and continuously occupying the current remaining bandwidth resources.
[0091] As a preferred embodiment, the method specifically detects whether the current network load of the rate-limiting object reaches the rate-limiting configuration parameter through the following steps:
[0092] If the rate-limiting target is the virtual private cloud, then obtain the current network load of at least one virtual machine on each computing node of the virtual private cloud.
[0093] When the current network load of all virtual machines on any compute node reaches the node rate limiting configuration parameter corresponding to any compute node, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is taken as the target rate limiting object.
[0094] If the rate-limiting object is not the virtual private cloud, then obtain the current network load of at least one virtual machine corresponding to the rate-limiting object;
[0095] When the current network load of all virtual machines reaches the rate limiting configuration parameter corresponding to the rate limiting object, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is used as the target rate limiting object.
[0096] Specifically, if the rate-limiting target is a Virtual Private Cloud (VPC), the network load of each compute node is used to determine whether the current network load of the rate-limiting target has reached the rate-limiting configuration parameters. The current network load of all virtual machines under each compute node is the current network load of that compute node. The VPC-level rate-limiting group information has already specified the node rate-limiting configuration parameters for each compute node in each VPC. If the current network load of any compute node reaches the corresponding node rate-limiting configuration parameter, it is determined that the current network load of the VPC has reached the rate-limiting configuration parameter, and it is then used as the target rate-limiting target.
[0097] If the rate-limiting target is not a Virtual Private Cloud (VPC), but rather a port, subnet, or entire machine, then the current network load of at least one virtual machine corresponding to that rate-limiting target is obtained. For example, if the rate-limiting target is a port, the current network load of the virtual machine corresponding to that port is directly obtained; if the rate-limiting target is a subnet or entire machine, the current network load of each virtual machine under that subnet or entire machine is obtained. When the current network load of all virtual machines reaches the rate-limiting configuration parameter corresponding to the rate-limiting target, it is determined that the current network load of the rate-limiting target has reached the rate-limiting configuration parameter, and it is then used as the target rate-limiting target.
[0098] As a preferred embodiment, the method specifically increases the bandwidth usage integral through the following steps:
[0099] When it is detected that all rate-limited objects in the rate-limiting group are not using the remaining bandwidth resources, obtain the cloud resource information, current network load, and current remaining bandwidth resource usage interval for each rate-limited object in the rate-limiting group;
[0100] Based on the cloud resource information, current network load, and current remaining bandwidth resource usage interval of each of the rate-limited objects, determine the additional points value corresponding to each of the rate-limited objects;
[0101] The bandwidth usage points of the rate-limited group are increased according to the newly added value of each of the aforementioned points; wherein the initial value of the bandwidth usage points is 0.
[0102] Specifically, in this embodiment, the increase in bandwidth usage points is affected by the cloud resource information of the rate-limited object, the current network load, and the current remaining bandwidth resource usage interval. Preferably, the cloud resource information includes virtual machine specifications and required bandwidth specifications. The virtual machine specifications can be the number of CPUs, CPU super-resolution ratio, memory size, memory super-resolution ratio, cloud disk size, etc., which are not specifically limited in this embodiment. The current network load includes at least one of BPS, PPS, CPS, and the number of packets sent per unit time. The current remaining bandwidth resource usage interval is specifically the time interval between the current time and the last time the remaining bandwidth resource usage ended.
[0103] Furthermore, based on the cloud resource information, current network load, and current remaining bandwidth usage interval for each rate-limited object, this embodiment calculates the incremental value of the integral corresponding to each rate-limited object using the following expression:
[0104] ;
[0105] in, Indicates the newly added value of the points; This represents the ratio of the current virtual machine's specifications to the preset maximum virtual machine specifications. The virtual machine specifications here can be selected from one of the following: number of CPUs, CPU super-resolution ratio, memory size, memory super-resolution ratio, or cloud disk size. For example, considering the number of CPUs in the virtual machine, then... This is the ratio of the number of CPUs in the virtual machine currently being rate-limited to the preset maximum number of CPUs in the virtual machine. This will not be elaborated further in this embodiment. This represents the incremental value of the points corresponding to the maximum virtual machine specification; This represents the ratio of the bandwidth requirement of the current rate-limited object to the preset maximum bandwidth requirement. This represents the incremental value of the integral corresponding to the maximum bandwidth specification; This represents the ratio of the current remaining bandwidth resource usage interval of the current rate-limited object to the preset maximum remaining bandwidth resource usage interval. The upper limit of the current remaining bandwidth resource usage interval of the rate-limited object is the maximum remaining bandwidth resource usage interval. This represents the incremental value of the integral corresponding to the maximum remaining bandwidth resource usage interval; This represents the ratio of the current BPS of the speed limit object to the maximum BPS in its corresponding speed limit group information; This represents the reduction in the integral when BPS reaches its maximum. This represents the ratio of the current CPS of the speed limit object to the maximum CPS in its corresponding speed limit group information; This represents the reduction in the integral when CPS reaches its maximum.
[0106] Based on the above expressions, the larger the virtual machine specification, the larger the purchased bandwidth specification, and the longer the time interval since the last use of remaining bandwidth resources, the faster the bandwidth usage points increase. Conversely, the larger the BPS and CPS of a virtual machine user, the slower the increase in bandwidth usage points. It's understandable that when a virtual machine user purchases a larger virtual machine specification and bandwidth specification, it should be allocated more remaining bandwidth resources. When the virtual machine specification and bandwidth specification are the same, the time interval since the virtual machine user last used remaining bandwidth resources and the current consumption of basic bandwidth resources should be considered. For example, if virtual machine A and virtual machine B with the same virtual machine specification and bandwidth specification compete, and virtual machine A has already consumed remaining bandwidth resources for a period of time, then virtual machine B's remaining bandwidth resource needs should be prioritized. Furthermore, since the rate-limiting group information also includes the maximum CPS rate-limiting configuration parameter, the allocation strategy for remaining bandwidth resources should also consider the CPS of each virtual machine user. When there is a large number of new connections but a low number of bits transmitted per second, computing resources are heavily consumed, and bandwidth processing capacity is relatively reduced. Therefore, allocating remaining bandwidth resources can allow for a higher CPS.
[0107] Furthermore, by adding the calculated incremental values of each integral to the current bandwidth usage integral of the rate-limited group, the bandwidth usage integral can be increased.
[0108] As a preferred embodiment, the method specifically reduces the bandwidth usage integral through the following steps:
[0109] When it is detected that at least one elastic rate limiting object in the target rate limiting group is using the current remaining bandwidth resources, the remaining bandwidth resource usage information of each elastic rate limiting object in the target rate limiting group is obtained;
[0110] Based on the remaining bandwidth resource usage information of each elastic rate limiting object, determine the integral reduction value corresponding to each elastic rate limiting object;
[0111] Based on each of the stated reduction values, the bandwidth usage points of the target rate-limited group are reduced.
[0112] Specifically, when it is detected that the current network load of at least one rate-limiting object in the target rate-limiting group is greater than the rate-limiting configuration parameter, it is determined that there is at least one elastic rate-limiting object in the target rate-limiting group that is using the current remaining bandwidth resources. In this embodiment, the reduction of bandwidth usage points is affected by the remaining bandwidth resource usage information of the rate-limited object. It can be understood that, based on the basic rate-limiting configuration parameters in the initial target rate-limiting group information and the modified rate-limiting configuration parameters in the adjusted target rate-limiting group information, it is possible to clearly identify the network load and maximum elastic rate-limiting configuration parameters of each rate-limited object during actual operation that exceed the basic rate-limiting configuration parameters. The network load exceeding the basic rate-limiting configuration parameters is the difference between the current network load of the rate-limited object and the basic rate-limiting configuration parameters. For example, BPS is one of the network load parameters. If the maximum BPS in the initial target rate-limiting group information is 200Mbps, and the current BPS of the rate-limited object is 250Mbps, then the BPS exceeding the basic rate-limiting configuration parameters is 50Mbps. The maximum elastic rate-limiting configuration parameter is the difference between the modified rate-limiting configuration parameters and the basic rate-limiting configuration parameters. For example, if the maximum BPS in the initial target rate-limiting group information is 200Mbps, and the maximum BPS in the adjusted target rate-limiting group information is 300Mbps, then the maximum elastic BPS is 100Mbps. Based on the network load exceeding the basic rate limit configuration parameters and the maximum elastic rate limit configuration parameters for each rate-limited object, it is possible to clearly determine its remaining bandwidth resource usage information.
[0113] Furthermore, based on the remaining bandwidth resource usage information of each elastic rate-limiting object, this embodiment determines the integral reduction value corresponding to each elastic rate-limiting object through the following expression:
[0114] ;
[0115] in, This indicates the decrease in the integral value; This represents the preset reduction in the base integral. This represents the ratio of the portion of BPS exceeding the basic speed limit configuration parameters of the current speed-limited object to the maximum elastic BPS; This represents the integral reduction value corresponding to the maximum elastic BPS when the BPS exceeds the basic speed limit configuration parameters; This represents the ratio of the percentage of PPS exceeding the basic speed limit configuration parameters for the current speed-limited object to the maximum elastic PPS. This represents the integral reduction value corresponding to the maximum elastic PPS when the PPS exceeds the basic speed limit configuration parameters. This represents the ratio of the CPS (Cost Per Second) of the current speed-limited object exceeding the basic speed-limit configuration parameters to the maximum elastic CPS. This represents the integral reduction value corresponding to the maximum elastic CPS when the CPS exceeds the basic speed limit configuration parameters.
[0116] Based on the above expression, the more BPS, PPS, and CPS a virtual machine user uses that exceed the basic rate limit configuration parameters, the greater the corresponding points will be required.
[0117] Furthermore, by using the calculated reduction values of each integral to consume the current bandwidth usage integral of the target rate-limiting group, it is possible to reduce the bandwidth usage integral until it is reduced to 0 or the target rate-limiting group stops using the current remaining bandwidth resources.
[0118] Please see Figure 2 A second aspect of the present invention provides a rate limiting configuration device 100 for a virtual switch, comprising:
[0119] The rate-limiting group information generation module 11 is used to generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object;
[0120] The rate limiting configuration module 12 is used to send the rate limiting group information to the virtual switch to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate limiting group information.
[0121] As a preferred embodiment, the rate-limiting group information generation module 11 is used to generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user, specifically including:
[0122] Based on the bandwidth requirement information of each virtual machine user, determine the required bandwidth specifications of each virtual machine user and its corresponding required bandwidth object;
[0123] Based on the required bandwidth specification, determine the rate limiting configuration parameters corresponding to the required bandwidth specification;
[0124] Based on the bandwidth demand object, determine the rate limiting object corresponding to each bandwidth demand specification;
[0125] At least one rate-limiting object corresponding to the same bandwidth requirement is bound to the rate-limiting configuration parameter corresponding to the same bandwidth requirement to generate the rate-limiting group information; wherein, each rate-limiting object in the rate-limiting group information is of the same type.
[0126] As a preferred embodiment, the rate-limiting group information generation module 11 is used to determine the rate-limiting configuration parameters corresponding to the required bandwidth specifications based on the required bandwidth specifications, specifically including:
[0127] When the bandwidth requirement object is a virtual private cloud, the rate limiting configuration parameters of the virtual private cloud are determined according to the bandwidth requirement specifications of the virtual private cloud.
[0128] Based on the number of virtual machines on each computing node of the virtual private cloud and the rate limiting configuration parameters, determine the node rate limiting configuration parameters corresponding to each computing node.
[0129] The type of the rate-limiting object is the rate-limiting group information corresponding to the virtual private cloud type, which includes the rate-limiting configuration parameters of each virtual private cloud and the node rate-limiting configuration parameters.
[0130] As a preferred embodiment, the rate limiting configuration module 12 is used to send the rate limiting group information to the virtual switch, so as to instruct the virtual switch to perform network rate limiting on each of the virtual machine users based on the rate limiting group information, specifically including:
[0131] The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to create a token bucket based on the rate-limiting group information; the token bucket is used to limit the network bandwidth of the virtual machine user.
[0132] As a preferred embodiment, the device further includes a remaining bandwidth resource allocation module, used for:
[0133] When it is detected that there are remaining bandwidth resources and the current network load of at least one target rate-limiting object reaches the rate-limiting configuration parameter, the bandwidth usage points of the target rate-limiting group corresponding to each target rate-limiting object are obtained; wherein, the bandwidth usage points decrease when the rate-limiting object in the rate-limiting group uses the remaining bandwidth resources, and increase when all rate-limiting objects in the rate-limiting group do not use the remaining bandwidth resources.
[0134] Based on the bandwidth usage score of the target rate-limiting group, the remaining bandwidth resources are allocated to each of the target rate-limiting objects.
[0135] As a preferred embodiment, the remaining bandwidth resource allocation module is used to allocate the current remaining bandwidth resources to each of the target rate-limiting objects based on the bandwidth usage points of the target rate-limiting group, specifically including:
[0136] Based on the current remaining bandwidth resources, adjust the target rate limiting group information corresponding to the target rate limiting group with the highest bandwidth usage points, and send the adjusted target rate limiting group information to the virtual switch;
[0137] When it is detected that the target rate limiting group after the current target rate limiting group information adjustment has stopped using the remaining bandwidth or the bandwidth usage score of the target rate limiting group after the target rate limiting group information adjustment is 0, the adjusted target rate limiting group information is restored to the initial target rate limiting group information, and the initial target rate limiting group information is sent to the virtual switch.
[0138] Repeat the aforementioned steps until the number of the target speed limit groups is 0.
[0139] As a preferred embodiment, the remaining bandwidth resource allocation module specifically detects whether the current network load of the rate-limiting object has reached the rate-limiting configuration parameters through the following steps:
[0140] If the rate-limiting target is the virtual private cloud, then obtain the current network load of at least one virtual machine on each computing node of the virtual private cloud.
[0141] When the current network load of all virtual machines on any compute node reaches the node rate limiting configuration parameter corresponding to any compute node, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is taken as the target rate limiting object.
[0142] If the rate-limiting object is not the virtual private cloud, then obtain the current network load of at least one virtual machine corresponding to the rate-limiting object;
[0143] When the current network load of all virtual machines reaches the rate limiting configuration parameter corresponding to the rate limiting object, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is used as the target rate limiting object.
[0144] As a preferred embodiment, the remaining bandwidth resource allocation module increases the bandwidth usage points through the following steps:
[0145] When it is detected that all rate-limited objects in the rate-limiting group are not using the remaining bandwidth resources, obtain the cloud resource information, current network load, and current remaining bandwidth resource usage interval for each rate-limited object in the rate-limiting group;
[0146] Based on the cloud resource information, current network load, and current remaining bandwidth resource usage interval of each of the rate-limited objects, determine the additional points value corresponding to each of the rate-limited objects;
[0147] The bandwidth usage points of the rate-limited group are increased according to the newly added value of each of the aforementioned points; wherein the initial value of the bandwidth usage points is 0.
[0148] As a preferred embodiment, the remaining bandwidth resource allocation module reduces the bandwidth usage points through the following steps:
[0149] When it is detected that at least one elastic rate limiting object in the target rate limiting group is using the current remaining bandwidth resources, the remaining bandwidth resource usage information of each elastic rate limiting object in the target rate limiting group is obtained;
[0150] Based on the remaining bandwidth resource usage information of each elastic rate limiting object, determine the integral reduction value corresponding to each elastic rate limiting object;
[0151] Based on each of the stated reduction values, the bandwidth usage points of the target rate-limited group are reduced.
[0152] The virtual switch speed limiting configuration device 100 provided in this embodiment of the invention can integrate various types of speed limiting configuration parameters for different speed limiting objects by generating speed limiting group information, and realize unified speed limiting configuration for virtual switches, thereby ensuring the timeliness of speed limiting configuration distribution to virtual switches.
[0153] Please see Figure 3 The third aspect of the present invention provides an electronic device 200, including a memory 22, a processor 21, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the speed limiting configuration method of the virtual switch described in any embodiment of the first aspect.
[0154] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device 200.
[0155] The electronic device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 200 and does not constitute a limitation on the electronic device 200. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the electronic device 200 may also include input / output devices, network access devices, buses, etc.
[0156] The processor 21 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 21 can be any conventional processor 21. The processor 21 is the control center of the electronic device 200, connecting various parts of the electronic device 200 via various interfaces and lines.
[0157] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements various functions of the electronic device 200 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0158] A fourth aspect of the present invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the rate-limiting configuration method for a virtual switch as described in any embodiment of the first aspect.
[0159] A fifth aspect of the present invention provides a computer program product, including a computer program / instructions, wherein when the computer program / instructions are executed by a processor, the steps of the rate limiting configuration method for a virtual switch as described in any embodiment of the first aspect are implemented.
[0160] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0161] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for configuring rate limiting on a virtual switch, characterized in that, include: Based on the bandwidth demand information of each virtual machine user, at least one rate-limiting group information is generated; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object; The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate-limiting group information. Specifically, generating at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user includes: Based on the bandwidth requirement information of each virtual machine user, determine the bandwidth requirement specifications of each virtual machine user and its corresponding bandwidth requirement object; Based on the required bandwidth specification, determine the rate limiting configuration parameters corresponding to the required bandwidth specification; Based on the bandwidth demand object, determine the rate limiting object corresponding to each bandwidth demand specification; At least one rate-limiting object corresponding to the same bandwidth requirement is bound to the rate-limiting configuration parameter corresponding to the same bandwidth requirement to generate the rate-limiting group information; wherein, each rate-limiting object in the rate-limiting group information is of the same type.
2. The rate limiting configuration method for a virtual switch as described in claim 1, characterized in that, The step of determining the rate limiting configuration parameters corresponding to the required bandwidth specifications specifically includes: When the bandwidth requirement object is a virtual private cloud, the rate limiting configuration parameters of the virtual private cloud are determined according to the bandwidth requirement specifications of the virtual private cloud. Based on the number of virtual machines on each computing node of the virtual private cloud and the rate limiting configuration parameters, determine the node rate limiting configuration parameters corresponding to each computing node. The type of the rate-limiting object is the rate-limiting group information corresponding to the virtual private cloud type, which includes the rate-limiting configuration parameters of each virtual private cloud and the node rate-limiting configuration parameters.
3. The rate limiting configuration method for a virtual switch as described in claim 1, characterized in that, The step of sending the rate-limiting group information to the virtual switch to instruct the virtual switch to perform network rate limiting on each virtual machine user based on the rate-limiting group information specifically includes: The rate-limiting group information is sent to the virtual switch to instruct the virtual switch to create a token bucket based on the rate-limiting group information; the token bucket is used to limit the network bandwidth of the virtual machine user.
4. The rate limiting configuration method for a virtual switch as described in claim 2, characterized in that, The method further includes: When it is detected that there are remaining bandwidth resources and the current network load of at least one target rate-limiting object reaches the rate-limiting configuration parameter, the bandwidth usage points of the target rate-limiting group corresponding to each target rate-limiting object are obtained; wherein, the bandwidth usage points decrease when the rate-limiting object in the rate-limiting group uses the remaining bandwidth resources, and increase when all rate-limiting objects in the rate-limiting group do not use the remaining bandwidth resources. Based on the bandwidth usage score of the target rate-limiting group, the remaining bandwidth resources are allocated to each of the target rate-limiting objects.
5. The rate limiting configuration method for a virtual switch as described in claim 4, characterized in that, The step of allocating the remaining bandwidth resources to each of the target rate-limiting objects based on the bandwidth usage points of the target rate-limiting group specifically includes: Based on the current remaining bandwidth resources, adjust the target rate limiting group information corresponding to the target rate limiting group with the highest bandwidth usage points, and send the adjusted target rate limiting group information to the virtual switch; When it is detected that the target rate limiting group after the current target rate limiting group information adjustment has stopped using the remaining bandwidth or the bandwidth usage score of the target rate limiting group after the target rate limiting group information adjustment is 0, the adjusted target rate limiting group information is restored to the initial target rate limiting group information, and the initial target rate limiting group information is sent to the virtual switch. Repeat the aforementioned steps until the number of the target speed limit groups is 0.
6. The rate limiting configuration method for a virtual switch as described in claim 4, characterized in that, The method specifically detects whether the current network load of the rate-limiting object has reached the rate-limiting configuration parameter through the following steps: If the rate-limiting target is the virtual private cloud, then obtain the current network load of at least one virtual machine on each computing node of the virtual private cloud. When the current network load of all virtual machines on any compute node reaches the node rate limiting configuration parameter corresponding to any compute node, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is taken as the target rate limiting object. If the rate-limiting object is not the virtual private cloud, then obtain the current network load of at least one virtual machine corresponding to the rate-limiting object; When the current network load of all virtual machines reaches the rate limiting configuration parameter corresponding to the rate limiting object, it is determined that the current network load of the rate limiting object has reached the rate limiting configuration parameter, and the rate limiting object is used as the target rate limiting object.
7. The rate limiting configuration method for a virtual switch as described in claim 4, characterized in that, The method specifically increases the bandwidth usage integral through the following steps: When it is detected that all rate-limited objects in the rate-limiting group are not using the remaining bandwidth resources, obtain the cloud resource information, current network load, and current remaining bandwidth resource usage interval for each rate-limited object in the rate-limiting group; Based on the cloud resource information, current network load, and current remaining bandwidth resource usage interval of each of the rate-limited objects, determine the additional points value corresponding to each of the rate-limited objects; The bandwidth usage points of the rate-limited group are increased according to the newly added value of each of the aforementioned points; wherein the initial value of the bandwidth usage points is 0.
8. The rate limiting configuration method for a virtual switch as described in claim 4, characterized in that, The method specifically reduces the bandwidth usage integral through the following steps: When it is detected that at least one elastic rate limiting object in the target rate limiting group is using the current remaining bandwidth resources, the remaining bandwidth resource usage information of each elastic rate limiting object in the target rate limiting group is obtained; Based on the remaining bandwidth resource usage information of each elastic rate limiting object, determine the integral reduction value corresponding to each elastic rate limiting object; Based on each of the stated reduction values, the bandwidth usage points of the target rate-limited group are reduced.
9. A rate-limiting configuration device for a virtual switch, characterized in that, include: A rate-limiting group information generation module is used to generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user; wherein, the rate-limiting group information includes rate-limiting configuration parameters corresponding to the bandwidth demand information and at least one rate-limiting object; The rate limiting configuration module is used to send the rate limiting group information to the virtual switch, so as to instruct the virtual switch to limit the network speed of each virtual machine user based on the rate limiting group information; The rate-limiting group information generation module is used to generate at least one rate-limiting group information based on the bandwidth demand information of each virtual machine user, specifically including: Based on the bandwidth requirement information of each virtual machine user, determine the bandwidth requirement specifications of each virtual machine user and its corresponding bandwidth requirement object; Based on the required bandwidth specification, determine the rate limiting configuration parameters corresponding to the required bandwidth specification; Based on the bandwidth demand object, determine the rate limiting object corresponding to each bandwidth demand specification; At least one rate-limiting object corresponding to the same bandwidth requirement is bound to the rate-limiting configuration parameter corresponding to the same bandwidth requirement to generate the rate-limiting group information; wherein, each rate-limiting object in the rate-limiting group information is of the same type.
10. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the rate-limiting configuration method for the virtual switch according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the rate-limiting configuration method of the virtual switch according to any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the steps of the rate limiting configuration method for a virtual switch as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Traffic speed limiting and information configuration method, routing node, system and storage medium
CN113315671A
Virtual machine speed limiting method, device and equipment and computer storage medium
CN113326097A