CN114816651A - Communication method, device and system - Google Patents

Communication method, device and system Download PDF

Info

Publication number
CN114816651A
CN114816651A CN202110120171.8A CN202110120171A CN114816651A CN 114816651 A CN114816651 A CN 114816651A CN 202110120171 A CN202110120171 A CN 202110120171A CN 114816651 A CN114816651 A CN 114816651A
Authority
CN
China
Prior art keywords
host
virtual machine
virtual
container
storage address
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.)
Pending
Application number
CN202110120171.8A
Other languages
Chinese (zh)
Inventor
钟国城
蔡少芝
程宝传
翟健翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110120171.8A priority Critical patent/CN114816651A/en
Priority to PCT/CN2021/116145 priority patent/WO2022160714A1/en
Publication of CN114816651A publication Critical patent/CN114816651A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network 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 And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a communication method. The method of the present application may be executed by a virtual machine, or may be executed by a component of the virtual machine (for example, a packet sending and receiving client in the virtual machine). The method comprises the following steps: acquiring a first virtual storage address where a data message is located and the length of the data message, and generating a first notification message according to the first virtual storage address and the length; and sending a first notification message to the first host, wherein the first notification message is used for triggering the first host to acquire the data message by the second container. The data message is a message communicated between a first container on the first virtual machine and a second container on the second virtual machine. The address and the length of the data message are transmitted by sending the notification message without frequently copying the data message, so that the time delay caused by transmitting the data message between containers can be reduced.

Description

