Container network processing method, device, equipment and medium

By deploying network service units in application software, creating ordinary and high-performance networks, and determining the target network based on requests, the problem of degradation in POD network performance in K8S cluster is solved, and the performance of container service network is improved.

CN117792912BActive Publication Date: 2024-12-03YUSUR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311704321.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2024-12-03
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

In the prior art, the performance of the POD network in the K8S cluster is affected by the use of DPU network alone, resulting in a degradation of the performance of the container service network.

Method used

By deploying network service units in application software, creating a container network containing ordinary networks and high-performance networks, and determining the target container network for processing based on network requests, the traffic separation of high and low-latency networks is achieved.

Benefits of technology

It improves the performance of the service network in the container, realizes the creation and use of ordinary and high-performance networks, and improves the efficiency of network request processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117792912B_ABST
    Figure CN117792912B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a container network processing method, device, equipment and medium. Among them, the container network processing method includes: deploying a network service unit based on application software, the network service unit includes at least one container; creating a container network for the network service unit, the container network includes a common network and a high-performance network; determining a target container network in response to a network request for the network service unit; and processing the network request using the target container network through the network service unit. According to the embodiments of the present disclosure, it is possible to achieve traffic separation of high and low latency networks and improve the performance of business networks in containers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of container network technology, and in particular to a container network processing method, device, equipment, and medium. Background Art

[0002] With the development of container technology, container networks facilitate the connection between containers and between containers and external networks. Container Network Interface (CNI) is a standard and universal interface for container networks, which can be understood as a standardized protocol for container networks. CNI is used to connect container management systems and network plug-ins, where container management systems such as application container engine (Docker) system, container orchestration engine (K8S) system, unified container management (mesos) system, etc.

[0003] In the related art, when using the Data Processing Unit (DPU) as the CNI network solution for K8S (Kubernetes), the DPU network is used alone as the main network of the POD (the smallest basic unit for deployment and management in the K8S cluster), which affects the business network performance in the container. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a container network processing method, device, equipment and medium.

[0005] In a first aspect, the present disclosure provides a container network processing method, including:

[0006] Deploy a network service unit based on the application software, wherein the network service unit includes at least one container;

[0007] Creating a container network for the network service unit, wherein the container network includes a common network and a high-performance network;

[0008] In response to a network request for the network service unit, determining a target container network;

[0009] The network request is processed by the network service unit using the target container network.

[0010] In a second aspect, the present disclosure provides a container network processing device, including:

[0011] A service deployment module, configured to deploy a network service unit based on application software, wherein the network service unit includes at least one container;

[0012] A network creation module, used to create a container network for the network service unit, wherein the container network includes a common network and a high-performance network;

[0013] a network determination module, configured to determine a target container network in response to a network request for the network service unit;

[0014] A request processing module is used to process the network request using the target container network through the network service unit.

[0015] In a third aspect, the present disclosure provides a container network processing device, including:

[0016] processor;

[0017] A memory for storing executable instructions;

[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the container network processing method of the first aspect.

[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the container network processing method of the first aspect.

[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0021] The container network processing method, apparatus, device and medium of the embodiments of the present disclosure can deploy a network service unit based on application software, wherein the network service unit includes at least one container, and then create a container network for the network service unit, wherein the container network includes a common network and a high-performance network. Then, in response to a network request for the network service unit, a target container network is determined, and finally the network request is processed by the network service unit using the target container network. Thus, a common network and a high-performance network can be created for the network service unit, traffic separation of high-latency and low-latency networks can be achieved, and business network performance in the container can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0023] Figure 1 A flowchart of a container network processing method provided by an embodiment of the present disclosure;

[0024] Figure 2 A schematic diagram of the structure of a container network provided in an embodiment of the present disclosure;

[0025] Figure 3 A schematic diagram of the structure of another container network provided in an embodiment of the present disclosure;

[0026] Figure 4 A schematic diagram of the structure of a container network processing device provided in an embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram of the structure of a container network processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0030] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0031] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0034] In order to solve the above problems, the embodiments of the present disclosure provide a container network processing method, device, equipment and medium. Figures 1 to 3 The container network processing method provided by the embodiment of the present disclosure is described in detail.

[0035] Figure 1 A flow chart of a container network processing method provided by an embodiment of the present disclosure is shown.

[0036] In the embodiments of the present disclosure, the container network processing method may be executed by an electronic device, such as a computer device, a cloud server, or a cloud server cluster, which is not limited here.

[0037] like Figure 1 As shown, the container network processing method may include the following steps.

[0038] S110. Deploy a network service unit based on application software, where the network service unit includes at least one container.

