Network request processing method, virtual network card configuration method and virtualized network system

By introducing shadow network interface cards (NICs) and binding them to virtual NICs in GiantVM, worker nodes can process network requests locally, solving the problems of long network request links and performance bottlenecks, and improving network performance and stability.

CN121814847APending Publication Date: 2026-04-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In GiantVM, excessively long network request links lead to increased latency and severe network performance bottlenecks, limiting its use cases and performance.

Method used

Create a shadow network interface card (NIC) on the worker node and bind it to the virtual NIC. Process network requests locally through the shadow NIC to avoid bypassing the master node and achieve distributed network processing.

Benefits of technology

Significantly shortens network request response time, reduces I/O latency, improves network throughput, resolves performance bottlenecks, and enhances the stability and scalability of GiantVM under large-scale network loads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121814847A_ABST
    Figure CN121814847A_ABST
Patent Text Reader

Abstract

The invention provides a network request processing method, a virtual network card configuration method and a virtualized network system.The virtualized network system comprises a main node and at least one working node which jointly form a virtual machine, and the main node configures a plurality of virtual network cards for the virtual machine. The working node creates a plurality of shadow network cards based on the virtual network card configuration information issued by the main node, and establishes a binding relationship between the shadow network cards and the virtual network cards; when the VCPU on the working node obtains the first network request, the working node extracts the first source MAC address, and determines a first shadow network card bound with the first virtual network card identified by the first source MAC address according to the binding relationship and the first source MAC address; and sending the first network request through the first shadow network card. The shadow network card is introduced, so that the network performance of each node can be fully utilized, the network delay is reduced, and the overall network bandwidth is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of virtual machine network technology, specifically relating to a network request processing method, a virtual network card configuration method, and a virtualized network system. Background Technology

[0002] GiantVM (Giant Virtual Machine) is a distributed Type II hypervisor based on QEMU (Quick Emulator) and KVM (Kernel-based Virtual Machine). It manages resources from multiple physical machines, providing a unified hardware abstraction for guest operating systems. Specifically, it consists of a master machine and multiple slave machines that jointly virtualize a large virtual machine.

[0003] In traditional GiantVM, the underlying layer consists of multiple physical machines, each deploying a modified QEMU+KVM. Each physical machine starts a QEMU process, and these QEMU processes share memory, thus presenting a single, large virtual machine to the upper layers. One of these QEMU processes resides on the Master physical machine, while the others reside on the Slaves. All network I / O operations are routed through the Master. Network I / O requests initiated by the VCPU (Virtual Central Processing Unit) on the Slave are sent by QEMU to the Master via the Slave's physical network, and then submitted to the local virtual network device by the QEMU process on the Master. Network I / O requests initiated by the VCPU on the Master are handled like those of a regular virtual machine, directly submitted to the local virtual network device by QEMU.

[0004] For example, such as Figure 1 As shown, network I / O requests initiated by the VCPU on the Slave (worker) must first be forwarded to the Master (master machine), then received by the Fast Emulator 1 on the Master before being submitted to the Virtual Network Device 1. This network request chain is not only long, leading to increased network request time, but it is also particularly prone to causing network performance bottlenecks on the Master. Although using GiantVM can provide CPU computing power and memory storage capacity far exceeding that of multiple nodes, its network capabilities are still inferior to those of a single machine. This undoubtedly brings great inconvenience to customers using GiantVM and limits the use cases of GiantVM. SUMMARY

[0005] In view of the above problems, the embodiments of the present application provide a network request processing method, a virtual network card configuration method and a virtualized network system which overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect, the embodiments of the present application provide a network request processing method applied to a worker node, a master node and at least one worker node together constituting a virtual machine, the master node configuring a plurality of virtual network cards for the virtual machine, and the method comprising: creating a plurality of shadow network cards locally at the worker node based on virtual network card configuration information issued by the master node, and establishing a binding relationship between the shadow network cards and the virtual network cards; in a case where a virtual central processing unit (VCPU) on the worker node acquires a first network request, extracting a first source media access control (MAC) address carried in the first network request, the first source MAC address identifying a first virtual network card as a logical exit of the first network request in the virtual machine; determining a first shadow network card bound to the first virtual network card identified by the first source MAC address according to the binding relationship and the first source MAC address; sending the first network request through the first shadow network card.

[0007] In a second aspect, the embodiments of the present application provide a virtual network card configuration method applied to a master node, the master node and at least one worker node together constituting a virtual machine; the method comprising: in response to a start of a quick emulator (QEMU) process locally at the master node, configuring a plurality of virtual network cards for the virtual machine; issuing virtual network card configuration information to the worker node; wherein the virtual network card configuration information is used to instruct the worker node to create a plurality of shadow network cards and establish a binding relationship between the shadow network cards and the virtual network cards, so as to realize local sending of a network request.

[0008] In a third aspect, the embodiments of the present application provide a virtualized network system, comprising: a master node, at least one worker node, the master node and the at least one worker node together constituting a virtual machine; the master node configuring a plurality of virtual network cards for the virtual machine, and issuing virtual network card configuration information to each worker node; the worker node creating a plurality of shadow network cards locally at the worker node based on the virtual network card configuration information, and establishing a binding relationship between the shadow network cards and the virtual network cards; If the first network request sent by the virtual machine is acquired by a virtual central processing unit (VCPU) on the worker node, the worker node extracts a first source media access control (MAC) address carried in the first network request, and determines, according to the binding relationship and the first source MAC address, a first shadow network card bound with a first virtual network card identified by the first source MAC address; The worker node sends the first network request through the first shadow network card.

[0009] In a fourth aspect, an electronic device is provided, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect or the second aspect.

[0010] In a fifth aspect, a readable storage medium is provided, which stores a program or instructions, and the program or instructions, when executed by a processor, implement the steps of the method according to the first aspect or the second aspect.

[0011] In the embodiments of the present application, the worker node receives the virtual network card configuration information issued by the master node, creates a plurality of shadow network cards locally on the worker node based on the virtual network card configuration information, establishes a binding relationship between the shadow network cards and the virtual network cards, and after a VCPU on the worker node acquires a network request, determines a corresponding shadow network card in the worker node based on the binding relationship and a virtual network card identified by a source MAC address carried in the network request, and sends the network request through the shadow network card, thereby achieving local processing of the network request on the worker node and avoiding bypassing the master node, which significantly shortens the response time of a single network request and reduces the network I / O delay. By introducing the shadow network card, the original centralized network processing mode can be changed to a distributed processing mode, so that the network I / O load is evenly distributed to each node, thereby making the total network bandwidth increase from the upper limit of a single master node to the aggregation of the physical network card bandwidth of all nodes, thereby obtaining a network throughput capacity far exceeding a single node. By decoupling the master node and the network I / O processing, the performance bottleneck problem caused by the convergence of all network flows on the master node is solved, and the overall stability and expansibility of GiantVM under large-scale network load are improved. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 A simple network I / O request flowchart in the existing GiantVM is shown; Figure 2 A network I / O request processing schematic diagram in the prior art GiantVM is shown; Figure 3 A network request processing flowchart in the GiantVM provided by the embodiments of the present application is shown; Figure 4 A network request processing method applied to a worker node is shown in the embodiment of the present application; Figure 5 A virtual network card configuration method applied to a master node is shown in the embodiment of the present application; Figure 6 A virtualization network system is shown in the embodiment of the present application; Figure 7 An entity structure of an electronic device is shown in the embodiment of the present application. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0014] The terms “first”, “second”, and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, “and / or” in the specification and claims indicates at least one of the connected objects, and the character “ / ” generally indicates that the front and rear associated objects are in an “or” relationship.

[0015] In the prior art, the implementation of network I / O request in GiantVM is as shown in Figure 2 A master node (master machine) and a plurality of worker nodes (worker machines) jointly constitute a virtual machine (VM) Figure 2With the internal architecture of one of the worker nodes as an example, the master node configures multiple virtual network cards for the virtual machine, and the virtual network cards are presented as logical network devices identifiable by an operating system of the virtual machine at the virtual machine level. At the master node level, the functions of the virtual network cards are implemented by virtual network devices (such as TAP devices) on a host operating system of the master node. A network I / O request (hereinafter referred to as a network request) on the worker node is sent by a working QEMU process on the worker node to a physical network card 0 of the master node by using a physical network card 0 on the worker node, and is received by a master QEMU process on the master node. The master QEMU process sends the network request to a virtual network device 0 corresponding to the virtual network card 0 in the virtual machine by writing, so as to send the network request to a network protocol stack of the master node for processing, and finally to an external network. Due to the long network request link, the network latency is significantly increased. In addition, all network requests of the worker nodes are concentrated on the master node for processing, which is prone to form a network performance bottleneck on the master node. This makes the network performance of the GiantVM lower than that of a single machine, which undoubtedly brings great inconvenience to users and seriously limits the application scenarios of the GiantVM.

[0016] Based on the problems existing in the prior art, the embodiment of the present application introduces a shadow network card and provides a GiantVM network performance optimization scheme based on the shadow network card. After the working QEMU process on the worker node receives the network request, the network request is redirected to the local shadow network card according to the established binding relationship between the shadow network card and the virtual network card, so as to change the network I / O mode from centralized to distributed, so that the network request does not need to bypass the master node, thereby effectively reducing the latency. At the same time, the network load can be distributed to each worker node, the physical network card bandwidth is fully utilized, the performance bottleneck of the master node is avoided, and the overall network performance of the GiantVM can be improved.