Communication method, device and system
Technical Field
The present invention relates to the field of communications, and in particular, to a communication method, apparatus, and system.
Background
With the continuous development of information technology, virtual machine technology is widely applied. A virtual machine (virtual machine) refers to a complete computer system that is simulated by software, has complete hardware functions, and runs in a completely isolated environment. One or more virtual computers can be simulated on one physical machine through virtual machine software. Container (Docker) is an open-source application container engine, aiming at providing an automated deployment solution for applications, and rapidly creating a container (container) on the Linux system, wherein the container is a series of processes isolated from other parts of the system.
At present, because the container is deployed in the virtual machine, the container external transmission data needs to be forwarded through the container network and the virtual machine network in the virtual machine.
Therefore, the container needs to be copied for many times when transmitting data to the outside, which results in low data transmission efficiency.
Disclosure of Invention
The application provides a communication method, a communication device and a communication system, wherein the address and the length of a data message are transmitted by sending an announcement message, and the time delay caused by transmitting the data message between containers is reduced by using a shared storage space.
The present application provides a communication method, which may be executed by a first virtual machine, or may be executed by a component of the first virtual machine (e.g., a packet transceiving client in the first virtual machine, etc.). The method comprises the following steps: acquiring a first virtual storage address of a data message and the length of the data message, wherein the data message is a message communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; generating a first notification message according to the first virtual storage address and the length; and sending a first notification message to the first host, wherein the first notification message is used for triggering the first host to acquire the data message by the second container.
In the method, a first virtual storage address where a data message is located and the length of the data message are determined, and a first notification message is generated according to the first virtual storage address and the length; and sending a first notification message to the first host, wherein the first notification message is used for triggering the first host to acquire the data message by the second container. The data message is a message communicated between a first container on the first virtual machine and a second container on the second virtual machine. The address and the length of the data message are transmitted by sending the notification message without frequently copying the data message, so that the time delay caused by transmitting the data message between containers can be reduced.
Optionally, in a possible implementation manner of the first aspect, the data packet in the above step is stored in a first shared memory, the first virtual storage address points to the first shared memory, a first virtual machine, a first host, and a second virtual machine share the first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host.
In the possible implementation manner, the host and the virtual machine share the shared memory, the virtual storage address and the length, so that the time delay caused by the transmission of the data message between the containers is reduced.
Optionally, in a possible implementation manner of the first aspect, the step further includes: and determining a new data message of the network card queue of the first container.
In this possible implementation manner, the data packet that the newly added first container needs to be transmitted to the second container is determined through the network card queue of the first container.
Optionally, in a possible implementation manner of the first aspect, the first advertisement message in the above step further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify a network card queue belonging to the second container on the virtual interface corresponding to the second container.
In this possible implementation manner, when there are multiple network card queues on the virtual interface, the identification is performed through the identifier of the network card queue, and then the second container obtains the correct data message from the first container.
Optionally, in a possible implementation manner of the first aspect, the determining of the network card queue new data packet of the first container in the above step includes: and determining a first pointer pointing to a target storage space of the first shared memory newly added in the network card queue, wherein the target storage space is used for storing the data message.
In this possible implementation manner, the data packet that the newly added first container needs to be transmitted to the second container is determined specifically by the first pointer of the network card queue on the first container.
Optionally, in a possible implementation manner of the first aspect, the first pointer is invalidated after being read.
In this possible implementation, the first pointer is invalidated after being read, so that the storage space of the memory is reduced.
A second aspect of the present application provides a communication method, which may be performed by a first host, or may be performed by a component of the first host (e.g., a packet server, a processor, a chip, or a system-on-chip in the first host). The method comprises the following steps: receiving a first notification message sent by a first virtual machine, wherein the first notification message comprises a first virtual storage address corresponding to the data message and the length of the data message, the data message is a message for communication between a first container on the first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; determining a first physical storage address corresponding to a first virtual storage address according to an address mapping table, wherein the first physical storage address is a physical storage address corresponding to a first shared memory where the data message is located, and the address mapping table stores a corresponding relation between one physical storage address and one or more virtual storage addresses; acquiring a data message according to the first physical storage address and the length; and if the second virtual machine is deployed on the first host, sending a second notification message to the second virtual machine, wherein the second notification message comprises a second virtual storage address and a length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification message is used for a second container to obtain data messages.
In the application, after receiving a first notification message sent by a first virtual machine, if a second virtual machine is deployed on a first host, sending a second notification message to the second virtual machine, and transmitting the address and the length of a data message by sending the notification message, so as to reduce the time delay caused by transmitting the data message between containers.
Optionally, in a possible implementation manner of the second aspect, the step further includes: and if the second virtual machine is deployed on the second host machine, sending the data message to the second host machine.
In this possible implementation manner, after receiving the first notification packet sent by the first virtual machine, if the second virtual machine is deployed on the second host, the second virtual machine sends the data packet to the second host, so that the second container obtains a correct data packet.
Optionally, in a possible implementation manner of the second aspect, the first virtual machine, the first host, and the second virtual machine in the above step share the first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host.
In the possible implementation manner, the host and the virtual machine share the shared memory, the virtual storage address and the length, so that the time delay caused by the transmission of the data message between the containers is reduced.
A third aspect of the present application provides a communication method, which may be performed by a second host, or may be performed by a component of the second host (e.g., a packet server, a processor, a chip, or a system-on-chip in the second host). The method comprises the following steps: receiving a data message from a first host, wherein the data message is a message for communication between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on the first host, the second virtual machine is deployed on the second host, and the first host and the second host are different hosts; determining a third virtual storage address corresponding to the second physical storage address according to an address mapping table, wherein the physical address stored in the data message is the second physical storage address, and the address mapping table stores the corresponding relation between one physical storage address and one or more virtual storage addresses; generating a third notification message according to the third virtual storage address and the length of the data message; and sending a third notification message to the second virtual machine, wherein the third notification message is used for the second container to acquire the data message.
In this possible implementation manner, the data packet from the first host is received, a third notification packet is generated according to the third virtual storage address and the length of the data packet, and the third notification packet is sent to the second virtual machine. The address and the length of the data message are transmitted by sending the notification message, so that the time delay caused by transmitting the data message between containers is reduced.
Optionally, in a possible implementation manner of the third aspect, the second virtual machine and the second host in the above step share one second shared memory, the second virtual machine is deployed on the second host, and the second physical storage address and the third virtual storage address point to the second shared memory; the second shared memory is used for storing the data message.
In the possible implementation manner, the host and the virtual machine share the shared memory, the virtual storage address and the length, so that the time delay caused by the transmission of the data message between the containers is reduced.
A fourth aspect of the present application provides a communication method, which may be performed by the second virtual machine, or may be performed by a component of the second virtual machine (e.g., a packet transceiving client in the second virtual machine, etc.). The method comprises the following steps: receiving an announcement message, wherein the announcement message comprises a virtual storage address where the data message is located and the length of the data message, the data message is a message for communication between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; and acquiring the data message according to the virtual memory address and the length.
In the possible implementation mode, the address and the length of the data message are determined by receiving the notification message, so that the data message is acquired, and the time delay caused by transmitting the data message between containers is reduced.
Optionally, in a possible implementation manner of the fourth aspect, the notification packet in the above step is generated by a first host, a second virtual machine is deployed on the first host, the first virtual machine, the first host, and the second virtual machine share a first shared memory, and the first shared memory is used to store the data packet.
In the possible implementation manner, the host and the virtual machine share the shared memory, the virtual storage address and the length, so that the time delay caused by the transmission of the data message between the containers is reduced.
Optionally, in a possible implementation manner of the fourth aspect, the notification message in the above step is generated by a second host, the second virtual machine is deployed on the second host, the second virtual machine and the second host share a second shared memory, and the second shared memory is used for storing the data message.
In the possible implementation manner, the host and the virtual machine share the shared memory, the virtual storage address and the length, so that the time delay caused by the transmission of the data message between the containers is reduced.
Optionally, in a possible implementation manner of the fourth aspect, the notification message in the above step further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify a network card queue belonging to the second container on the virtual interface corresponding to the second container.
In this possible implementation manner, when there are multiple network card queues on the virtual interface, the identification is performed through the identifier of the network card queue, and then the second container obtains the correct data message from the first container.
Optionally, in a possible implementation manner of the fourth aspect, the step further includes: and writing a second pointer into a network card queue of the second container so that the second container acquires the data message, wherein the second pointer points to a target storage space of the first shared memory or the second shared memory, and the target storage space is used for storing the data message.
In this possible implementation manner, specifically, a second pointer of the network card queue is added to the first container, so that the second container acquires the data packet according to the second pointer.
A fifth aspect of the present application provides a communication system including a first virtual machine, a first host, and a second virtual machine: the system comprises a first virtual machine, a second virtual machine and a third virtual machine, wherein the first virtual machine is used for acquiring a first virtual storage address of a data message and the length of the data message, the data message is a message communicated between a first container on the first virtual machine and a second container on the second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; the first virtual machine is also used for generating a first notification message according to the first virtual storage address and the length; the first virtual machine is further configured to send a first notification message to the first host, where the first notification message is used to enable the first host to trigger the second container to acquire the data message.
Optionally, in a possible implementation manner of the fifth aspect, the first host in the communication system is configured to determine, according to an address mapping table, a first physical storage address corresponding to a first virtual storage address, where the first physical storage address is a physical storage address corresponding to a storage space where the data packet is located, and the address mapping table stores a correspondence between one physical storage address and one or more virtual storage addresses; the first host is further used for acquiring the data message according to the first physical storage address and the length.
Optionally, in a possible implementation manner of the fifth aspect, the first host in the communication system is further configured to send a second notification message to the second virtual machine if the second virtual machine is deployed on the first host, where the second notification message includes a second virtual storage address and a length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification message is used for the second container to obtain the data packet; the first host is further configured to send the data packet to the second host if the second virtual machine is deployed on the second host.
Optionally, in a possible implementation manner of the fifth aspect, the communication system further includes: the second host is used for converting the second physical storage address into a third virtual storage address according to an address mapping table, the physical address of the storage space of the data message is the second physical storage address, and the address mapping table stores the corresponding relation between one physical storage address and one or more virtual storage addresses; the second host is also used for generating a third notification message according to the third virtual storage address and the length of the data message; the second host is further configured to send a third notification message to the second virtual machine, where the third notification message is used for the second container to obtain the data message.
Optionally, in a possible implementation manner of the fifth aspect, the second virtual machine in the communication system is configured to receive a second notification message sent by the first host if the second virtual machine is deployed on the first host; and the second virtual machine is also used for acquiring the data message according to the second virtual storage address and the length.
Optionally, in a possible implementation manner of the fifth aspect, a second virtual machine in the communication system is deployed on the second host, and the second virtual machine is configured to receive a third notification message sent by the second host; and the second virtual machine is also used for acquiring the data message according to the third virtual storage address and the length.
A sixth aspect of the present application provides a communication device, which may be a first virtual machine. Or may be a component of the first virtual machine (e.g., a packet forwarding/receiving client in the first virtual machine), and the communication apparatus includes: the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first virtual storage address of a data message and the length of the data message, the data message is a message communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; a generating unit, configured to generate a first notification packet according to the first virtual storage address and the length; and the sending unit is used for sending a first notification message to the first host, wherein the first notification message is used for enabling the first host to trigger the second container to acquire the data message.
Optionally, in a possible implementation manner of the sixth aspect, the data packet is stored in a first shared memory, a first virtual storage address points to the first shared memory, a first virtual machine, a first host, and a second virtual machine share the first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host; the first shared memory is used for storing data messages, and the first virtual storage address points to the first shared memory.
Optionally, in a possible implementation manner of the sixth aspect, the communication apparatus further includes: and the determining unit is used for determining the network card queue newly-added data message of the first container.
Optionally, in a possible implementation manner of the sixth aspect, the first advertisement message further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify a network card queue belonging to the second container on the virtual interface corresponding to the second container.
Optionally, in a possible implementation manner of the sixth aspect, the determining unit is specifically configured to determine that a first pointer pointing to a target storage space of the first shared memory is newly added in the network card queue, and the target storage space is used for storing the data packet.
Optionally, in a possible implementation manner of the sixth aspect, the first pointer is invalidated after being read.
A seventh aspect of the present application provides a communication device, which may be a first host. Or may be a component of the first host (a packet server, a processor, a chip, or a system-on-chip in the first host, etc.), and the communication apparatus includes: the receiving unit is used for receiving a first notification message sent by a first virtual machine, wherein the first notification message comprises a first virtual storage address corresponding to the data message and the length of the data message, the data message is a message communicated between a first container on the first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host; a determining unit, configured to determine, according to an address mapping table, a first physical storage address corresponding to a first virtual storage address, where the first physical storage address is a physical storage address corresponding to a first shared memory where the data packet is located, and the address mapping table stores a correspondence between one physical storage address and one or more virtual storage addresses; the acquisition unit is used for acquiring a data message according to the first physical storage address and the length; and the sending unit is used for sending a second notification message to the second virtual machine if the second virtual machine is deployed on the first host, wherein the second notification message comprises a second virtual storage address and a length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification message is used for a second container to obtain the data message.
Optionally, in a possible implementation manner of the seventh aspect, the sending unit is further configured to send the data packet to the second host if the second virtual machine is deployed on the second host.
Optionally, in a possible implementation manner of the seventh aspect, the first virtual machine, the first host, and the second virtual machine share a first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host; the first shared memory is used for storing the data message.
An eighth aspect of the present application provides a communication device, which may be a second host. Or may be a component of the second host (a packet server, a processor, a chip, or a system-on-chip in the second host, etc.), and the communication apparatus includes: a receiving unit, configured to receive a data packet from a first host, where the data packet is a packet communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on the first host, the second virtual machine is deployed on the second host, and the first host and the second host are different hosts; the determining unit is used for determining a virtual storage address corresponding to a physical storage address of the data message according to an address mapping table, and the address mapping table stores a corresponding relation between one physical storage address and one or more virtual storage addresses; the generating unit is used for generating an announcement message according to the virtual storage address and the length of the data message; and the sending unit is used for sending an announcement message to the second virtual machine, wherein the announcement message is used for the second container to acquire the data message.
Optionally, in a possible implementation manner of the eighth aspect, the second virtual machine and the second host share a shared memory, and the physical storage address and the virtual storage address point to the shared memory;
the shared memory is used for storing the data message.
A ninth aspect of the present application provides a communication device, which may be a second virtual machine. Or may be a component of the second virtual machine (for example, a packet transmission/reception client in the second virtual machine), and the communication device includes:
the receiving unit is used for receiving an announcement message, wherein the announcement message comprises a virtual storage address where the data message is located and the length of the data message, the data message is a message for communication between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
and the acquisition unit is used for acquiring the data message according to the virtual storage address and the length.
Optionally, in a possible implementation manner of the ninth aspect, the notification message is generated by a first host, the second virtual machine is deployed on the first host, the first virtual machine, the first host, and the second virtual machine share a first shared memory, and the first shared memory is used for storing the data message.
Optionally, in a possible implementation manner of the ninth aspect, the notification message is generated by a second host, the second virtual machine is deployed on the second host, the second virtual machine and the second host share a second shared memory, and the second shared memory is used for storing the data message.
Optionally, in a possible implementation manner of the ninth aspect, the notification message further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify a network card queue belonging to the second container on the virtual interface corresponding to the second container.
Optionally, in a possible implementation manner of the ninth aspect, the communication apparatus further includes: and the processing unit is used for writing a second pointer into the network card queue of the second container so that the second container acquires the data message, the second pointer points to a target storage space of the first shared memory or the second shared memory, and the target storage space is used for storing the data message.
A tenth aspect of the present application provides a communication device, which may be a first virtual machine or a component of the first virtual machine (e.g., a packet receiving and sending client in the first virtual machine), and which executes the method in the first aspect or any possible implementation manner of the first aspect.
An eleventh aspect of the present application provides a communication apparatus, which may be a first host or a component of the first host (e.g., a packet transceiver server, a processor, a chip, or a chip system in the first host), and which performs the method in any possible implementation manner of the second aspect or the second aspect.
A twelfth aspect of the present application provides a communication apparatus, which may be a second host or a component of the second host (e.g., a packet transceiver server, a processor, a chip, or a chip system in the second host), and which performs the method in any possible implementation manner of the second aspect or the second aspect.
A thirteenth aspect of the present application provides a communication device, which may be a second virtual machine, or may be a component of the second virtual machine (for example, a packet transceiving client in the second virtual machine), and the communication device executes the method in the foregoing first aspect or any possible implementation manner of the first aspect.
A fourteenth aspect of the present application provides a communication apparatus comprising: a processor coupled with a memory, the memory being configured to store a program or instructions that, when executed by the processor, cause the apparatus to implement the method of the first aspect or any possible implementation of the first aspect, or cause the apparatus to implement the method of the second aspect or any possible implementation of the second aspect, or cause the apparatus to implement the method of the third aspect or any possible implementation of the third aspect, or cause the apparatus to implement the method of the fourth aspect or any possible implementation of the fourth aspect.
A fifteenth aspect of the present application provides a communication system, which includes at least one of the first virtual machine (or the packet transceiving client in the first virtual machine) in the method of the first aspect, the first host (or the packet transceiving server in the first host) in the method of the second aspect, the second host (or the packet transceiving server in the second host) in the method of the third aspect, and the second virtual machine (or the packet transceiving client in the second virtual machine) in the method of the fourth aspect. Alternatively, the communication system includes at least one of the communication apparatus of the sixth aspect, the communication apparatus of the seventh aspect, the communication apparatus of the eighth aspect, and the communication apparatus of the ninth aspect. Alternatively, the communication system includes at least one of the communication apparatus of the tenth aspect, the communication apparatus of the eleventh aspect, the communication apparatus of the twelfth aspect, and the communication apparatus of the thirteenth aspect.
A sixteenth aspect of the present application provides a computer-readable medium having stored thereon a computer program or instructions which, when run on a computer, causes the computer to perform the method of the aforementioned first aspect or any possible implementation of the first aspect, or causes the computer to perform the method of the aforementioned second aspect or any possible implementation of the second aspect, or causes the computer to perform the method of the aforementioned third aspect or any possible implementation of the third aspect, or causes the computer to perform the method of the aforementioned fourth aspect or any possible implementation of the fourth aspect.
A seventeenth aspect of the present application provides a computer program product comprising a program that, when executed, causes a method in the aforementioned first aspect or any possible implementation of the first aspect to be performed, causes a method in the aforementioned second aspect or any possible implementation of the second aspect to be performed, causes a method in the aforementioned third aspect or any possible implementation of the third aspect to be performed, and causes a method in the aforementioned fourth aspect or any possible implementation of the fourth aspect to be performed.
For technical effects brought by the fifth, sixth, tenth, fourteenth, fifteenth, sixteenth, seventeenth aspects or any one of possible implementation manners of the fifth, sixth, tenth, fourteenth, fifteenth, sixteenth, seventeenth aspects, reference may be made to the technical effects brought by the first aspect or different possible implementation manners of the first aspect, and details are not described here.
For technical effects brought by the fifth, seventh, eleventh, fourteenth, fifteenth, sixteenth, seventeenth aspects or any one of possible implementation manners, reference may be made to technical effects brought by different possible implementation manners of the second aspect or the second aspect, and details are not described herein again.
For technical effects brought by the fifth, eighth, twelfth, fourteenth, fifteenth, sixteenth, seventeenth aspects or any one of possible implementation manners of the fifth, eighth, twelfth, fourteenth, fifteenth, sixteenth, seventeenth aspects, reference may be made to technical effects brought by different possible implementation manners of the third aspect or the third aspect, and details are not described here again.
For technical effects brought by the fifth, ninth, thirteenth, fourteenth, fifteenth, sixteenth, seventeenth aspects or any one of the possible implementation manners, reference may be made to technical effects brought by different possible implementation manners of the fourth aspect or the fourth aspect, and details are not described herein again.
According to the technical scheme, the address and the length of the data message are transmitted in a mode of sending the notification message, the data message does not need to be frequently copied, and time delay caused by data message transmission among containers can be reduced.
Drawings
FIG. 1 is a diagram of a virtualization architecture in the prior art;
FIG. 2 is a schematic diagram of a network framework in an embodiment of the present application;
FIG. 3 is a schematic diagram of a prior art inter-container communication process;
fig. 4 to fig. 6 are schematic structural diagrams of several communication systems in the embodiment of the present application;
fig. 7 is a schematic flow chart of a service processing method in the embodiment of the present application;
fig. 8 to 13 are schematic structural diagrams of the communication device in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Where in the description of the present application, "/" indicates an OR meaning, for example, A/B may indicate A or B, unless otherwise indicated. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. Also, in the description of the present application, "a plurality" means two or more than two unless otherwise specified. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," and the like do not denote any order or importance, but rather the terms "first," "second," and the like do not denote any order or importance.
First, some terms in the embodiments of the present application are explained so as to be easily understood by those skilled in the art.
1. Virtualization, container technology:
virtualization is an important foundation of cloud computing, and in the conventional virtualization technology, a virtual machine (also referred to as a virtual machine) is used as a management unit, and each virtual machine has an independent operating system kernel and has good isolation. The container technology can be regarded as a lightweight virtualization mode, and the container technology packages an application and a necessary execution environment into a container mirror image, so that the application program can directly run in a host machine in a relatively independent mode. The container technology is virtualized at the operating system level, and multiple virtualization environments can be run on the host kernel. Compared with the traditional application test and deployment, the deployment of the container does not need to consider the compatibility problem of the running environment of the application in advance; compared with the traditional virtual machine, the container can run in the host machine without an independent operating system kernel, and higher running efficiency and resource utilization rate are realized. The container technology is a technology for packaging applications into separate containers, and the container technology isolates each application, and breaks the dependency and connection relationship between the programs, that is, a huge service system can be combined by containers hosted by many different applications under the support of the container technology. Container technology effectively partitions resources managed by a single operating system into isolated groups to better balance conflicting resource usage requirements among the isolated groups, and virtualization technology belonging to the operating system level is widely used due to its lightweight nature.
2、Docker:
The Docker is one of the most representative container platforms at present, and in the Docker container technology, containers in a host are used as management units, and all the containers share kernel resources of the host, and isolation and limitation of the resources are realized through a virtualization technology. At the heart of container technology, a "boundary" is created for the process by constraining and modifying its dynamic behavior.
For most Linux containers such as Docker, the control groups (Cgroups) technique is the main means for making constraints, while the Namespace (Namespace) technique is the main method for modifying process views. Namespace and Cgroups are Linux kernel characteristics, namespaces are encapsulation isolation of global system resources, so that processes in different namespaces have independent global system resources, and changing the system resources in one Namespace only affects the process in the current Namespace and does not affect the processes in other namespaces. The Linux Cgroup is a function of the Linux kernel, and is used to limit, control, and separate resources (such as a Central Processing Unit (CPU), a memory, and a disk input/output) of a process group. Therefore, the container is essentially a process with a defined parameter, a running Docker container, which is actually an application process that enables multiple Linux Namespace, resource-constrained Cgroups configurations.
3. A virtual machine container:
the virtual machine container is a solution provided for the problem of container isolation safety, and the safety advantage of the virtual machine and the operation efficiency and resource utilization efficiency advantage of the container are combined by deploying a plurality of containers in the traditional virtual machine, so that the safety of the container is greatly improved under the condition of sacrificing some performances.
In a containerization scene, how to communicate among containers is an important subject, and the communication among containers needs to use a network virtualization technology. The network virtualization is an important ring in virtualization, and the technology can simulate a plurality of virtual networks which are isolated from each other on a physical network, so that different users can use independent network resource slices, the utilization rate of network resources is improved, and an elastic network is realized.
4、eventfd:
eventfd is a system call provided by Linux 2.6 that may be used to implement event notification. The eventfd comprises a 64-bit unsigned integer counter maintained by the kernel, a file descriptor is returned when the eventfd is created, and the processes can read/change the value of the counter by reading/writing (write) the file descriptor, so that the inter-process communication is realized.
5、Kubernetes(k8s):
Kubernets is an open-source container cluster management system. On the basis of the Docker technology, a series of complete functions such as deployment and operation, resource scheduling, service discovery, dynamic scaling and the like are provided for containerized application, and convenience in large-scale container cluster management is improved. Kubernets is a complete distributed system supporting platform and has complete cluster management capacity, a multi-expansion multi-level security protection and admission mechanism, multi-tenant application supporting capacity, a transparent service registration and discovery mechanism, an internal intelligent load balancer, strong fault discovery and self-repair capacity, service rolling upgrade and online capacity expansion capacity, an expandable resource automatic scheduling mechanism and multi-granularity resource quota management capacity. Meanwhile, Kubernetes provides a perfect management tool, and covers all links including development, deployment test and operation and maintenance monitoring.
6、Pod:
Pod is the smallest unit that kubernets can deploy and manage, and if one wants to run a container, one Pod is created for the container first. Also, a Pod may contain multiple containers, so that multiple containers are contained in a Pod, often due to tight coupling in service. Multiple processes (operated as containers) can be operated in a Pod to work cooperatively, containers in the same Pod can be automatically allocated to the same node, and the containers in the same Pod share resources, network environment and dependence and are always scheduled simultaneously. Each Pod is assigned a unique Internet Protocol (IP) address. All containers in a Pod share network space, including IP addresses and ports.
7. The cloud computing architecture:
the cloud computing architecture can be expressed by three-layer SPI (SaaS, PaaS and IaaS) models:
software as a Service (SaaS) layer (S layer): what the user sees and uses, web pages, mobile software (APP), reports, etc.
Platform as a Service (PaaS) layer (P layer): it can be understood as a platform layer, a background in a popular sense.
Infrastructure as a Service (IaaS) layer (I layer): it is understood to be an infrastructure layer, various networks, servers or hosts, storage devices.
Among them, a critical technical breakthrough in the convergence of hardware resources is virtualization. Virtualization can improve the effective utilization rate of resources, make operation more flexible, and simplify change management. A single physical server may have multiple virtual machines, each running as if on its own hardware, while providing separation and security. The method is characterized in that the host is managed in a centralized mode, the service is provided to the outside through a virtualization layer by a market mechanism, and a profit mode of charging according to the usage amount forms a basic layer of cloud computing. This is IaaS, which forms the base layer for cloud computing.
Since a physical host includes one or more network cards (NICs) in a conventional network environment, to implement communication with other physical hosts, it is necessary to connect to an external network facility through its own NIC. The application is isolated, and one application is often deployed on one physical device. In order to reduce the waste of physical resources, one physical resource may be abstracted by using a virtualization technology (as shown in fig. 1), one physical network card is virtualized into multiple virtual network cards (vnics), and different applications are isolated by using a virtual machine. The communication between the virtual machines is completed by virtual switches (vswitch, vsw), the link between the virtual network card and the virtual switch is also a virtual link, a virtual network is formed inside the whole host, and if three layers of network packet forwarding are involved between the virtual machines, the communication is completed by the virtual router.
In general, the modules of the whole set of virtual network can be separated and completed by a third party, for example, one of the solutions that is named by comparison is an Open VSwitch (OVS). The OVS is a piece of virtual switching software. Virtual switching is to form a switch component by software using a virtual platform. Compared with the traditional physical switch, the virtual switch is more flexible in configuration. Tens of virtual switches or even hundreds of virtual switches can be configured on a common server, and the number of ports can be flexibly selected. The OVS has the advantage that it is based on the design principle of software-defined networking (SDN), and facilitates the control and management of virtual machine clusters, and in addition, its distributed characteristic can implement virtual machine communication between cross hosts (or called servers) transparently, as shown in fig. 2, and fig. 2 is a schematic diagram of enabling OVS communication between cross hosts. The current container network and virtual machine network adopt the scheme. Wherein the virtualization management unit can be a container or a virtual machine.
Referring to fig. 2 and 3, a communication method of a current virtual machine container is described, as shown in fig. 3, a network management usually adopts a mode in which two sets of management systems coexist, a container network in a virtual machine and an I-layer virtual machine network on a host are separately managed, the virtual machine network is managed by using an open computing management platform (OPS), and the container network is managed by using k8 s. Inter-container communication can be classified into the following three cases:
1. communication between containers within the same virtual machine.
In this case, traffic is only forwarded in the virtual machine, and currently, the mainstream scheme is to directly forward the traffic by using an OVS or Linux bridge. The case of interworking using OVS bridges is described below as an example (other cases are similar). The OVS is provided with a bridge, and when a container is created, the OVS can hang the virtual network card of the container on the bridge. All containers within the same virtual machine are connected to the OVS bridge through which communications take place.
The message sent from the container 1 to the container 2 in the same virtual machine is firstly copied from the container 1 to the OVS network bridge in the virtual machine through the virtual network card of the container 1, and then copied to the virtual network card of the container 2 through the OVS network bridge, and the whole process has primary forwarding and secondary copying. In this case, the inter-container communication method in the virtual machine is the same as the conventional bare metal container communication method.
2. Communication between containers on two virtual machines on the same host.
This scenario involves container to virtual machine and virtual machine to host (host) communications, and in fig. 3 communications between container 2 and container 3 need to be forwarded over the container network in the virtual machine and the I-layer network on the host. Taking the OVS bridge on both the virtual machine and the host for forwarding as an example, the message sent from the container 2 to the container 3 is first copied from the container 2 to the OVS bridge in the virtual machine via the virtual network card of the container 2, then copied from the OVS bridge to the virtual network card of the first virtual machine (which may be referred to as vm1), and then copied from the virtual network card of vm1 to the OVS bridge on the host, at which time the message arrives at the host. In the process of sending data from the host to the container 3, the required forwarding times and copying times are consistent with the path of sending the message from the container 2 to the host. The whole process has three hops and five copies. In this case, the use of the virtual machine container increases the number of copies from the OVS to the virtual machine network card in the virtual machine and from the virtual machine network card to the host OVS back and forth four times compared with the conventional bare machine container.
3. And the container of the virtual machine is communicated with the outside of the host machine.
This case relates to container to host communication, and host to outside communication, and only container to host communication is discussed here. In the process of sending the message from the container 1 to the host, firstly, the message is copied from the virtual network card of the container 1 to the OVS bridge in the virtual machine, then the message is copied to the virtual network card of vm1 by the OVS bridge, and finally the message is copied from the virtual network card of vm1 to the OVS bridge on the host, and at this time, the message reaches the host and then is forwarded to the outside by the host. This process has a total of two hops and three copies. In this case, the virtual machine container is used for copying from the OVS to the virtual machine network card in the virtual machine and from the virtual machine network card to the host OVS more than the traditional bare machine container.
As can be seen from fig. 3, the packet transmitted between the containers needs to be copied for multiple times, and the forwarding performance is low.
In view of the above problems, embodiments of the present application provide a communication method, where addresses and lengths of data packets are transmitted by sending notification packets, and data packets do not need to be frequently copied, so that delay caused by data packet transmission between containers can be reduced. The data message in the present application may be any kind of data for inter-container communication, encapsulated in any manner. For example, the data packet may be used to carry control signaling, may also be used to carry service data, and may include protocol information, may also be a data payload, may be two-layer data, may also be three-layer data, or data of other layers.
Fig. 4 is a schematic diagram of a communication system to which the communication method provided in the embodiment of the present application is applied, where the communication system includes: a host machine and a virtual machine. A virtual machine may run on a host machine.
The host comprises a user space (user space) part and a kernel space (kernel space) part, the userpace comprises an agent and a virtual switch, and the virtual switch comprises a packet receiving and sending server. Kernel space includes Hypervisor. The virtual machine comprises a proxy, a packet sending and receiving client, and one or more containers (container 1 and container 2 are shown in the figure), wherein each container corresponds to one virtual interface (hereinafter collectively referred to as an interface), for example, container 1 corresponds to interface 1, and container 2 corresponds to interface 2.
An agent (agent) component is deployed on the host computer, an agent (proxy) component is deployed in the virtual machine, and the agent component and the proxy component are uniformly managed by k8 s. Compared with the virtual machine network and the container network of the virtual machine in fig. 3 which are managed separately, the virtual machine network needs to manage openStack, and the container network needs to manage k8 s. Fig. 4 uses a set of integrated network management schemes to manage the container network and the virtual machine network simultaneously, which simplifies the complexity of network management of the virtual machine container.
When k8s issues the container creation event to the host, agent on the host listens to the event, notifies the container creation event to proxy in the virtual machine through eventfd mechanism, and the proxy is responsible for creation and management (for example, interface creation and binding) of the container network.
The agent running on the host is a framework supporting plug-in type extension, and a plug-in responsible for virtual machine network management and a plug-in responsible for container network management run under the framework of the agent simultaneously to manage the network on the host together. The virtual machine network management plug-in may adopt a virtual machine management scheme such as kubevir, virtlet, and the like, and is not limited herein. Container network management referring to the management channel in fig. 4, the containers in the virtual machines are no longer managed by the virtual machines themselves, but are managed by the host machines.
Data transmission between containers refers to a data channel in fig. 4, vsw is no longer deployed in the virtual machine, and when vsw on the host is started, mapping relationships from all virtual addresses to physical addresses (which may be called as an address mapping table) on the host are obtained from the Hypervisor, and the address mapping relationships are also dynamically and synchronously updated in the running process. The Hypervisor in the kernel masters the whole memory resource, maintains the mapping relation from the virtual address to the machine address, and the control channel between the packet receiving and sending client and the Hypervisor is mainly used for the packet receiving and sending client to obtain the mapping relation between the virtual address and the physical address from the Hypervisor. The control channel between the packet receiving and transmitting server and the packet receiving and transmitting client is mainly used for the packet receiving and transmitting server to monitor the message of the packet receiving and transmitting client and maintain the corresponding relation of the packet receiving and transmitting client connected to the virtual machine so as to distinguish the connection of different virtual machines. After the virtual machine on the host computer is started, the packet receiving and sending client in the virtual machine is also started at the same time, the connection is established with the packet receiving and sending server on the host computer, and the network card queue of the container on the virtual machine is monitored. If a new message is added to the network card queue, the event fd mechanism is used between the packet receiving and sending client in the virtual machine and the packet receiving and sending server in the host to perform message receiving and sending notification, and the copy of the message received and sent between the virtual machine and the host is reduced or avoided by sharing the memory between the virtual machine and the host. Here, the evevvtfd can also be understood as a bottom layer notification mechanism, and does not pass through a protocol stack.
It is understood that an interface on a virtual machine may also connect more containers, such as: one interface connects two containers, as shown in fig. 5, container 1 shares interface 1 with container 2, and container 3 shares interface 2. In addition, the number of hosts and virtual machines in the communication system may be multiple, and is not limited herein. For example: as shown in fig. 6, the communication system includes a server 1 and a server 2. The virtual machine 1, the virtual machine 2 and the virtual switch 1 are deployed on the server 1, and the virtual machine 3 and the virtual switch 2 are deployed on the server 2. The virtual machine 1 includes a container 1 and a container 2, and the container 1 and the container 2 share an interface 1. The virtual machine 2 includes a container 3 therein, and the container 3 communicates using the interface 1. The virtual machine 3 includes a container 4 and a container 5, and the container 4 and the container 5 share the interface 1. k8s manages the whole system, server 1 (also called host 1 or node 1) and server 2 (also called host 2 or node 2) communicate with each other through switches, which can be leaf switches (leaf) and/or backbone switches (spine). Each server runs a distributed agent for managing the virtual machine network and the container network on the server. And running a distributed proxy in each virtual machine on each server, wherein the distributed proxy is used for receiving the call of the agent and executing a specific container network management event in the virtual machine. And a packet receiving and transmitting server is operated in each vsw on each server, a packet receiving and transmitting client is operated in each virtual machine on each server, and the packet receiving and transmitting server and the packet receiving and transmitting client cooperate to complete the communication between the containers through an eventfd mechanism.
The following describes a communication method in the embodiment of the present application with reference to the communication systems of fig. 4 to 6. The communication device (which may also be referred to as a server, a network device, or the like) in the embodiment of the present application may refer to a first virtual machine, a second virtual machine, a first host, or a second host, which is not limited herein.
Referring to fig. 7, an embodiment of a communication method provided in the present application includes steps 701 to 710 b. The communication method may be executed by the virtual machine and the host, or may be executed by a packet receiving and sending client in the virtual machine and a packet receiving and sending server in the host, which is not limited herein.
In step 701, the first virtual machine obtains a first virtual memory address and a length of the data packet.
In the embodiment of the application, the first virtual machine may obtain the first virtual storage address and the length of the data packet in a plurality of ways, and the first virtual storage address and the length may be obtained by determining a way of adding a new data packet to a network card queue of the first container. The first virtual storage address and the length may be sent to the first virtual machine by another device than the first virtual machine, and the like, and the specific details are not limited herein. Optionally, the first host and the first virtual machine share a first shared memory, where the first shared memory is used to store the data packet, and the first virtual storage address points to the first shared memory, or, when the first shared memory space is large, the first virtual storage address points to a storage space in the first shared memory, where the data packet is stored.
Optionally, the determining of the newly added data message in the network card queue of the first container may be that a first pointer pointing to a target storage space of the first shared memory is newly added in the network card queue of the first container, and the target storage space stores the data message.
In this embodiment, the data packet is a packet communicated between a first container on a first virtual machine and a second container on a second virtual machine, that is, a packet that needs to be transmitted between the first container and the second container.
In step 702, the first virtual machine generates a first notification packet according to the first virtual storage address and the length.
After acquiring the first virtual storage address and the length of the data message, the first virtual machine generates a first notification message according to the first virtual storage address and the length.
Optionally, the packet receiving and sending client in the first virtual machine generates a first notification packet according to the first virtual storage address and the length.
For example, the format of the first notification message may be as shown in table 1:
TABLE 1
Field(s) Sample examples Description of the invention
Length 500 Length of data message
Address 0xb7a3001000000000 Virtual memory address of data message
Optionally, the first advertisement packet further includes an interface number, and the interface number may be used to identify an interface in a second virtual machine to which the second container is connected.
For example, if the interface 1 corresponds to a network card queue identifier (queue ID), the format of the first notification packet may be as shown in table 2 or table 3:
TABLE 2
Field(s) Sample examples Description of the invention
Length 500 Length of data message
Veth 1 Interface numbering
Address 0xb7a3001000000000 Virtual memory address of data message
Optionally, the first advertisement message further includes an identifier of a network card queue, where the identifier of the network card queue may be used to identify a network card queue belonging to the second container on the virtual interface corresponding to the second container.
TABLE 3
Field(s) Sample examples Description of the invention
Length 500 Length of data message
queue ID 2 Network card queue identification
Address 0xb7a3001000000000 Virtual memory address of data message
Optionally, if one virtual machine interface bears virtual network cards of multiple containers, the queue ID is added to the notification message in the embodiment of the present application to distinguish network card queues of different containers on the same interface, and the virtual machine and the host store the corresponding relationship between the network card queues of the containers and the queue ID, so that when the notification message is sent, the network card queue belonging to a certain container on the queue ID identification interface can be added.
For example, if the interface 1 corresponds to a plurality of network card queue identifiers, the format of the first notification packet may be as shown in table 4:
TABLE 4
Field(s) Sample examples Description of the invention
Length 500 Length of data message
Veth 1 Interface numbering
queue ID 2 Network card queue identification
Address 0xb7a3001000000000 Virtual memory address of data message
It should be understood that the format of the first advertisement message is only an example, and the specific format is not limited herein.
In step 703, the first virtual machine sends a first notification message to the first host.
After the first virtual machine generates the first notification message, the first virtual machine sends the first notification message to the first host.
Optionally, the packet transceiving client in the first virtual machine sends the first notification message to the packet transceiving server in the first host, and specifically, the eventfd mechanism may be used to transmit the first notification message, which may be understood as that the packet transceiving client in the first virtual machine and the packet transceiving server in the first host are used as two processes on the first host, and the eventfd mechanism is used to perform inter-process communication to transmit the first notification message.
In step 704, the first host determines a first physical storage address corresponding to the first virtual storage address according to the address mapping table.
In this embodiment of the present application, a manner of obtaining the address mapping table by the first host may be obtained from a Hypervisor in a kernel of the first host, or may be obtained by sending the address mapping table to the first host through another device, and the specific details are not limited herein. The address mapping table stores a corresponding relationship between a physical storage address and a plurality of virtual storage addresses. The Hypervisor in the kernel maintains a mapping relationship (i.e., address mapping table) of virtual storage addresses to machine addresses (which may also be understood as physical storage addresses).
After obtaining the address mapping table and the first notification packet, the first host determines a first physical storage address corresponding to the first virtual storage address, where the first physical storage address is a physical storage address corresponding to a storage space (which may be understood as the aforementioned first shared memory) where the data packet is located, or may be understood as that the first physical storage address points to the first shared memory.
Optionally, the packet receiving and sending server in the first host determines a first physical storage address corresponding to the first virtual storage address.
In step 705, the first host obtains the data packet according to the first physical memory address and the length.
After determining a first physical storage address of the data message, the first host acquires the data message from the first shared memory according to the first physical storage address and the length.
Optionally, the packet receiving and sending server in the first host obtains the data packet from the first shared memory according to the first physical storage address and the length.
Optionally, the first host determines a next hop address and an outgoing interface of the data packet according to a destination address and a vsw forwarding rule in the data packet, and further determines whether the second container on the second virtual machine is deployed on the first host or the second host according to the next hop address and/or the outgoing interface of the data packet. Wherein, the vsw forwarding rule may be pre-configured.
Optionally, after the first host acquires the data packet, it may be determined whether the second virtual machine is deployed on the first host or the second host according to the data packet. If the second virtual machine is deployed on the first host, then step 706a and step 707a are performed. If the second virtual machine is deployed on the second host, then steps 706b through 710b are performed.
In step 706a, if the second virtual machine is deployed on the first host, the first host sends a second notification message to the second virtual machine.
And if the second virtual machine is deployed on the first host machine, the first host machine determines a second virtual storage address corresponding to the first physical storage address, and generates a second notification message according to the second virtual storage address and the length of the data message. And sending a second notification message to the second virtual machine. The first virtual storage address and the second virtual storage address may be the same or different, but the first virtual storage address and the second virtual storage address correspond to the first physical storage address, and it can also be understood that the first virtual storage address and the second virtual storage address point to the same physical storage space.
In this embodiment, the format of the second notification message is similar to that of the first notification message, and details are not repeated here.
Optionally, after the packet receiving and sending server in the first host generates the second notification message, the second notification message is sent to the packet receiving and sending client in the second virtual machine according to the correspondence table. The corresponding relation table stores the corresponding relation between the virtual machines and the packet receiving and sending client sides, and one virtual machine corresponds to one packet receiving and sending client side.
In step 707a, the second virtual machine obtains the data packet according to the second notification message.
And after receiving the second notification message, the second virtual machine acquires the data message according to the second virtual storage address and the length. It can be understood that the second virtual machine reads the data packet from the first shared memory according to the length and the second virtual storage address. The second virtual machine is deployed on the first host, and the first virtual machine, the first host and the second virtual machine share the first shared memory. And the second virtual storage address points to the first shared memory for storing the data message. Therefore, the second virtual machine can find the first shared memory for storing the data message according to the second virtual storage address, and take out the data message from the first shared memory according to the length.
Optionally, after receiving the second notification packet, the packet-sending client in the second virtual machine reads the data packet according to the second virtual address and the length. And the data message is placed on the network card queue of the second container, so that the second container acquires the data message.
Optionally, the first pointer may be invalidated after being read (the first virtual machine or a packet receiving and sending client in the first virtual machine reads), or a response message (used to indicate that the second container has correctly received the data message) is fed back after the second container acquires the data message, and the first virtual machine may delete the first pointer from the network card queue of the first container.
In step 706b, if the second virtual machine is deployed on the second host, the first host sends a data packet to the second host.
Optionally, the packet receiving and sending server in the first host sends the data packet to the packet receiving and sending server in the second host.
Optionally, the first host sends the data packet to the second host according to the destination address and the vsw forwarding rule in the data packet.
It is understood that the first host may also send the data packet to the second host through the third host, that is, the first host does not directly send the data packet to the second host, and accordingly, the second host receives the data packet from the first host. There may be no intermediate device (third host), or there may be multiple intermediate devices (third hosts), which is not limited here.
In step 707b, the second host determines a third virtual storage address corresponding to the second physical storage address according to the address mapping table.
And the second host receives the data message sent by the first host, stores the data message in the second physical storage address, and converts the second physical storage address for storing the data message into a third virtual storage address according to the address mapping table. For example, after receiving the data packet sent by the first host, the second host stores the data packet in the second shared memory, and the physical storage address of the second shared memory is the second physical storage address.
Optionally, the packet receiving and sending server in the second host determines a third virtual storage address corresponding to the second physical storage address according to the address mapping table.
Optionally, the second virtual machine and the second host share a second shared memory, the second shared memory stores the data packet, and the second physical storage address and the third virtual storage address point to the second shared memory.
In step 708b, the second host generates a third notification message according to the third virtual storage address and the length of the data message.
And after the second host determines the third virtual storage address, generating a third notification message according to the third virtual storage address and the length of the data message.
Optionally, the packet receiving and sending server in the second host generates a third notification message according to the third virtual storage address and the length of the data message.
In this embodiment of the application, the format of the third notification message is similar to that of the first notification message, and details are not described here again.
In step 709b, the second host sends a third notification message to the second virtual machine.
Optionally, the packet receiving and sending server in the second host sends the third notification message to the packet receiving and sending client in the second virtual machine.
In step 710b, the second virtual machine obtains the data packet according to the third notification message.
After receiving the third notification message, the second virtual machine obtains the data message according to the third virtual storage address and the length, which can be understood as that the second virtual machine reads the data message from the second shared memory according to the length and the third virtual storage address. Since the second virtual machine is deployed on the second host, the second virtual machine and the second host share the second shared memory. And the third virtual memory address points to the second shared memory for storing the data message. Therefore, the second virtual machine can find the second shared memory for storing the data message according to the third virtual storage address, and take out the data message from the second shared memory according to the length.
Optionally, after receiving the third notification message, the packet receiving and sending client in the second virtual machine reads the data message according to the third virtual storage address and the length. And the data message is placed on the network card queue of the second container, so that the second container acquires the data message.
In a possible implementation manner, the communication method of the embodiment of the present application includes steps 701 to 703, that is, communication between the virtual machine and the host. In another possible implementation manner, the communication method of the embodiment of the present application includes steps 701 to 707a, that is, communication between containers in different virtual machines on the same host. In another possible implementation manner, the communication method of the embodiment of the present application includes steps 701 to 705, and steps 707a to 710b, that is, communication between containers on different hosts.
The communication method in the embodiment of the application may be applied to Linux Container (LXC), libvirt-LXC, and may also be applied to scenarios such as Docker and socket, and is not limited herein.
In the embodiment of the application, on one hand, the address and the length of the data message are transmitted by sending the notification message and sharing the memory between the virtual machine and the host, so that the time delay caused by transmitting the data message between containers is reduced, the data message does not need to be frequently copied, and the copying or forwarding of the data message in the transmission process can be reduced. On the other hand, agent components and proxy components are uniformly managed by a k8s set of management system (i.e. virtual machine network and container network are uniformly managed). Compared with the case network of the virtual machine and the virtual machine network on the host machine which are separately managed in fig. 3, the embodiment of the present application uses a set of integrated network management schemes to manage the case network and the virtual machine network simultaneously, thereby simplifying the complexity of network management of the virtual machine case.
Corresponding to the method provided by the above method embodiment, the embodiment of the present application further provides a corresponding apparatus, which includes a module for executing the above embodiment. The module may be software, hardware, or a combination of software and hardware.
Referring to fig. 8, an embodiment of a communication device in the embodiment of the present application is shown, where the communication device may be a first virtual machine, or may be a component of the first virtual machine (for example, a packet sending and receiving client in the first virtual machine), and the communication device includes:
an obtaining unit 801, configured to obtain a first virtual storage address of a data packet and a length of the data packet, where the data packet is a packet for communication between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
a generating unit 802, configured to generate a first notification packet according to the first virtual storage address and the length;
a sending unit 803, configured to send the first notification packet to the first host, where the first notification packet is used to enable the first host to trigger the second container to obtain the data packet.
Optionally, the communication device further comprises: a determining unit 804, configured to determine that the network card queue of the first container adds the data packet.
Optionally, the first pointer is invalidated after being read.
Optionally, the first virtual machine, the first host, and a second virtual machine share a first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host; the first shared memory is used for storing the data message, and the first virtual storage address points to the first shared memory.
Optionally, the first advertisement message further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify the network card queue belonging to the second container on the virtual interface corresponding to the second container.
Optionally, the determining unit 804 is specifically configured to determine that a first pointer pointing to a target storage space of the first shared memory is newly added to the network card queue, where the target storage space is used to store the data packet.
In this embodiment, operations performed by each unit in the communication device are similar to those described for the first virtual machine or the packet receiving and sending client in the first virtual machine in the embodiments shown in fig. 4 to fig. 7, and are not described again here.
In this embodiment, the sending unit 803 transmits the address and the length of the data packet by sending the notification packet, so as to reduce the time delay caused by transmitting the data packet between the containers, that is, reduce the copy or forwarding of the data packet during transmission.
Referring to fig. 9, in another embodiment of the communication device in the embodiment of the present application, the communication device may be a first host, or may be a component of the first host (for example, a packet service end, a processor, a chip, or a system-on-chip in the first host), and the communication device includes:
a receiving unit 901, configured to receive a first notification message sent by a first virtual machine, where the first notification message includes a first virtual storage address corresponding to a data message and a length of the data message, the data message is a message for communication between a first container on the first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
a determining unit 902, configured to determine, according to an address mapping table, a first physical storage address corresponding to the first virtual storage address, where the first physical storage address is a physical storage address corresponding to a first shared memory where the data packet is located, and the address mapping table stores a correspondence between one physical storage address and one or more virtual storage addresses;
an obtaining unit 903, configured to obtain the data packet according to the first physical storage address and the length;
a sending unit 904, configured to send a second notification packet to the second virtual machine if the second virtual machine is deployed on the first host, where the second notification packet includes a second virtual storage address and the length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification packet is used for the second container to obtain the data packet.
Optionally, the sending unit 904 is further configured to send the data packet to the second host if the second virtual machine is deployed on the second host.
Optionally, the first virtual machine, the first host, and a second virtual machine share a first shared memory, and the second virtual machine is deployed on the first host; or the first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host; the first shared memory is used for storing the data message.
In this embodiment, operations performed by each unit in the communication device are similar to those described for the first host or the packet receiving and sending server in the first host in the embodiments shown in fig. 4 to fig. 7, and are not described again here.
In this embodiment, after the receiving unit 901 receives a first notification message sent by a first virtual machine, if a second virtual machine is deployed on a first host, the sending unit 904 sends a second notification message to the second virtual machine, and the sending unit 904 transmits an address and a length of a data message by sending the notification message, so as to reduce a delay caused by transmitting the data message between containers.
Referring to fig. 10, in another embodiment of the communication device in the embodiment of the present application, the communication device may be a second host, or may be a component of the second host (for example, a packet transceiver server, a processor, a chip, or a system-on-chip in a first host), and the communication device includes:
a receiving unit 1001, configured to receive a data packet from a first host, where the data packet is a packet communicated between a first container on the first virtual machine and a second container on the second virtual machine, the first virtual machine is deployed on the first host, the second virtual machine is deployed on a second host, and the first host and the second host are different hosts;
a determining unit 1002, configured to determine a virtual storage address corresponding to a physical storage address of a data packet according to an address mapping table, where the address mapping table stores a correspondence between one physical storage address and one or more virtual storage addresses;
a generating unit 1003, configured to generate an announcement message according to the virtual storage address and the length of the data message;
a sending unit 1004, configured to send the notification packet to the second virtual machine, where the notification packet is used by the second container to obtain the data packet.
Optionally, a second virtual machine and the second host share a shared memory, the second virtual machine is deployed on the second host, and the physical storage address and the virtual storage address point to the shared memory; the shared memory is used for storing the data message.
In this embodiment, operations performed by each unit in the communication device are similar to those described for the second host or the packet receiving and sending server in the second host in the embodiments shown in fig. 4 to fig. 7, and are not described again here.
In this embodiment, the receiving unit 1001 receives a data packet from the first host, the generating unit 1003 generates a third notification packet according to the third virtual storage address and the length of the data packet, and the sending unit 1004 sends the third notification packet to the second virtual machine. The sending unit 1004 reduces the delay caused by the transmission of the data packet between the containers by transmitting the address and the length of the data packet in the form of the notification packet.
Referring to fig. 11, in another embodiment of a communication device in the embodiment of the present application, the communication device may be a second virtual machine, or may be a component of the second virtual machine (for example, a packet sending and receiving client in the second virtual machine), and the communication device includes:
a receiving unit 1101, configured to receive an announcement message, where the announcement message includes a second virtual storage address where a data message is located and a length of the data message, where the data message is a message for communication between a first container on a first virtual machine and a second container on a second virtual machine, where the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
an obtaining unit 1102, configured to obtain the data packet according to the second virtual storage address and the length.
Optionally, the communication device further comprises: a processing unit 1103, configured to write a second pointer into a network card queue of the second container, so that the second container obtains the data packet, where the second pointer points to a target storage space of the first shared memory or the second shared memory, and the target storage space is used to store the data packet.
Optionally, the notification packet is generated by the first host, the second virtual machine is deployed on the first host, the first virtual machine, the first host, and the second virtual machine share a first shared memory, and the first shared memory is used to store the data packet.
Optionally, the notification packet is generated by the second host, the second virtual machine is deployed on the second host, the second virtual machine and the second host share a second shared memory, and the second shared memory is used for storing the data packet.
Optionally, the notification message further includes an identifier of a network card queue, where the identifier of the network card queue is used to identify the network card queue belonging to the second container on the virtual interface corresponding to the second container.
In this embodiment, operations performed by each unit in the communication device are similar to those described for the second virtual machine or the packet receiving and sending client in the second virtual machine in the embodiments shown in fig. 4 to fig. 7, and are not described again here.
In this embodiment, the receiving unit 1101 receives the notification message and determines the address and length of the data message, and the obtaining unit 1102 obtains the data message, thereby reducing the time delay caused by transmitting the data message between the containers.
Referring to fig. 12, a possible schematic diagram of a communication device according to the foregoing embodiment, the communication device may specifically be the first host (where the first virtual machine is disposed on the first host or the first virtual machine and the second virtual machine are disposed on the first host) or the second host (where the second virtual machine may be disposed on the second host) in the foregoing embodiment, and the communication device may include but is not limited to a processor 1201, a communication port 1202, a memory 1203, and a bus 1204.
The processor 1201 may be a central processing unit, general purpose processor, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in this disclosure. The processor 1201 may also be a combination of computing functions, such as a combination including one or more microprocessors, a digital signal processor and a microprocessor, or the like. For convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The storage 1203 may include a first shared memory or a second shared memory for storing the data packet.
In this embodiment of the application, the first virtual machine and the first host share a set of physical devices, or the first virtual machine, the second virtual machine and the first host share a set of physical devices, or the second virtual machine and the second host share a set of physical devices, which is not limited herein.
It should be noted that the communication apparatus shown in fig. 12 may be specifically configured to implement the functions of the steps executed by the communication apparatus in the method embodiments corresponding to fig. 4 to fig. 7, and implement the technical effect corresponding to the communication apparatus, and the specific implementation manner of the communication apparatus shown in fig. 12 may refer to the descriptions in each of the method embodiments corresponding to fig. 4 to fig. 7, and is not described in detail here.
Optionally, a communication device may also be as shown in fig. 13, which may include but is not limited to a processor 1301, a communication port 1302, a memory 1303, and a bus 1304. The functions and advantageous effects of the units in fig. 13 can refer to the description of the units in fig. 12, and different from the description of fig. 12, the processor 1301 in fig. 13 includes a packet transceiving server and a packet transceiving client, where the packet transceiving client mainly monitors a packet transceiving queue of a container in a virtual machine and generates an advertisement packet in the embodiments shown in fig. 4 to fig. 7, and the packet transceiving client runs on the virtual machine. The other part is a packet receiving and transmitting server, which is responsible for processing the message and generating the notification message in the embodiments shown in fig. 4 to fig. 7, and the packet receiving and transmitting server runs on the physical server.
An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, and when the computer-executable instructions are executed by a processor, the processor executes a method according to a possible implementation manner of a communication apparatus in the foregoing embodiment, where the communication apparatus may specifically be the communication apparatus in the method embodiments corresponding to fig. 4 to fig. 7.
An embodiment of the present application further provides a computer program product storing one or more computers, and when the computer program product is executed by the processor, the processor executes a method that may be implemented by the communication apparatus, where the communication apparatus may specifically be the communication apparatus in the method embodiments corresponding to fig. 4 to fig. 7.
The embodiment of the present application further provides a chip system, where the chip system includes a processor, and is configured to support a communication device to implement functions involved in possible implementation manners of the communication device. In one possible design, the system-on-chip may further include a memory, which stores program instructions and data necessary for the communication device. The chip system may be formed by a chip, or may include a chip and other discrete devices, where the communication device may specifically be the communication device in the method embodiments corresponding to fig. 4 to fig. 7.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

Claims (25)

1. A method of communication, the method comprising:
acquiring a first virtual storage address of a data message and a length of the data message, wherein the data message is a message communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
generating a first notification message according to the first virtual storage address and the length;
and sending the first notification message to the first host, wherein the first notification message is used for triggering the first host to acquire the data message by the second container.
2. The method of claim 1, wherein the datagram is stored in a first shared memory, wherein the first virtual memory address points to the first shared memory,
the first virtual machine, the first host and the second virtual machine share the first shared memory, and the second virtual machine is deployed on the first host;
or
The first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host.
3. The method of claim 2, wherein before the obtaining the first virtual memory address of the data packet and the length of the data packet, the method further comprises:
and determining that the network card queue of the first container is newly added with the data message.
4. The method according to claim 3, wherein the first advertisement message further includes an identifier of a network card queue, and the identifier of the network card queue is used to identify the network card queue belonging to the second container on the virtual interface corresponding to the second container.
5. The method according to claim 3 or 4, wherein the determining that the network card queue of the first container adds the data packet comprises:
determining that a first pointer pointing to a target storage space of the first shared memory is newly added in the network card queue, where the target storage space is used for storing the data packet.
6. The method of claim 5, wherein the first pointer is invalidated after being read.
7. A method of communication, the method comprising:
receiving a first notification message sent by a first virtual machine, where the first notification message includes a first virtual storage address corresponding to a data message and a length of the data message, the data message is a message communicated between a first container on the first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
determining a first physical storage address corresponding to the first virtual storage address according to an address mapping table, wherein the first physical storage address is a physical storage address corresponding to a first shared memory where the data message is located, and the address mapping table stores a corresponding relation between one physical storage address and one or more virtual storage addresses;
acquiring the data message according to the first physical storage address and the length;
and if the second virtual machine is deployed on the first host, sending a second notification message to the second virtual machine, where the second notification message includes a second virtual storage address and the length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification message is used for the second container to obtain the data message.
8. The method of claim 7, further comprising:
and if the second virtual machine is deployed on the second host machine, sending the data message to the second host machine.
9. The method of claim 7 or 8, wherein the first virtual machine, the first host, and the second virtual machine share the first shared memory, the second virtual machine being deployed on the first host;
or
The first virtual machine and the first host share the first shared memory, and the second virtual machine is deployed on the second host.
10. A method of communication, the method comprising:
receiving a data message from a first host, wherein the data message is a message communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on the first host, the second virtual machine is deployed on a second host, and the first host and the second host are different hosts;
determining a virtual storage address corresponding to a physical storage address of the data message according to an address mapping table, wherein the address mapping table stores a corresponding relation between one physical storage address and one or more virtual storage addresses;
generating an announcement message according to the quasi-storage address and the length of the data message;
and sending the notification message to the second virtual machine, wherein the notification message is used for the second container to obtain the data message.
11. The method of claim 10,
the second virtual machine and the second host share a shared memory, and the physical storage address and the virtual storage address point to the shared memory;
the shared memory is used for storing the data message.
12. A method of communication, the method comprising:
receiving an announcement message, wherein the announcement message comprises a virtual storage address where a data message is located and the length of the data message, the data message is a message for communication between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
and acquiring the data message according to the virtual storage address and the length.
13. The method of claim 12, wherein the advertisement packet is generated by the first host, wherein the second virtual machine is deployed on the first host, and wherein the first virtual machine, the first host, and the second virtual machine share a first shared memory, and wherein the first shared memory is used for storing the data packet.
14. The method of claim 12, wherein the advertisement packet is generated by the second host, wherein the second virtual machine is deployed on the second host, and wherein the second virtual machine and the second host share a second shared memory, and wherein the second shared memory is used for storing the data packet.
15. The method according to any one of claims 12 to 14, wherein the notification message further includes an identifier of a network card queue, and the identifier of the network card queue is used to identify the network card queue belonging to the second container on the virtual interface corresponding to the second container.
16. The method of claim 15, further comprising:
writing a second pointer into a network card queue of the second container so that the second container acquires the data message, wherein the second pointer points to a target storage space of the first shared memory or the second shared memory, and the target storage space is used for storing the data message.
17. A communication system, comprising a first virtual machine, a first host, and a second virtual machine, the first virtual machine configured to:
acquiring a first virtual storage address of a data message and a length of the data message, wherein the data message is a message communicated between a first container on a first virtual machine and a second container on a second virtual machine, the first virtual machine is deployed on a first host, and the second virtual machine is deployed on the first host or a second host different from the first host;
generating a first notification message according to the first virtual storage address and the length;
and sending the first notification message to the first host, wherein the first notification message is used for triggering the first host to acquire the data message by the second container.
18. The communication system of claim 17, wherein the first host is configured to:
determining a first physical storage address corresponding to the first virtual storage address according to an address mapping table, wherein the first physical storage address is a physical storage address corresponding to a storage space where the data message is located, and the address mapping table stores a corresponding relation between one physical storage address and one or more virtual storage addresses;
and acquiring the data message according to the first physical storage address and the length.
19. The communication system of claim 18, wherein the first host is further configured to:
if the second virtual machine is deployed on the first host machine, sending a second notification message to the second virtual machine, where the second notification message includes a second virtual storage address and the length, the second virtual storage address is obtained by converting the first physical storage address, and the second notification message is used for the second container to obtain the data message;
or
And if the second virtual machine is deployed on the second host machine, sending the data message to the second host machine.
20. The communication system according to any of claims 17-19, wherein the communication system further comprises the second host configured to:
converting the second physical storage address into a third virtual storage address according to an address mapping table, wherein the physical address of the storage space of the data message is the second physical storage address, and the address mapping table stores the corresponding relation between one physical storage address and one or more virtual storage addresses;
generating a third notification message according to the third virtual storage address and the length of the data message;
and sending the third notification message to the second virtual machine, wherein the third notification message is used for the second container to obtain the data message.
21. The communication system of claim 19, wherein the second virtual machine is disposed on the first host machine, and wherein the second virtual machine is configured to:
receiving a second notification message sent by the first host;
and acquiring the data message according to the second virtual storage address and the length.
22. The communication system of claim 20, wherein the second virtual machine is disposed on the second host, and wherein the second virtual machine is configured to:
receiving a third notification message sent by the second host;
and acquiring the data message according to the third virtual storage address and the length.
23. A communications apparatus, comprising: a processor coupled with a memory for storing a program or instructions that, when executed by the processor, cause the apparatus to perform the method of any of claims 1-6 or cause the apparatus to perform the method of any of claims 12-16.
24. A communications apparatus, comprising: a processor coupled with a memory for storing a program or instructions that, when executed by the processor, cause the apparatus to perform the method of any of claims 7 to 9 or cause the apparatus to perform the method of claim 10 or 11.
25. A computer-readable medium, having stored thereon a computer program or instructions, which, when run on a computer, causes the computer to perform the method of any of claims 1 to 6, or perform the method of any of claims 7 to 9, or perform the method of claim 10 or 11, or perform the method of any of claims 12 to 16.
CN202110120171.8A 2021-01-28 2021-01-28 Communication method, device and system Pending CN114816651A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110120171.8A CN114816651A (en) 2021-01-28 2021-01-28 Communication method, device and system
PCT/CN2021/116145 WO2022160714A1 (en) 2021-01-28 2021-09-02 Communication method, apparatus, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110120171.8A CN114816651A (en) 2021-01-28 2021-01-28 Communication method, device and system