[0039] In the embodiment of the present disclosure, the electronic device may deploy a network service unit based on application software.

[0040] Optionally, the application software (Kubernetes, K8s) is an open source system for automatically deploying, scaling, and managing containerized applications.

[0041] Optionally, the network service unit (POD) can be the smallest basic unit for deployment and management in the K8s cluster. The network service unit (POD) includes at least one container.

[0042] Specifically, the electronic device can deploy a network service unit (POD) based on the application software (K8s), such as deploying ovn-k8s components based on Kubernetes, deploying ovn using docker on the DPU SoC (system on chip), and the ovn-node container deploys the network service unit (POD) on the cluster server through docker technology. The network service unit (POD) can include at least one container.

[0043] S120. Create a container network for the network service unit, where the container network includes a common network and a high-performance network.

[0044] In the embodiment of the present disclosure, the electronic device may create a container network for the network service unit.

[0045] Optionally, the container network can be used for network processing of the container. The container network may include a common network and a high-performance network.

[0046] Optionally, the common network (Calico) can create and manage a flat three-layer network for each container, and each container will be assigned a routable Internet Protocol (IP). Since there is no need to unpack and encapsulate packets during communication, the network performance loss is small, easy to troubleshoot, and easy to scale horizontally.

[0047] Optionally, the high-performance network (DPU) may be a network with high performance and low latency.

[0048] Specifically, the electronic device can create a container network for a network service unit (POD), such as creating a common network (Calico) and a high-performance network (DPU).

[0049] S130: Determine a target container network in response to a network request for the network service unit.

[0050] In an embodiment of the present disclosure, the electronic device may determine a target container network in response to a network request for the network service unit.

[0051] Optionally, the network request may be request network.

[0052] Optionally, the target container network may be a container network corresponding to the network request.

[0053] Specifically, the electronic device may determine a corresponding container network among a common network and a high-performance network included in the container network in response to a network request for the network service unit, and obtain a target container network.

[0054] S140: Process the network request by using the target container network through the network service unit.

[0055] In the embodiment of the present disclosure, the electronic device may process the network request using the target container network through a network service unit.

[0056] Specifically, the electronic device can use the target container network to process the network request through a network service unit (POD), such as using a common network (Calico) to process the network request or using a high-performance network (DPU) to process the network request.

[0057] Therefore, in the embodiment of the present disclosure, a network service unit can be deployed based on application software, the network service unit includes at least one container, and then a container network is created for the network service unit, the container network includes a common network and a high-performance network, and then in response to a network request for the network service unit, a target container network is determined, and finally the network request is processed by the network service unit using the target container network, thereby creating a common network and a high-performance network for the network service unit, realizing traffic separation of high and low latency networks, and improving business network performance in containers.

[0058] Optionally, S120 may specifically include: creating the high-performance network for the network service unit by a data processing unit.

[0059] Specifically, the electronic device may create the high-performance network for the network service unit through a data processing unit. For example, the electronic device may create a high-performance network for the network service unit (POD) through a data processing unit (DPU).

[0060] Optionally, creating the high-performance network for the network service unit through the data processing unit may specifically include: receiving network information corresponding to the high-performance network allocated by the data processing unit through the network service unit, the network information including network address information, physical address information, gateway information and routing table information; calling the container network interface according to the first network information, and selecting the corresponding virtual function device.

[0061] In the embodiment of the present disclosure, the electronic device can receive the network information corresponding to the high-performance network allocated by the data processing unit through the network service unit.

[0062] Optionally, the network information may include network address information (ip), physical address information (Media Access Control Address, mac), gateway information (gw) and routing table information (route).

[0063] Specifically, the electronic device can receive the network information corresponding to the high-performance network allocated by the data processing unit through the network service unit, such as setting the (annotation information) annotations k8s.v1.cni.cncf.io / networks:kube-system / ovn-network@eth1 in the POD, indicating the use of the ovn network, the master component of OVN-K8S allocates the DPU network to the POD's network address information (ip), physical address information (mac), gateway information (gw), and routing table information (route), and updates them in the POD's annotations, thereby obtaining the network information corresponding to the high-performance network.

[0064] Furthermore, the electronic device may call the container network interface according to the network information and select a corresponding virtual function device.

[0065] Optionally, a virtual function device (Virtual Function, VF) is a channel function of a PCIe device at a virtual level, that is, it only includes an I / O function, and physical resources are shared between VFs.

[0066] Specifically, the electronic device can call the container network interface (CNI) according to the network information and select the corresponding virtual function device (VF), such as Multus-cni calls the CNI of OVN-K8S according to the k8s.v1.cni.cncf.io / networks:kube-system / ovn-network@eth1 configuration information and selects the corresponding sr-iov VF device.

