Service communication method and service grid system

By introducing network management pods into the service mesh system and using redirection rules to manage traffic between service containers, the problem of excessively long communication data transmission paths in the prior art is solved, and efficient network traffic management and resource conservation are achieved.

CN119676309AActive Publication Date: 2025-03-21HENAN KUNLUN TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411888688.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-21
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In the existing service grid system, the data transmission paths of inter-service communication are longer, resulting in low network traffic management efficiency.

Method used

By introducing network management pods into the service mesh system, redirection rules are used to summarize traffic between service containers into the network management pod for management, optimize data transmission paths and reduce the number of hops in the network.

Benefits of technology

The data transmission path in the service grid system is optimized, the efficiency of network traffic management is improved, resource overhead is reduced, and the need to deploy sidecar agents in each pod is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676309A_ABST
    Figure CN119676309A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a service communication method and a service grid system. The method is applied to a service grid system, the service grid system comprises a first Pod, a network management Pod and a second Pod, the first Pod comprises a first service container, and the second Pod comprises a second service container; the method comprises: using the first service container to send target data to the network management Pod based on a first redirection rule, the target data being data that the first service container needs to send to the second service container; and after the network management Pod obtains the target data sent by the first service container, sending the target data to the second service container by using the network management Pod based on a second redirection rule. According to the service communication method and the service grid system, the data transmission path can be optimized, and the management efficiency of network flow is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a service communication method and a service grid system. Background Art

[0002] Service Mesh is an infrastructure layer used to handle inter-service communication in a microservice architecture. Its main function is to provide reliable network communication between services. Currently, service mesh implements traffic management and other functions by deploying lightweight proxies, such as Sidecar proxies, in applications. By deploying a Sidecar proxy for each service instance, the Sidecar proxy can be responsible for intercepting all traffic in and out of the service and performing traffic management.

[0003] Taking the traffic sent from service A to service B as an example, the traffic transmission path is usually the business container in service A - the Sidecar proxy of service A - the control plane (such as the Istio control plane) - the Sidecar proxy of service B - the business container of service B, resulting in a longer traffic transmission path and lower efficiency of network traffic management. Summary of the invention

[0004] The embodiments of the present application disclose a service communication method and a service grid system, which can optimize data transmission paths and improve the management efficiency of network traffic.

[0005] The embodiment of the present application discloses a service communication method, which is applied to a service grid system, wherein the service grid system includes a first Pod, a network management Pod, and a second Pod, wherein the first Pod includes a first service container, the second Pod includes a second service container, and the first Pod and the network management Pod run on the same node, which is a computing device or a virtual machine running on the computing device; the method includes:

[0006] Using the first service container based on a first redirection rule, the target data is sent to the network management Pod, where the target data is data that the first service container needs to send to the second service container, and the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod;

[0007] After the network management Pod obtains the target data sent by the first service container, the network management Pod is used to send the target data to the second service container based on the second redirection rule, where the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

[0008] In this implementation, the service grid system can manage the traffic between service containers in different Pods through the network management Pod running in each node. The first service container in the first Pod can send the target data of the second service container that needs to be sent to the second Pod to the network management Pod based on the first redirection rule. The network management Pod can send the target data to the second service container based on the second redirection rule. The target data does not need to pass through the Sidecar agent of the first Pod and the second Pod, which can optimize the data transmission path, reduce the number of data hops in the network, and improve the management efficiency of network traffic. In addition, the inbound and outbound traffic of the service containers of each Pod is uniformly aggregated to the network management Pod, and traffic management is performed through the network management Pod. A global network management mode is adopted, and there is no need to deploy a Sidecar agent in each Pod to manage the traffic of the service container, which can reduce the resource overhead of network management.

[0009] In some optional implementations, before using the first service container to send the target data to the network management Pod based on the first redirection rule, the method further includes:

[0010] When the first Pod is added to the service grid system, the network management Pod is used to load the target program according to the traffic event of the first Pod, and a second redirection rule is configured through the target program, wherein the traffic event includes Pod information corresponding to the first Pod and Pod information of other Pods communicating with the first Pod.

[0011] In this embodiment, when the first Pod is added to the service grid system, the network management Pod can load the target program according to the traffic event of the first Pod and configure the second redirection rule related to the first Pod. By configuring the redirection rules through event-driven configuration, normal communication between service containers in different Pods is ensured.

[0012] In some optional implementations, before using the first service container to send the target data to the network management Pod based on the first redirection rule, the method further includes:

[0013] When the first Pod is added to the service grid system, the target program in the shared data volume is loaded using the first Pod, and a first redirection rule is configured through the target program.

[0014] In this implementation, the Pod added to the service grid can load the target program in the shared data volume and configure the redirection rules, so as to aggregate the traffic of the service containers in each Pod into the network management Pod for management, thereby improving the overall network performance.

[0015] In some optional implementations, after configuring the redirection rule corresponding to the first Pod and the redirection rule corresponding to the network management Pod through the target program, the method further includes:

[0016] The network management Pod is used to store the second redirection rule in a global forwarding information base FIB.

[0017] In this implementation, the network management Pod can maintain and manage the configured redirection rules stored in the FIB, thereby achieving traffic management across network namespaces between different Pods, better optimizing the traffic of the service capacity of each Pod in the node, and improving the overall network performance.

[0018] In some optional implementations, the first Pod, the network management Pod, and the second Pod run on the same node, and the first redirection rule is used to instruct the first service container to send data sent to the second service container belonging to the same node to the network management Pod;

[0019] The second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container of the same node to the second service container.

[0020] In this implementation, the inbound and outbound traffic of the service containers in each Pod within the same node can be aggregated to the network management Pod within the node. The traffic of the service containers in each Pod within the same node can be managed through the network management Pod, which can optimize the data transmission path and improve the management efficiency of network traffic. There is no need to deploy a Sidecar agent in each Pod for traffic management, which can reduce the resource overhead of network management.

[0021] In some optional implementations, the first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node; the first redirection rule is used to instruct the first Pod to send data sent to a second service container belonging to a different node to the network management Pod, and the second redirection rule is used to instruct the network management Pod of the first node to send the received data sent to the second service container of a different node to the network management Pod of the second node;

[0022] The using the network management Pod to send the target data to the second service container based on the second redirection rule includes:

[0023] Using the network management Pod of the first node to send the target data to the network management Pod of the second node based on the second redirection rule;

[0024] After the network management Pod of the second node obtains the target data sent by the network management Pod of the first node, the network management Pod of the second node is used to send the target data to the second service container based on the third redirection rule, and the third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

[0025] In this implementation, network management Pods are deployed on different nodes in the service grid system, and cross-node communication can be achieved between the network management Pods of different nodes. The traffic of the service containers of the Pods running in each node in the service grid system can be aggregated to the network management Pods deployed in each node for management, thereby optimizing the traffic transmission path and improving the management efficiency of network traffic.

[0026] In some optional implementations, the redirection rules include first-category rules, second-category rules, third-category rules, and fourth-category rules; wherein,

[0027] The first type of rule is used to instruct that data sent by a service container to other service containers belonging to the same node be sent to the network management Pod;

[0028] The second type of rule is used to instruct that data sent by a service container to other service containers belonging to different nodes be sent to the network management Pod;

[0029] The third type of rule is used to instruct the network management Pod to send the received data sent to other service containers belonging to different nodes to the network management Pod of the node where the other service containers are located;

[0030] The fourth type of rule is used to instruct the network management Pod to send the received data sent to other service containers of the same node to the other service containers.

[0031] In this implementation, based on the various configured redirection rules, the traffic of service containers in different Pods in the service network system can be uniformly aggregated to the network management Pod for management, and communication between service containers in different Pods on the same node can be achieved, as well as communication between service containers in different Pods across nodes, thereby ensuring the stability of communication between different services in the service network system.

[0032] The embodiment of the present application discloses a service grid system, the service grid system comprising: a first Pod, a network management Pod and a second Pod, the first Pod comprising a first service container, the second Pod comprising a second service container, the first Pod and the network management Pod running on the same node; wherein the first Pod is connected to the network management Pod via a border gateway protocol BGP communication, and the network management Pod is connected to the second Pod via the BGP communication;

[0033] The first service container is used to send target data to the network management Pod, where the target data is data that the first service container needs to send to the second service container;

[0034] The network management Pod is configured to send the target data to the second service container after acquiring the target data sent by the first service container.

[0035] In this implementation, the traffic rules of BGP can be used to aggregate the traffic of the service containers of each Pod in the service grid system to the network management Pod, which will not conflict with the iptables network rules used by the host and optimize the traffic management path. In addition, the inbound and outbound traffic of the service containers of each Pod is aggregated to the network management Pod, and traffic management is performed through the network management Pod. The global network management mode is adopted, and there is no need to deploy a Sidecar agent in each Pod to manage the traffic of the service container, which can reduce the resource overhead of network management.

[0036] In some optional implementations, the first service container is further used to send the target data to the network management Pod based on a first redirection rule; the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod;

[0037] The network management Pod is also used to send the target data to the second service container based on a second redirection rule after obtaining the target data sent by the first service container; the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

[0038] In this implementation, the first service container in the first Pod can send the target data of the second service container that needs to be sent to the second Pod to the network management Pod based on the first redirection rule, and the network management Pod can send the target data to the second service container based on the second redirection rule. The data transmission path is optimized based on the redirection rule, the number of data hops in the network is reduced, and the management efficiency of network traffic is improved.

[0039] In some optional implementations, the network management Pod is also used to load the target program according to the traffic event corresponding to the first Pod when the first Pod is added to the service grid system, and configure the second redirection rule through the target program; the traffic event includes the Pod information corresponding to the first Pod and the Pod information of other Pods communicating with the first Pod.

[0040] In this embodiment, when the first Pod is added to the service grid system, the network management Pod can load the target program according to the traffic event of the first Pod and configure the second redirection rule related to the first Pod. By configuring the redirection rules through event-driven configuration, normal communication between service containers in different Pods is ensured.

[0041] In some optional implementations, when the first Pod is added to the service grid system, the first Pod is also used to load the target program in the shared data volume and configure the first redirection rule through the target program.

[0042] In this implementation, the Pod added to the service grid can load the target program in the shared data volume and configure the redirection rules, so as to aggregate the traffic of the service containers in each Pod into the network management Pod for management, thereby improving the overall network performance.

[0043] In some optional implementations, the network management Pod is further used to store the second redirection rule in a global forwarding information base FIB.

[0044] In this implementation, the network management Pod can maintain and manage the configured redirection rules stored in the FIB, thereby achieving traffic management across network namespaces between different Pods, better optimizing the traffic of the service capacity of each Pod in the node, and improving the overall network performance.

[0045] In some optional implementations, the first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node;

[0046] The network management Pod of the first node is further used to send the target data to the network management Pod of the second node;

[0047] The network management Pod of the second node is further configured to send the target data to the second service container after acquiring the target data sent by the network management Pod of the first node.

[0048] In this implementation, network management Pods are deployed on different nodes in the service grid system, and cross-node communication can be achieved between the network management Pods of different nodes. The traffic of the service containers of the Pods running in each node in the service grid system can be aggregated to the network management Pods deployed in each node for management, thereby optimizing the traffic transmission path and improving the management efficiency of network traffic.

[0049] In some optional embodiments, the network management Pod of the second node is further used to send the target data to the second service container based on a third redirection rule after obtaining the target data sent by the network management Pod of the first node, and the third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

[0050] In this implementation, the network management Pods between different nodes can communicate across nodes. Based on the redirection rules, the network management Pods can send data sent by the network management Pods of other nodes to the service container of the same node, thereby ensuring the communication stability between the service containers of different nodes.

[0051] The embodiment of the present application discloses a service communication device, which is applied to a service grid system. The service grid system includes a first Pod, a network management Pod, and a second Pod. The first Pod includes a first service container, the second Pod includes a second service container, and the first Pod and the network management Pod run on the same node, which is a computing device or a virtual machine running on a computing device. The device includes:

[0052] A first sending module, configured to use the first service container to send target data to the network management Pod based on a first redirection rule, where the target data is data that the first service container needs to send to the second service container, and the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod;

[0053] A second sending module is used to send the target data to the second service container using the network management Pod based on a second redirection rule after the network management Pod obtains the target data sent by the first service container, and the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

[0054] An embodiment of the present application discloses a computing device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method described in any of the above embodiments.

[0055] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0056] An embodiment of the present application discloses a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1A An application scenario diagram of a service communication method in an embodiment;

[0059] Figure 1B A system architecture diagram of a service communication method in one embodiment;

[0060] Figure 2 A flowchart of a service communication method in one embodiment;

[0061] Figure 3 A schematic diagram of cross-node service communication in one embodiment;

[0062] Figure 4 A flowchart of a service communication method in another embodiment;

[0063] Figure 5 It is a schematic diagram of each Pod in a node loading a target program through a shared data volume in one embodiment;

[0064] Figure 6 A schematic diagram of a process of communication between services across nodes in one embodiment;

[0065] Figure 7 A schematic diagram of implementing communication between different services in one embodiment;

[0066] Figure 8 is a block diagram of a service communication device in one embodiment;

[0067] Fig. 9 A structural block diagram of a computing device in one embodiment. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0070] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first service container may be referred to as a second service container, and similarly, a second service container may be referred to as a first service container. Both the first service container and the second service container are service containers, but they are not necessarily the same service container. The term "plurality" used in this application refers to two or more.

[0071] The following are some explanations and descriptions of some terms that may be involved in this application:

[0072] Service mesh: It is an infrastructure layer used to handle inter-service communication in a microservice architecture. Its main function is to provide reliable network communication between services and implement load balancing, traffic management, security authentication, monitoring, and fault handling in inter-service communication. It can help developers build and manage microservice architecture more easily.

[0073] Microservice architecture: is a cloud-native architecture approach that decomposes applications into small components or services that are loosely coupled and can be deployed independently.

[0074] Sidecar mode: In the service mesh, a Sidecar proxy is deployed for each service instance. The Sidecar proxy container runs in the Pod of each service instance. The Sidecar proxy is responsible for intercepting all traffic in and out of the service container in the Pod and performing traffic management.

[0075] Service instance: refers to a specific implementation or deployment of a microservice at runtime.

[0076] Pod: The smallest resource management unit in a Kubernetes (K8s) cluster. Each Pod can include one or more containers. Containers in the same Pod can share storage, network, and namespace.

[0077] Container: It is a convenient and lightweight virtualization technology. Containers can be used to encapsulate applications, application configuration files, etc., so that they can run in various environments.

[0078] Node: It refers to the machine that carries the workload in the Kubernetes cluster. The node can be a virtual machine or a physical machine. The node contains the services required to run the Pod.

[0079] Network namespace: is a method of isolating network resources in the operating system, allowing different processes or containers to run in different network environments without interfering with each other; each network namespace has its own IP (Internet Protocol) address, routing table, firewall rules, etc., thereby achieving network isolation.

[0080] BGP (Border Gateway Protocol) is an autonomous system routing protocol that can be used to exchange routing information between different autonomous systems (AS). It can build and maintain routing tables on a global scale and is suitable for complex Internet structures.

[0081] Control plane: refers to the part of the network that controls data forwarding and determines the transmission path of data from the source to the destination.

[0082] Istio: is a service mesh solution that can be used to manage and route traffic between microservices, detect and prevent attacks between services, and monitor service performance.

[0083] Veth Pair (Virtual Ethernet Pair): refers to a pair of virtual network cards, which is a paired virtual communication interface. Data sent from one virtual communication interface can directly reach the other virtual communication interface.

[0084] Figure 1A FIG. 1 is an application scenario diagram of a service communication method in an embodiment. Figure 1A As shown, the method can be applied to a service network system 100, which may include one or more computing devices 110. The computing devices 110 may include servers and other devices. Multiple computing devices 110 may form a server cluster and have a cluster management architecture, such as a Kubernetes cluster.

[0085] Optionally, the computing device 110 can be used as a host to provide a virtualized environment for the container operation in the Kubernetes cluster. A computing device 110 or a virtual machine running in the computing device 110 can be considered as a node of the Kubernetes cluster. A service grid can be deployed in the Kubernetes cluster, and one or more services can be deployed in each node (one service can correspond to one service instance), and different services on the same node and services between different nodes can communicate.

[0086] For example, Figure 1B The system architecture diagram of the service communication method in one embodiment. In each node (Node) of the Kubernetes cluster, one or more services can be deployed. For example, one or more Pods can be run in each node, one service can correspond to one Pod, and one Pod can correspond to one network namespace. For example, service A (i.e., Pod-A) and service B (i.e., Pod-B) are deployed in the node. The network namespace corresponding to service A (i.e., Pod-A) can be Network-A, and the network namespace corresponding to service B (i.e., Pod-B) can be Network-B.

[0087] Each Pod may include one or more service containers, where the service container may refer to a container for performing service operations. For example, Pod-A may include a service container for performing service A operations, and Pod-B may include a service container for performing service B operations.

[0088] In an embodiment of the present application, a network management Pod can also be deployed in each node (Node) of the Kubernetes cluster. The network management Pod (i.e., the network proxy Pod) can be used to manage the traffic of each service container in the node. The inbound and outbound traffic of the service containers in each Pod in the node can be aggregated to the network management Pod, and traffic management can be performed through the network management Pod.

[0089] For example, taking the example of sending traffic from service A (i.e. Pod-A) in a node to service B (i.e. Pod-B), the traffic transmission path is Pod-A's service container-network management Pod-Pod-B's service container. Compared with the traffic transmission path in the Sidecar mode, the number of hops of data in the network can be reduced, thereby improving the management efficiency of network traffic.

[0090] like Figure 2 As shown, in one embodiment, a service communication method is provided, which can be applied to the above-mentioned service network system. The method may include the following steps:

[0091] Step 210: Use the first service container to send target data to the network management Pod based on the first redirection rule, where the target data is data that the first service container needs to send to the second service container.

[0092] Step 220: After the network management Pod obtains the target data sent by the first service container, the network management Pod is used to send the target data to the second service container based on the second redirection rule.

[0093] In a service network system, one or more services may be deployed in a server cluster, which may include one or more nodes, each of which may be a computing device or a virtual machine running on a computing device. A network management Pod may run in each node, and one or more Pods corresponding to the service may also run. The Pods corresponding to the service may be used to process the business of the service to provide service-related functions. Each Pod corresponding to the service may include one or more service containers, which may be used to perform the business of the service.

[0094] The network management Pod running in each node can centrally manage the traffic of the service containers in each Pod in the node.

[0095] It should be noted that a service can also correspond to multiple Pods, and the Pods corresponding to the same service can belong to the same network namespace. Each network namespace has independent network configuration, such as network equipment, routing information or forwarding rules.

[0096] In some embodiments, corresponding redirection rules may be pre-configured for the Pods corresponding to each service in the service network system, and the redirection rules may be used to define the data transmission path between the service container in the Pod and the service container in other Pods. The data transmission path between the service containers in two Pods may include at least two redirection rules, and the at least two redirection rules may be used to indicate that the data between the service containers in the two Pods is first sent from one service container to the network management Pod, and then sent from the network management Pod to another service container, so as to realize the aggregation of data between different services to the network management Pod for unified management.

[0097] Exemplarily, the service network system may include a first Pod, a network management Pod and a second Pod, the first Pod may include a first service container, the second Pod may include a second service container, the first Pod and the network management Pod may run on the same node, wherein the first Pod and the second Pod may be Pods corresponding to different services in the service network system.

[0098] The first Pod may correspond to the first service, and the first service container may be used to perform the business of the first service; the second Pod may correspond to the second service, and the second service container may be used to perform the business of the second service. The first service and the second service are different services in the service network system. The second Pod may run on the same node as the first Pod, or on a different node.

[0099] When the first service container of the first Pod needs to send target data to the second service container of the second Pod, the first service container can send the target data to the network management Pod of the node where the first Pod is located based on the first redirection rule. After the network management Pod receives the target data sent by the first service container, the network management Pod can send the target data to the second service container of the second Pod based on the second redirection rule.

[0100] The first redirection rule may be used to instruct the data sent from the first service container to the second service container to be sent to the network management Pod; the second redirection rule may be used to instruct the network management Pod to send the received data sent to the second service container to the second service container. Optionally, the first redirection rule and the second redirection rule may form a data transmission path from the first service container to the second service container.

[0101] As an implementation mode, the storage space corresponding to the first Pod may store the redirection rules corresponding to the first Pod. The redirection rules corresponding to the first Pod may be one or more. For example, for multiple other Pods communicating with the first Pod, multiple redirection rules corresponding to the other Pods may be configured. Furthermore, the redirection rules corresponding to the first Pod may be used to instruct the service container in the first Pod to send the data sent to the service containers in other Pods to the network management Pod.

[0102] Each Pod running in a node can be used as a virtual network device and is assigned a corresponding virtual communication interface. For example, the virtual communication interface can be represented by an IP (Internet Protocol) address and / or a port number, and each virtual network device can communicate through the virtual communication interface.

[0103] Exemplarily, the redirection rules corresponding to the first Pod may be composed of the virtual communication interface corresponding to the first Pod (such as the IP address and / or port number of the first Pod) and the virtual communication interface corresponding to the network management Pod (such as the IP address and / or port number corresponding to the network management Pod).

[0104] It should be noted that the storage space corresponding to the first Pod may store the redirection rules included in the complete data transmission path between the service container of the first Pod and the service containers of other Pods, or may only store the redirection rules corresponding to a partial data transmission path between the service container of the first Pod and the service containers of other Pods. For example, only the redirection rules corresponding to the data transmission path from the service container of the first Pod to the network management Pod may be stored.

[0105] When the first service container in the first Pod obtains target data that needs to be sent to the second service container in the second Pod, the target data may carry the virtual communication interface corresponding to the second Pod. The first service container may search for the first redirection rule that matches the virtual communication interface corresponding to the second Pod in the stored redirection rules corresponding to the first Pod based on the virtual communication interface corresponding to the second Pod, and send the target data to the network management Pod based on the first redirection rule.

[0106] As an implementation method, the storage space corresponding to the network management Pod in the node can store redirection rules related to the Pods corresponding to each service in the node. For each Pod corresponding to each service in the node, the network management Pod can store one or more redirection rules. For example, for multiple other Pods that communicate with the first Pod, the network management Pod can store the redirection rules corresponding to the communication between the first Pod and each other Pod.

[0107] It should be noted that the storage space corresponding to the network management Pod can store the redirection rules included in the complete data transmission path between the service container of the Pod corresponding to each service in the node and the service container of other Pods, and can also store the redirection rules corresponding to the partial data transmission path from the network management Pod to the service container of other Pods. For example, for the communication between the first Pod and the second Pod, the network management Pod can only store the redirection rules from the network management Pod to the service container of the second Pod.

[0108] After the network management Pod obtains the target data sent by the first service container of the first Pod, the target data carries the virtual communication interface corresponding to the second Pod. The network management Pod can search for a second redirection rule that matches the virtual communication interface corresponding to the second Pod in the stored redirection rules based on the virtual communication interface corresponding to the second Pod, and send the target data to the second service container of the second Pod based on the second redirection rule.

[0109] Optionally, the network management Pod can implement communication between Pods of different services in the same node, the first Pod and the second Pod can run on the same node, and the network management Pod can forward the target data sent by the first Pod to the second service container of the second Pod based on the second redirection rule.

[0110] For example, Figure 1B As shown in the figure, service A (i.e., Pod-A) in the node sends data to service B (i.e., Pod-B), then the service container of Pod-A sends the data to the network management Pod first, and then the network management Pod forwards the data to the service container of Pod-B. Compared with the data transmission path in the Sidecar mode in the related art, the number of hops of data in the network can be reduced, and the management efficiency of network traffic can be improved.

[0111] In some embodiments, the network management Pod can also realize communication between Pods of different services across nodes. The first Pod and the second Pod can run on different nodes, and the network management Pod can communicate with the network management Pods of other nodes. Based on the second redirection rule, the network management Pod can forward the target data sent by the first Pod to the network management Pod in the destination node, and then the network management Pod in the destination node forwards the target data to the second service container of the second Pod; wherein the destination node is the node to which the second Pod belongs.

[0112] For example, Figure 3 FIG. 1 is a schematic diagram of cross-node service communication in one embodiment. Figure 3As shown, the service of node 1 (i.e., Pod-A) sends data to the service of node 2 (i.e., Pod-C). Then, the service container of Pod-A first sends the data to the network management Pod-1 of node 1, which is then forwarded by the network management Pod-1 of node 1 to the network management Pod-2 of node 2. The network management Pod-2 of node 2 can forward the data to the service container of Pod-C. Compared with the data transmission path in the Sidecar mode in the related art, the number of hops of data in the network can be reduced, and the management efficiency of network traffic can be improved.

[0113] As an implementation method, communication between different services can be achieved based on the BGP protocol, and different nodes in the Kubernetes cluster can exchange routing information, thereby achieving communication between services on different nodes. The routing information may include redirection rules for the Pods corresponding to each service. The redirection rules can be used to build data transmission paths between different services in the same node and between different services on different nodes, thereby achieving communication between different services.

[0114] In an embodiment of the present application, the network management Pod can realize both communication between different services within a node and communication between different services across nodes. The traffic of the service containers corresponding to the services of each node in the service grid system can be aggregated to the network management Pod deployed in each node for management, thereby optimizing the traffic transmission path, improving the management efficiency of network traffic, and eliminating the need to modify the native network configuration of the Kubernetes cluster. The non-invasive design provides a more flexible network traffic management method that can adapt to different network environments and requirements.

[0115] In an embodiment of the present application, the service grid system can manage the traffic between service containers in different Pods through the network management Pod running in each node. The first service container in the first Pod can send the target data of the second service container that needs to be sent to the second Pod to the network management Pod based on the first redirection rule. The network management Pod can send the target data to the second service container based on the second redirection rule. The target data does not need to pass through the Sidecar agent of the first Pod and the second Pod, which can optimize the data transmission path, reduce the number of data hops in the network, and improve the management efficiency of network traffic. Moreover, the inbound and outbound traffic of the service containers of each Pod is uniformly aggregated to the network management Pod, and traffic management is performed through the network management Pod. A global network management mode is adopted, and there is no need to deploy a Sidecar agent in each Pod to manage the traffic of the service container, which can reduce the resource overhead of network management.

[0116] like Figure 4As shown, in another embodiment, a service communication method is provided, which can be applied to the above-mentioned computing device, and the method may include the following steps:

[0117] Step 402, when the first Pod is added to the service grid system, the target program is loaded according to the traffic event of the first Pod using the network management Pod, and the second redirection rule is configured through the target program.

[0118] When the first Pod is added to the service grid system, a redirection rule corresponding to the first Pod can be configured. When the first Pod is added to the service grid system, it can be a Pod originally running in the computing device or a newly started Pod.

[0119] In some embodiments, when a first Pod is added to a service grid system, a traffic event corresponding to the first Pod may be registered in a network management Pod. The traffic event may be used to monitor the business configuration process of the first Pod, such as monitoring the business processing process for communication between the first Pod configuration and other Pods. The business processing process may be a process for a service container in the first Pod to send data to a service container in another Pod, or a process for two-way communication between a service container in the first Pod and a service container in another Pod, etc.

[0120] As a specific implementation method, a cni Pod corresponding to the istio-cni plug-in can be deployed in a node in the service network system. When the cni Pod detects that a first Pod needs to be added to the service grid system, it can send push information corresponding to the first Pod to the network management Pod, so that the network management Pod registers the traffic event corresponding to the first Pod.

[0121] Optionally, when the cni instance detects that the first Pod needs to be added to the service grid system, a target label can be assigned to the first Pod so that the network management Pod manages the traffic of the first Pod. The target label can be used to indicate that the first service corresponding to the first Pod needs to be managed by the network management Pod. Optionally, the label content of the target label can be set according to actual needs, and the label content can be composed of one or more of numbers, letters, text, and symbols.

[0122] After assigning the target label to the first Pod, the operation of each service container in the first Pod can be blocked first, the traffic event corresponding to the first Pod can be registered in the network management Pod, and the redirection rules corresponding to the first Pod can be configured. After the redirection rules corresponding to the first Pod are configured, the service container in the first Pod can be run. Specifically, when the cni Pod in the node adds the first Pod to the service grid system, it can prevent the service container in the first Pod from starting, wait for the network management Pod to successfully register the traffic event for the first Pod, and configure the redirection rules corresponding to the first Pod, and then create and run the service container in the first Pod, which can ensure the accuracy of the first Pod in processing business, and the first Pod only needs to focus on business implementation, which can improve business processing efficiency and reduce resource overhead.

[0123] It should be noted that there may also be services with target labels running in the service network system. The service without target labels may be a service that needs to manage its own traffic. In this case, the target label may not be assigned to the Pod corresponding to the service. The traffic of the service container in the Pod without the target label will not be aggregated to the network management Pod for unified management. Whether the traffic of the service container is managed by the network management Pod can be set according to actual needs. By adding labels, the flexibility of traffic management for each service in the service network system can be improved, and network performance can be improved.

[0124] The traffic event corresponding to the first Pod may include Pod information corresponding to the first Pod and Pod information of other Pods communicating with the first Pod. Optionally, the other Pods communicating with the first Pod may be peer Pods communicating with the first Pod, such as Pods corresponding to other services that receive data sent by the service container of the first Pod.

