CN114465956B - Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium - Google Patents
Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114465956B CN114465956B CN202210373381.2A CN202210373381A CN114465956B CN 114465956 B CN114465956 B CN 114465956B CN 202210373381 A CN202210373381 A CN 202210373381A CN 114465956 B CN114465956 B CN 114465956B
- Authority
- CN
- China
- Prior art keywords
- network card
- identifier
- virtual network
- virtual machine
- speed limit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure provides a method and a device for limiting virtual machine flow, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: receiving a virtual machine speed limit strategy updating request sent by a client, wherein the speed limit strategy updating request comprises a first virtual machine identifier and first speed limit information; determining an identifier of a first virtual network card associated with the identifier of the first virtual machine; and sending a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, wherein the speed limit configuration instruction comprises the identifier of the first virtual network card and the first speed limit information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow rate limit requirements of the virtual machines exist, the virtual machines are taken as units, and the multiple virtual network cards associated with the virtual machines can be subjected to rate limit adjustment, so that the complexity of flow rate limit of the virtual machines is reduced, and the flow rate limit process of the virtual machines is simplified.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for limiting a flow rate of a virtual machine, an electronic device, and a storage medium.
Background
With the development of computer technology, virtual machines are increasingly widely used. In the related art, the speed of the traffic passing through the network card may be limited based on a speed limit policy of a granularity of a single virtual network card. One virtual machine can be provided with a plurality of virtual network cards, and if the speed of the flow flowing through the virtual machine is to be limited, all the virtual network cards under the virtual machine need to be configured with corresponding speed-limiting strategies, so that the complexity of flow speed limitation of the virtual machine is increased. Therefore, how to reduce the complexity of limiting the flow rate of the virtual machine becomes a problem to be solved urgently at present.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a method for limiting a flow rate of a virtual machine, including:
receiving a virtual machine speed limit strategy updating request sent by a client, wherein the speed limit strategy updating request comprises a first virtual machine identifier and first speed limit information;
determining an identifier of a first virtual network card associated with the identifier of the first virtual machine;
and sending a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, wherein the speed limit configuration instruction comprises the identifier of the first virtual network card and the first speed limit information.
An embodiment of a second aspect of the present disclosure provides a method for limiting a virtual machine flow rate, including:
receiving a virtual network card speed-limiting configuration instruction sent by a server, wherein the speed-limiting configuration instruction comprises an identifier and speed-limiting information of a first virtual network card;
and updating the speed limit strategy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information.
An embodiment of a third aspect of the present disclosure provides a device for limiting a virtual machine flow rate, including:
the receiving module is used for receiving a virtual machine speed limit strategy updating request sent by a client, wherein the speed limit strategy updating request comprises a first virtual machine identifier and first speed limit information;
the determining module is used for determining the identifier of the first virtual network card associated with the identifier of the first virtual machine;
and the sending module is configured to send a virtual network card speed limit configuration instruction to the VPC gateway vgw of the private network on the cloud, where the speed limit configuration instruction includes an identifier of the first virtual network card and the first speed limit information.
An embodiment of a fourth aspect of the present disclosure provides a device for limiting a virtual machine flow rate, including:
the receiving module is used for receiving a virtual network card speed-limiting configuration instruction sent by a server, wherein the speed-limiting configuration instruction comprises an identifier of a first virtual network card and speed-limiting information;
and the updating module is used for updating the speed limit strategy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information.
An embodiment of a fifth aspect of the present disclosure provides an electronic device, including: the device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the processor executes the program, the method for limiting the flow rate of the virtual machine as provided in the embodiment of the first aspect of the disclosure is realized, or the method for limiting the flow rate of the virtual machine as provided in the embodiment of the second aspect of the disclosure is realized.
An embodiment of a sixth aspect of the present disclosure provides a non-transitory computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements a method for limiting a flow rate of a virtual machine as set forth in the embodiment of the first aspect of the present disclosure, or implements a method for limiting a flow rate of a virtual machine as set forth in the embodiment of the second aspect of the present disclosure.
A seventh aspect of the present disclosure provides a computer program product, where when executed by an instruction processor in the computer program product, the method for limiting the virtual machine traffic speed provided in the first aspect of the present disclosure is performed, or the method for limiting the virtual machine traffic speed provided in the second aspect of the present disclosure is performed.
The method, the device, the electronic device and the storage medium for limiting the flow speed of the virtual machine can firstly receive a virtual machine speed limiting strategy updating request sent by a client, wherein the speed limiting strategy updating request comprises a first virtual machine identifier and first speed limiting information, then the identifier of a first virtual network card associated with the first virtual machine identifier is determined, and then a virtual network card speed limiting configuration instruction can be sent to a private network VPC gateway vgw on the cloud, wherein the speed limiting configuration instruction comprises the identifier of the first virtual network card and the first speed limiting information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow rate limit requirements of the virtual machines exist, the virtual machines are taken as units, and the multiple virtual network cards associated with the virtual machines can be subjected to rate limit adjustment, so that the complexity of flow rate limit of the virtual machines is reduced, and the flow rate limit process of the virtual machines is simplified.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The above and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a method for limiting a virtual machine traffic rate according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for limiting a virtual machine traffic rate according to an embodiment of the present disclosure;
fig. 2A is a schematic diagram illustrating a flow rate limiting process of a virtual machine according to an embodiment of the disclosure;
fig. 2B is a schematic diagram illustrating a virtual machine flow rate limit hierarchy according to an embodiment of the disclosure;
fig. 2C is a schematic diagram illustrating a flow rate limit of a virtual machine according to an embodiment of the disclosure;
fig. 3 is a flowchart illustrating a method for limiting a virtual machine traffic rate according to an embodiment of the disclosure;
fig. 3A is a schematic diagram of a virtual network card associated with a virtual machine according to an embodiment of the present disclosure;
fig. 3B is a schematic diagram illustrating a flow rate limiting process of a virtual machine according to an embodiment of the disclosure;
fig. 4 is a flowchart illustrating a method for limiting a flow rate of a virtual machine according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a device for limiting a virtual machine traffic rate according to another embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a device for limiting a flow rate of a virtual machine according to another embodiment of the present disclosure;
FIG. 7 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
The method, apparatus, electronic device, and storage medium for limiting virtual machine traffic according to the embodiments of the present disclosure are described below with reference to the accompanying drawings.
The embodiment of the present disclosure is exemplified by the method that the virtual machine flow rate limiting method is configured in a virtual machine flow rate limiting device, and the virtual machine flow rate limiting device may be applied to any electronic device, so that the electronic device may execute a virtual machine flow rate limiting function.
Fig. 1 is a schematic flowchart of a method for limiting a virtual machine traffic rate according to an embodiment of the present disclosure.
As shown in fig. 1, the method for limiting the virtual machine traffic rate may include the following steps:
Generally, the speed limit of the traffic passing through a single virtual network card can be realized based on a speed limit strategy of the granularity of the virtual network card, that is, the speed limit is set on the virtual network card. If the speed limit of the flow flowing through the virtual machine is to be realized, all the virtual network cards under the virtual machine need to be configured with corresponding speed limit strategies, so that the complexity of flow speed limit of the virtual machine is increased.
Therefore, in the embodiment of the present disclosure, if the speed limit of the virtual machine needs to be updated, the speed limit policy of the virtual machine may be adjusted according to the received virtual machine speed limit policy update request.
The style or presentation form of the first virtual machine identifier may be set in advance, for example, may be a virtual machine(s) ((c))virtualmachine,vm) A, vm1, etc., as the present disclosure is not limited thereto.
Optionally, the first speed limit information may include at least one of: the speed limit type and a threshold value corresponding to each speed limit type.
The rate-limiting type may be various, such as a broadcast/multicast rate, a number of packets per second (pps) to be sent, that is, a packet sending rate, and a number of bits per second (bps), where the bps may be referred to as a total traffic.
In addition, bps can be further subdivided, such as: network Address Translation (NAT), Load Balance (LB), Elastic Internet Protocol (EIP), and other routing types. The present disclosure is not limited thereto.
In addition, the threshold corresponding to each speed limit type can be a numerical value set in advance; the speed limit types are different, and the threshold values corresponding to the speed limit types may be the same or may also be different, which is not limited in this disclosure.
For example, by analyzing the received update request of the speed limit policy of the virtual machine, if it is determined that the update request includes "virtual machine 1 and packet sending speed", it may be determined that the first virtual machine identifier is "virtual machine 1" and the first speed limit information is: the "speed of contracting" is limited.
Or, by analyzing the received virtual machine speed limit policy update request, if it is determined that the update request includes "virtual machine 2, m", it may be determined that the first virtual machine identifier is "virtual machine 2" and the first speed limit information is: the flow rate is less than or equal to m.
Or, by analyzing the received virtual machine speed limit policy update request, if it is determined that the update request includes "virtual machine 1, NAT, a", it may be determined that the first virtual machine identifier is "virtual machine 1", and in the first speed limit information: the speed limit type is NAT, and the corresponding flow rate threshold value is a.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the first virtual machine identifier, the first speed limit information, and the like in the implementation of the present disclosure.
The number of the first virtual network card associated with the first virtual machine identifier may be one, or may also be multiple, which is not limited in this disclosure.
It is to be understood that the first virtual network card associated with the first virtual machine identifier may be set in advance, or may also be set by default, and the like, which is not limited in this disclosure.
In addition, the style or presentation form of the identifier of the first virtual network card may be set in advance, and may be, for example: 1. virtual network card 1, virtual network card 02, etc., which are not limited in this disclosure.
Optionally, each first virtual machine identifier and the identifier of the corresponding first virtual network card may be stored in an associated manner in advance, for example, may be stored in a database, so that after the first virtual machine identifier is determined, traversal may be performed in the database to determine the identifier of the first virtual network card associated with the first virtual machine identifier.
For example, if the first virtual machine identifier is "1", the identifiers of the first virtual network card associated with "1" are determined to be "00", "01", "02", respectively, by looking up in the database. Or the first virtual machine is marked as '1', and the mark of the first virtual network card which is associated with '1' is determined as 'a' by searching in the database. The present disclosure is not limited thereto.
Wherein, a private network (VPC) on the cloud can be a customizable logical isolated network space on the public cloud; a VPC gateway (VPC gateway, vgw), which may implement network interconnection above the network layer, etc., and is not limited in this disclosure.
For example, if the speed limit policy update request of the virtual machine is analyzed, the identifier of the first virtual machine included in the speed limit policy update request is determined to be "1", and the first speed limit information is "LB, d", and then the identifier of the first virtual network card associated with the first virtual machine identifier is determined to be "01", "02" by searching for the first virtual machine identifier "1". And then, a virtual network card speed limit configuration instruction can be sent to vgw, wherein the instruction can include "01, 02, LB, d", so that vgw can set the threshold of LB in the "01" or "02" of the virtual network card to d according to the received virtual network card speed limit configuration instruction, thereby realizing the virtual machine flow speed limit.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the first virtual machine identifier, the first speed limit information, the first virtual network card identifier, and the like in the embodiment of the present disclosure.
According to the embodiment of the disclosure, a virtual machine speed limit policy update request sent by a client may be received first, where the speed limit policy update request includes a first virtual machine identifier and first speed limit information, then an identifier of a first virtual network card associated with the first virtual machine identifier is determined, and then a virtual network card speed limit configuration instruction may be sent to the private network VPC gateway vgw on the cloud, where the speed limit configuration instruction includes the identifier of the first virtual network card and the first speed limit information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow rate limit requirements of the virtual machines exist, the virtual machines are taken as units, and the multiple virtual network cards associated with the virtual machines can be subjected to rate limit adjustment, so that the complexity of flow rate limit of the virtual machines is reduced, and the flow rate limit process of the virtual machines is simplified.
Fig. 2 is a flowchart illustrating a method for limiting a virtual machine traffic rate according to an embodiment of the present disclosure. As shown in fig. 2, the method for limiting the virtual machine traffic rate may include the following steps:
Optionally, the first speed limit information may include at least one of: the speed limit type and a threshold value corresponding to each speed limit type.
It should be noted that specific contents and implementation manners of the first speed limit information may refer to descriptions of other embodiments of the disclosure, and are not described herein again.
It can be understood that after the received virtual machine speed limit policy update request is analyzed to determine the first virtual machine identifier and the first speed limit information included therein, the first virtual machine identifier and the first speed limit information may be stored in the database in an associated manner.
For example, if it is determined that the first virtual machine identifier is "1" and the first speed limit information is "LB, d", the "first virtual machine 1" and the "subdivision type LB, speed limit threshold value d" may be stored in the database in association. The present disclosure is not limited thereto.
Optionally, after determining the first virtual machine identifier and the first speed limit information according to the virtual machine speed limit policy update request, the first virtual machine identifier and the first speed limit information may be stored in the database. For the same virtual machine, multiple virtual machine speed limit strategy updating requests may be received, and the first virtual machine identifier and the first speed limit information in the database may be updated and stored in a correlated manner according to the time when the strategy updating requests are received. The present disclosure is not limited thereto.
The association relationship table may be a table or a chart set in advance and storing the association relationship between the virtual machine identifier and the virtual network card identifier, which is not limited in this disclosure.
For example, if the first virtual machine identifier is "2", the identifiers of the virtual network cards associated with "2" are determined to be "00" and "01" respectively by traversing the preset association relationship table of the virtual machine identifier and the virtual network card identifier, and then the identifiers of the first virtual network cards corresponding to the first virtual machine identifier "2" can be determined to be "00" and "01" respectively. The present disclosure is not limited thereto.
It should be noted that, step 202 may be executed first, and then step 203 is executed, or step 203 may be executed first, and then step 202 is executed, or step 202 and step 203 may also be executed at the same time, and the disclosure is not limited thereto.
It can be understood that, if there is one first virtual network card corresponding to the first virtual machine identifier, the flow rate limit may be performed on the first virtual network card through the virtual network card rate limit configuration instruction. If the number of the first virtual network cards corresponding to the first virtual machine identifier is multiple, the flow rate of the multiple first virtual network cards related to the first virtual machine identifier can be limited through one virtual network card speed limit configuration instruction. The present disclosure is not limited thereto.
The method for limiting the virtual machine flow rate can be applied to any virtual machine flow rate limiting scene, and the method is not limited by the disclosure.
The following describes a virtual machine traffic speed-limiting process provided by the present disclosure with reference to a schematic diagram of the virtual machine traffic speed-limiting process shown in fig. 2A.
As shown in fig. 2A, when there is a virtual machine traffic speed limit requirement, the client may send a virtual machine speed limit policy update request to the server, where the update request may include a first virtual machine identifier and first speed limit information. After receiving the virtual machine speed limit strategy updating request, the server can store the first virtual machine identifier and the speed limit record corresponding to the first speed limit information into a database, and then can check whether the speed limit record is successfully stored.
In addition, the server side can traverse the database to determine the identifier of the first virtual network card associated with the identifier of the first virtual machine; and sending a virtual network card speed limit configuration instruction to vgw, so that vgw can receive the identifier of the first virtual network card to be updated and the first speed limit information. In addition, the server side can also return a successful message of creating the flow rate limit of the virtual machine to the client side.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the virtual machine traffic speed limiting process in the embodiment of the present disclosure.
It can be understood that the virtual machine traffic speed limit provided by the present disclosure may be implemented based on three levels of vpc-vm-virtual network cards, and the three-level speed limit diagram may be as shown in fig. 2B. If the first virtual machine identifier is "vm 1" and the associated first virtual network card identifiers are "03, 06", the flow rate limit can be performed on the "03" and "06" virtual network cards associated with the first virtual machine. The present disclosure is not limited thereto.
It can be understood that, if any one first virtual machine is associated with a plurality of first virtual network cards, according to the method for limiting the flow rate of the virtual machine provided by the present disclosure, the flow rate of all the virtual network cards in the virtual machine can be limited by the overall rate-limiting strategy of the virtual machine layer.
For example, by parsing the received virtual machine speed limit policy update request, it is determined that the first virtual machine identifier included therein is "1", the speed limit policy is "packetization rate", and the corresponding threshold value is "m", if the virtual network card associated with the first virtual machine is "01" or "04", respectively, the actual packetization rate m1 of "01" should be less than or equal to "m", and the actual packetization rate m2 of "04" should be less than or equal to "m", and (m 1+ m 2) is less than or equal to m.
Or, as shown in fig. 2C, under the condition of single virtual machine and multiple network cards traffic speed limit, the speed limit type corresponding to the virtual machine may be packet sending speed, broadcast/multicast, total traffic, wherein the total traffic may be further subdivided into: NAT, LB, EIP and other types, and various speed limit types can have corresponding speed limit threshold values. The virtual machine may have a plurality of virtual network cards, for example: a virtual network card 1, a virtual network card 2, a virtual network card 3, a virtual network card n, etc.
It should be noted that the above examples are merely illustrative, and should not be taken as limitations on the manner of limiting the traffic of the virtual machine in the embodiments of the present disclosure.
According to the embodiment of the disclosure, a virtual machine speed limit policy update request sent by a client may be received first, where the speed limit policy update request includes a first virtual machine identifier and first speed limit information, then the first virtual machine identifier and the first speed limit information may be stored in a database in an associated manner, and a preset association relation table of the virtual machine identifier and a virtual network card identifier is traversed to determine an identifier of a first virtual network card associated with the first virtual machine identifier, and then a virtual network card speed limit configuration instruction may be sent to a private proprietary network gateway on the cloud, where the speed limit configuration instruction includes the identifier of the first virtual network card and the first speed limit information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow rate limit requirements of the virtual machines exist, the virtual machines are taken as units, and the multiple virtual network cards associated with the virtual machines can be subjected to rate limit adjustment, so that the complexity of flow rate limit of the virtual machines is reduced, and the flow rate limit process of the virtual machines is simplified. Fig. 3 is a flowchart illustrating a method for limiting a virtual machine traffic rate according to an embodiment of the present disclosure.
As shown in fig. 3, the method for limiting the virtual machine traffic rate may include the following steps:
The identifier or the presentation form of the identifier of the second virtual machine may be set in advance, for example, "virtual machine a", "vm 1", and the like, which is not limited in this disclosure.
In addition, the identifier or the presentation form of the identifier of the second virtual network card may be set in advance, for example, "virtual network card 01", "virtual network card 3", and the like, which is not limited in this disclosure.
It can be understood that, when the virtual network card associated with the virtual machine changes, the client may send a virtual network card update request to the server, so that the server may determine the virtual machine identifier and the virtual network card identifier to be updated according to the received virtual network card update request.
When the virtual machine identifier and the virtual network card identifier are updated, there may be a plurality of situations, for example, the virtual machine identifier and the virtual network card identifier may be unbound or deleted, or may be newly added, and the like.
For example, by analyzing the virtual network card update request, it is determined that the second virtual machine identifier is "virtual machine 3", and the second virtual network card "0" is unbundled, if the preset association table of the virtual machine identifier and the virtual network card identifier indicates that the second virtual network card identifier associated with the "virtual machine 3" is "0", "1", and "2", respectively, and then the second virtual network card "0" associated with the "virtual machine 3" may be deleted, and then the second virtual network card identifier associated with the "virtual machine 3" in the updated association table may be "0" and "1".
Or, the second virtual machine identifier is determined to be the "virtual machine 3" and the "3" of the second virtual network card is added through analyzing the virtual network card updating request. If the second virtual network card identifiers associated with the "virtual machine 3" in the preset association relationship table of the virtual machine identifiers and the virtual network card identifiers are "1" and "2", respectively, the second virtual network card "3" may be added to the association relationship table, and the second virtual network card identifiers associated with the second virtual machine identifier "virtual machine 3" in the updated association relationship table are "1", "2", and "3", respectively.
Alternatively, as shown in the schematic diagram of the virtual network card associated with the virtual machine in fig. 3A, for the "virtual machine 3", the "network card 0" may be deleted or unbundled, and the "network card 3" may be added or bound, as can be seen from fig. 3A, after the virtual machine "3" performs the unbundling and adding operations, the associated second virtual network card identifiers are "1", "2" and "3", respectively.
It should be noted that, the above example is only an illustrative example, and cannot be used as a limitation on the virtual network card update request and the manner of updating the preset association table in the embodiment of the present disclosure.
It can be understood that, if the virtual network card update request is a virtual network card unbinding request, the second virtual network card of the second virtual machine identifier may be unbound in the preset association table of the virtual machine identifier and the virtual network card identifier based on the second virtual machine identifier and the second virtual network card identifier, and then a virtual network card unbinding instruction may be sent to vgw, so that vgw may perform an unbinding operation on the second virtual network card associated with the second virtual machine.
And step 304, acquiring second speed limiting information corresponding to the second virtual machine identifier under the condition that the virtual network card updating request is a virtual network card newly-increased request.
Optionally, the second speed limit information may include at least one of: the speed limit type and the threshold corresponding to each speed limit type are not limited in the disclosure.
The new virtual machine identifier and the corresponding second speed limit information included in the new request can be obtained by analyzing the new request of the virtual network card. The present disclosure is not limited thereto. Or, the second speed limit information corresponding to the second virtual machine identifier may also be acquired by searching in the database.
For example, the second virtual machine identifier is "virtual machine 3", the information associated with "virtual machine 3" is searched in a database storing the virtual machine identifier and the speed limit information in a traversing manner, and if it is determined that the speed limit information corresponding to "virtual machine 3" is: and m is selected. Then it may be determined that the second speed limit information corresponding to "virtual machine 3" is: the velocity is less than or equal to m. The present disclosure is not limited thereto. Or, by analyzing the virtual network card newly-added request, if it is determined that the newly-added request includes "virtual machine 1, packet sending speed", it may be determined that the second virtual machine identifier is "virtual machine 1" and the corresponding second speed limit information is: the "speed of sending a packet" is limited.
Or, by analyzing the virtual network card newly-added request, if it is determined that the newly-added request includes "virtual machine 1, NAT, d", it may be determined that the second virtual machine identifier is "virtual machine 1" and the corresponding second speed limit information: the speed limit type is NAT, and the corresponding threshold value is d.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the second virtual machine identifier, the second speed limit information, and the like in the implementation of the present disclosure.
And 305, sending a virtual network card speed limit configuration instruction to vgw, wherein the speed limit configuration instruction includes a second virtual network card identifier and second speed limit information.
For example, if the new request for the virtual network card is analyzed to determine that the new request includes "vm 1" and "virtual network card 01", it may be determined that the second virtual machine identifier is "vm 1" and the second virtual network card identifier is "virtual network card 01". If the corresponding second speed limit information is determined to be: a threshold value d. A virtual network card speed limit configuration instruction containing "virtual network card 01 and threshold d" may be sent to vgw, so that vgw may know the identifier of the second virtual network card and the second speed limit information.
It should be noted that the above example is only an illustrative example, and cannot be used as a limitation on the second virtual network card identifier, the second speed limit information, and the like in the embodiment of the present disclosure.
Or, by analyzing the virtual network card newly-added request, if it is determined that the newly-added request includes "virtual machine 1, NAT, d", it may be determined that the second virtual machine identifier is "virtual machine 1" and the corresponding second speed limit information: the speed limit type is NAT, and the corresponding threshold value is d.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the second virtual machine identifier, the second speed limit information, and the like in the implementation of the present disclosure.
The following describes a flow rate limiting process of the virtual machine provided by the present disclosure, taking a virtual network card update request as an add-on request as an example.
Fig. 3B is a schematic diagram of a flow rate limiting process of a virtual machine according to an embodiment of the present disclosure;
as shown in fig. 3B, the client may send a virtual network card adding request to the server, where the updating request may include a second virtual machine identifier and a second virtual network card identifier. After receiving the virtual network card update request, the server may store the second virtual machine identifier and the second virtual network card identifier in the database. Then, the server may send a virtual network card update instruction to vgw, so that vgw may update the virtual network card associated with the second virtual machine according to the identifier of the second virtual machine and the identifier of the second virtual network card.
In addition, the server may also check whether the second virtual machine has corresponding second speed limit information, and if so, may send a virtual network card speed limit configuration instruction, so that vgw may update the speed limit information of the newly added virtual network card. In addition, the server can also return and display the information of successful virtual network card addition to the client.
It should be noted that the above example is only an illustrative example, and cannot be taken as a limitation on the virtual machine traffic speed limiting process in the embodiment of the present disclosure.
According to the embodiment of the disclosure, a virtual network card update request may be received first, then, an association table between a preset virtual machine identifier and a virtual network card identifier may be updated based on a second virtual machine identifier and the second virtual network card identifier, a virtual network card unbinding instruction is sent to vgw when the virtual network card update request is a virtual network card unbinding request, second speed limit information corresponding to the second virtual machine identifier is obtained when the virtual network card update request is a virtual network card newly-adding request, and a virtual network card speed limit configuration instruction is sent to vgw. Therefore, by analyzing the virtual network card updating request, the updating requirement of the virtual network card associated with the virtual machine can be determined, and then the corresponding updating instruction can be sent to vgw, so that the virtual network card associated with the virtual machine can be updated, the complexity of updating the virtual network card is reduced, the updating of the virtual network card is simpler and easier, the perception interference caused to a user is reduced, the user experience is improved, and the operation of the user is facilitated.
Fig. 4 is a flowchart illustrating a method for limiting a flow rate of a virtual machine according to an embodiment of the present disclosure. As shown in fig. 4, the method for limiting the flow rate of the virtual machine may include the following steps:
step 401, receiving a virtual network card speed limit configuration instruction sent by a server, wherein the speed limit configuration instruction includes an identifier of a first virtual network card and speed limit information.
Vgw may determine the identifier and the speed limit information of the first virtual network card included therein by analyzing the received virtual network card speed limit configuration instruction sent by the server.
Optionally, the speed limit information may include at least one of: the speed limit type and a threshold value corresponding to each speed limit type.
For example, vgw analyzes the received virtual network card speed limit configuration command sent by the server to determine that "vm 03, n" is included, it may be determined that the identifier of the first virtual network card is "vm 03" and the corresponding speed limit information "speed is less than or equal to n".
For example, vgw analyzes the received speed limit configuration instruction of the virtual network card sent by the server to determine that the received speed limit configuration instruction includes "vm 02, vm03 and NAT", and then may determine that the identifier of the first virtual network card is "vm 02, vm 03" and the corresponding speed limit information "limit the NAT".
It should be noted that the above example is only an illustrative example, and cannot be used as a limitation on the identification of the first virtual network card, the speed limit information, and the like in the embodiment of the present disclosure.
And 402, updating the speed limit strategy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information.
It can be understood that vgw, after receiving the virtual network card speed-limiting configuration instruction sent by the server, may determine the first virtual network card identifier and the speed-limiting information included in the speed-limiting configuration instruction by analyzing the virtual network card speed-limiting configuration instruction, and may then update the speed-limiting policy of the first virtual network card.
For example, if the identifier of the first virtual network card is "vm 1" and the speed limit information is "n", the speed limit policy of the first virtual network card may be updated, for example, the speed limit threshold of the first virtual network card "vm 1" is updated to "n".
It should be noted that the above example is only an illustrative example, and cannot be used as a limitation on the identifier of the first virtual network card, the speed limit information, and the like in the embodiment of the present disclosure.
It can be understood that the association relationship between the virtual machine and the virtual network card can also be updated.
Optionally, a virtual network card update instruction sent by the server may be received first, where the update instruction includes the target virtual machine identifier and the second virtual network card identifier, and then the virtual network card associated with the target virtual machine identifier may be updated according to the second virtual network card identifier.
When the virtual network card of the virtual machine needs to be deleted or added, a virtual network card update instruction may be sent to vgw, so that the vgw may determine the corresponding target virtual machine identifier and the second virtual network card identifier by analyzing the received virtual network card update instruction sent by the server.
In addition, the style or presentation form identified by the target virtual machine may be set in advance, for example, the style or presentation form may be: virtual machine 1, vm2, etc., to which this disclosure is not limited.
In addition, the style or presentation form of the identifier of the second virtual network card may be set in advance, for example, the style or presentation form may be as follows: a second virtual network card 1, a virtual network card 02, etc., which are not limited in this disclosure.
Optionally, the virtual network card update instruction may be multiple, for example, the virtual network card update instruction may be a virtual network card unbinding instruction, or may also be a virtual network card adding instruction, and the like, which is not limited in this disclosure.
For example, by analyzing the virtual network card update instruction sent by the server, it is determined that the target virtual machine identifier included in the virtual network card update instruction is "vm 1" and the second virtual network card identifier is "03", and if the virtual network card associated with the current target virtual machine "vm 1" does not include the second virtual network card "03", the "vm 1" and the second virtual network card "03" may be bound, so that the updated virtual network card associated with the "vm 1" includes the second virtual network card "03".
Or analyzing the virtual network card update instruction sent by the server to determine that the update instruction is a unbinding instruction, and if the target virtual machine identifier contained in the unbinding instruction is "vm 1" and the second virtual network card identifier contained in the unbinding instruction is "01", unbinding the target virtual machine "vm 1" and the second virtual network card "01", so that the updated "vm 1" and the second virtual network card "01" are disassociated.
Or, the update instruction sent by the server is analyzed to determine that the update instruction is a new instruction, and if the target virtual machine identifier included in the update instruction is "vm 2" and the second virtual network card identifier is "03", the target virtual machine "vm 2" and the second virtual network card "03" may be bound, so that the second virtual network card "03" is the new virtual network card associated with the target virtual machine "vm 2".
It should be noted that, the foregoing examples are only illustrative, and cannot be used as limitations on the second virtual network card identifier, the target virtual machine identifier, and the like in the embodiments of the present disclosure.
Therefore, in the embodiment of the disclosure, the virtual network card updating instruction sent by the server may be received first, and then the virtual network card associated with the target virtual machine identifier is updated according to the second virtual network card identifier, so that the virtual network card associated with the virtual machine may be updated, the complexity of updating the virtual network card associated with the virtual machine is reduced, and the complexity of limiting the flow rate of the virtual machine is also reduced.
According to the embodiment of the disclosure, a virtual network card speed-limiting configuration instruction sent by a server side can be received first, wherein the speed-limiting configuration instruction includes an identifier of a first virtual network card and speed-limiting information, and then a speed-limiting strategy of the first virtual network card corresponding to the identifier of the first virtual network card can be updated based on the speed-limiting information. Therefore, the speed-limiting strategy of the virtual network card can be updated according to the identification and the speed-limiting information of the virtual network card, so that the flow speed limitation of the virtual machine associated with the virtual network card is realized, the complexity of the flow speed limitation of the virtual machine is reduced, and the flow speed-limiting process of the virtual machine is simplified.
In order to implement the above embodiment, the present disclosure further provides a device for limiting the flow rate of the virtual machine.
Fig. 5 is a schematic structural diagram of a device for limiting a virtual machine traffic speed according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 for limiting a virtual machine traffic speed may include: a receiving module 510, a determining module 520, and a sending module 530.
The receiving module 510 is configured to receive a virtual machine speed limit policy update request sent by a client, where the speed limit policy update request includes a first virtual machine identifier and first speed limit information.
A determining module 520, configured to determine an identifier of the first virtual network card associated with the identifier of the first virtual machine.
A sending module 530, configured to send a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, where the speed limit configuration instruction includes the identifier of the first virtual network card and the first speed limit information.
Optionally, the determining module 520 is further configured to:
and storing the first virtual machine identifier and the first speed limit information into a database in a correlation mode.
Optionally, the determining module 520 is specifically configured to:
and traversing a preset association relation table of virtual machine identifications and virtual network card identifications to determine the identification of the first virtual network card associated with the first virtual machine identification.
Optionally, the system further includes an update module, configured to:
receiving a virtual network card updating request, wherein the updating request comprises a second virtual machine identifier and a second virtual network card identifier;
and updating the association relation table of the preset virtual machine identifier and the virtual network card identifier based on the second virtual machine identifier and the second virtual network card identifier.
Optionally, the update module is further configured to:
and sending a virtual network card unbinding instruction to the vgw when the update request is a virtual network card unbinding request, wherein the unbinding instruction includes the second virtual machine identifier and the second virtual network card identifier.
Optionally, the update module is further configured to:
under the condition that the updating request is a virtual network card newly-adding request, acquiring second speed-limiting information corresponding to the second virtual machine identifier;
and sending a virtual network card speed limit configuration instruction to the vgw, wherein the speed limit configuration instruction comprises the second virtual network card identifier and the second speed limit information.
Optionally, the speed limit information includes at least one of the following: the speed limit types and the threshold corresponding to each speed limit type.
The functions and specific implementation principles of the modules in the embodiments of the present disclosure may refer to the embodiments of the methods, and are not described herein again.
The device for limiting the virtual machine flow speed according to the embodiment of the present disclosure may first receive a virtual machine speed limit policy update request sent by a client, where the speed limit policy update request includes a first virtual machine identifier and first speed limit information, then determine an identifier of a first virtual network card associated with the first virtual machine identifier, and then send a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, where the speed limit configuration instruction includes the identifier of the first virtual network card and the first speed limit information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow rate limit requirements of the virtual machines exist, the virtual machines are taken as units, and the multiple virtual network cards associated with the virtual machines can be subjected to rate limit adjustment, so that the complexity of flow rate limit of the virtual machines is reduced, and the flow rate limit process of the virtual machines is simplified.
Fig. 6 is a schematic structural diagram of a device for limiting a virtual machine traffic speed according to an embodiment of the present disclosure.
As shown in fig. 6, the apparatus 600 for limiting a virtual machine traffic speed may include: a receiving module 610 and an updating module 620.
The receiving module 610 is configured to receive a virtual network card speed-limiting configuration instruction sent by a server, where the speed-limiting configuration instruction includes an identifier of a first virtual network card and speed-limiting information.
And the updating module 620 is configured to update the speed limit policy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information.
Optionally, the receiving module is further configured to receive a virtual network card update instruction sent by the server, where the update instruction includes a target virtual machine identifier and a second virtual network card identifier;
and the updating module is further used for updating the virtual network card associated with the target virtual machine identifier according to the second virtual network card identifier.
Optionally, the speed limit information includes at least one of the following: the speed limit type and a threshold value corresponding to each speed limit type.
The functions and specific implementation principles of the modules in the embodiments of the present disclosure may refer to the embodiments of the methods, and are not described herein again.
The device for limiting the flow rate of the virtual machine in the embodiment of the disclosure may first receive a virtual network card rate-limiting configuration instruction sent by a server, where the rate-limiting configuration instruction includes an identifier of a first virtual network card and rate-limiting information, and then may update a rate-limiting policy of the first virtual network card corresponding to the identifier of the first virtual network card based on the rate-limiting information. Therefore, the speed-limiting strategy of the virtual network card can be updated according to the identification and the speed-limiting information of the virtual network card, so that the flow speed limitation of the virtual machine associated with the virtual network card is realized, the complexity of the flow speed limitation of the virtual machine is reduced, and the flow speed-limiting process of the virtual machine is simplified.
In order to implement the above embodiment, the present disclosure further provides an electronic device, including: the virtual machine traffic speed limiting method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the processor executes the program, the virtual machine traffic speed limiting method is realized according to the embodiment of the disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing a computer program, which when executed by a processor implements the method for limiting the flow rate of the virtual machine according to the foregoing embodiments of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which when executed by an instruction processor in the computer program product, performs the method for limiting the flow rate of the virtual machine according to the foregoing embodiments of the present disclosure.
FIG. 7 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device 12 shown in fig. 7 is only an example and should not bring any limitations to the function and scope of use of the disclosed embodiments.
As shown in fig. 7, electronic device 12 is in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
According to the technical scheme, a virtual machine speed-limiting strategy updating request sent by a client side can be received, wherein the speed-limiting strategy updating request comprises a first virtual machine identifier and first speed-limiting information, then the identifier of a first virtual network card associated with the first virtual machine identifier is determined, and then a virtual network card speed-limiting configuration instruction can be sent to a private network VPC gateway vgw on the cloud, wherein the speed-limiting configuration instruction comprises the identifier of the first virtual network card and the first speed-limiting information. Therefore, the virtual machines are associated with the corresponding virtual network cards, when the flow speed limit requirement of the virtual machines exists, the virtual machines can be used as units, and the speed limit of the virtual network cards associated with the virtual machines can be adjusted, so that the complexity of flow speed limit of the virtual machines is reduced, and the flow speed limit process of the virtual machines is simplified.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "plurality" means at least two, e.g., two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. While embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.
Claims (11)
1. A method for limiting the flow rate of a virtual machine is characterized by comprising the following steps:
receiving a virtual machine speed limit strategy updating request sent by a client, wherein the speed limit strategy updating request comprises a first virtual machine identifier and first speed limit information;
determining the identifier of a first virtual network card associated with the identifier of the first virtual machine, wherein one or more first virtual network cards associated with the identifier of the first virtual machine are provided;
sending a virtual network card speed limit configuration instruction to a private network (VPC) gateway vgw on the cloud, wherein the speed limit configuration instruction comprises an identifier of the first virtual network card and the first speed limit information;
wherein the determining the identifier of the first virtual network card associated with the identifier of the first virtual machine comprises: traversing a preset association relation table of virtual machine identifications and virtual network card identifications to determine the identification of the first virtual network card associated with the first virtual machine identification;
the method further comprises the following steps:
receiving a virtual network card updating request, wherein the updating request comprises a second virtual machine identifier and a second virtual network card identifier; and updating the association relation table of the preset virtual machine identifier and the virtual network card identifier based on the second virtual machine identifier and the second virtual network card identifier.
2. The method of claim 1, wherein after receiving the virtual machine speed limit request sent by the client, further comprising:
and storing the first virtual machine identifier and the first speed limit information into a database in a correlation mode.
3. The method according to claim 1, wherein after the updating the association table of the preset virtual machine identifier and the virtual network card identifier, the method further comprises:
and sending a virtual network card unbinding instruction to the vgw when the update request is a virtual network card unbinding request, wherein the unbinding instruction includes the second virtual machine identifier and the second virtual network card identifier.
4. The method according to claim 1, wherein after the updating the association table of the preset virtual machine identifier and the virtual network card identifier, the method further comprises:
under the condition that the updating request is a virtual network card newly-increased request, second speed limiting information corresponding to the second virtual machine identifier is obtained;
and sending a virtual network card speed limit configuration instruction to the vgw, wherein the speed limit configuration instruction comprises the second virtual network card identifier and the second speed limit information.
5. The method of any of claims 1-4, wherein the speed limit information includes at least one of: the speed limit types and the threshold corresponding to each speed limit type.
6. A method for limiting the flow rate of a virtual machine is characterized by comprising the following steps:
receiving a virtual network card speed-limiting configuration instruction sent by a server, wherein the speed-limiting configuration instruction comprises an identifier and speed-limiting information of a first virtual network card;
updating a speed limit strategy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information, wherein one or more first virtual network cards are provided;
receiving a virtual network card updating instruction sent by the server, wherein the updating instruction comprises a target virtual machine identifier and a second virtual network card identifier;
updating the virtual network card associated with the target virtual machine identifier according to the second virtual network card identifier;
the server determines the identifier of the virtual network card associated with the target virtual machine identifier, and sends a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, wherein the speed limit configuration instruction includes the identifier of the virtual network card associated with the target virtual machine identifier and first speed limit information.
7. The method of claim 6, wherein the speed limit information includes at least one of: the speed limit type and a threshold value corresponding to each speed limit type.
8. A device for limiting virtual machine traffic speed is characterized by comprising:
the receiving module is used for receiving a virtual machine speed limit strategy updating request sent by a client, wherein the speed limit strategy updating request comprises a first virtual machine identifier and first speed limit information;
a determining module, configured to determine an identifier of a first virtual network card associated with the first virtual machine identifier, where one or more first virtual network cards associated with the first virtual machine identifier are provided;
the sending module is used for sending a virtual network card speed limit configuration instruction to a private network (VPC) gateway vgw on the cloud, wherein the speed limit configuration instruction comprises an identifier of the first virtual network card and the first speed limit information;
wherein the determining the identifier of the first virtual network card associated with the identifier of the first virtual machine includes: traversing a preset association relation table of virtual machine identifications and virtual network card identifications to determine the identification of the first virtual network card associated with the first virtual machine identification;
the device further comprises:
the network card updating module is used for receiving a virtual network card updating request, wherein the updating request comprises a second virtual machine identifier and a second virtual network card identifier; and updating the association relation table of the preset virtual machine identifier and the virtual network card identifier based on the second virtual machine identifier and the second virtual network card identifier.
9. A device for limiting virtual machine traffic speed is characterized by comprising:
the receiving module is used for receiving a virtual network card speed-limiting configuration instruction sent by a server, wherein the speed-limiting configuration instruction comprises an identifier of a first virtual network card and speed-limiting information;
the updating module is used for updating the speed limit strategy of the first virtual network card corresponding to the identifier of the first virtual network card based on the speed limit information, wherein one or more first virtual network cards are provided;
the receiving module is further configured to receive a virtual network card update instruction sent by the server, where the update instruction includes a target virtual machine identifier and a second virtual network card identifier;
the updating module is further configured to update the virtual network card associated with the target virtual machine identifier according to the second virtual network card identifier;
the server determines the identifier of the virtual network card associated with the target virtual machine identifier, and sends a virtual network card speed limit configuration instruction to the private network VPC gateway vgw on the cloud, wherein the speed limit configuration instruction includes the identifier of the virtual network card associated with the target virtual machine identifier and first speed limit information.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the method for limiting virtual machine traffic as recited in any of claims 1-5, or implements the method for limiting virtual machine traffic as recited in any of claims 6-7.
11. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for limiting virtual machine traffic speed according to any one of claims 1-5, or implements the method for limiting virtual machine traffic speed according to any one of claims 6-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210373381.2A CN114465956B (en) | 2022-04-11 | 2022-04-11 | Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210373381.2A CN114465956B (en) | 2022-04-11 | 2022-04-11 | Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114465956A CN114465956A (en) | 2022-05-10 |
CN114465956B true CN114465956B (en) | 2022-08-23 |
Family
ID=81417808
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210373381.2A Active CN114465956B (en) | 2022-04-11 | 2022-04-11 | Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114465956B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114884816B (en) * | 2022-06-17 | 2024-02-13 | 中国联合网络通信集团有限公司 | Data packet speed limit rule processing method, device, equipment and storage medium |
CN116016353A (en) * | 2022-12-06 | 2023-04-25 | 北京百度网讯科技有限公司 | Method and device for requesting speed limit, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019446A (en) * | 2020-08-28 | 2020-12-01 | 北京浪潮数据技术有限公司 | Interface speed limiting method, device, equipment and readable storage medium |
CN112165435A (en) * | 2020-09-29 | 2021-01-01 | 山东省计算中心(国家超级计算济南中心) | Bidirectional flow control method and system based on network service quality of virtual machine |
CN112769597A (en) * | 2020-12-23 | 2021-05-07 | 杭州谐云科技有限公司 | Container network current limiting method and system for cloud-edge collaborative virtualization scene |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201933837A (en) * | 2018-01-19 | 2019-08-16 | 思銳科技股份有限公司 | Method and system for extracting in-tunnel flow data over a virtual network |
-
2022
- 2022-04-11 CN CN202210373381.2A patent/CN114465956B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019446A (en) * | 2020-08-28 | 2020-12-01 | 北京浪潮数据技术有限公司 | Interface speed limiting method, device, equipment and readable storage medium |
CN112165435A (en) * | 2020-09-29 | 2021-01-01 | 山东省计算中心(国家超级计算济南中心) | Bidirectional flow control method and system based on network service quality of virtual machine |
CN112769597A (en) * | 2020-12-23 | 2021-05-07 | 杭州谐云科技有限公司 | Container network current limiting method and system for cloud-edge collaborative virtualization scene |
Also Published As
Publication number | Publication date |
---|---|
CN114465956A (en) | 2022-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114465956B (en) | Method and device for limiting flow rate of virtual machine, electronic equipment and storage medium | |
US11397724B2 (en) | Method and apparatus for obtaining area speed limit value and terminal device | |
US20140207930A1 (en) | Independent network interfaces for virtual network environments | |
CN110581903A (en) | multilayer intranet penetration method, system and medium | |
JP2013509658A (en) | Allocation of storage memory based on future usage estimates | |
US11036535B2 (en) | Data storage method and apparatus | |
CN109284180B (en) | Task scheduling method and device, electronic equipment and storage medium | |
US12021952B2 (en) | Application based egress interface selection | |
CN107689987B (en) | Virtual network service exposure method and device | |
CN111585887B (en) | Communication method and device based on multiple networks, electronic equipment and storage medium | |
CN111831618A (en) | Data writing method, data reading method, device, equipment and storage medium | |
CN109445986A (en) | A kind of backup data set hanging method and the fast quick-recovery of backup data set, carry system | |
CN109947842B (en) | Data storage method, device and system in distributed storage system | |
US20220006776A1 (en) | Connection tracking records for a very large scale nat engine | |
US10860472B2 (en) | Dynamically deallocating memory pool subinstances | |
CN108829646A (en) | Data storage and analytic method, device, system and storage medium | |
CN112367256A (en) | Creation method, apparatus and storage medium | |
US20180203893A1 (en) | Dynamically reconciling objects from multiple sources | |
CN112351050A (en) | Method, device, communication equipment and storage medium for mirroring data stream | |
CN111858020A (en) | User resource limiting method, device and computer storage medium | |
CN112291212B (en) | Static rule management method and device, electronic equipment and storage medium | |
CN116032614A (en) | Container network micro-isolation method, device, equipment and medium | |
US20190079875A1 (en) | Efficient provisioning of virtual machines to endpoint computing environment | |
CN115580644A (en) | Method, apparatus, device and storage medium for communication between client systems in host | |
CN105765542A (en) | Method for accessing files, distributed storage system and storage node |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |