Load balancing system and method, apparatus, electronic device

By modularly splitting the load balancing system and monitoring the node status, the problem of traffic being forwarded to failed pods in the Kubernetes cluster was solved, achieving high availability and continuity.

CN118945164BActive Publication Date: 2026-02-24CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410989372.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2026-02-24
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

In existing technologies, the load balancing system of a Kubernetes cluster cannot effectively detect the health status of pods, which may cause traffic to be forwarded to failed pods, resulting in business interruption.

Method used

The modular load balancing system includes a forwarding plane, a session plane, and a monitoring plane. The monitoring plane monitors the status information of the forwarding plane and the session plane. The session plane matches configuration information from a preset database based on the forwarding information and interacts with the forwarding plane. The forwarding plane forwards traffic based on the configuration information and status information.

Benefits of technology

By modularizing the system, each module is responsible for its own function, and the monitoring module monitors the status of nodes, preventing traffic from being forwarded to failed nodes, reducing the probability of business interruption, and improving the continuity and high availability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945164B_ABST
    Figure CN118945164B_ABST
Patent Text Reader

Abstract

The system and method, device and electronic equipment provided by the present disclosure comprise a forwarding plane, a session plane and a monitoring plane, the monitoring plane is used for monitoring state information of the forwarding plane and the session plane; the forwarding plane is used for obtaining to-be-forwarded traffic and transmitting forwarding information carried in the to-be-forwarded traffic to the session plane; the session plane is used for responding to the forwarding information, matching configuration information corresponding to the to-be-forwarded traffic from a preset database according to the forwarding information, and performing interaction of session and configuration with the forwarding plane, and transmitting the configuration information to the forwarding plane; the forwarding plane is further used for receiving the configuration information and performing forwarding processing on the to-be-forwarded traffic according to the configuration information and the state information. Compared with the related art, the embodiment of the present disclosure can avoid forwarding the to-be-forwarded traffic to the failed node and reduce the probability of service interruption by modularizing and splitting, monitoring the state information of each node of the system through the monitoring plane module, so that the system has continuity and high availability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a load balancing system, method, apparatus, and electronic device. Background Technology

[0002] With the increasing popularity of Kubernetes (also known as k8s or "kube", an open-source container orchestration platform that automates many manual operations involved in deploying, managing and scaling containerized applications) and the rapid increase in user scale, products need to introduce a highly available and high-performance load balancing solution for Kubernetes clusters. This solution must not only have high performance but also be able to achieve features such as canary releases and high availability.

[0003] This load balancing system uses DPVS (Dual-Port Virtual Server, an open-source load balancing software that supports L4 (transport layer) load balancing) as a Layer 4 (transport layer) load balancer, nginx (a high-performance HTTP and reverse proxy server that also supports IMAP / POP3 protocols) as a Layer 7 (application layer) load balancer, and ingress-nginx as the Kubernetes ingress controller (an ingress is an API object used to manage external access to services within the cluster). User requests first pass through the DPVS Layer 4 load balancer, then through the nginx Layer 7 load balancer, and finally through the ingress-nginx controller to reach the Kubernetes cluster; responses from the Kubernetes cluster pass sequentially through the ingress-nginx controller, the nginx load balancer, and the DPVS load balancer before finally reaching the user.

[0004] Meanwhile, when the Kubernetes cluster load balancing system performs automatic health checks, it checks the health status of the Layer 7 load balancer Nginx through the Layer 4 load balancer DPVS, and then checks the health status of the Kubernetes cluster through the Layer 7 load balancer Nginx.

[0005] However, in existing load balancing systems, DPVS detects the health status of nginx, which in turn detects the health status of backend pods (a basic unit of work in a Kubernetes cluster, representing a process in the cluster). DPVS and ingress-nginx cannot detect the health status of pods in Kubernetes, and traffic may be forwarded to failed pods, causing business interruptions. Summary of the Invention

[0006] This disclosure provides a load balancing system, method, apparatus, and electronic device. Its main purpose is to address the problem in existing load balancing systems where DPVS detects the health status of nginx, and nginx detects the health status of backend pods. DPVS and Ingress-nginx cannot detect the health status of pods in Kubernetes, potentially leading to traffic being forwarded to faulty pods and causing service interruptions.

[0007] According to a first aspect of this disclosure, a load balancing system is provided, comprising: a forwarding plane, a session plane, and a monitoring plane.

[0008] The monitoring plane is used to monitor the status information of the forwarding plane and the session plane;

[0009] The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane;

[0010] The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration, and transmit the configuration information to the forwarding plane;

[0011] The forwarding plane is also used to receive the configuration information and forward the traffic to be forwarded according to the configuration information and the status information.

[0012] Optionally, the forwarding plane includes: a transport layer forwarding plane, an application layer forwarding plane, and a trunking forwarding plane.

[0013] The transport layer forwarding plane is used to transmit the forwarding information to the session plane, receive first configuration information, and forward the traffic to be forwarded to the application layer forwarding plane according to the first configuration information; wherein, the first configuration information includes the first address information of the application layer forwarding plane corresponding to the traffic to be forwarded, and the configuration information includes the first configuration information and the second configuration information.

[0014] The application layer forwarding plane is used to receive the traffic to be forwarded and transmit the forwarding information to the session plane;

[0015] The application layer forwarding plane is further configured to receive the second configuration information and forward the traffic to be forwarded to the cluster forwarding plane according to the second configuration information; wherein the second configuration information includes the second address information of the cluster forwarding plane corresponding to the traffic to be forwarded;

[0016] The cluster forwarding plane is used to receive the traffic to be forwarded.

[0017] Optionally, the session plane includes: a transport layer session plane, an application layer session plane, and a cluster session plane.

[0018] The transport layer session plane is used to receive the forwarding information transmitted by the transport layer forwarding plane, and match the first configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the first configuration information to the transport layer forwarding plane.

[0019] The application layer session plane is used to receive the forwarding information transmitted by the application layer forwarding plane, and match the second configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the second configuration information to the application layer forwarding plane.

[0020] The cluster session plane is used for interaction with the cluster forwarding plane for sessions and configuration.

[0021] Optionally, the monitoring plane is further configured to determine whether the configuration information meets preset configuration conditions, and generate a forwarding instruction based on the determination result, and transmit the forwarding instruction to the forwarding plane;

[0022] The monitoring plane is also used to obtain the forwarding status of the traffic to be forwarded.

[0023] Optionally, the monitoring plane includes: a transport layer monitoring plane, an application layer monitoring plane, and a cluster monitoring plane.

[0024] The transport layer monitoring plane is used to monitor the first state information of the transport layer forwarding plane and the transport layer session plane, as well as the first forwarding state of the traffic to be forwarded; wherein the state information includes the first state information, the second state information, and the third state information.

[0025] The transport layer monitoring plane is further configured to determine whether the first configuration information meets preset configuration conditions, and generate a first forwarding instruction based on the determination result, and transmit the first forwarding instruction to the transport layer forwarding plane; wherein, the forwarding instruction includes the first forwarding instruction and a second forwarding instruction;

[0026] The application layer monitoring plane is used to monitor the second state information of the application layer forwarding plane and the application layer session plane, as well as the second forwarding state of the traffic to be forwarded.

[0027] The application layer monitoring plane is also used to determine whether the second configuration information meets the preset configuration conditions, and generate the second forwarding instruction based on the determination result, and transmit the second forwarding instruction to the application layer forwarding plane;

[0028] The cluster monitoring plane is used to monitor the third state information of the cluster forwarding plane and the cluster session plane.

[0029] According to a second aspect of this disclosure, a method for traffic forwarding is provided, the method being applied to the system described in the first aspect above, wherein the method includes:

[0030] Obtain the traffic to be forwarded and its status information; wherein, the status information is the status information of the device that performs the forwarding processing on the traffic to be forwarded;

[0031] Match the configuration information corresponding to the traffic to be forwarded from the preset database based on the forwarding information carried by the traffic to be forwarded;

[0032] The traffic to be forwarded is processed according to the configuration information and the status information.

[0033] Optionally, before forwarding the traffic to be forwarded according to the configuration information and the status information, the method further includes:

[0034] Determine whether the configuration information meets the preset configuration conditions, and generate a forwarding instruction based on the determination result;

[0035] Determine whether to forward the traffic to be forwarded based on the forwarding instruction;

[0036] If the forwarding instruction is determined to be a cancel forwarding instruction, the forwarding process for the traffic to be forwarded is canceled.

[0037] If the forwarding instruction is determined to be a forwarding instruction, the traffic to be forwarded is forwarded according to the configuration information and the status information.

[0038] Optionally, generating the forwarding instruction based on the judgment result includes:

[0039] If the configuration information is determined to meet the preset configuration conditions, the forwarding instruction for determining forwarding is generated;

[0040] If it is determined that the configuration information does not meet the preset configuration conditions, a forwarding instruction to cancel forwarding is generated.