[0017] In the embodiment of the present application, the master node and at least one worker node together constitute a virtual machine, and the master node and the worker node are real physical nodes. In the GiantVM scenario, the number of worker nodes is multiple. The master node configures multiple virtual network cards for the virtual machine, and multiple shadow network cards are configured on each worker node. The multiple shadow network cards are bound to the multiple virtual network cards one by one, forming a binding relationship between the shadow network card and the virtual network card. The shadow network card can be understood as a local agent of the virtual network card on the worker node. They collectively represent the same virtual network identity, but process local network requests on different physical nodes. In terms of logical functions, the shadow network card is equivalent to the bound virtual network card, and aims to provide distributed network exit capability for the virtual machine.

[0018] Figure 3 A network request processing flowchart in the GiantVM provided by the embodiment of the present application is shown.

[0019] exist Figure 3 In the architecture shown, the master node and multiple worker nodes jointly virtualize a complete virtual machine. Figure 3 The following is a detailed illustration of the internal architecture of one of the worker nodes. Figure 3 The virtual machine in the architecture shown is, for example, a GiantVM instance. The main QEMU process of this virtual machine runs on the master node, and the worker QEMU processes run on the worker nodes. The master node configures multiple virtual network interfaces (such as virtual network interface 0, virtual network interface 1, ..., virtual network interface N) for the virtual machine, which are backed by multiple virtual network devices (such as virtual network device 0, virtual network device 1, ..., virtual network device N) created on the master node. The multiple shadow network interfaces (such as shadow network interface 0, shadow network interface 1, ..., shadow network interface N) on the worker nodes are implemented by multiple virtual network devices (such as virtual network device 0', virtual network device 1', ..., virtual network device N') created on the worker nodes. The virtual network devices on the worker nodes are shadow devices of the virtual network devices on the master node. For example, the virtual network devices on the master node are TAP devices, and the virtual network devices on the worker nodes are STAP devices (shadow TAP devices). Virtual network adapters and shadow network adapters are logical network interfaces that appear inside the virtual machine operating system. The underlying entities supporting these logical network interfaces are: virtual network devices created on the master node and virtual network devices created on the worker nodes; that is, the functions of virtual network adapters are carried out by virtual network devices on the master node, and the functions of shadow network adapters are carried out by virtual network devices on worker nodes.

[0020] Within the master node, virtual network devices 0 to N are connected to local virtual bridges (master node virtual bridges), which in turn connect to local physical network cards (NICs) to access external networks. Local virtual bridges include integrated bridges and tunnel bridges. Within the worker nodes, virtual network devices 0' to N' are connected to local virtual bridges (worker node virtual bridges), which in turn connect to local physical NICs to access external networks. Local virtual bridges include integrated bridges and tunnel bridges.

[0021] exist Figure 3In the process, if a VCPU on the master node receives a network request, the master node extracts the source MAC (Media Access Control) address carried in the network request, determines the virtual network interface card (e.g., virtual network interface card 0) identified by the source MAC address, and writes the network request to the virtual network device 0 corresponding to virtual network interface card 0, so that it enters the master node's virtual bridge and is transmitted to the external network via the master node's virtual bridge and the master node's physical network interface card (not shown in the figure). If a VCPU on a worker node receives a network request, the worker node extracts the source MAC address carried in the network request, determines the shadow network interface card (e.g., shadow network interface card 0) bound to the virtual network interface card (e.g., virtual network interface card 0) identified by the source MAC address, and writes the network request to the virtual network device 0' corresponding to shadow network interface card 0, so that it enters the worker node's virtual bridge and is transmitted to the external network via the worker node's virtual bridge and the worker node's physical network interface card (not shown in the figure).

[0022] like Figure 4 As shown in the embodiments of this application, the network request processing method applied to a worker node includes the following steps: Step 401: Based on the virtual network interface card configuration information issued by the master node, create multiple shadow network interfaces on the worker node and establish a binding relationship between the shadow network interfaces and the virtual network interfaces.

[0023] Multiple virtual network interfaces (NICs) on the master node are implemented by multiple first virtual network devices on the master node (the functionality of the virtual NICs is carried out by the first virtual network devices on the master node). After configuring multiple virtual NICs for the virtual machines, the master node sends the virtual NIC configuration information to each worker node. The virtual NIC configuration information is used to indicate the configuration status of the multiple virtual NICs. Based on the received virtual NIC configuration information, the worker nodes create multiple shadow NICs locally, the same number as the multiple virtual NICs, and establish a binding relationship between the shadow NICs and the virtual NICs. The multiple shadow NICs are implemented by multiple second virtual network devices (the functionality of the shadow NICs is carried out by the second virtual network devices on the worker nodes), and the multiple second virtual network devices correspond one-to-one with the multiple first virtual network devices. In this architecture, the first virtual network devices act as the backend of the virtual NICs, and the second virtual network devices act as the backend of the shadow NICs.

[0024] Step 402: When the VCPU on the worker node obtains the first network request, extract the first source MAC address carried in the first network request. The first source MAC address identifies the first virtual network card in the virtual machine that serves as the logical exit point for the first network request.

[0025] The virtual machine (using GiantVM as an example in this embodiment) runs a standard operating system and applications. When an application needs to access the network (e.g., responding to a client request), it hands the network data packets over to the virtual machine's kernel for processing. GiantVM's computing power (the virtual machine's VCPUs) is aggregated from the physical CPUs of all physical nodes (including the master and worker nodes). GiantVM's scheduler dynamically allocates computing tasks to a specific VCPU within the virtual machine, which is then scheduled to execute on a physical CPU of a physical node. Therefore, when a network request needs to be sent, the instruction to send the network data packet is ultimately executed by a specific VCPU. If this VCPU happens to be scheduled to run on a physical CPU of a worker node, then the network request is considered to have originated from that worker node.

[0026] When the VCPU on the worker node receives the first network request, it extracts the first source MAC address carried in the first network request. The first source MAC address identifies the first virtual network interface card (NIC) in the virtual machine that serves as the logical exit point for the first network request. The worker node determines the first virtual NIC based on the first source MAC address. Specifically, the KVM on the worker node will first capture the first network request. After KVM exits kernel mode, it will hand over the first network request to the worker QEMU process on the worker node for processing.

[0027] The working QEMU process on the worker node creates a shadow network interface card and establishes a binding relationship through the QEMU startup module during its startup phase; during its running phase, the QEMU network I / O processing module routes network requests to the local shadow network interface card according to the binding relationship.

[0028] Step 403: Based on the binding relationship and the first source MAC address, determine the first shadow network card bound to the first virtual network card identified by the first source MAC address.

[0029] The working QEMU process on the working node (specifically the QEMU network I / O processing module) determines the first shadow network card bound to the first virtual network card identified by the first source MAC address based on the pre-established binding relationship and the first source MAC address extracted from the first network request.

[0030] When the VCPU on the worker node obtains the first network request, the request is sent to the local QEMU network I / O processing module. The QEMU network I / O processing module queries the binding relationship of the records and determines which shadow network interface card the request should be sent to based on the binding relationship.

[0031] Step 404: Send the first network request through the first shadow network card.

[0032] After determining the first shadow network interface card, the worker node sends the first network request to the external network through the first shadow network interface card, so that the first network request is issued locally on the worker node, so that the first network request does not need to go through the master node, thereby effectively reducing latency.

[0033] When a worker node sends a first network request through a first shadow network interface card (NIC), it includes: redirecting the first network request to the first shadow NIC on the worker node's local machine; sending the first network request to the worker node's virtual bridge via the first shadow NIC; and sending it to the external network via the worker node's physical NIC.

[0034] Since the first source MAC address identifies the first virtual network card in the virtual machine as the logical exit of the first network request, after the worker node determines the first shadow network card based on the binding relationship and the first source MAC address, it redirects the first network request to the first shadow network card on the current worker node (the first shadow network card serves as the logical exit of the first network request on the worker node), and writes the first network request to the second virtual network device corresponding to the first shadow network card, so that the first network request enters the virtual bridge on the worker node. The first network request is sent to the external network through the virtual bridge on the worker node (such as an integrated bridge or a tunnel bridge) and the physical network card connected to the virtual bridge.

[0035] At the working node, the second virtual network device is connected to the local integrated bridge, the local integrated bridge is connected to the local tunnel bridge through a virtual port, and the local tunnel bridge is connected to the local physical network card through a virtual port. The local physical network card sends the first network request to the external network.

[0036] The above-described implementation scheme of this application, based on the virtual network interface card (NIC) configuration information issued by the master node, creates multiple shadow NICs locally on the worker nodes and establishes a binding relationship between the shadow NICs and the virtual NICs. After the VCPU on the worker node obtains a network request, it determines the corresponding shadow NIC in the worker node based on the binding relationship and the virtual NIC identified by the source MAC address carried in the network request. The network request is then sent through the shadow NIC, enabling the network request to be processed locally on the worker node. This avoids bypassing the master node, significantly shortens the response time of a single network request, and reduces network I / O latency. Furthermore, it transforms the original centralized network processing mode into a distributed processing mode, so that the network I / O load is evenly distributed across the nodes. This increases the total network bandwidth from the upper limit of a single master node to the aggregated bandwidth of the physical NICs of all nodes, thereby achieving a network throughput capacity far exceeding that of a single node. By decoupling the master node from network I / O processing, it solves the performance bottleneck problem caused by all network traffic converging on the master node, improving the overall stability and scalability of GiantVM under large-scale network loads.

[0037] The following describes the process of creating a shadow network interface card (NIC) based on virtual NIC configuration information and establishing a binding relationship between the shadow NIC and the virtual NIC. This process includes the following steps: In response to the start of the QEMU process on the worker node, a configuration request is sent to the master node; Receive virtual network interface configuration information sent by the master node based on the configuration request; Based on the virtual network interface card (NIC) configuration information, create multiple shadow NICs on the local worker node, with the same number of shadow NICs as the number of virtual NICs. The created shadow network interfaces are bound one by one to the multiple virtual network interfaces configured on the master node to generate a binding relationship.

[0038] After the QEMU process (the worker QEMU process) starts locally on the worker node, the QEMU startup module within the QEMU process sends a configuration request to the master node. The master node responds to this request and sends virtual network interface card (NIC) configuration information to the worker node. Upon receiving the virtual NIC configuration information, the worker node's QEMU startup module performs initialization: based on the number of virtual NICs on the master node, it creates the same number of shadow NICs locally. These shadow NICs function as a second virtual network device connected to the worker node's local virtual bridge, preparing for subsequent direct external communication. Furthermore, the QEMU startup module binds the locally created shadow NICs to their corresponding virtual NICs on the master node in a one-to-one manner, establishing a binding relationship between the shadow NICs and the virtual NICs.

[0039] The above implementation process, by creating a shadow network interface card locally based on the virtual network interface card configuration information issued by the master node and establishing a binding relationship between the shadow network interface card and the virtual network interface card, can transform the network I / O mode of the virtual machine from centralized forwarding to distributed processing, thereby laying the foundation for achieving low latency and high bandwidth network performance.

[0040] In an optional embodiment of this application, the method further includes: after creating multiple shadow network cards, configuring ARP filtering rules locally on the worker node to prevent the second virtual network device from responding to ARP requests; the ARP filtering rules include a first rule to discard ARP packets output from the second virtual network device, and a second rule to discard incoming ARP packets sent to the second virtual network device.

[0041] After creating a shadow network interface card (NIC) locally, the worker node configures ARP (Address Resolution Protocol) filtering rules locally to prevent the second virtual network device corresponding to the shadow NIC from responding to ARP requests. These ARP filtering rules include a first rule that discards ARP packets output from the second virtual network device, and a second rule that discards incoming ARP packets destined for the second virtual network device. Based on the first rule, it ensures that when an ARP request for a virtual machine's IP address appears in the network, only the virtual NIC on the master node will respond to the ARP request; the shadow NIC will not issue a response. In a typical configuration, one virtual NIC corresponds to one master IP address; in this case, this rule prevents address conflicts caused by multiple physical nodes (master and worker nodes) simultaneously claiming to hold this specific IP address. Based on the second rule, all ARP requests sent to the shadow NIC are blocked, fundamentally eliminating the possibility of it generating any response, thereby maintaining network stability and consistency.

[0042] The above implementation process, by configuring ARP filtering rules locally on the worker node after creating the shadow network interface card, can control the communication behavior of the shadow network interface card in the network and prohibit it from responding to ARP requests, thereby fundamentally avoiding address conflicts caused by multiple network interfaces (master node and worker node) responding to the same IP address at the same time.

[0043] This application provides a method for configuring a virtual network interface card (NIC) for a master node, such as... Figure 5 As shown, the method includes the following steps: Step 501: In response to the start of the QEMU process on the master node, configure multiple virtual network cards for the virtual machine.

[0044] The startup of the QEMU process (master QEMU process) on the master node marks the start of the virtual machine startup process. This embodiment uses GiantVM as an example. When GiantVM starts on the master node, based on the number of virtual network interfaces specified for the virtual machine, the QEMU process, acting as the execution carrier, creates a corresponding number of first virtual network devices. These first virtual network devices serve as the backend for the virtual network interfaces, thereby configuring multiple virtual network interfaces for the virtual machine.

[0045] Step 502: Send virtual network interface card (NIC) configuration information to the worker nodes. The virtual NIC configuration information is used to instruct the worker nodes to create multiple shadow NICs and establish a binding relationship between the shadow NICs and the virtual NICs, so as to realize the local sending of network requests.

[0046] After receiving a configuration request from a worker node, the master node sends virtual network interface card (NIC) configuration information to the worker node. This configuration information instructs the worker node to create multiple shadow NICs and establish a binding relationship between the shadow NICs and the virtual NICs, enabling network requests to be sent locally on the worker node.

[0047] For worker nodes, after receiving the virtual network interface card (NIC) configuration information, they create the same number of shadow NICs locally as the virtual NICs, and bind the locally created shadow NICs to the virtual NICs configured on the master node one-to-one, thus forming a binding relationship between the shadow NICs and the virtual NICs.

[0048] In the above implementation process, after the master node starts the local QEMU process, it configures multiple virtual network cards for the virtual machine. Based on the requests from the worker nodes, it sends the virtual network card configuration information indicating the configuration status to the worker nodes. The worker nodes then create shadow network cards locally to establish binding relationships. This allows network requests to be processed locally on the worker nodes, shortening the response time of a single network request, reducing network I / O latency, and implementing a distributed processing mode. This ensures that the network I / O load is evenly distributed across the nodes, avoiding the performance bottleneck caused by all network traffic converging on the master node.

[0049] Optionally, the method further includes the following steps: When the VCPU on the master node obtains the second network request, the second source MAC address carried in the second network request is extracted. The second source MAC address identifies the second virtual network card in the virtual machine that serves as the logical exit point for the second network request. Send a second network request through a second virtual network card.

[0050] If a VCPU on the master node receives a second network request (the VCPU executing the instruction to issue a network packet is scheduled to the master node's physical CPU), the processing path for the second network request is determined to be the master node. The master node extracts the second source MAC address carried in the second network request. This second source MAC address identifies the second virtual network interface card (NIC) in the virtual machine that serves as the logical exit point for the second network request. Based on the second NIC identified by the second source MAC address, the master node writes the second network request into the virtual network device corresponding to the second NIC. This causes the second network request to enter the master node's local virtual bridge and then be transmitted to the external network via the virtual bridge and the master node's local physical NIC. The master node's local virtual bridge includes, for example, an integrated bridge and a tunnel bridge. The second network request is transmitted sequentially via the integrated bridge and the tunnel bridge to the physical NIC, and then from the physical NIC to the external network.

[0051] In the above process, if the VCPU that executes the command to issue network data packets is scheduled to the master node, and the network request is processed locally on the master node, localized processing of network requests can be achieved. This mechanism, combined with the scenario of local processing by worker nodes, constructs a decentralized distributed network architecture and realizes distributed network processing capabilities without global central bottlenecks.

[0052] The above describes the overall implementation scheme of the network request processing method on the worker node side and the overall implementation scheme of the virtual network card configuration method on the master node side. The virtualized network system provided in this application embodiment is described below. For example... Figure 6 As shown, the virtualized network system provided in this application embodiment includes: a master node 61, at least one worker node 62, and the master node 61 and at least one worker node 62 together constitute a virtual machine 60; The master node 61 configures multiple virtual network interface cards 611 for virtual machine 60 and sends virtual network interface card configuration information to each worker node 62; Based on the virtual network interface card (NIC) configuration information, worker node 62 creates multiple shadow NICs 621 locally and establishes a binding relationship between the shadow NICs 621 and the virtual NICs 611. If the first network request issued by virtual machine 60 is obtained by the VCPU on worker node 62, worker node 62 extracts the first source MAC address carried in the first network request, and determines the first shadow network card bound to the first virtual network card identified by the first source MAC address based on the binding relationship and the first source MAC address. Work node 62 sends the first network request through the first shadow network card.

[0053] In the GiantVM scenario, the master node 61 and multiple worker nodes 62 together constitute a virtual machine 60. By creating shadow network interface cards 621 locally on each worker node 62, each worker node 62 can process network requests locally, avoiding bypassing the master node 61, significantly shortening the response time of a single network request, and reducing network I / O latency. Furthermore, redirecting network requests to the shadow network interface cards 621 on the worker node 62 can change the network I / O mode from centralized to distributed, so that the network I / O load is evenly distributed across all nodes. This increases the total network bandwidth from the upper limit of a single master node to the aggregated bandwidth of the physical network interface cards of all nodes, achieving a network throughput capacity far exceeding that of a single node. In addition, by decoupling the master node 61 from network I / O processing, the performance bottleneck caused by all network traffic converging on the master node 61 is solved, improving the overall stability and scalability of GiantVM under large-scale network loads.

[0054] Optionally, the multiple shadow network interface cards 621 on the worker node 62 are implemented by multiple second virtual network devices 622 deployed on the worker node 62; Work node 62 sends the first network request to the external network in sequence via the second virtual network device 622 corresponding to the first shadow network card, the work node virtual bridge 623, and the work node physical network card 624.

[0055] Multiple second virtual network devices 622 deployed on worker node 62 serve as the backend for multiple shadow network cards 621. On worker node 62, the second virtual network devices 622 are connected to worker node virtual bridge 623. Worker node virtual bridge 623 includes a local integrated bridge and a local tunnel bridge of worker node 62. The local integrated bridge is connected to the local tunnel bridge through a virtual port. The local tunnel bridge is connected to the worker node physical network card 624 through a virtual port. The worker node physical network card 624 sends the first network request to the external network.

[0056] Optionally, the multiple virtual network cards 611 on the master node 61 are implemented by multiple first virtual network devices 612 deployed on the master node 61, and the second virtual network device 622 corresponds one-to-one with the first virtual network device 612; If the VCPU on the master node 61 obtains a second network request carrying a second source MAC address, the master node 61 determines the second virtual network card in the virtual machine 60 identified by the second source MAC address as the logical exit of the second network request; The master node 61 sends the second network request to the external network in sequence via the first virtual network device 612 corresponding to the second virtual network card, the master node virtual bridge 613, and the master node physical network card 614.

[0057] Multiple first virtual network devices 612 deployed on the master node 61 serve as the backend for multiple virtual network cards 611. On the master node 61, the first virtual network devices 612 are connected to the master node virtual bridge 613. The master node virtual bridge 613 includes the master node 61's local integrated bridge and local tunnel bridge. The local integrated bridge is connected to the local tunnel bridge through a virtual port. The local tunnel bridge is connected to the master node's physical network card 614 through a virtual port. The master node's physical network card 614 sends the second network request to the external network.

[0058] Optionally, when creating multiple shadow network interface cards 621 and establishing the binding relationship between the shadow network interface cards 621 and the virtual network interface card 611, the worker node 62 is also used for: In response to the start of the QEMU process on worker node 62, a configuration request is sent to master node 61; Receive virtual network interface configuration information sent by master node 61 based on configuration request; Based on the virtual network interface configuration information, create multiple shadow network interfaces 621 on the local working node, the same number as the multiple virtual network interfaces 611; The multiple shadow network cards 621 created are bound one by one to the multiple virtual network cards 611 configured on the master node 61 to generate a binding relationship.

[0059] After the worker node 62 starts its local QEMU process, it sends a configuration request to the master node 61 to obtain the virtual network interface card (NIC) configuration information corresponding to the multiple virtual NICs 611 configured by the master node 61. After obtaining the virtual NIC configuration information, the worker node 62 creates the same number of shadow NICs 621 locally as the virtual NICs 611. It then binds the multiple shadow NICs 621 to the multiple virtual NICs 611 configured by the master node 61, generating a binding relationship. By introducing the shadow NICs 621 and establishing the binding relationship, the network I / O mode of the virtual machine 60 is transformed from centralized forwarding to distributed processing, laying the foundation for achieving low latency and high bandwidth network performance.

[0060] Optionally, worker node 62 is also used to: after creating multiple shadow network interface cards 621, configure ARP filtering rules locally on the worker node to prevent the second virtual network device 622 from responding to ARP requests; The ARP filtering rules include a first rule that discards ARP packets output from the second virtual network device 622, and a second rule that discards incoming ARP packets destined for the second virtual network device 622.

[0061] After worker node 62 creates shadow network interface 621 locally, it configures ARP filtering rules locally. These rules include a first rule and a second rule. Based on the first rule, it ensures that when an ARP request for a virtual machine's IP address appears on the network, shadow network interface 621 will not respond, preventing address conflicts caused by multiple physical nodes simultaneously claiming to hold that specific IP address. Based on the second rule, it blocks all ARP requests sent to shadow network interface 621, fundamentally eliminating the possibility of it generating any response, thereby maintaining network stability and consistency.

[0062] As the system implementation is basically similar to the method implementation, it is described in a relatively simple way. For relevant details, please refer to the description of the method implementation.

[0063] On the other hand, embodiments of this application also provide an electronic device, including a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the virtual network card configuration method on the master node side or the network request processing method on the worker node side described above.

[0064] For example, Figure 7 A schematic diagram of the physical structure of an electronic device is shown.

[0065] like Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740. The processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions stored in the memory 730. The processor 710 is used to execute various processes of the virtual network interface card configuration method on the master node side or the network request processing method on the worker node side in this embodiment of the application, which will not be described in detail here.

[0066] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0067] In another aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the virtual network interface card configuration method on the master node side or the network request processing method on the worker node side described above.

[0068] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A network request processing method, characterized in that, Applied to worker nodes, where a master node and at least one worker node together constitute a virtual machine, and the master node configures multiple virtual network interface cards for the virtual machine, the method includes: Based on the virtual network interface card configuration information issued by the master node, multiple shadow network interfaces are created locally on the worker node, and a binding relationship is established between the shadow network interfaces and the virtual network interface card. When the virtual central processing unit (VCPU) on the working node obtains a first network request, the first source media access control (MAC) address carried in the first network request is extracted. The first source MAC address identifies the first virtual network card in the virtual machine that serves as the logical exit point of the first network request. Based on the binding relationship and the first source MAC address, determine the first shadow network card bound to the first virtual network card identified by the first source MAC address; The first network request is sent through the first shadow network card.

2. The method according to claim 1, characterized in that, The process of creating multiple shadow network interfaces on the worker node based on the virtual network interface configuration information issued by the master node, and establishing a binding relationship between the shadow network interfaces and the virtual network interface, includes: In response to the startup of the QEMU fast simulator process on the local worker node, a configuration request is sent to the master node; Receive the virtual network interface configuration information sent by the master node based on the configuration request; Based on the virtual network interface configuration information, create multiple shadow network interfaces on the local working node, with the same number as the multiple virtual network interfaces. The multiple shadow network interfaces created are bound one by one to the multiple virtual network interfaces configured on the master node to generate the binding relationship.

3. The method according to claim 1, characterized in that, Sending the first network request through the first shadow network card includes: Redirect the first network request to the first shadow network interface card on the worker node; The first network request is sent to the virtual bridge of the worker node via the first shadow network card, and then sent to the external network via the physical network card of the worker node.

4. The method according to any one of claims 1 to 3, characterized in that, The multiple virtual network interface cards on the master node are implemented by multiple first virtual network devices; The multiple shadow network cards on the working node are implemented by multiple second virtual network devices, and the second virtual network devices correspond one-to-one with the first virtual network device.

5. The method according to claim 4, characterized in that, After creating multiple shadow network adapters, the following is also included: Configure Address Resolution Protocol (ARP) filtering rules locally on the worker node to prevent the second virtual network device from responding to ARP requests; The ARP filtering rules include a first rule that discards ARP packets output from the second virtual network device, and a second rule that discards incoming ARP packets destined for the second virtual network device.

6. A method for configuring a virtual network interface card (NIC), characterized in that, Applied to a master node, wherein the master node and at least one worker node together constitute a virtual machine; the method includes: In response to the startup of the QEMU fast emulator process on the master node, multiple virtual network cards are configured for the virtual machine; Send virtual network interface card configuration information to the working node; The virtual network interface card (NIC) configuration information is used to instruct the working node to create multiple shadow NICs and establish a binding relationship between the shadow NICs and the virtual NICs, so as to realize the local sending of network requests.

7. The method according to claim 6, characterized in that, Also includes: When the virtual central processing unit (VCPU) on the master node obtains a second network request, the second source media access control (MAC) address carried in the second network request is extracted. The second source MAC address identifies the second virtual network card in the virtual machine that serves as the logical exit point for the second network request. The second network request is sent through the second virtual network card.

8. A virtualized network system, characterized in that, include: A master node and at least one worker node, wherein the master node and the at least one worker node together constitute a virtual machine; The master node configures multiple virtual network cards for the virtual machine and sends virtual network card configuration information to each worker node; Based on the virtual network interface card (NIC) configuration information, the working node creates multiple shadow NICs locally and establishes a binding relationship between the shadow NICs and the virtual NIC. If the first network request issued by the virtual machine is acquired by the virtual central processing unit (VCPU) on the worker node, the worker node extracts the first source media access control (MAC) address carried in the first network request, and determines the first shadow network card bound to the first virtual network card identified by the first source MAC address based on the binding relationship and the first source MAC address. The working node sends the first network request through the first shadow network card.

9. The system according to claim 8, characterized in that, The multiple shadow network cards on the working node are implemented by multiple second virtual network devices deployed on the working node; The working node sends the first network request to the external network sequentially via the second virtual network device corresponding to the first shadow network card, the working node virtual bridge, and the working node physical network card.

10. The system according to claim 9, characterized in that, The multiple virtual network interface cards on the master node are implemented by multiple first virtual network devices deployed on the master node, and the second virtual network devices correspond one-to-one with the first virtual network devices; If the VCPU on the master node obtains a second network request carrying a second source MAC address, the master node determines the second virtual network card in the virtual machine identified by the second source MAC address as the logical exit of the second network request; The master node sends the second network request to the external network sequentially via the first virtual network device corresponding to the second virtual network card, the master node virtual bridge, and the master node physical network card.