Dpu virtual interface detection method and device in cloud native, equipment and medium
By utilizing the service monitor in the Kubernetes environment to detect virtual interface anomalies in target containers, the problem of load balancers being unable to detect virtual interface anomalies is solved. This enables timely detection and avoidance of traffic forwarding to abnormal containers, improving user experience and system performance.
Patent Information
- Application Number
- CN202411568117.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In a Kubernetes environment, when a data processor communicates with a pod container through a virtual interface, the load balancer may fail to detect the virtual interface anomaly, causing traffic to access the service to still be forwarded to the abnormal pod container, thus impacting customer business.
By sending echo request messages to the target container through the service monitor of the control node, the system detects whether the virtual interface of the target container is abnormal. If no reply message is received within a preset time, it is determined that the virtual interface is abnormal, and the load balancing rules are updated to prevent traffic from being forwarded to the abnormal container.
Timely detection of virtual interface anomalies prevents traffic from being forwarded to abnormal target containers, improving user experience and system performance.
Smart Images

Figure CN119782054B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of cloud-native technology, and in particular to a method, apparatus, device and medium for detecting DPU virtual interfaces in cloud-native environments. Background Technology
[0002] Kubernetes, or K8s for short, is an open-source container orchestration and management platform used to automate the deployment, scaling, and management of containerized applications.
[0003] In existing Kubernetes environments, when an old pod container is deleted or a new pod container is created on a worker node, the load balancer updates the load balancing rules to implement open virtual network load balancing, ensuring that traffic is no longer forwarded to the deleted pod container. However, when a data processor is deployed on a worker node, the data processor communicates with the pod container through a virtual interface. If the virtual interface corresponding to the data processor and / or the pod container malfunctions, the load balancer cannot detect the VF or VFR malfunction, and traffic accessing the service will still be forwarded to the pod container corresponding to the malfunctioning VF or VFR, thus impacting customer services. Summary of the Invention
[0004] To address the aforementioned technical issues, this disclosure provides a method, apparatus, device, and medium for detecting DPU virtual interfaces in cloud-native environments.
[0005] The first aspect of this disclosure provides a method for detecting DPU virtual interfaces in cloud-native environments, applied to control nodes in a cluster, including:
[0006] Identify at least one target container corresponding to the target service;
[0007] For each target container, an echo request message is sent to the target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container.
[0008] If no response message is received from the target container in response to the echo request message within the first preset time, it is determined that the virtual interface corresponding to the target container has malfunctioned. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the worker node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node.
[0009] A second aspect of this disclosure provides a cloud-native DPU virtual interface detection device, comprising:
[0010] The container determination module is used to determine at least one target container corresponding to the target service;
[0011] The message sending module is used to send an echo request message to each target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container.
[0012] The interface detection module is used to determine that the virtual interface corresponding to the target container is abnormal if no reply message is received from the target container in response to the echo request message within a first preset time. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the worker node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node.
[0013] A third aspect of this disclosure provides an electronic device, including:
[0014] processor;
[0015] Memory, used to store executable instructions;
[0016] The processor is used to read executable instructions from memory and execute the executable instructions to implement the cloud-native DPU virtual interface detection method provided in the first aspect above.
[0017] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the cloud-native DPU virtual interface detection method provided in the first aspect.
[0018] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0019] The cloud-native DPU virtual interface detection method, apparatus, device, and medium provided in this disclosure can identify at least one target container corresponding to a target service. For each target container, an echo request message for detecting the virtual interface corresponding to the target container is sent to the target container based on the service monitor corresponding to the target container. If no reply message is received from the target container in response to the echo request message within a first preset time, it is determined that the virtual interface corresponding to the target container is abnormal. The virtual interface corresponding to the target container includes a first virtual interface corresponding to the target container in the worker node of the cluster, and / or a second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node. Thus, by deploying a service monitor corresponding to each target container to detect the virtual interface corresponding to the target container, abnormalities in the virtual interface corresponding to the target container can be detected in a timely manner, avoiding forwarding traffic accessing the service to the target container where the virtual interface is abnormal, thereby improving the user experience. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a cloud-native DPU virtual interface detection method provided in an embodiment of this disclosure;
[0023] Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of this disclosure;
[0024] Figure 3 This is a flowchart of another cloud-native DPU virtual interface detection method provided in this embodiment of the disclosure;
[0025] Figure 4 This is a schematic diagram of the structure of a cloud-native DPU virtual interface detection device provided in an embodiment of this disclosure;
[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0027] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0028] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0030] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0032] Typically, in existing Kubernetes environments, the load balancer on the data processor node of a worker node binds to the backend pod container selected by the service. Upon detecting the deletion of an old pod container or the creation of a new pod container on the data processor node, it updates the load balancing rules on the data processor node to implement open virtual network load balancing, ensuring that traffic is no longer forwarded to the deleted pod container. However, if an anomaly occurs on the first virtual interface corresponding to the pod container on the worker node or the second virtual interface (VFR) corresponding to the first virtual interface (VF) on the data processor node, the load balancer cannot detect the VF or VFR anomaly. Traffic accessing the service will still be forwarded to the pod container corresponding to the anomaly VF or VFR, thus impacting customer services. To address this issue, this disclosure provides a method for detecting DPU virtual interfaces in cloud-native environments. The method is described below with reference to specific embodiments.
[0033] Figure 1 This is a flowchart illustrating a method for detecting DPU virtual interfaces in cloud-native environments, provided in this embodiment. This method can be executed by a cloud-native DPU virtual interface detection device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server, server cluster, or terminal, where the terminal specifically includes a computer or tablet computer. Furthermore, this method can be applied to… Figure 2The application scenario shown includes a cluster 200 comprising a control node 20 and worker nodes 30. It should be noted that there can be multiple worker nodes in the cluster 200. It is understood that the cloud-native DPU virtual interface detection method provided in this embodiment can also be applied to other scenarios.
[0034] This cloud-native DPU virtual interface detection method can be applied in cloud-native scenarios, where the cluster can be a container orchestration system, such as a Kubernetes cluster. A Kubernetes cluster consists of control nodes and worker nodes. Data Processing Units (DPUs) can be deployed on the worker nodes to offload computationally intensive network and storage tasks, thereby reducing the load on the worker node's central processing unit and improving overall system performance. The DPUs handle traffic forwarding by deploying open virtual network controllers and open virtual switches. Furthermore, the load balancer on the worker node's DPU binds to the selected backend pod containers and interacts with them through virtual interfaces. The load balancer is responsible for managing load balancing rules, such as updating them, to ensure smooth communication with the backend pod containers.
[0035] like Figure 2 As shown, cluster 200 includes control node 20 and worker node 30.
[0036] Control node 20 is the control center of the entire cluster, responsible for managing and coordinating the containers on the worker nodes. Specifically, it is responsible for managing the status of the entire cluster, adding, deleting and managing worker nodes, etc.
[0037] Worker node 30 is the work unit in the cluster, responsible for running containers and providing services.
[0038] Specifically, the control node 20 includes an OVN northbound database 21, a first virtual network controller 22, and an OVN southbound database 23.
[0039] The OVN Northbound Database 21 is used to store high-level logical network configurations, specifically including configurations for logical switches, logical routers, security groups, etc. The OVN Northbound Database 21 contains a load balancing health check component 211, which specifies the virtual IP address (VIP) and port number corresponding to the service to be checked.
[0040] The OVN Southbound Database 23 is used to store low-level logical states and data. Within the OVN Southbound Database 23, a service monitor is configured. This service monitor is created based on the virtual IP address (VIP) and port number corresponding to the service to be monitored, as specified in the Load Balancer Health Check Component 211. The service monitor is used to send echo request messages to at least one container (e.g., a pod) corresponding to the target service to monitor the virtual interfaces corresponding to at least one container.
[0041] Work node 30 includes a virtual private cloud environment 31 and a data processor 32.
[0042] The virtual private cloud environment 31 includes multiple containers, such as container M and container N. Each container has a corresponding first virtual interface, such as container M corresponding to virtual interface M and container N corresponding to virtual interface N. These multiple containers each correspond to different services.
[0043] The data processor 32 includes a second virtual network controller 321 and a virtual network switch 322. The virtual network switch 322 includes a virtual interface X and a virtual interface Y, wherein virtual interface X corresponds one-to-one with virtual interface M, and virtual interface Y corresponds one-to-one with virtual interface N.
[0044] The control node 20 and the data processor 32 are connected through a tunnel established via interface 1 and interface 2.
[0045] The following is combined Figure 2 The application scenarios shown are for Figure 1 The cloud-native DPU virtual interface detection method is introduced, for example, Figure 2 The control node 20 in the system can execute this method. For example... Figure 1 As shown in the figure, the cloud-native DPU virtual interface detection method provided in this embodiment includes the following steps.
[0046] S110. Determine at least one target container corresponding to the target service.
[0047] In this embodiment of the disclosure, at least one target container is a container set in the worker nodes of the cluster for processing the target service.
[0048] The target service can be a UDP-type service, i.e. a service based on the User Datagram Protocol.
[0049] Specifically, when it is necessary to inspect the virtual interface of a container, the control node can determine the target service to be inspected and determine at least one target container corresponding to the target service based on the association between the target service and the backend container.
[0050] S120. For each target container, send an echo request message to the target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container.
[0051] In this embodiment of the disclosure, a service monitor is set in the control node. The service monitor is used to detect the virtual interface of the target container and determine whether the virtual interface of the target container is abnormal.
[0052] Echo request messages can be ICMP echo request messages, where ICMP is short for Internet Control Message Protocol.
[0053] The virtual interface corresponding to the target container can be understood as a virtual interface used for communication between the target container and the data processor when a data processor is plugged into the worker node, so as to facilitate the transmission of messages (including received messages and sent messages) corresponding to the target container through the data processor.
[0054] Specifically, after determining at least one target container corresponding to the target service, the control node determines the service monitor corresponding to each target container, and sends a message to the second virtual network controller in the data processor based on the service monitor, so that the second virtual network controller in the data processor sends an echo request message to the virtual network switch in the data processor based on the message.
[0055] The message includes the virtual IP address and port number corresponding to the target service, as well as the virtual interface check configuration parameters corresponding to the target container. Specifically, the virtual interface check configuration parameters may include the number of checks to treat the virtual interface corresponding to the target container as abnormal, the number of checks to treat the virtual interface corresponding to the target container as normal, and the timeout period for the health check.
[0056] In this embodiment of the disclosure, the service monitor can send message messages to the second virtual network controller in the data processor based on the tunnel between the control node and the data processor.
[0057] In some embodiments of this disclosure, the target service includes endpoints used to expose the network address of the target service. While the control node sends echo request messages to the target container based on the service monitor corresponding to the target container, it also periodically sends packet probe requests to the endpoints corresponding to the target service based on the service monitor to detect the endpoints and ensure their normal operation. The packet probe request can be a UDP packet probe request. UDP, short for User Datagram Protocol, is an important transport layer protocol in network communication.
[0058] S130. If no response message is received from the target container in response to the echo request message within the first preset time, it is determined that the virtual interface corresponding to the target container has malfunctioned. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the worker node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node.
[0059] In this embodiment of the disclosure, after the control node sends an echo request message to the target container based on the service monitor corresponding to the target container, it receives the reply message returned by the target container in response to the echo request message in real time. If no reply message is received from the target container in response to the echo request message within a first preset time, it is determined that the virtual interface corresponding to the target container has malfunctioned.
[0060] Specifically, the response message returned by the target container to the echo request message can be sent to the second virtual network controller via the virtual network switch in the data processor. The second virtual network controller then sends the response message to the control node via the tunnel between the control node and the data processor.
[0061] The first virtual interface can be, for example, Figure 2 The virtual interfaces M and N are shown; the second virtual interface can be as follows: Figure 2 The virtual interfaces X and Y are shown.
[0062] In this embodiment, at least one target container corresponding to a target service can be identified. For each target container, an echo request message for detecting the virtual interface corresponding to the target container is sent to the target container based on the service monitor corresponding to the target container. If no reply message is received from the target container in response to the echo request message within a first preset time, it is determined that the virtual interface corresponding to the target container is abnormal. The virtual interface corresponding to the target container includes a first virtual interface corresponding to the target container in the worker node of the cluster, and / or a second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node. Thus, by deploying a service monitor corresponding to each target container to detect the virtual interface corresponding to the target container, abnormalities in the virtual interface corresponding to the target container can be detected in a timely manner, avoiding forwarding traffic accessing the service to the target container where the virtual interface is abnormal, thereby improving the user experience.
[0063] In the above embodiments of this disclosure, after sending an echo request message to the target container based on the service monitor corresponding to the target container, the cloud-native DPU virtual interface detection method may further include: if a reply message returned by the target container in response to the echo request message is received within a first preset time, the reply message is detected, and the echo request message is sent to the target container again based on the service monitor at a second preset time interval, and the above echo request message sending operation is repeated until a first preset threshold is reached; when all the reply messages corresponding to the echo request message are detected normally, the virtual interface corresponding to the target container is determined to be normal; when there are target reply messages with abnormal detection in the reply messages corresponding to the echo request message, and the number of target reply messages with abnormal detection is greater than or equal to the second preset threshold, the virtual interface corresponding to the target container is determined to be abnormal.
[0064] In this embodiment of the disclosure, the first preset time is the timeout time of the health check in the virtual interface check configuration parameters, which is used to characterize whether the reply message has timed out.
[0065] Specifically, if the control node receives a reply message from the target container in response to the echo request message within a first preset time, it will test the reply message based on a preset diagnostic tool to determine whether the reply message is normal. At the same time, it will continue to send echo request messages to the target container based on the service monitor at a first preset time interval, and the target container will return a reply message in response to the echo request message, until the first preset threshold is reached.
[0066] For example, the first preset time is 3 seconds, and the first preset threshold is 5 times. At this time, the control node sends an echo request message to the target container based on the service monitor at the 1st second, and receives the reply message returned by the target container in real time, detecting the reply message. Simultaneously, at the 4th second, it continues to send a second echo request message to the target container based on the service monitor, until 5 messages are sent. The virtual interface detection for the target container ends at this point. If all 5 reply messages are detected normally, the virtual interface corresponding to the target container is determined to be normal. If 4 out of 5 reply messages are detected abnormally, the virtual interface corresponding to the target container is determined to be abnormal. Abnormal reply message detection may include packet loss, etc.
[0067] Furthermore, after completing the current detection of the virtual interface of the target container, the control node will periodically perform detection on the virtual interface of the target container.
[0068] In this embodiment of the disclosure, after receiving the reply message, the reply message can be detected. Only when the reply message is detected as normal can it be determined that the virtual interface corresponding to the target container is normal, thereby improving the accuracy of virtual interface detection.
[0069] In this embodiment of the disclosure, after determining that the virtual interface corresponding to the target container has become abnormal, the cloud-native DPU virtual interface detection method may further include: updating the load balancing rules in the data processor and deleting the IP address corresponding to the target container from the load balancing rules.
[0070] In this embodiment of the disclosure, after detecting an anomaly in the virtual interface corresponding to the target container, the load balancing rules in the data processor can be updated, and the IP address corresponding to the target container in the load balancing rules can be deleted to avoid forwarding traffic corresponding to the target service to the target container, thereby preventing the target service from becoming unavailable and improving the user experience.
[0071] In this embodiment of the disclosure, before determining at least one target container corresponding to the target service, the cloud-native DPU virtual interface detection method may further include: obtaining a first configuration parameter, the first configuration parameter including the virtual IP address and port number corresponding to the target service, and the virtual interface check configuration parameter corresponding to the target container; deploying a load balancing health check component based on the first configuration parameter; and establishing a binding relationship between the logical port of at least one target container corresponding to the target service and the load balancing health check component.
[0072] Specifically, after obtaining the first configuration parameters, the control node deploys a load balancing health check component in the OVN northbound database based on the first configuration parameters, and binds the logical port of at least one target container corresponding to the target service to the load balancing health check component, thereby enabling the identification of the backend container corresponding to the target container based on the binding relationship.
[0073] Further, determining at least one target container corresponding to the target service may specifically include: determining at least one target container corresponding to the target service based on the binding relationship.
[0074] In this embodiment of the disclosure, before sending an echo request message to the target container based on the service monitor corresponding to the target container, the cloud-native DPU virtual interface detection method may further include: creating at least one service monitor corresponding to each target container in the target container based on the first configuration parameters in the load balancing health check component.
[0075] Specifically, after the control node deploys the load balancing health check component in the OVN northbound database, it automatically creates at least one service monitor for each target container in the OVN southbound database based on the first configuration parameters in the load balancing health check component, according to the OVN mechanism. The service monitor specifies information such as the IP address and port of the target container, the logical port of the target container, and the protocol number.
[0076] In this embodiment of the disclosure, before determining at least one target container corresponding to the target service, the cloud-native DPU virtual interface detection method may further include: deploying a virtual network cluster environment based on a data processor, wherein a data processor is plugged into a worker node in the cluster; obtaining second configuration parameters, the second configuration parameters including the tunnel address corresponding to the data processor, the tunnel type connecting the data processor and the control node, the remote address of the control node, the identification information corresponding to the data processor, and the name of the worker node corresponding to the data processor; and deploying a virtual network component based on the second configuration parameters, the virtual network component including a first virtual network component on the control node and a second virtual network component on the data processor.
[0077] The tunnel type can include VXLAN tunnels, generic tunnels, etc., and there are no restrictions here.
[0078] Specifically, after obtaining the second configuration parameters, the control node deploys first virtual network components such as the OVN northbound database, the OVN southbound database, and the first virtual network controller on the control node based on the second configuration parameters, and at the same time deploys second virtual network components such as the second virtual network controller and the virtual network switch in the data processor.
[0079] In this embodiment, deploying a data processor-based virtual network cluster environment can be understood as deploying a virtual network environment adapted to the operation of the data processor within the cluster. This is similar to existing implementations of deploying data processor-based cluster environments and will not be elaborated upon here. The specific deployment methods for the virtual network components are similar to those used in existing Kubernetes clusters and will not be elaborated upon here.
[0080] In this embodiment of the disclosure, a cluster environment can be deployed before the virtual interface is detected, so that the cluster environment is adapted to the operation of the data processor, thus providing support for subsequent virtual interface detection.
[0081] In this embodiment of the disclosure, after deploying the virtual network component based on the second configuration parameters, the cloud-native DPU virtual interface detection method may further include: creating at least one target container corresponding to the target service on the worker node, determining the first virtual interface corresponding to each of the at least one target container, adding the first virtual interface to the namespace where the target container is located; and creating a second virtual interface corresponding to the first virtual interface on the data processor.
[0082] In this embodiment of the disclosure, at least one target container can be created for each target service to handle access requests corresponding to the target service. At the same time, a first virtual interface and a second virtual interface are added to each target container to realize the interaction between the target container and the data processor based on the first virtual interface and the second virtual interface. Through the interaction between the target container and the data processor, the tasks in the container can be unloaded to the data processor for execution, thereby improving system performance.
[0083] Figure 3 This is a flowchart of another cloud-native DPU virtual interface detection method provided in this disclosure embodiment, such as... Figure 3 As shown, the cloud-native DPU virtual interface detection method may specifically include the following steps:
[0084] S310: Deploy a virtual network cluster environment based on data processors, with data processors plugged into the worker nodes in the cluster.
[0085] S320. Obtain the second configuration parameters and deploy a virtual network component based on the second configuration parameters. The virtual network component includes a first virtual network component on the control node and a second virtual network component on the data processor.
[0086] S330. Create at least one target container corresponding to the target service on the working node, determine the first virtual interface corresponding to each of the at least one target container, add the first virtual interface to the namespace where the target container is located, and create a second virtual interface corresponding to the first virtual interface on the data processor.
[0087] In this embodiment of the disclosure, before or after step S330, the control node can obtain preset configuration parameters, create a target service and its corresponding endpoint based on the preset configuration parameters, and establish a correspondence between the target service and the target container. The target service specifies the virtual IP address, communication protocol, port number, etc., corresponding to the target service.
[0088] S340. Obtain the first configuration parameters, deploy the load balancing health check component and the service monitor corresponding to each target container based on the first configuration parameters, and establish a binding relationship between the logical port of at least one target container corresponding to the target service and the load balancing health check component.
[0089] S350. Determine at least one target container corresponding to the target service based on the binding relationship.
[0090] S360. For each target container, send an echo request message to the target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container.
[0091] S370. If no response message is received from the target container in response to the echo request message within the first preset time, it is determined that the virtual interface corresponding to the target container has malfunctioned.
[0092] S380. If a reply message is received from the target container in response to the echo request message within a first preset time, the reply message is detected, and the service monitor is controlled to send echo request messages to the target container at a second preset time interval. The above echo request message sending operation is repeated until the first preset threshold is reached.
[0093] S390. If all the response messages corresponding to the echo request message are detected as normal, it is determined that the virtual interface corresponding to the target container is normal.
[0094] S3010. When there is a target reply message with an anomaly detected in the reply message corresponding to the echo request message, and the number of target reply messages with an anomaly detected is greater than or equal to the second preset threshold, it is determined that the virtual interface corresponding to the target container has an anomaly.
[0095] In this embodiment, a data processor-based virtual network cluster environment and virtual network components can be deployed in the cluster. A load balancing health check component is deployed in the virtual network component of the control node. A service monitor corresponding to each target container is created based on the load balancing health check component. The virtual interface of the target container corresponding to the target service is detected based on the service monitor. By deploying each component before detecting the virtual interface corresponding to the target container, at least one target container and its corresponding virtual interface can be quickly identified, facilitating subsequent detection of the virtual interface. At the same time, by deploying a service monitor corresponding to each target container to detect the virtual interface, any abnormalities in the virtual interface can be detected in a timely manner, avoiding forwarding traffic to the target container with the abnormal virtual interface and improving the user experience.
[0096] Figure 4 This is a schematic diagram of the structure of a cloud-native DPU virtual interface detection device provided in an embodiment of this disclosure.
[0097] In this embodiment of the disclosure, the cloud-native DPU virtual interface detection device can be installed within an electronic device and can be understood as a functional module within the aforementioned electronic device. Specifically, the electronic device can be a server, a server cluster, or a terminal, wherein the terminal specifically includes computers or tablet computers, etc., without limitation.
[0098] like Figure 4As shown, the cloud-native DPU virtual interface detection device 400 may include a container determination module 410, a message sending module 420, and an interface detection module 430.
[0099] The container determination module 410 can be used to determine at least one target container corresponding to the target service.
[0100] The message sending module 420 can be used to send an echo request message to each target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container.
[0101] The interface detection module 430 can be used to determine that the virtual interface corresponding to the target container is abnormal if no reply message is received from the target container in response to the echo request message within a first preset time. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the worker node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node.
[0102] In this embodiment, at least one target container corresponding to a target service can be identified. For each target container, an echo request message for detecting the virtual interface corresponding to the target container is sent to the target container based on the service monitor corresponding to the target container. If no reply message is received from the target container in response to the echo request message within a first preset time, it is determined that the virtual interface corresponding to the target container is abnormal. The virtual interface corresponding to the target container includes a first virtual interface corresponding to the target container in the worker node of the cluster, and / or a second virtual interface corresponding to the first virtual interface in the data processor deployed on the worker node. Thus, by deploying a service monitor corresponding to each target container to detect the virtual interface corresponding to the target container, abnormalities in the virtual interface corresponding to the target container can be detected in a timely manner, avoiding forwarding traffic accessing the service to the target container where the virtual interface is abnormal, thereby improving the user experience.
[0103] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a target detection module.
[0104] The target detection module can be used to detect the response message returned by the target container in response to the echo request message after sending an echo request message to the target container based on the service monitor corresponding to the target container within a first preset time. Then, after a second preset time interval, it can continue to send an echo request message to the target container based on the service monitor, and repeat the above echo request message sending operation until the first preset threshold is reached.
[0105] If all response messages corresponding to the echo request message are detected as normal, it is determined that the virtual interface corresponding to the target container is normal.
[0106] If there is a target reply message with an anomaly detected in the reply message corresponding to the echo request message, and the number of target reply messages with an anomaly detected is greater than or equal to the second preset threshold, it is determined that the virtual interface corresponding to the target container has an anomaly.
[0107] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a rule update module.
[0108] The rule update module can be used to update the load balancing rules in the data processor and delete the IP address of the target container from the load balancing rules after it is determined that the virtual interface corresponding to the target container has encountered an anomaly.
[0109] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a first deployment module.
[0110] The first deployment module can be used to obtain first configuration parameters before determining at least one target container corresponding to the target service. The first configuration parameters include the virtual IP address and port number corresponding to the target service, and the virtual interface check configuration parameters corresponding to the target container.
[0111] Deploy the load balancer health check component based on the first configuration parameters;
[0112] Establish a binding relationship between the logical port of at least one target container corresponding to the target service and the load balancing health check component.
[0113] The container determination module 410 can be specifically used to determine at least one target container corresponding to the target service based on the binding relationship.
[0114] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a monitor creation module.
[0115] The monitor creation module can be used to create at least one service monitor for each target container in the target container based on the first configuration parameters in the load balancing health check component, before sending an echo request message to the target container based on the service monitor corresponding to the target container.
[0116] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a second deployment module.
[0117] The second deployment module can be used to deploy a virtual network cluster environment based on data processors before determining at least one target container corresponding to the target service. Data processors are plugged into the worker nodes in the cluster.
[0118] Obtain the second configuration parameters, which include the tunnel address corresponding to the data processor, the tunnel type connecting the data processor and the control node, the remote address of the control node, the identification information corresponding to the data processor, and the name of the working node corresponding to the data processor.
[0119] The virtual network component is deployed based on the second configuration parameters. The virtual network component includes a first virtual network component on the control node and a second virtual network component on the data processor.
[0120] In some embodiments of this disclosure, the cloud-native DPU virtual interface detection device 400 may further include a third deployment module.
[0121] The third deployment module can be used to create at least one target container corresponding to the target service on the worker node after deploying the virtual network component based on the second configuration parameters, determine the first virtual interface corresponding to each of the at least one target container, and add the first virtual interface to the namespace where the target container is located.
[0122] Create a second virtual interface on the data processor that corresponds to the first virtual interface.
[0123] It should be noted that, Figure 4 The cloud-native DPU virtual interface detection device 400 shown can execute the various steps in the above method embodiments and realize the various processes and effects in the above method embodiments, which will not be elaborated here.
[0124] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
[0125] In this embodiment of the disclosure, Figure 5 The electronic devices shown can be servers, server clusters, or terminals. Terminals specifically include computers or tablets, etc., without limitation.
[0126] like Figure 5 As shown, the electronic device may include a processor 510 and a memory 520 storing computer program instructions.
[0127] Specifically, the processor 510 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this disclosure.
[0128] Memory 520 may include a large-capacity storage for information or instructions. For example, and not limitingly, memory 520 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway device. In a particular embodiment, memory 520 is a non-volatile solid-state memory. In a particular embodiment, memory 520 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0129] The processor 510 reads and executes computer program instructions stored in the memory 520 to perform the steps of the cloud-native DPU virtual interface detection method provided in this embodiment of the disclosure.
[0130] In one example, the electronic device may also include a transceiver 530 and a bus 540. Wherein, as... Figure 5 As shown, the processor 510, memory 520 and transceiver 530 are connected via bus 540 and communicate with each other.
[0131] Bus 540 may include hardware, software, or both. For example, and not limited to, 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 Infinite Bandwidth 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, bus 540 may include one or more buses.
[0132] This disclosure also provides a computer-readable storage medium that can store a computer program. When the computer program is executed by a processor, the processor enables the processor to implement the cloud-native DPU virtual interface detection method provided in this disclosure.
[0133] The aforementioned storage medium may, for example, include a memory 520 containing computer program instructions, which can be executed by a processor 510 of an electronic device to complete the cloud-native DPU virtual interface detection method provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device.
[0134] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily 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 this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting DPU virtual interfaces in cloud-native environments, characterized in that, An OVN northbound database, first virtual network controller, and OVN southbound database are used in a control node within a cluster. The OVN northbound database is configured with a load balancing health check component, which specifies the virtual IP address and port number corresponding to the service to be checked. The OVN southbound database is configured with a service monitor, which is created based on the virtual IP address and port number corresponding to the service to be checked specified in the load balancing health check component. The service monitor includes: Identify at least one target container corresponding to the target service; For each target container, an echo request message is sent to the target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container. If no response message is received from the target container in response to the echo request message within a first preset time, it is determined that the virtual interface corresponding to the target container has malfunctioned. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the worker node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed in the worker node. After sending an echo request message to the target container based on the service monitor corresponding to the target container, the method further includes: If a response message is received from the target container in response to the echo request message within the first preset time, the response message is detected, and the echo request message is sent to the target container again based on the service monitor at a second preset time interval. The above echo request message sending operation is repeated until the first preset threshold is reached. When all the response messages corresponding to the echo request message are detected as normal, it is determined that the virtual interface corresponding to the target container is normal. If there is a target reply message with an anomaly detected in the reply message corresponding to the echo request message, and the number of target reply messages with an anomaly detected is greater than or equal to a second preset threshold, it is determined that the virtual interface corresponding to the target container has an anomaly.
2. The method according to claim 1, characterized in that, After determining that the virtual interface corresponding to the target container has encountered an anomaly, the method further includes: Update the load balancing rules in the data processor and delete the IP address corresponding to the target container in the load balancing rules.
3. The method according to claim 1, characterized in that, Before determining at least one target container corresponding to the target service, the method further includes: Obtain the first configuration parameters, which include the virtual IP address and port number corresponding to the target service, and the virtual interface check configuration parameters corresponding to the target container; Deploy the load balancer health check component based on the first configuration parameters; Establish a binding relationship between the logical port of at least one target container corresponding to the target service and the load balancing health check component; The determination of at least one target container corresponding to the target service includes: Based on the binding relationship, at least one target container corresponding to the target service is determined.
4. The method according to claim 3, characterized in that, Before sending an echo request message to the target container based on the service monitor corresponding to the target container, the method further includes: Based on the first configuration parameters in the load balancing health check component, a service monitor is created for each target container in the at least one target container.
5. The method according to claim 1, characterized in that, Before determining at least one target container corresponding to the target service, the method further includes: Deploy a virtual network cluster environment based on a data processor, wherein the data processor is plugged into the worker nodes in the cluster; Obtain the second configuration parameters, which include the tunnel address corresponding to the data processor, the tunnel type connecting the data processor and the control node, the remote address of the control node, the identification information corresponding to the data processor, and the name of the working node corresponding to the data processor. Based on the second configuration parameters, a virtual network component is deployed, the virtual network component including a first virtual network component on the control node and a second virtual network component on the data processor.
6. The method according to claim 5, characterized in that, After deploying the virtual network component based on the second configuration parameters, the method further includes: Create at least one target container corresponding to the target service on the working node, determine the first virtual interface corresponding to each of the at least one target container, and add the first virtual interface to the namespace where the target container is located; A second virtual interface corresponding to the first virtual interface is created on the data processor.
7. A cloud-native DPU virtual interface detection device, characterized in that, An OVN northbound database, first virtual network controller, and OVN southbound database are used in a control node within a cluster. The OVN northbound database is configured with a load balancing health check component, which specifies the virtual IP address and port number corresponding to the service to be checked. The OVN southbound database is configured with a service monitor, which is created based on the virtual IP address and port number corresponding to the service to be checked specified in the load balancing health check component. The service monitor includes: The container determination module is used to determine at least one target container corresponding to the target service; The message sending module is used to send an echo request message to each target container based on the service monitor corresponding to the target container. The echo request message is used to detect the virtual interface corresponding to the target container. The interface detection module is used to determine that the virtual interface corresponding to the target container is abnormal if no reply message is received from the target container in response to the echo request message within a first preset time. The virtual interface corresponding to the target container includes the first virtual interface corresponding to the target container in the working node of the cluster, and / or the second virtual interface corresponding to the first virtual interface in the data processor deployed in the working node. The target detection module is configured to: after sending an echo request message to the target container based on the service monitor corresponding to the target container, if a reply message is received from the target container in response to the echo request message within a first preset time period, detect the reply message, and continue sending the echo request message to the target container based on the service monitor at a second preset time interval, repeating the above echo request message sending operation until a first preset threshold is reached; when all reply messages corresponding to the echo request message are detected as normal, determine that the virtual interface corresponding to the target container is normal; when there are abnormal target reply messages among the reply messages corresponding to the echo request message, and the number of abnormal target reply messages is greater than or equal to a second preset threshold, determine that the virtual interface corresponding to the target container is abnormal.
8. An electronic device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the cloud-native DPU virtual interface detection method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the cloud-native DPU virtual interface detection method as described in any one of claims 1-6.
Citation Information
Patent Citations
Link monitoring method, medium, device and computing equipment
CN116582465A
CNI network plug-in-based network flow detection and control method and system
CN117914559A