[0041] According to a third aspect of this disclosure, a traffic forwarding apparatus is provided, comprising:

[0042] An acquisition unit is used to acquire traffic to be forwarded and status information; wherein, the status information is the status information of the device that performs forwarding processing on the traffic to be forwarded;

[0043] The matching unit is used to match the configuration information corresponding to the traffic to be forwarded from a preset database based on the forwarding information carried by the traffic to be forwarded.

[0044] The forwarding unit is used to forward the traffic to be forwarded according to the configuration information and the status information.

[0045] Optionally, the device further includes:

[0046] The judgment unit is used to determine whether the configuration information meets the preset configuration conditions;

[0047] The generation unit is used to generate forwarding instructions based on the judgment result;

[0048] The determining unit is configured to determine whether to forward the traffic to be forwarded based on the forwarding instruction.

[0049] The cancellation unit is used to cancel the forwarding process of the traffic to be forwarded when it is determined that the forwarding instruction is to cancel forwarding;

[0050] The forwarding unit is further configured to, when determining that the forwarding instruction is a confirmed forwarding, forward the traffic to be forwarded according to the configuration information and the status information.

[0051] Optionally, the generation unit is further configured to:

[0052] If the configuration information is determined to meet the preset configuration conditions, the forwarding instruction for determining forwarding is generated;

[0053] If it is determined that the configuration information does not meet the preset configuration conditions, a forwarding instruction to cancel forwarding is generated.

[0054] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:

[0055] At least one processor; and

[0056] A memory communicatively connected to the at least one processor; wherein,

[0057] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the second aspect above.

[0058] According to a fifth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the second aspect above.

[0059] According to a sixth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the second aspect above.

[0060] The load balancing system, method, apparatus, and electronic device disclosed herein include: a forwarding plane, a session plane, and a monitoring plane. The monitoring plane is used to monitor the status information of the forwarding plane and the session plane. The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane. The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration manner, transmitting the configuration information to the forwarding plane. The forwarding plane is also used to receive the configuration information and perform forwarding processing on the traffic to be forwarded according to the configuration information and the status information. Compared with related technologies, the embodiments of this disclosure, through modular decomposition, with each module only responsible for its own function, and by monitoring the status information of each node in the system through the monitoring plane module, can avoid forwarding traffic to be forwarded to failed nodes, reduce the probability of service interruption, and enable the system to have continuity and high availability.

[0061] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0062] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0063] Figure 1 This is a schematic diagram of the structure of a load balancing system provided in an embodiment of the present disclosure;

[0064] Figure 2 This is a schematic diagram illustrating the interaction logic between the forwarding plane and the session plane, provided in an embodiment of this disclosure.

[0065] Figure 3 This is a schematic diagram of the interaction logic of a monitoring surface provided in an embodiment of this disclosure;

[0066] Figure 4 A schematic diagram of the architecture of a load balancing system provided in an embodiment of this disclosure;

[0067] Figure 5 A flowchart illustrating a traffic forwarding method provided in an embodiment of this disclosure;

[0068] Figure 6A schematic diagram of the structure of a traffic forwarding device provided in an embodiment of this disclosure;

[0069] Figure 7 A schematic diagram of another traffic forwarding device provided in an embodiment of this disclosure;

[0070] Figure 8 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0071] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0072] The following description, with reference to the accompanying drawings, describes a load balancing system, method, apparatus, and electronic device according to embodiments of the present disclosure.

[0073] The load balancing system described in this disclosure divides the load balancing of the Kubernetes cluster into three modules: the forwarding plane (FP), the session plane (SP), and the monitoring plane (MP). Figure 1 This is a schematic diagram of the structure of a load balancing system provided in an embodiment of the present disclosure.

[0074] like Figure 1 As shown, the load balancing system includes: forwarding plane 11, session plane 12, and monitoring plane 13.

[0075] The monitoring plane 13 is used to monitor the status information of the forwarding plane 11 and the session plane 12;

[0076] The forwarding plane 11 is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane 12.

[0077] The session plane 12 is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane 11 in a session and configuration, and transmit the configuration information to the forwarding plane 11;

[0078] The forwarding plane 11 is also used to receive the configuration information and forward the traffic to be forwarded according to the configuration information and the status information.

[0079] Each module, namely the forwarding plane 11, the session plane 12, and the monitoring plane 13, contains three layers: the forwarding plane 11 includes the Layer 4 (transport layer) forwarding plane 111, the Layer 7 (application layer) forwarding plane 112, and the cluster (e.g., Kubernetes cluster) forwarding plane 113; the session plane 12 includes the Layer 4 (transport layer) session plane 121, the Layer 7 (application layer) session plane 122, and the cluster (e.g., Kubernetes cluster) session plane 123; and the monitoring plane 13 includes the Layer 4 (transport layer) monitoring plane 131, the Layer 7 (application layer) monitoring plane 132, and the cluster (e.g., Kubernetes cluster) monitoring plane 133, etc.

[0080] The forwarding plane 11 is responsible for forwarding traffic, which flows from user -> Layer 4 FP (Layer 4 forwarding plane) 111 -> Layer 7 FP112 -> Kubernetes cluster FP113. The session plane 12 is responsible for interacting with the forwarding plane 11 for sessions and configurations. Each time the forwarding plane 11 forwards traffic, it must first find the corresponding session and configuration information from the session plane 12. The monitoring plane 13 is responsible for health checks and reporting monitoring information, including recording the health status of each forwarding plane 11 and reporting traffic to the server.

[0081] It should be noted that each layer of the forwarding plane 11 contains multiple nodes, that is, the transport layer forwarding plane 111 contains multiple transport layer nodes, the application layer forwarding plane 112 contains multiple application layer nodes, the cluster forwarding plane contains multiple Kubernetes cluster nodes, etc. Specifically, the number of nodes at each layer is not limited in this embodiment.

[0082] The load balancing system provided in this disclosure includes: a forwarding plane, a session plane, and a monitoring plane. The monitoring plane is used to monitor the status information of the forwarding plane and the session plane. The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane. The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration manner, transmitting the configuration information to the forwarding plane. The forwarding plane is also used to receive the configuration information and forward the traffic to be forwarded according to the configuration information and the status information. Compared with related technologies, the embodiments of this disclosure, through modular decomposition, with each module only responsible for its own function, and by monitoring the status information of each node in the system through the monitoring plane module, can avoid forwarding traffic to be forwarded to failed nodes, reduce the probability of service interruption, and enable the system to have continuity and high availability.

[0083] In one possible implementation of this disclosure, the forwarding plane 11 includes: a transport layer forwarding plane 111, an application layer forwarding plane 112, and a trunking forwarding plane 113.

[0084] The transport layer forwarding plane 111 is used to transmit the forwarding information to the session plane 12, and receive first configuration information, and forward the traffic to be forwarded to the application layer forwarding plane 112 according to the first configuration information; wherein, the first configuration information includes the first address information of the application layer forwarding plane corresponding to the traffic to be forwarded, and the configuration information includes the first configuration information and the second configuration information.

[0085] The application layer forwarding plane 112 is used to receive the traffic to be forwarded and transmit the forwarding information to the session plane 12;

[0086] The application layer forwarding plane 112 is further configured to receive the second configuration information and forward the traffic to be forwarded to the cluster forwarding plane 113 according to the second configuration information; wherein, the second configuration information includes the second address information of the cluster forwarding plane corresponding to the traffic to be forwarded;

[0087] The cluster forwarding plane 113 is used to receive the traffic to be forwarded.

[0088] In one possible implementation of this disclosure, the session plane 12 includes: a transport layer session plane 121, an application layer session plane 122, and a cluster session plane 123.

[0089] The transport layer session plane 121 is used to receive the forwarding information transmitted by the transport layer forwarding plane 111, and match the first configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the first configuration information to the transport layer forwarding plane.

[0090] The application layer session plane 121 is used to receive the forwarding information transmitted by the application layer forwarding plane 112, and match the second configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the second configuration information to the application layer forwarding plane.

[0091] The cluster session plane 123 is used to interact with the cluster forwarding plane 113 for sessions and configuration.

[0092] In summary, the session plane 12 and the forwarding plane 11 will interact regarding sessions and configurations. The interaction process can be achieved through, but is not limited to, [various methods]. Figure 2 To explain, among other things, Figure 2This is a schematic diagram of the interaction logic between the forwarding plane and the session plane provided in an embodiment of the present disclosure. In this embodiment, DPVS is selected as the main load balancer for the Layer 4 load balancing component (transport layer forwarding plane 111 and transport layer session plane 121). The transport layer forwarding plane 111 and the transport layer session plane 121 of DPVS are both located on the same machine. Based on this, a DPVS agent is developed to manage DPVS sessions, allowing users to establish and modify DPVS sessions through API. Therefore, the transport layer session plane 121 will select the DPVS agent as the main load balancer.

[0093] Nginx is selected as the main load balancer for the Layer 7 load balancing (application layer forwarding plane 112 and application layer session plane 122). Since the Nginx in application layer session plane 122 contains a lot of session information, it is necessary to improve the open-source Nginx and interact with etcd through the Nginx agent interface as the main load balancer for application layer session plane 122. Here, etcd refers to the preset database.

[0094] In a Kubernetes cluster, both the session layer and the forwarding layer (cluster forwarding plane 113 and cluster session plane 123) are implemented using the open-source ingress-nginx.

[0095] In one possible implementation of this disclosure, the monitoring plane 13 is further configured to determine whether the configuration information meets preset configuration conditions, generate a forwarding instruction based on the determination result, and transmit the forwarding instruction to the forwarding plane 11.

[0096] The monitoring surface 13 is also used to obtain the forwarding status of the traffic to be forwarded.

[0097] In one possible implementation of this disclosure, the monitoring plane 13 includes: a transport layer monitoring plane 131, an application layer monitoring plane 132, and a cluster monitoring plane 133.

[0098] The transport layer monitoring plane 131 is used to monitor the first status information of the transport layer forwarding plane 111 and the transport layer session plane 121, as well as the first forwarding status of the traffic to be forwarded; wherein, the status information includes the first status information, the second status information and the third status information.

[0099] The transport layer monitoring surface 131 is further configured to determine whether the first configuration information meets the preset configuration conditions, and generate a first forwarding instruction based on the determination result, and transmit the first forwarding instruction to the transport layer forwarding surface 111; wherein, the forwarding instruction includes the first forwarding instruction and the second forwarding instruction;

[0100] The application layer monitoring plane 132 is used to monitor the second state information of the application layer forwarding plane 112 and the application layer session plane 122, as well as the second forwarding state of the traffic to be forwarded.

[0101] The application layer monitoring plane 132 is further configured to determine whether the second configuration information meets the preset configuration conditions, generate the second forwarding instruction based on the determination result, and transmit the second forwarding instruction to the application layer forwarding plane 112.

[0102] The cluster monitoring plane 133 is used to monitor the third state information of the cluster forwarding plane 113 and the cluster session plane 123.

[0103] For ease of understanding, this disclosure provides an interactive logic diagram of the monitoring surface, such as... Figure 3 As shown, monitoring plane 13 is responsible for three functions: first, checking whether the configuration file is correctly synchronized; second, checking the health status of forwarding plane 11; and third, monitoring traffic and reporting it to the monitoring product. Through dpvs monitor (transport layer monitoring plane 131), it monitors the traffic of dpvs (transport layer forwarding plane 111) and checks the status of each dpvs node, reporting the monitoring information to the monitoring product. Through nginx monitor (application layer monitoring plane 132), it monitors the traffic of nginx (application layer forwarding plane 112), compares it with the configuration information in the etcd (pre-defined database) cluster, and checks the status of each nginx (application layer forwarding plane 112) node. Through ingress-nginx monitor (cluster monitoring plane 133), it monitors the traffic of the Kubernetes cluster, compares the configuration information of ingress-nginx (cluster forwarding plane 113) to see if it is synchronized, checks the node status of the Kubernetes cluster (cluster forwarding plane 113), and reports it to the server.

[0104] It should be noted that since the session plane 12 contains a lot of session information, it is necessary to improve the open-source nginx and interact with etcd through the nginx agent interface. The session plane 12 is mainly used to store information. Therefore, etcd can represent the preset database, as well as the application layer forwarding plane 112 and the cluster forwarding plane 113.

[0105] Specifically, regarding the load balancing architecture, this disclosure provides a schematic diagram of the architecture of a load balancing system, such as... Figure 4As shown, the traffic to be forwarded passes through dpvs (transport layer forwarding plane 111) to nginx (application layer forwarding plane 112) in forwarding plane 11, and then through ingress-nginx to the Kubernetes cluster (cluster forwarding plane 113). Configuration information is obtained through session plane 12, and monitoring information and health checks are implemented through monitoring plane 13, thereby realizing a highly available Kubernetes cluster load balancing architecture.

[0106] Figure 5 This is a flowchart illustrating a traffic forwarding method provided in an embodiment of this disclosure. Figure 5 As shown, the method includes the following steps:

[0107] Step 501: Obtain the traffic to be forwarded and its status information; wherein, the status information is the status information of the device that performs the forwarding processing of the traffic to be forwarded.

[0108] In this embodiment of the disclosure, the traffic to be forwarded is traffic information obtained from the user, and the status information includes, but is not limited to, the health status of each node of the device that processes the traffic to be forwarded, the on / off status of each node of the device that processes the traffic to be forwarded, etc. Specifically, this embodiment of the disclosure does not impose any restrictions on the status information.