[0125] In some embodiments, the Pod information corresponding to the first Pod may include but is not limited to one or more of the network namespace corresponding to the first Pod, the Pod name (or service name), network communication information, etc., wherein the network communication information may include a virtual communication interface corresponding to the first Pod, such as an IP address and / or port number, etc.

[0126] The Pod information of other Pods communicating with the first Pod may include, but is not limited to, one or more of the network namespace corresponding to the other Pod, the Pod name (or service name), the network communication information, etc. The network communication information may include the virtual communication interface corresponding to the other Pod, such as the IP address and / or port number, etc.

[0127] By associating the Pod information corresponding to the first Pod and the Pod information of other Pods communicating with the first Pod with the traffic event corresponding to the first Pod, it is convenient to subsequently monitor the business processing flow of communication between the first Pod configuration and other Pods, thereby triggering the configuration of the corresponding redirection rules.

[0128] After registering a traffic event in the network management Pod, if the network management Pod monitors a business configuration operation that matches the traffic event based on the traffic event, the target program can be loaded, and the redirection rules corresponding to the business configuration operation can be configured through the target program.

[0129] Since the traffic event includes the Pod information corresponding to the first Pod and the Pod information of one or more other Pods communicating with the first Pod, when the first Pod performs a business configuration operation, the business configuration operation is used to configure the business processing flow for communication between the service container of the first Pod and the service container of any other Pod. The Pod information of the first Pod and the Pod information of any other Pod in communication will be defined in the business configuration operation. Therefore, the business configuration operation complies with the traffic event corresponding to the first Pod. The network management Pod can obtain the business configuration operation that complies with the traffic event and the Pod information of the first Pod and the Pod information of any other Pod in communication defined in the business configuration operation, load the target program, and configure the redirection rules corresponding to the business configuration operation. The redirection rules corresponding to the business configuration operation can be used to help implement the business processing flow configured in the business configuration operation.

[0130] Exemplarily, when the first Pod performs a business configuration operation corresponding to the second Pod, the business configuration operation is used to configure the business processing flow of the first service container of the first Pod to send data to the second service container of the second Pod, which complies with the traffic event corresponding to the first Pod, then the network management Pod can configure the first service container of the first Pod to send data to the second service container of the second Pod, and the corresponding redirection rule. For example, the network management Pod can be configured to instruct the network management Pod to send the received data sent to the second service container to the second service container. Optionally, the network management Pod can also be configured to instruct the first redirection rule to send the data sent from the first service container to the second service container to the network management Pod.

[0131] In some embodiments, the redirection rules may include first-class rules, second-class rules, third-class rules, and fourth-class rules; wherein,

[0132] The first type of rules is used to instruct that data sent by a service container to other service containers belonging to the same node be sent to the network management Pod;

[0133] The second type of rules is used to instruct that data sent by a service container to other service containers belonging to different nodes be sent to the network management Pod;

[0134] The third type of rules is used to instruct the network management Pod to send the data received and sent to other service containers belonging to different nodes to the network management Pod of the node where the other service containers are located;

[0135] The fourth type of rule is used to instruct the network management Pod to send the data received and sent to other service containers on the same node to other service containers.

[0136] Among them, the first and fourth types of rules can be used to realize communication between different services in the same node, and the second and third types of rules can be used to realize communication between different services across nodes.

[0137] In this implementation, based on the various configured redirection rules, the traffic of service containers in different Pods in the service network system can be uniformly aggregated to the network management Pod for management, and communication between service containers in different Pods on the same node can be achieved, as well as communication between service containers in different Pods across nodes, thereby ensuring the stability of communication between different services in the service network system.

[0138] The target program may refer to a program for adding redirection rules. Optionally, the target program may include a first function, a second function, a third function and a fourth function, wherein the first function can be used to configure the above-mentioned first type of rules, the second function can be used to configure the above-mentioned second type of rules, the third function can be used to configure the above-mentioned third type of rules, and the fourth function can be used to configure the above-mentioned fourth type of rules.

[0139] As an implementation method, communication between different services can be achieved based on the BGP protocol, and the target program can be a BGP redirection extension program, which can be used to provide redirection rules under the BGP protocol.

[0140] Exemplarily, the BGP redirection extension program implements the configuration of redirection rules, and can mainly use the following functions:

[0141] Hook_ingress(from-netdev) can be used to implement the redirection rule configuration of the traffic of the network device (i.e., network interface) in the same node entering the network management Pod. This function Hook_ingress(from-netdev) can be used to configure the first type of rules mentioned above;

[0142] Hook_ingress (from-overlay) can be used to implement the redirection rule configuration of network device traffic entering the network management Pod and then communicating and interacting with the network management Pod of other nodes across nodes. It belongs to the redirection rule of the overlay network. The function Hook_ingress (from-overlay) can be used to configure the second type of rules mentioned above;

[0143] Hook_egress(to-overlay) can be used to implement the redirection rule configuration of the traffic flowing out of the network management Pod to the network device, and then communicate and interact with the network management Pod of other nodes across nodes. It belongs to the redirection rule of the overlay network. This function Hook_egress(to-overlay) can be used to configure the third type of rules mentioned above;

[0144] Hook_egress(to-netdev) can be used to configure the redirection rules for the traffic flowing out of the network management Pod to the network device in the same node. This function Hook_egress(to-netdev) can be used to configure the fourth type of rules mentioned above.

[0145] Redirection rules for the Pods corresponding to each service can be formulated based on several functions in the above target program.

[0146] Taking the example of sending data from the first service container in the first Pod to the second service container in the second Pod, configure the various redirection rules contained in the data transmission path from the first service container in the first Pod to the second service container in the second Pod. If the first Pod and the second Pod run on the same node, the function Hook_ingress(from-netdev) can be called to configure the first redirection rule (used to instruct the first service container to send the data sent to the second service container belonging to the same node to the network management Pod), and the first redirection rule can be a first-class rule; the function Hook_egress(to-netdev) is called to configure the second redirection rule (used to instruct the network management Pod to send the received data sent to the second service container of the same node to the second service container), and the second redirection rule can be a fourth-class rule.

[0147] If the first Pod and the second Pod run on different nodes, the Hook_ingress(from-overlay) function can be called to configure the first redirection rule (used to instruct the first service container to send the data sent to the second service container belonging to a different node to the network management Pod), and the first redirection rule can be a second-type rule; the Hook_egress(to-overlay) function is called to configure the second redirection rule (used to instruct the network management Pod to send the received data sent to the second service container of a different node to the network management Pod of the node where the second service container is located), and the second redirection rule can be a third-type rule; the Hook_egress(to-netdev) function is also called to configure the third redirection rule (used to instruct the network management Pod of the node where the second service container is located to send the received data of the second service container of the same node to the second service container), and the third redirection rule can be a fourth-type rule.

[0148] Exemplarily, the configured redirection rule can be represented by the network interface information corresponding to the Pod. For example, the data transmission path corresponding to the communication between the first Pod and the second Pod of the same node can be represented as: the IP address of the first Pod-the IP address of the network management Pod-the IP address of the second Pod, wherein the IP address of the first Pod-the IP address of the network management Pod can be the first redirection rule, and the IP address of the network management Pod-the IP address of the second Pod can be the second redirection rule.