Publications (1)

Publication Number Publication Date
CN114816651A true CN114816651A (en) 2022-07-29

Family

ID=82525389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110120171.8A Pending CN114816651A (en) 2021-01-28 2021-01-28 Communication method, device and system

Country Status (2)

Country Link
CN (1) CN114816651A (en)
WO (1) WO2022160714A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016320B (en) * 2022-12-30 2024-03-19 中国联合网络通信集团有限公司 Data transmission method, device and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9578032B2 (en) * 2014-08-23 2017-02-21 Vmware, Inc. Application publishing using memory state sharing
CN109992352B (en) * 2017-12-29 2021-10-08 迈普通信技术股份有限公司 Data transmission method and device, electronic equipment and readable storage medium
EP3748926B1 (en) * 2018-02-24 2024-05-15 Huawei Technologies Co., Ltd. Communication method and apparatus
CN110659143B (en) * 2019-08-13 2022-09-09 深圳信息职业技术学院 Communication method and device between containers and electronic equipment
CN110572288A (en) * 2019-11-04 2019-12-13 河南戎磐网络科技有限公司 Data exchange method based on trusted container

Also Published As

Publication number Publication date
WO2022160714A1 (en) 2022-08-04

Similar Documents

Publication Publication Date Title
CN111522653B (en) Container-based network function virtualization platform
CN107145380B (en) Virtual resource arranging method and device
US9910687B2 (en) Data flow affinity for heterogenous virtual machines
CN112416737B (en) Container testing method, device, equipment and storage medium
US11500666B2 (en) Container isolation method and apparatus for netlink resource
US9858096B2 (en) Communication device migration method of extension function and communication system
CN104301417A (en) Load balancing method and device
WO2023165137A1 (en) Cross-cluster network communication system and method
CN109525590B (en) Data packet transmission method and device
WO2014183574A1 (en) Computer node deployment method, processing node, controller, and system
CN110830574A (en) Method for realizing intranet load balance based on docker container
CN111030932B (en) Method, device and system for anchoring data message
US10353857B2 (en) Parallel processing apparatus and method for controlling communication
CN112583655B (en) Data transmission method and device, electronic equipment and readable storage medium
CN114816651A (en) Communication method, device and system
CN116800616B (en) Management method and related device of virtualized network equipment
US20210103457A1 (en) Control apparatus, control system, control method, and program
CN115705198A (en) Node for operating a group of containers, system and method for managing a group of containers
CN109729731A (en) A kind of accelerated processing method and equipment
CN112583740B (en) Network communication method and device
CN114595027A (en) Method and apparatus for application deployment across multiple computing domains
Ewais et al. A Framework Integrating FPGAs in VNF Networks
Patel et al. Interval graph multi-coloring-based resource reservation for energy-efficient containerized cloud data centers
Teivo Evaluation of low latency communication methods in a Kubernetes cluster
WO2022126389A1 (en) Method and device for establishing network connection

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