[0109] Step 502: Match the configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information carried by the traffic to be forwarded.

[0110] In this embodiment of the disclosure, the forwarding information includes, but is not limited to, the destination node of the traffic to be forwarded, the traffic information of the traffic to be forwarded, etc., and the configuration information includes, but is not limited to, the address information of the destination node of the traffic to be forwarded, etc. Specifically, this embodiment of the disclosure does not impose any restrictions on the forwarding information and the configuration information.

[0111] Step 503: Forward the traffic to be forwarded according to the configuration information and the status information.

[0112] In this embodiment of the disclosure, after determining the address information of the destination node of the traffic to be forwarded based on the configuration information, it is determined whether the destination node of the traffic to be forwarded is in a failed state based on the status information. If the destination node of the traffic to be forwarded is not in a failed state, the traffic to be forwarded is forwarded to the destination node. If the destination node of the traffic to be forwarded is in a failed state, the forwarding of the traffic to be forwarded is canceled and a prompt is issued so that the user can re-forward the traffic.

[0113] The load balancing method provided in this disclosure includes: a forwarding plane, a session plane, and a monitoring plane. The monitoring plane is used to monitor the status information of the forwarding plane and the session plane. The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane. The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration manner, transmitting the configuration information to the forwarding plane. The forwarding plane is also used to receive the configuration information and forward the traffic to be forwarded according to the configuration information and the status information. Compared with related technologies, the embodiments of this disclosure, through modular decomposition, with each module only responsible for its own function, and by monitoring the status information of each node in the system through the monitoring plane module, can avoid forwarding traffic to be forwarded to failed nodes, reduce the probability of service interruption, and enable the system to have continuity and high availability.

[0114] In one possible implementation of this disclosure, before forwarding the traffic to be forwarded according to the configuration information and the status information, the following methods may also be used, but are not limited to: determining whether the configuration information meets preset configuration conditions, and generating a forwarding instruction based on the determination result; determining whether to forward the traffic to be forwarded according to the forwarding instruction; canceling the forwarding of the traffic to be forwarded if the forwarding instruction is determined to cancel forwarding; and forwarding the traffic to be forwarded according to the configuration information and the status information if the forwarding instruction is determined to confirm forwarding.

[0115] In this embodiment of the disclosure, the preset configuration condition is a custom setting, such as whether the format and content of the configuration information are correct. Specifically, this embodiment of the disclosure does not limit the preset configuration condition.

[0116] In one possible implementation of this disclosure, the step of generating a forwarding instruction based on the judgment result can also be implemented in the following ways, but not limited to: generating a forwarding instruction to determine forwarding when the configuration information meets preset configuration conditions; and generating a forwarding instruction to cancel forwarding when the configuration information does not meet preset configuration conditions.

[0117] In this embodiment of the disclosure, by judging the configuration information, the correctness of the configuration information can be ensured, and the traffic to be forwarded can be accurately forwarded to the destination node.

[0118] In summary, the embodiments disclosed herein can achieve the following effects:

[0119] 1. By modularizing the system, each module is responsible for its own function, and the monitoring plane module monitors the status information of each node in the system. This avoids forwarding traffic to failed nodes, reduces the probability of service interruption, and enables the system to have continuity and high availability.

[0120] 2. Compared with the existing solutions, which do not perform modular decomposition, resulting in low traffic forwarding efficiency and the inability to perceive node information of each link, the embodiments of this disclosure improve efficiency by modular decomposition, where each link is only responsible for its own function.

[0121] 3. The embodiments of this disclosure monitor the status information of each node in the system through the monitoring plane module, which can perceive the status of each node in the system and avoid the situation that the health status of the Kubernetes cluster can only be detected through the Layer 7 load balancer and the Layer 4 load balancer cannot perceive it.

[0122] 4. The embodiments disclosed herein can promptly detect the synchronization status of configuration information, thus avoiding the problem that new configuration rules cannot take effect if the configuration information of layers four and seven is not synchronized in a timely manner.

[0123] Corresponding to the traffic forwarding method described above, this invention also proposes a traffic forwarding apparatus. Since the apparatus embodiments of this invention correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to the method embodiments described above, and will not be repeated here.

[0124] Figure 6 This is a schematic diagram of the structure of a traffic forwarding device provided in an embodiment of the present disclosure, as shown below. Figure 6 As shown, it includes:

[0125] The acquisition unit 61 is used to acquire the traffic to be forwarded and status information; wherein, the status information is the status information of the device that performs forwarding processing on the traffic to be forwarded.

[0126] Matching unit 62 is used to match the configuration information corresponding to the traffic to be forwarded from a preset database based on the forwarding information carried by the traffic to be forwarded;

[0127] Forwarding unit 63 is used to forward the traffic to be forwarded according to the configuration information and the status information.

[0128] The load balancing apparatus provided in this disclosure includes: a forwarding plane, a session plane, and a monitoring plane. The monitoring plane is used to monitor the status information of the forwarding plane and the session plane. The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane. The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration manner, transmitting the configuration information to the forwarding plane. The forwarding plane is also used to receive the configuration information and perform forwarding processing on the traffic to be forwarded according to the configuration information and the status information. Compared with related technologies, the embodiments of this disclosure, through modular decomposition, with each module only responsible for its own function, and by monitoring the status information of each node in the system through the monitoring plane module, can avoid forwarding traffic to be forwarded to failed nodes, reduce the probability of service interruption, and enable the system to have continuity and high availability.

[0129] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 7 As shown, the device further includes:

[0130] Judgment unit 64 is used to determine whether the configuration information meets the preset configuration conditions;

[0131] Generation unit 65 is used to generate forwarding instructions based on the judgment result;

[0132] The determining unit 66 is used to determine whether to forward the traffic to be forwarded based on the forwarding instruction;

[0133] Cancellation unit 67 is used to cancel the forwarding process of the traffic to be forwarded when it is determined that the forwarding instruction is to cancel forwarding;

[0134] The forwarding unit 63 is further configured to, when determining that the forwarding instruction is a confirmed forwarding, perform forwarding processing on the traffic to be forwarded according to the configuration information and the status information.

[0135] Furthermore, in one possible implementation of this disclosure embodiment, the generation unit 65 is further configured to:

[0136] If the configuration information is determined to meet the preset configuration conditions, the forwarding instruction for determining forwarding is generated;

[0137] If it is determined that the configuration information does not meet the preset configuration conditions, a forwarding instruction to cancel forwarding is generated.

[0138] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0139] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0140] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0141] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 802 or a computer program loaded from storage unit 808 into RAM (Random Access Memory) 803. RAM 803 can also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. I / O (Input / Output) interface 805 is also connected to bus 804.

[0142] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0143] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as traffic forwarding methods. For example, in some embodiments, the traffic forwarding method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the aforementioned traffic forwarding method by any other suitable means (e.g., by means of firmware).

[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0145] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0146] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0147] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0148] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0149] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0150] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0151] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0152] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A load balancing system, characterized in that, include: The system comprises a forwarding plane, a session plane, and a monitoring plane. The forwarding plane includes a transport layer forwarding plane, an application layer forwarding plane, and a cluster forwarding plane. The session plane includes a transport layer session plane, an application layer session plane, and a cluster session plane. The monitoring plane includes a transport layer monitoring plane, an application layer monitoring plane, and a cluster monitoring plane. The monitoring plane is used to monitor the status information of the forwarding plane and the session plane; The forwarding plane is used to acquire traffic to be forwarded and transmit the forwarding information carried in the traffic to be forwarded to the session plane; The session plane is used to respond to the forwarding information, match the configuration information corresponding to the traffic to be forwarded from a preset database according to the forwarding information, and interact with the forwarding plane in a session and configuration, and transmit the configuration information to the forwarding plane; The forwarding plane is also used to receive the configuration information and forward the traffic to be forwarded according to the configuration information and the status information; The transport layer monitoring plane is used to monitor the first state information of the transport layer forwarding plane and the transport layer session plane, as well as the first forwarding state of the traffic to be forwarded; wherein the state information includes the first state information, the second state information, and the third state information. The transport layer monitoring plane is further configured to determine whether the first configuration information meets preset configuration conditions, and generate a first forwarding instruction based on the determination result, and transmit the first forwarding instruction to the transport layer forwarding plane; wherein, the configuration information includes the first configuration information and the second configuration information; The application layer monitoring plane is used to monitor the second state information of the application layer forwarding plane and the application layer session plane, as well as the second forwarding state of the traffic to be forwarded. The application layer monitoring plane is also used to determine whether the second configuration information meets the preset configuration conditions, and generate a second forwarding instruction based on the determination result, and transmit the second forwarding instruction to the application layer forwarding plane; The cluster monitoring plane is used to monitor the third state information of the cluster forwarding plane and the cluster session plane.