[0149] For example, the data transmission path corresponding to the communication between the first Pod and the second Pod of different nodes can be expressed as: the IP address of the first Pod-the IP address of the network management Pod of the node where the first Pod is located-the IP address of the network management Pod of the node where the second Pod is located-the IP address of the second Pod.

[0150] In an embodiment of the present application, when the first Pod is added to the service grid system, the network management Pod can load the target program according to the traffic event of the first Pod, and configure the second redirection rule related to the first Pod. By configuring the redirection rules through event-driven configuration, normal communication between service containers in different Pods is ensured.

[0151] After the network management Pod configures the redirection rule corresponding to the first Pod, the redirection rule can be stored in the global forwarding information base (Forward Information dataBase, FIB). For example, after the network management Pod configures the above-mentioned second redirection rule, the network management Pod can be used to store the second redirection rule in the FIB.

[0152] Optionally, each node can maintain a FIB, which can store the redirection rules of the Pods corresponding to each service in the node. By maintaining and managing the configured redirection rules stored in the FIB, traffic management across network namespaces between different Pods can be achieved, which can better optimize the traffic of the service capacity of each Pod in the node and improve the overall network performance.

[0153] Step 404: When the first Pod is added to the service grid system, the target program in the shared data volume is loaded using the first Pod, and a first redirection rule is configured through the target program.

[0154] In some embodiments, the target program may be stored in a shared data volume of the node, which may refer to a data volume that can be shared by all Pods in the node, and the Pods corresponding to each service running in the node and the network management Pod can access the shared data volume. When the first Pod is added to the service grid system, the first Pod can load the target program in the shared data volume and configure the redirection rules corresponding to the first Pod through the target program.

[0155] When the first Pod is added to the service grid system, when the first Pod performs a service configuration operation, the first Pod can load the target program in the shared data volume and configure the redirection rule corresponding to the service configuration operation.

[0156] Exemplarily, when the first Pod performs a business configuration operation corresponding to the second Pod, the business configuration operation is used to configure the business processing flow of the first service container of the first Pod to send data to the second service container of the second Pod. The first Pod can load the target program in the shared data volume, and configure the first service container of the first Pod to send data to the second service container of the second Pod through the target program, and the corresponding redirection rule. For example, the first Pod can configure the first redirection rule of the data sent by the first service container to the second service container to the network management Pod through the target program.

[0157] As an implementation method, the network management Pod can configure the various redirection rules included in the data transmission path from the first service container of the first Pod to the second service container of the second Pod, and then send the configured redirection rules to each Pod in the data transmission path. For example, the network management Pod can send the configured first redirection rule to the first Pod for storage, and the first Pod may not configure the redirection rule. For another example, the network management Pod can also send the configured third redirection rule to the network management Pod of the node where the second service container is located for storage, etc.

[0158] As another implementation, the network management Pod may configure a portion of the redirection rules in the data transmission path from the first service container of the first Pod to the second service container of the second Pod. For example, only the second redirection rule may be configured, and the first Pod may configure the first redirection rule.

[0159] For example, Figure 5 FIG. 1 is a schematic diagram of each Pod in a node loading a target program through a shared data volume in an embodiment. Figure 5 As shown, the Pods corresponding to each service in the node, such as Pod-A and Pod-B, can load the BGP redirection extension program through the shared data volume to configure the redirection rules. The network management Pod can also run the BGP redirection extension program through the shared data volume to configure the redirection rules of the Pods corresponding to each service.

[0160] Optionally, after configuring the redirection rule, the first Pod may store the configured redirection rule in the FIB. For example, after configuring the above-mentioned first redirection rule, the first Pod may store the first redirection rule in the FIB.

[0161] In an embodiment of the present application, the Pods corresponding to each service added to the service network system can load the target program in the shared data volume and configure the redirection rules, so as to aggregate the traffic of the service containers in each Pod into the network management Pod for management, thereby improving the overall network performance.

[0162] Step 406: Use the first service container to send target data to the network management Pod based on the first redirection rule, where the target data is data that the first service container needs to send to the second service container.

[0163] Step 408: After the network management Pod obtains the target data sent by the first service container, the network management Pod is used to send the target data to the second service container based on the second redirection rule.

[0164] For the description of steps 406 to 408 , reference may be made to the relevant description in the above embodiment, which will not be repeated here.

[0165] In an embodiment of the present application, when the first Pod is added to the service grid system, the network management Pod can load the target program and configure the redirection rules corresponding to the first Pod, so as to aggregate the traffic of the service containers in each Pod into the network management Pod for management, thereby improving the overall network performance.

[0166] like Figure 6As shown, in some embodiments, the first Pod and the network management Pod run on a first node, the second Pod runs on a second node, the first node is different from the second node, and the above service communication method may include the following steps:

[0167] Step 602, using the first service container to send the target data to the network management Pod of the first node based on the first redirection rule, where the target data is the data that the first service container needs to send to the second service container; the first redirection rule is used to instruct the first Pod to send the data sent to the second service container belonging to a different node to the network management Pod of the first node.

[0168] Step 604, after the network management Pod of the first node obtains the target data sent by the first service container, the network management Pod of the first node is used to send the target data to the network management Pod of the second node based on the second redirection rule; the second redirection rule is used to instruct the network management Pod of the first node to send the received data sent to the second service container of a different node to the network management Pod of the second node.

[0169] Step 606, after the network management Pod of the second node obtains the target data sent by the network management Pod of the first node, the network management Pod of the second node is used to send the target data to the second service container based on the third redirection rule, and the third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

[0170] When the first Pod and the second Pod run on different nodes respectively, communication between services across nodes can be achieved through communication interaction of network management Pods on different nodes. The first service container of the first Pod can send target data to the network management Pod of the same node (i.e., the first node) based on the first redirection rule, and the network management Pod sends the target data to the network management Pod of the second node based on the second redirection rule.

[0171] As an implementation method, the second redirection rule may include the network interface information of the network management Pod of the first node, the network interface information of the physical network card of the first node, the network interface information of the physical network card of the second node, and the network interface information of the network management Pod of the second node. Based on the second redirection rule, the network management Pod of the first node may send the target data to the physical network card of the first node, forward the target data to the physical network card of the second node through the physical network card of the first node, and then transmit the target data to the network management Pod of the second node by the physical network card of the second node, thereby realizing communication interaction between network management Pods across nodes.

[0172] In some embodiments, for the Pods corresponding to each service in the service grid system, a Veth Pair device corresponding to each Pod can be set, wherein one end of the Veth Pair device can be set in the Pod corresponding to the service, and the other end of the Veth Pair device can be set in the network management Pod, thereby building a communication channel between the Pod corresponding to the service and the network management Pod.

[0173] Furthermore, redirection rules can be configured for the Veth Pair devices corresponding to each Pod, such as configuring a first redirection rule to transmit data from the virtual communication interface (i.e., Veth interface) of the first Pod to the virtual communication interface of the network management Pod, and / or configuring to transmit data from the virtual communication interface of the network management Pod to the virtual communication interface of the second Pod, etc.

[0174] Optionally, the network management Pod can also form a Veth Pair device with the physical network card or virtual network card of the node, thereby building a communication channel between the virtual communication interface of the network management Pod and the network interface of the physical network card of the node.

[0175] For example, Figure 7 FIG. 1 is a schematic diagram of implementing communication between different services in one embodiment. Figure 7 As shown, veth1 in service A (i.e., Pod-A) in the node and veth0 in the network management Pod form a Veth Pair device, veth2 in service B (i.e., Pod-B) and veth0 in the network management Pod form a Veth Pair device, and veth0 in the network management Pod and eth0 of the physical network card form a Veth Pair device. Among them, veth0, veth1, veth2, and eth0 can represent the name of the Veth Pair device, and each Veth Pair device can be configured with an IP address.