[0067] Optionally, creating the high-performance network for the network service unit by the data processing unit may specifically include: sending virtual function information corresponding to the virtual function device and the first network information to the network service unit by the data processing unit.

[0068] In the embodiment of the present disclosure, the electronic device may send the virtual function information corresponding to the virtual function device and the first network information to the network service unit through the data processing unit.

[0069] Specifically, the electronic device can send the virtual function information corresponding to the virtual function device (VF) and the first network information to the network service unit (POD) through the data processing unit (DPU). For example, the ovnkube-node component on the host side of the DPU adds the corresponding vf to the POD according to the vf information, and sets ip, mac, gw, route, etc.; the ovnkube-node component on the so side of the DPU adds the corresponding vfr to ovs according to the connection-details information of the pod.

[0070] Optionally, after the POD is created successfully, log in to the POD to view the network card information ifconfig and the routing information route-n.

[0071] Optionally, the network request may include a process identifier.

[0072] Optionally, a process identifier (PID) is created every time a program is opened in the operating system.

[0073] Optionally, S130 may specifically include: when it is detected that the process identifier of the network request is a first preset identifier, determining that the common network is the target container network.

[0074] In the embodiment of the present disclosure, when the electronic device detects that the process identifier of the network request is the first preset identifier, it can determine that the common network is the target container network.

[0075] Optionally, the first preset identifier may be an identifier corresponding to a common network.

[0076] Specifically, after detecting that the process identifier of the network request is the first preset identifier, the electronic device can determine that the common network is the target container network, that is, use the POD corresponding process identifier (PID) to log in to nsenter-nt$PID bash in the namespace.

[0077] Optionally, S130 may specifically include: when it is detected that the process identifier of the network request is a second preset identifier, determining that the high-performance network is the target container network.

[0078] In the embodiment of the present disclosure, when the electronic device detects that the process identifier of the network request is the second preset identifier, it can determine that the high-performance network is the target container network.

[0079] Optionally, the second preset identifier may be an identifier corresponding to the high-performance network.

[0080] Specifically, after detecting that the process identifier of the network request is the second preset identifier, the electronic device can determine that the high-performance network is the target container network, that is, use the POD corresponding process identifier (PID) to log in to nsenter-nt$PID bash in the namespace.

[0081] Figure 2 A schematic diagram of the structure of a container network provided by an embodiment of the present disclosure is shown.

[0082] like Figure 2 As shown, the electronic device can create a common network (Calico) and a high-performance network (DPU) for the network service unit, and determine the corresponding target container network according to the network request, so that the network service unit uses the target container network to process the network request. Specific implementation methods refer to the above.

[0083] Figure 3 A schematic diagram of the structure of another container network provided by an embodiment of the present disclosure is shown.

[0084] like Figure 3 As shown, the electronic device can create a common network (Calico) and a high-performance network (DPU) for multiple network service units, and determine the corresponding target container network according to the network request, so that the network service unit uses the target container network to process the network request. The specific implementation method is referred to above.

[0085] Figure 4 A schematic diagram of the structure of a container network processing device provided by an embodiment of the present disclosure is shown.

[0086] like Figure 4 As shown, the container network processing device 400 may include a service deployment module 410 , a network creation module 420 , a network determination module 430 and a request processing module 440 .

[0087] The service deployment module 410 may be used to deploy a network service unit based on application software, wherein the network service unit includes at least one container.

[0088] The network creation module 420 may be used to create a container network for the network service unit, where the container network includes a common network and a high-performance network.

[0089] The network determination module 430 may be configured to determine a target container network in response to a network request for the network service unit.

[0090] The request processing module 440 may be configured to process the network request using the target container network through the network service unit.

[0091] Therefore, in the embodiment of the present disclosure, a network service unit can be deployed based on application software, the network service unit includes at least one container, and then a container network is created for the network service unit, the container network includes a common network and a high-performance network, and then in response to a network request for the network service unit, a target container network is determined, and finally the network request is processed by the network service unit using the target container network, thereby creating a common network and a high-performance network for the network service unit, realizing traffic separation of high and low latency networks, and improving business network performance in containers.

[0092] In some embodiments of the present disclosure, the network creation module 420 may specifically include a network creation unit.

[0093] The network creation unit may be configured to create the high-performance network for the network service unit through a data processing unit.

[0094] In some embodiments of the present disclosure, the network creation module 420 may further specifically include an information receiving unit and an interface calling unit.

[0095] The information receiving unit can be used to receive network information corresponding to the high-performance network allocated by the data processing unit through the network service unit, and the network information includes network address information, physical address information, gateway information and routing table information.