2. The system according to claim 1, characterized in that, The transport layer forwarding plane is used to transmit the forwarding information to the session plane, receive the first configuration information, and forward the traffic to be forwarded to the application layer forwarding plane according to the first configuration information; wherein, the first configuration information includes the first address information of the application layer forwarding plane corresponding to the traffic to be forwarded. The application layer forwarding plane is used to receive the traffic to be forwarded and transmit the forwarding information to the session plane; The application layer forwarding plane is further configured to receive the second configuration information and forward the traffic to be forwarded to the cluster forwarding plane according to the second configuration information; wherein the second configuration information includes the second address information of the cluster forwarding plane corresponding to the traffic to be forwarded; The cluster forwarding plane is used to receive the traffic to be forwarded.

3. The system according to claim 2, characterized in that, The transport layer session plane is used to receive the forwarding information transmitted by the transport layer forwarding plane, and match the first configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the first configuration information to the transport layer forwarding plane. The application layer session plane is used to receive the forwarding information transmitted by the application layer forwarding plane, and match the second configuration information corresponding to the traffic to be forwarded from the preset database according to the forwarding information, and transmit the second configuration information to the application layer forwarding plane. The cluster session plane is used for interaction with the cluster forwarding plane for sessions and configuration.

4. The system according to claim 3, characterized in that, The monitoring plane is also used to determine whether the configuration information meets the preset configuration conditions, and to generate a forwarding instruction based on the determination result, and to transmit the forwarding instruction to the forwarding plane; The monitoring plane is also used to obtain the forwarding status of the traffic to be forwarded.

5. A method for traffic forwarding, said method being applied to the system according to any one of claims 1-4, characterized in that, include: Obtain the traffic to be forwarded and its status information; wherein, the status information is the status information of the device that performs the forwarding processing on the traffic to be forwarded; Match the configuration information corresponding to the traffic to be forwarded from the preset database based on the forwarding information carried by the traffic to be forwarded; The traffic to be forwarded is forwarded according to the configuration information and the status information; The acquisition of the traffic to be forwarded and its status information includes: monitoring first status information and the first forwarding status of the traffic to be forwarded; wherein the status information includes the first status information, the second status information and the third status information; The forwarding process for the traffic to be forwarded includes: determining whether the first configuration information meets preset configuration conditions, and generating a first forwarding instruction based on the determination result; wherein, the configuration information includes the first configuration information and the second configuration information; Monitor the second status information and the second forwarding status of the traffic to be forwarded; Determine whether the second configuration information meets the preset configuration conditions, and generate a second forwarding instruction based on the determination result; Monitor the third state information.

6. The method according to claim 5, characterized in that, Before forwarding the traffic to be forwarded according to the configuration information and the status information, the method further includes: Determine whether the configuration information meets the preset configuration conditions, and generate a forwarding instruction based on the determination result; Determine whether to forward the traffic to be forwarded based on the forwarding instruction; If the forwarding instruction is determined to be a cancel forwarding instruction, the forwarding process for the traffic to be forwarded is canceled. If the forwarding instruction is determined to be a forwarding instruction, the traffic to be forwarded is forwarded according to the configuration information and the status information.

7. The method according to claim 6, characterized in that, The step of generating a forwarding instruction based on the judgment result includes: If the configuration information is determined to meet the preset configuration conditions, the forwarding instruction for determining forwarding is generated; If it is determined that the configuration information does not meet the preset configuration conditions, a forwarding instruction to cancel forwarding is generated.

8. A traffic forwarding device, characterized in that, include: An acquisition unit is used to acquire traffic to be forwarded and status information; wherein, the status information is the status information of the device that performs forwarding processing on the traffic to be forwarded; The matching unit is used to match the configuration information corresponding to the traffic to be forwarded from a preset database based on the forwarding information carried by the traffic to be forwarded. A forwarding unit is used to forward the traffic to be forwarded according to the configuration information and the status information; The acquisition unit is further configured to monitor first status information and the first forwarding status of the traffic to be forwarded; wherein the status information includes the first status information, the second status information, and the third status information. The forwarding unit is further configured to determine whether the first configuration information meets preset configuration conditions, and generate a first forwarding instruction based on the determination result; wherein the configuration information includes the first configuration information and the second configuration information; Monitor the second status information and the second forwarding status of the traffic to be forwarded; Determine whether the second configuration information meets the preset configuration conditions, and generate a second forwarding instruction based on the determination result; Monitor the third state information.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 5-7.

Citation Information

Patent Citations

  • Gateway system, gateway, message forwarding method and program product

    CN114979016A