[0176] As an implementation method, the first Pod and the second Pod run on the same node. The first service container in the first Pod can send the target data to the Veth interface of the network management Pod through the Veth interface of the first Pod based on the first redirection rule, and the network management Pod can send the target data to the Veth interface of the second Pod through the Veth interface of the network management Pod based on the second redirection rule, thereby transmitting it to the second service container of the second Pod.

[0177] As another implementation, the first Pod and the second Pod run on different nodes, then the first service container in the first Pod can send the target data to the Veth interface of the network management Pod of the first node through the Veth interface of the first Pod based on the first redirection rule. The network management Pod of the first node can send the target data to the Veth interface of the physical network card of the first node through the Veth interface of the network management Pod based on the second redirection rule. The physical network card of the first node forwards the target data to the physical network card of the second node, and the physical network card of the second node sends the target data to the Veth interface of the network management Pod of the second node through its own Veth interface. The network management Pod of the second node sends the target data to the Veth interface of the second Pod through the Veth interface of the network management Pod of the second node based on the third redirection rule, thereby transmitting it to the second service container of the second Pod.

[0178] As an implementation method, a communication connection can also be established between the Pod corresponding to each service in the node and the network management Pod through a bridge. The bridge can be equivalent to a switch, which is used to transfer the traffic of two network namespaces. For the Pod corresponding to each service in the node and the network management Pod, a Veth Pair device can be set. One end of the Veth Pair device can be set in the Pod, and the other end can be set on the bridge. The data output by the Veth interface of the first Pod can be transmitted to the bridge, and then sent by the bridge to the Veth interface of the network management Pod; the data output by the Veth interface of the network management Pod can be transmitted to the bridge, and then forwarded by the bridge to the Veth interface of the second Pod. The use of bridge connection can better realize the connection between complex network devices, ensuring the accuracy of data transmission and network transmission performance.

[0179] It should be noted that the communication between the Pods corresponding to each target service in the node and the network management Pod can also be achieved in other ways, and is not limited to the above-mentioned method of setting up the Veth Pair device.

[0180] In some embodiments, the target data may be sent to the second service container through the network management Pod based on the network management policy.

[0181] After the traffic corresponding to each service container in the node is aggregated to the network management Pod, the network management Pod can manage the traffic of each service container based on the network management policy.

[0182] Exemplarily, the network management strategy may include adjusting the traffic transmission rate based on the load of the Pod. The network management Pod can obtain the load of the Pod corresponding to each service, and control the speed of transmitting data to each service container according to the load of the Pod corresponding to each service. The load of the Pod can adopt resource utilization, such as the CPU (Central Processing Unit) utilization and memory utilization corresponding to the Pod. The network management Pod is used to control the speed of transmitting data to the second Pod. If the load of the second Pod is large (such as high resource utilization), the speed of transmitting data to the second Pod can be reduced; if the load of the second Pod is small (such as low resource utilization), the speed of transmitting data to the second Pod can be increased, and the load of the second Pod can be better balanced.

[0183] Exemplarily, the network management policy may include limiting unauthorized access traffic. After the network management Pod obtains the target data, it can determine whether the first Pod that sends the target data has access rights to the second Pod. If it does not have the access rights, the data may not be forwarded to the second Pod, thereby improving security.

[0184] It should be noted that the network management strategy is not limited to the above-mentioned strategies, and other strategies may also be adopted, which are not limited here.

[0185] The network management Pod can manage the traffic of each service container based on the network management strategy, dynamically adjust the network traffic and optimize the traffic, thereby improving the overall network performance.

[0186] In an embodiment of the present application, network management Pods are deployed on different nodes in the service grid system, and cross-node communication can be achieved between the network management Pods of different nodes. The traffic of the service containers of the Pods running in each node in the service grid system can be aggregated to the network management Pods deployed in each node for management, thereby optimizing the traffic transmission path and improving the management efficiency of network traffic.

[0187] In some embodiments, a service grid system is provided, which includes: a first Pod, a network management Pod and a second Pod, the first Pod includes a first service container, the second Pod includes a second service container, and the first Pod and the network management Pod run on the same node; wherein the first Pod is connected to the network management Pod via BGP communication, and the network management Pod is connected to the second Pod via BGP communication.

[0188] The first service container is used to send target data to the network management Pod, where the target data is data that the first service container needs to send to the second service container.

[0189] The network management Pod is configured to send the target data to the second service container after acquiring the target data sent by the first service container.

[0190] In some embodiments, the first service container is further used to send the target data to the network management Pod based on the first redirection rule; the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod;

[0191] The network management Pod is also used to send the target data to the second service container based on the second redirection rule after obtaining the target data sent by the first service container; the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

[0192] In some embodiments, the network management Pod is also used to load the target program according to the traffic event corresponding to the first Pod when the first Pod is added to the service grid system, and configure the second redirection rule through the target program; the traffic event includes the Pod information corresponding to the first Pod and the Pod information of other Pods communicating with the first Pod.

[0193] In some embodiments, when the first Pod is added to the service grid system, the first Pod is also used to load the target program in the shared data volume and configure the first redirection rule through the target program.

[0194] In some embodiments, the network management Pod is further configured to store the second redirection rule in the global forwarding information base FIB.

[0195] In some embodiments, the first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node;

[0196] The network management Pod of the first node is also used to send the target data to the network management Pod of the second node.

[0197] The network management Pod of the second node is further used to send the target data to the second service container after acquiring the target data sent by the network management Pod of the first node.

[0198] In some embodiments, the network management Pod of the second node is further used to send the target data to the second service container based on a third redirection rule after obtaining the target data sent by the network management Pod of the first node. The third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

[0199] In the embodiment of the present application, the service grid system can manage the traffic between service containers in different Pods through the network management Pod running in each node, which can optimize the data transmission path, reduce the number of data hops in the network, and improve the management efficiency of network traffic. In addition, the inbound and outbound traffic of the service containers of each Pod is uniformly aggregated to the network management Pod, and traffic management is performed through the network management Pod. The global network management mode is adopted, and there is no need to deploy a Sidecar agent in each Pod to manage the traffic of the service container, which can reduce the resource overhead of network management.

[0200] like Figure 8 As shown, in one embodiment, a service communication device 800 is provided, which can be applied to the above-mentioned service grid system. The service communication device 800 may include a first sending module 810 and a second sending module 820.

[0201] The first sending module 810 is used to use the first service container to send target data to the network management Pod based on the first redirection rule, where the target data is data that the first service container needs to send to the second service container, and the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod.

[0202] The second sending module 820 is used to send the target data to the second service container based on the second redirection rule after the network management Pod obtains the target data sent by the first service container. The second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

[0203] In some embodiments, the service communication device 800 further includes a rule configuration module.

[0204] A rule configuration module is used to load a target program using a network management Pod according to a traffic event of the first Pod when the first Pod is added to the service grid system, and configure a second redirection rule through the target program, wherein the traffic event includes Pod information corresponding to the first Pod and Pod information of other Pods communicating with the first Pod.

[0205] In some embodiments, the rule configuration module is further used to use the first Pod to load the target program in the shared data volume when the first Pod is added to the service grid system, and configure the first redirection rule through the target program.

[0206] In some embodiments, the service communication device 800 further includes a storage module.