[0096] The interface calling unit can be used to call the container network interface according to the network information and select the corresponding virtual function device.

[0097] In some embodiments of the present disclosure, the network creation module 420 may further specifically include an information sending unit.

[0098] The information sending unit may be configured to send the virtual function information corresponding to the virtual function device and the first network information to the network service unit through the data processing unit.

[0099] In some embodiments of the present disclosure, the network request may include a process identifier.

[0100] In some embodiments of the present disclosure, the network determination module 430 may specifically include a first determination unit.

[0101] The first determination unit may be configured to determine that the common network is the target container network when detecting that the process identifier of the network request is a first preset identifier.

[0102] In some embodiments of the present disclosure, the network determination module 430 may specifically include a second determination unit.

[0103] The second determination unit may be configured to determine the high-performance network as the target container network when detecting that the process identifier of the network request is a second preset identifier.

[0104] It should be noted that Figure 4 The container network processing device 400 shown can execute Figures 1 to 3 The various steps in the method embodiment shown in the figure are implemented Figures 1 to 3 The various processes and effects in the method embodiment shown are not described in detail here.

[0105] Figure 5 A schematic diagram of the structure of a container network processing device provided by an embodiment of the present disclosure is shown.

[0106] In some embodiments of the present disclosure, Figure 5 The container network processing device shown may be an electronic device. For example, the electronic device may be a computer device or a server device, etc., which is not limited here.

[0107] like Figure 5 As shown, the container network processing device may include a processor 501 and a memory 502 storing computer program instructions.

[0108] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0109] The memory 502 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 502 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0110] The processor 501 reads and executes computer program instructions stored in the memory 502 to perform the steps of the container network processing method provided in the embodiment of the present disclosure.

[0111] In one example, the container network processing device may further include a transceiver 503 and a bus 504. Figure 5 As shown, the processor 501, the memory 502 and the transceiver 503 are connected via a bus 504 and communicate with each other.

[0112] The bus 504 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0113] The embodiments of the present disclosure also provide a non-volatile computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the container network processing method provided by the embodiments of the present disclosure.

[0114] The above-mentioned storage medium may, for example, include a memory 502 of computer program instructions, and the above-mentioned instructions may be executed by the processor 501 of the container network processing device to complete the container network processing method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0115] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0116] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A container network processing method, characterized in that: include: Deploy a network service unit based on the application software, wherein the network service unit includes at least one container; Creating a container network for the network service unit, wherein the container network includes a common network and a high-performance network; In response to a network request for the network service unit, determining a target container network; Processing the network request using the target container network through the network service unit; Wherein, creating a container network for the network service unit includes: Creating the high-performance network for the network service unit through a data processing unit; The step of creating the high-performance network for the network service unit by using a data processing unit includes: receiving, through the network service unit, network information corresponding to the high-performance network allocated by the data processing unit, the network information including network address information, physical address information, gateway information and routing table information; The container network interface is called according to the network information, and a corresponding virtual function device is selected.

2. The method according to claim 1, characterized in that The step of creating the high-performance network for the network service unit by using a data processing unit includes: The virtual function information corresponding to the virtual function device and the network information are sent to the network service unit through the data processing unit.

3. The method according to claim 1, characterized in that The network request includes a process identifier.

4. The method according to claim 3, characterized in that The step of determining a target container network in response to a network request for the network service unit includes: When it is detected that the process identifier of the network request is a first preset identifier, the common network is determined to be the target container network.

5. The method according to claim 3, characterized in that: The step of determining a target container network in response to a network request for the network service unit includes: When it is detected that the process identifier of the network request is a second preset identifier, the high-performance network is determined to be the target container network.

6. A container network processing device, characterized in that: include: A service deployment module, configured to deploy a network service unit based on application software, wherein the network service unit includes at least one container; A network creation module, used to create a container network for the network service unit, wherein the container network includes a common network and a high-performance network; a network determination module, configured to determine a target container network in response to a network request for the network service unit; a request processing module, configured to process the network request using the target container network through the network service unit; Wherein, the network creation module includes: A network creation unit, configured to create the high-performance network for the network service unit through a data processing unit; Wherein, the network creation module includes: An information receiving unit, configured to receive network information corresponding to the high-performance network allocated by the data processing unit through the network service unit, wherein the network information includes network address information, physical address information, gateway information and routing table information; The interface calling unit is used to call the container network interface according to the network information and select the corresponding virtual function device.

7. A container network processing device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the container network processing method described in any one of claims 1 to 5.

8. A non-volatile computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the container network processing method according to any one of claims 1 to 5.