[0207] The storage module is used to store the second redirection rule in the global forwarding information base FIB by using the network management Pod.

[0208] In some embodiments, the first Pod, the network management Pod, and the second Pod run on the same node, and the first redirection rule is used to instruct the first service container to send data sent to the second service container belonging to the same node to the network management Pod;

[0209] The second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container of the same node to the second service container.

[0210] In some embodiments, the first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node; the first redirection rule is used to instruct the first Pod to send data sent to a second service container belonging to a different node to the network management Pod, and the second redirection rule is used to instruct the network management Pod of the first node to send the received data sent to the second service container of a different node to the network management Pod of the second node.

[0211] The second sending module 820 is also used to use the network management Pod of the first node to send the target data to the network management Pod of the second node based on the second redirection rule; after the network management Pod of the second node obtains the target data sent by the network management Pod of the first node, the network management Pod of the second node is used to send the target data to the second service container based on the third redirection rule, and the third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

[0212] In the embodiment of the present application, the service grid system can manage the traffic between service containers in different Pods through the network management Pod running in each node, which can optimize the data transmission path, reduce the number of data hops in the network, and improve the management efficiency of network traffic. In addition, the inbound and outbound traffic of the service containers of each Pod is uniformly aggregated to the network management Pod, and traffic management is performed through the network management Pod. The global network management mode is adopted, and there is no need to deploy a Sidecar agent in each Pod to manage the traffic of the service container, which can reduce the resource overhead of network management.

[0213] Fig. 9 FIG. 1 is a block diagram of a computing device in one embodiment. Fig. 9As shown, the computing device 900 may include one or more of the following components: a processor 910, and a memory 920 coupled to the processor 910, wherein the memory 920 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 910.

[0214] The processor 910 may include one or more processing cores. The processor 910 uses various interfaces and lines to connect various parts within the entire computing device 900, and executes various functions and processes data of the computing device 900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 920, and calling data stored in the memory 920. Optionally, the processor 910 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 910 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 910, but may be implemented separately through a communication chip.

[0215] The memory 920 may include a random access memory (RAM) or a read-only memory (ROM). The memory 920 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the computing device 900 during use, etc.

[0216] It can be understood that the computing device 900 may include more or fewer structural elements than those in the above structural block diagram, for example, a radio frequency module, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., and is not limited here.

[0217] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program implements the methods described in the above embodiments when executed by a processor.

[0218] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.

[0219] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.

[0220] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).

[0221] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0222] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0223] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0224] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0225] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0226] The above is a detailed introduction to a service communication method and a service grid system disclosed in the embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A service communication method, characterized in that: Applied to a service grid system, the service grid system includes a first Pod, a network management Pod and a second Pod, the first Pod includes a first service container, the second Pod includes a second service container, the first Pod and the network management Pod run on the same node, and the node is a computing device or a virtual machine running on the computing device; the method includes: Using the first service container based on a first redirection rule, the target data is sent to the network management Pod, where the target data is data that the first service container needs to send to the second service container, and the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod; After the network management Pod obtains the target data sent by the first service container, the network management Pod is used to send the target data to the second service container based on the second redirection rule, where the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

2. The method according to claim 1, characterized in that Before using the first service container to send the target data to the network management Pod based on the first redirection rule, the method further includes: When the first Pod is added to the service grid system, the network management Pod is used to load the target program according to the traffic event of the first Pod, and a second redirection rule is configured through the target program, wherein the traffic event includes Pod information corresponding to the first Pod and Pod information of other Pods communicating with the first Pod.

3. The method according to claim 2, characterized in that Before using the first service container to send the target data to the network management Pod based on the first redirection rule, the method further includes: When the first Pod is added to the service grid system, the target program in the shared data volume is loaded using the first Pod, and a first redirection rule is configured through the target program.

4. The method according to claim 3, characterized in that After configuring the redirection rule corresponding to the first Pod and the redirection rule corresponding to the network management Pod through the target program, the method further includes: The network management Pod is used to store the second redirection rule in a global forwarding information base FIB.

5. The method according to any one of claims 1 to 4, characterized in that: The first Pod, the network management Pod, and the second Pod run on the same node, and the first redirection rule is used to instruct the first service container to send data sent to the second service container belonging to the same node to the network management Pod; The second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container of the same node to the second service container.

6. The method according to any one of claims 1 to 4, characterized in that: The first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node; the first redirection rule is used to instruct the first Pod to send data sent to a second service container belonging to a different node to the network management Pod, and the second redirection rule is used to instruct the network management Pod of the first node to send the received data sent to the second service container of a different node to the network management Pod of the second node; The using the network management Pod to send the target data to the second service container based on the second redirection rule includes: Using the network management Pod of the first node to send the target data to the network management Pod of the second node based on the second redirection rule; After the network management Pod of the second node obtains the target data sent by the network management Pod of the first node, the network management Pod of the second node is used to send the target data to the second service container based on the third redirection rule, and the third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

7. A service grid system, characterized in that: The service grid system includes: a first Pod, a network management Pod and a second Pod, the first Pod includes a first service container, the second Pod includes a second service container, and the first Pod and the network management Pod run on the same node; wherein the first Pod is connected to the network management Pod via a border gateway protocol BGP communication, and the network management Pod is connected to the second Pod via the BGP communication; The first service container is used to send target data to the network management Pod, where the target data is data that the first service container needs to send to the second service container; The network management Pod is configured to send the target data to the second service container after acquiring the target data sent by the first service container.

8. The service grid system according to claim 7, characterized in that: The first service container is further used to send the target data to the network management Pod based on a first redirection rule; the first redirection rule is used to indicate that the data sent by the first service container to the second service container is sent to the network management Pod; The network management Pod is also used to send the target data to the second service container based on a second redirection rule after obtaining the target data sent by the first service container; the second redirection rule is used to instruct the network management Pod to send the received data sent to the second service container to the second service container.

9. The service grid system according to claim 8, characterized in that: The network management Pod is also used to load the target program according to the traffic event corresponding to the first Pod and configure the second redirection rule through the target program when the first Pod is added to the service grid system; the traffic event includes Pod information corresponding to the first Pod and Pod information of other Pods communicating with the first Pod.

10. The service grid system according to claim 9, characterized in that: When the first Pod is added to the service grid system, the first Pod is also used to load the target program in the shared data volume and configure the first redirection rule through the target program.

11. The service grid system according to claim 9, characterized in that: The network management Pod is further used to store the second redirection rule in a global forwarding information base FIB.

12. The service grid system according to claim 7, characterized in that: The first Pod and the network management Pod run on a first node, the second Pod runs on a second node, and the first node is different from the second node; The network management Pod of the first node is further used to send the target data to the network management Pod of the second node; The network management Pod of the second node is further configured to send the target data to the second service container after acquiring the target data sent by the network management Pod of the first node.

13. The service grid system according to claim 12, characterized in that: The network management Pod of the second node is also used to send the target data to the second service container based on a third redirection rule after obtaining the target data sent by the network management Pod of the first node. The third redirection rule is used to instruct the network management Pod of the second node to send the received data sent to the second service container of the same node to the second service container.

Citation Information

Patent Citations

  • Flow control method and system based on service grid, equipment and medium

    CN113765816A

  • Service grid monitoring index acquisition method, service deployment method and device

    CN116962238A

  • Method and apparatus for implementing service topology awareness of cluster, and device and medium

    WO2024148877A1

  • Data transmission method based on high-speed network, system, and computing device cluster

    WO2024245335A1