Data distribution method and device, equipment and storage medium
Through the stateless data shunt method, the traffic is shunted using the drainage address in the message, which solves the problems of large resource consumption and traffic statistical deviation of load balancing gateway system, and achieves the connection consistency of forward and reverse traffic and the accuracy of traffic speed limit.
Patent Information
- Application Number
- CN202311533384.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
When the existing load balancing gateway system processes large amounts of data requests, the resource consumption is too large, which affects stability and reliability, and only ensures the connection consistency of forward traffic, resulting in statistical deviations in reverse traffic and affects the accuracy of traffic speed limit.
Data shunt is realized through stateless mode, and traffic is shunt using the cluster drainage address or node drainage address carried in the message. There is no need to save the cookie id and connection hash value of each connection. For forward and reverse traffic, they are scheduled to the same target gateway node separately to ensure connection consistency.
It reduces the use of storage resources, improves the stability and reliability of the shunt, ensures the connection consistency of forward and reverse traffic of the same connection, improves the accuracy of traffic speed limit, and avoids network congestion.
Smart Images

Figure CN120017589A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud technology, and in particular to a data diversion method, device, equipment and storage medium. Background Art
[0002] Driven by data computing and data high availability, the amount of data requests has gradually increased. In the traditional single-server architecture, a single server cannot handle all data requests, resulting in performance degradation or system crashes. Based on this, load balancing gateway systems and server clusters are usually deployed in large data center networks. The load balancing gateway system is used to distribute data requests to multiple servers in the server cluster for processing, thereby improving the processing efficiency of data requests.
[0003] In order to ensure the continuity of data processing, the load balancing gateway system needs to dispatch all messages belonging to the same connection to the same server for processing at the back end, that is, to achieve connection consistency (Per Connection Constant, PCC for short). To this end, under the relevant technology, for the first message of each connection sent by the client, the load balancing gateway system dispatches to obtain the corresponding server IP address, and at the same time generates the cookie id and connection hash value corresponding to the connection, and saves the connection relationship table between the cookie id and the connection hash value and the server IP address. When the load balancing gateway system receives subsequent messages, it queries the connection relationship table based on the cookie id carried in the subsequent message and the connection hash value calculated based on the message header of the subsequent message, obtains the server IP address, and then forwards the subsequent message to the server based on the server IP address. The server returns the response message to the client through the ordinary gateway, and no longer passes through the load balancing gateway system for diversion.
[0004] In the above technical solution, the load balancing gateway system needs to store the cookie ID and connection hash value of each connection, which results in excessive resource consumption of the load balancing gateway system, thereby affecting the stability and reliability of the load balancing gateway system. Secondly, the above technical solution only guarantees the connection consistency of the forward traffic (messages sent by the client to the server), while the reverse traffic (messages returned by the server to the client) is no longer diverted through the load balancing gateway system, which results in deviations in the statistics of network traffic by the load balancing gateway system, thereby affecting the accuracy of the traffic speed limit, thereby causing network congestion. Summary of the invention
[0005] The embodiments of the present application provide a data diversion method, apparatus, device and storage medium for scheduling both forward traffic and reverse traffic to the same target gateway node in a stateless manner, thereby ensuring the connection consistency of the forward traffic and reverse traffic of the same connection.
[0006] On the one hand, an embodiment of the present application provides a data splitting method, which is applied to a splitter, including:
[0007] Parse the request message sent by the sender to obtain the cluster drainage address and inner protocol header;
[0008] Determine a corresponding gateway cluster based on the cluster diversion address, and obtain an address set of multiple gateway nodes included in the gateway cluster;
[0009] Selecting a target address that matches the inner protocol header from the address set, and sending the request message to the corresponding target gateway node based on the target address, so that the target gateway node adds the node drainage address corresponding to the target gateway node in the request message and then sends the request message to the receiving end;
[0010] Receiving a reply message carrying the node diversion address returned by the receiving end;
[0011] The reply message is sent to the target gateway node associated with the node diversion address, so that the target gateway node sends the reply message to the sending end.
[0012] On the one hand, an embodiment of the present application provides a data offloading method, which is applied to a target gateway node, including:
[0013] Receive a request message sent by the splitter based on the target address corresponding to the target gateway node, the request message is sent by the sender to the splitter, and the request message includes a cluster drainage address and an inner protocol header; the target address is obtained from the address set obtained by the splitter based on the cluster drainage address to determine the corresponding gateway cluster and obtain the address set of multiple gateway nodes included in the gateway cluster, and based on the inner protocol header;
[0014] After adding the node diversion address corresponding to the target gateway node in the request message, sending the request message to the receiving end;
[0015] receiving a reply message sent by the splitter based on the target address, wherein the target address is determined by the splitter based on the node diversion address carried in the reply message sent by the receiving end;
[0016] The reply message is sent to the sending end.
[0017] On the one hand, an embodiment of the present application provides a data splitting device, applied to a splitter, comprising:
[0018] The parsing module is used to parse the request message sent by the sender to obtain the cluster drainage address and inner protocol header;
[0019] A matching module, which determines a corresponding gateway cluster based on the cluster diversion address, and obtains an address set of multiple gateway nodes included in the gateway cluster;
[0020] The matching module is further configured to select a target address matching the inner protocol header from the address set, and send the request message to the corresponding target gateway node based on the target address, so that the target gateway node adds the node drainage address corresponding to the target gateway node to the request message and then sends the request message to the receiving end;
[0021] A first receiving module, configured to receive a reply message carrying the node diversion address returned by the receiving end;
[0022] The first sending module is used to send the reply message to the target gateway node associated with the node diversion address, so that the target gateway node sends the reply message to the sending end.
[0023] Optionally, the matching module is specifically used for:
[0024] Selecting a target diversion strategy that matches the inner protocol header from a plurality of diversion strategies;
[0025] Acquire associated field information from the inner protocol header according to the target diversion strategy;
[0026] Performing hash calculation on the field information to obtain a target hash value;
[0027] An address in the address set that matches the target hash value is used as the target address.
[0028] Optionally, when the target diversion strategy is a flow-granularity diversion strategy, the field information includes: the source IP address, the destination IP address, the identifier of the virtual private cloud where the sender is located, the source port number, and the destination port number in the inner protocol header;
[0029] When the target traffic diversion strategy is a traffic diversion strategy at the service granularity, the field information includes: an identifier of the virtual private cloud, the destination IP address, and the destination port number;
[0030] When the target traffic diversion strategy is a traffic diversion strategy at the virtual private cloud granularity, the field information includes: an identifier of the virtual private cloud;
[0031] When the target traffic diversion strategy is a tenant-granularity traffic diversion strategy, the field information includes: a tenant identifier corresponding to the identifier of the virtual private cloud.
[0032] Optionally, the parsing module is specifically used for:
[0033] Parsing the request message sent by the sender based on the message protocol header to obtain a first outer layer protocol header and an inner layer protocol header, wherein the destination IP address of the first outer layer protocol header is the cluster diversion address;
[0034] The parsing module is also used for:
[0035] After receiving the reply message carrying the node diversion address returned by the receiving end, the message protocol header of the reply message is parsed to obtain a second outer layer protocol header, wherein the destination IP address of the second outer layer protocol header is the node diversion address.
[0036] Optionally, the first sending module is further used for:
[0037] Before sending the request message to the corresponding target gateway node based on the target address, modify the destination IP address of the first outer protocol header to the target address;
[0038] Before sending the reply message to the target gateway node associated with the node diversion address, the destination IP address of the second outer protocol header is modified to the target address.
[0039] Optionally, the matching module is specifically used for:
[0040] A first diversion rule matching the cluster diversion address is obtained from a preset diversion rule set, wherein the first diversion rule includes: the cluster diversion address and an address set of multiple gateway nodes included in the corresponding gateway cluster.
[0041] Optionally, the matching module is specifically used for:
[0042] From the diversion rule set, obtain a second diversion rule matching the node diversion address, wherein the second diversion rule includes: the node diversion address and a target address of a corresponding target gateway node;
[0043] Based on the target address, the reply message is sent to the target gateway node.
[0044] Optionally, a health strategy module is also included;
[0045] The health strategy module is specifically used for:
[0046] In response to a delete instruction for the target address in the diversion rule set sent by the controller, acquiring the first diversion rule and the second diversion rule associated with the target address from the diversion rule set, wherein the delete instruction is sent by the controller by calling the remote interface of the diverter when the controller detects that the target gateway node is in a fault state;
[0047] The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
[0048] Optionally, the health strategy module is specifically used to:
[0049] When it is detected that the target gateway node is in a fault state, acquiring the first diversion rule and the second diversion rule associated with the target address from the diversion rule set;
[0050] The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
[0051] On the one hand, an embodiment of the present application provides a data distribution device, which is applied to a target gateway node, including:
[0052] The second receiving module is used to receive a request message sent by the splitter based on the target address corresponding to the target gateway node, the request message is sent by the sending end to the splitter, and the request message includes a cluster drainage address and an inner layer protocol header; the target address is the splitter determining the corresponding gateway cluster based on the cluster drainage address, and obtaining the address set of multiple gateway nodes included in the gateway cluster, and based on the inner layer protocol header, obtained from the address set;
[0053] A processing module, configured to add a node diversion address corresponding to the target gateway node in the request message;
[0054] A second sending module, used for sending the request message to a receiving end;
[0055] The second receiving module is further used to receive a reply message sent by the splitter based on the target address, where the target address is determined by the splitter based on the node diversion address carried in the reply message sent by the receiving end;
[0056] The second sending module is further used to send the reply message to the sending end.
[0057] Optionally, the processing module is specifically used for:
[0058] Modify the source IP address of the first outer layer protocol header of the request message to the node diversion address;
[0059] Before sending the reply message to the sending end, the source IP address of the second outer layer protocol header of the reply message is modified to the cluster drainage address.
[0060] Optionally, the processing module is further used for:
[0061] Acquire multiple backup gateway nodes corresponding to the target gateway node, each backup gateway node corresponding to a backup routing priority;
[0062] The backup routing priorities of the multiple backup gateway nodes are published so that when the target gateway node fails, the multiple backup gateway nodes take over the messages forwarded to the target gateway node according to the corresponding backup routing priorities.
[0063] On the one hand, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned data diversion method when executing the program.
[0064] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program is run on the computer device, the computer device executes the steps of the above-mentioned data diversion method.
[0065] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above-mentioned data diversion method.
[0066] In an embodiment of the present application, the diverter diverts traffic through the cluster diversion address or node diversion address carried in the message, and there is no need to save the cookie ID and connection hash value of each connection. In other words, the diverter in the present application is implemented in a stateless manner, which can greatly reduce the occupancy of storage resources, thereby improving the stability and reliability of the diverter.
[0067] Secondly, for forward traffic, the splitter dispatches the request message to the target gateway node based on the cluster drainage address in the request message and the inner protocol header of the request message, and the target gateway node forwards the request message to the receiving end. For reverse traffic, the splitter dispatches the reply message to the target gateway node based on the node drainage address corresponding to the target gateway node carried in the reply message, and the target gateway node forwards the reply message to the sending end, so that both forward and reverse traffic are dispatched to the same target gateway node, ensuring the connection consistency of the forward and reverse traffic of the same connection, and effectively solving the problem of traffic jitter; at the same time, since both forward and reverse traffic are dispatched to the same target gateway node, the accuracy of the statistical results is higher when counting network traffic, thereby improving the accuracy of traffic speed limit and avoiding network congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0069] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;
[0070] Figure 2 A flow chart of a data distribution method provided in an embodiment of the present application;
[0071] Figure 3 A schematic diagram of a flow chart of a forward flow diversion method provided in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of a flow chart of a reverse flow diversion method provided in an embodiment of the present application;
[0073] Figure 5 A flowchart of a data distribution method provided in an embodiment of the present application;
[0074] Figure 6 A flow chart of a data distribution method provided in an embodiment of the present application;
[0075] Figure 7 A flow chart of a data distribution method provided in an embodiment of the present application;
[0076] Figure 8 A schematic diagram of a priority backup group provided in an embodiment of the present application;
[0077] Fig. 9A schematic diagram of the structure of a data distribution device provided in an embodiment of the present application;
[0078] Fig.10 A schematic diagram of the structure of a data distribution device provided in an embodiment of the present application;
[0079] Fig.11 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0081] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0082] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0083] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing. The embodiment of the present application uses cloud technology to divert data and achieve load balancing.
[0084] A private cloud is a cloud infrastructure and software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within a data center. In addition to hardware resources, creating a private cloud generally also requires cloud equipment (IaaS, Infrastructure as a Service) software. Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud services. The difference is that the cloud hardware is the user's own personal computer or server, not the data center of the cloud computing vendor. The purpose of cloud computing vendors building data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees of the company as well as customers and suppliers of the company for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services. The data diversion of the embodiment of the present application is deployed in a private cloud.
[0085] VPC: virtual private cloud. A dynamically configured pool of public cloud computing resources that requires the use of encryption protocols, tunneling protocols, and other security procedures to transmit data between private enterprises and cloud service providers. A VPC essentially turns a cloud service provider's multi-tenant architecture into a single-tenant architecture.
[0086] VPCID: virtual private cloud identifier, is an identifier used to uniquely identify a virtual private cloud in cloud computing services.
[0087] P4: Programming Protocol Independent Packet Processors, a protocol-independent hardware programming language.
[0088] LB: Load Balance, a network application scenario that refers to distributing workload among multiple server nodes to improve system reliability and efficiency.
[0089] RS: Real server, a server node located at the back end and assigned load in a load balancing application scenario.
[0090] PCC: Per Connection Constant, connection consistency, refers to the data packets of the same flow are always scheduled to the same server node at the backend.
[0091] Stateful gateway: refers to a gateway that needs to record and maintain each network connection.
[0092] VPCGW Gateway: A Layer 4 load balancing gateway.
[0093] NAT: Network Address Translation.
[0094] FULL NAT: refers to converting the source IP address, destination IP address, source port (PORT) address, and destination port (PORT) address of the message at the same time. In the load balancing scenario, in NAT mode, after the splitter receives the request message sent by the client, it modifies the destination IP address of the request message to the IP address of the real server, and modifies the destination port number of the request message to the port number of the real server. In FULL NAT mode, after the splitter receives the request message sent by the client, it modifies the source IP address of the request message to the intranet IP address of the splitter, modifies the source port number of the request message to the intranet port number of the splitter, modifies the destination IP address of the request message to the IP address of the real server, and modifies the destination port number of the request message to the port number of the real server.
[0095] GRE: Generic Routing Encapsulation, is a network protocol used to encapsulate various network layer protocols in the network.
[0096] BGP: Border Gateway Protocol, a dynamic routing protocol used to exchange routing information between autonomous systems.
[0097] ECMP: Equal-Cost Multi-Path, is a network routing technology that allows data packets to be load balanced among multiple paths with the same cost (e.g., number of hops, bandwidth, latency, etc.). The main purpose of ECMP is to improve network availability, fault tolerance, and bandwidth utilization.
[0098] OSPF: Open Shortest Path First, is an open internal routing protocol used to transmit routing information within an autonomous system.
[0099] CPU: Central Processing Unit.
[0100] The design concept of the embodiments of the present application is introduced below.
[0101] Currently, load balancing gateway systems are usually deployed in large data center networks to achieve service distribution and horizontal expansion of cloud data center services. Load balancing gateway systems contain a key basic requirement, namely, achieving connection consistency.
[0102] To this end, under the relevant technology, for the first message of each connection sent by the client, the load balancing gateway system schedules to obtain the corresponding server IP address, and generates the cookie id and connection hash value corresponding to the connection, and saves the connection relationship table of the cookie id and connection hash value and the server IP address. When the load balancing gateway system receives subsequent messages, it queries the connection relationship table based on the cookie id carried in the subsequent message and the connection hash value calculated based on the message header of the subsequent message, obtains the server IP address, and then forwards the subsequent message to the server based on the server IP address. The server returns the response message to the client through the ordinary gateway, and no longer passes through the load balancing gateway system for diversion.
[0103] In the above technical solution, the load balancing gateway system needs to store the cookie ID and connection hash value of each connection, which results in excessive resource consumption of the load balancing gateway system, thereby affecting the stability and reliability of the load balancing gateway system. Secondly, the above technical solution only guarantees the connection consistency of the forward traffic (messages sent by the client to the server), while the reverse traffic (messages returned by the server to the client) is no longer diverted through the load balancing gateway system, which results in deviations in the statistics of network traffic by the load balancing gateway system, thereby affecting the accuracy of the traffic speed limit, thereby causing network congestion.
[0104] In view of this, an embodiment of the present application provides a data diversion method, in which, for forward traffic, the diverter parses the request message sent by the sender to obtain the cluster drainage address and the inner protocol header. Then, the corresponding gateway cluster is determined based on the cluster drainage address, and the address set of multiple gateway nodes contained in the gateway cluster is obtained. Then, the target address that matches the inner protocol header is selected from the address set, and the request message is sent to the corresponding target gateway node based on the target address. After the target gateway node adds the node drainage address corresponding to the target gateway node in the request message, the request message is sent to the receiving end.
[0105] For reverse traffic, the splitter receives the reply message carrying the node diversion address returned by the receiving end, and then sends the reply message to the target gateway node associated with the node diversion address, and the target gateway node sends the reply message to the sending end.
[0106] In an embodiment of the present application, the diverter diverts traffic through the cluster diversion address or node diversion address carried in the message, and there is no need to save the cookie ID and connection hash value of each connection. In other words, the diverter in the present application is implemented in a stateless manner, which can greatly reduce the occupancy of storage resources, thereby improving the stability and reliability of the diverter.
[0107] Secondly, for forward traffic, the splitter dispatches the request message to the target gateway node based on the cluster drainage address in the request message and the inner protocol header of the request message, and the target gateway node forwards the request message to the receiving end. For reverse traffic, the splitter dispatches the reply message to the target gateway node based on the node drainage address corresponding to the target gateway node carried in the reply message, and the target gateway node forwards the reply message to the sending end. In this way, both forward and reverse traffic are dispatched to the same target gateway node, ensuring the connection consistency of the forward and reverse traffic of the same connection, and effectively solving the problem of traffic jitter; at the same time, when counting network traffic, the accuracy is higher, thereby improving the accuracy of traffic speed limit and avoiding network congestion.
[0108] refer to Figure 1 , which is a system architecture diagram applicable to an embodiment of the present application, the system architecture at least includes a sending end 101, a traffic scheduling layer 102, a gateway cluster layer 103 and a receiving end 104.
[0109] The traffic scheduling layer 102 is used to schedule received messages to the gateway cluster layer 103. In practical applications, the traffic scheduling layer 102 can deploy a single splitter (also called a network splitter) or a splitter cluster composed of multiple splitters. The splitter supports clustered deployment and can be expanded horizontally at will.
[0110] In some embodiments, the splitter can be implemented by a programmable switching chip, and a single splitter node can reach a Tbps splitting capacity, with the advantages of statelessness, high bandwidth, and low latency. Of course, the splitter can also be implemented by using an ordinary CPU server, and this application does not make specific limitations on this. In addition, the splitter of the present application adopts a stateless design scheme with high stability and reliability.
[0111] The gateway cluster layer 103 includes various types of stateful or stateless gateway clusters. The gateway cluster layer 103 is deployed at the back end of the traffic scheduling layer 102 and receives data requests scheduled by the front end traffic scheduling layer 102. In actual applications, the gateway cluster layer 103 and the traffic scheduling layer 102 can span any three-layer network in the physical topology. The gateway cluster layer 103 also supports upgrading a single-network card gateway to a multi-network card gateway, greatly improving the overall performance of the back-end gateway.
[0112] The number of the transmitting ends 101 may be one or more, and the number of the receiving ends 104 may also be one or more. The present application does not specifically limit the number of the transmitting ends 101 and the receiving ends 104.
[0113] The sending end 101 and the receiving end 104 can both be virtual machines in the VPC cloud network. Of course, the sending end 101 and the receiving end 104 can also be terminal devices such as smart phones, tablet computers, laptops, desktop computers, smart home appliances, smart voice interaction devices, smart car devices, etc.; the sending end 101 and the receiving end 104 can also be independent physical servers, or server clusters or distributed systems composed of multiple physical servers, or cloud services that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, but are not limited to these.
[0114] The messages in the direction from the sending end 101 to the receiving end 104 can be called forward traffic, and the messages in the direction from the receiving end 104 to the sending end 101 can be called reverse traffic.
[0115] In practical applications, the data diversion method in the embodiments of the present application can be applied to scenarios such as traffic distribution between nodes, lossless traffic migration between new and old clusters, cross-cluster disaster recovery, cross-availability zone / cross-region disaster recovery, and multi-tenant traffic isolation.
[0116] based on Figure 1 The system architecture diagram shown in the figure, the embodiment of the present application provides a process of a data diversion method, such as Figure 2 As shown, the process of this method is Figure 1 The sending end, the splitter, the target gateway node, and the receiving end are interactively executed, wherein the splitter is located at the traffic scheduling layer, and the target gateway node is located at the gateway cluster layer. The method includes the following steps:
[0117] Step S201: The splitter receives a request message sent by a sender.
[0118] Specifically, the sending end can be a virtual machine in the VPC cloud network, or a terminal device, server, etc.
[0119] Step S202: the splitter parses the request message to obtain the cluster diversion address and the inner protocol header.
[0120] Specifically, the cluster diversion address refers to: the IP address (i.e., cluster_director_ip) pre-bound on the diverter for diverting traffic to the gateway cluster. Therefore, the cluster diversion address can also be called the cluster diversion IP address. For each gateway cluster in the backend gateway cluster layer, a cluster diversion address can be assigned. Multiple cluster diversion addresses can be bound to a diverter to implement traffic scheduling for multiple gateway clusters in the gateway cluster layer.
[0121] In addition to binding the cluster drainage address, the diverter is also bound to the node drainage address. The node drainage address refers to: the IP address (i.e. node_director_ip) that is pre-bound to the diverter for diverting traffic to a single gateway node. Therefore, the node drainage address can also be called the node drainage IP address. For all gateway nodes in the gateway cluster layer in the backend, an independent node drainage address can be assigned. Multiple node drainage addresses can be bound to a diverter to implement traffic scheduling for multiple gateway nodes in the gateway cluster layer.
[0122] After the splitter is bound to the cluster drainage address and the node drainage address, it publishes dynamic routes of all cluster drainage addresses and all node drainage addresses to attract business traffic to the splitter.
[0123] After the splitter receives the request message sent by the sender, it parses the message protocol header of the request message to obtain the first outer protocol header and the inner protocol header, wherein the destination IP address of the first outer protocol header is the cluster diversion address, and the inner protocol header includes: source IP address, destination IP address, identifier of the virtual private cloud where the sender is located, source port number, and destination port number.
[0124] It should be noted that although the above-mentioned cluster drainage address and node drainage address are pre-bound to the diverter, the subsequent diversion process also supports adjustment of the bound cluster drainage address and node drainage address. This application does not make specific limitations on this.
[0125] Step S202: determine the corresponding gateway cluster based on the cluster diversion address, and obtain the address set of multiple gateway nodes included in the gateway cluster.
[0126] Specifically, a diversion rule set is set in the diverter. The diversion rule set includes multiple diversion rules, each of which includes: a diversion address and an address set of a next-hop gateway node, wherein the types of diversion addresses include: a cluster diversion address and a node diversion address.
[0127] When the diversion address is a cluster diversion address, the address set of the next-hop gateway node includes: the address set of multiple gateway nodes in the gateway cluster corresponding to the cluster diversion address. When the diverter is bound to multiple cluster diversion addresses, the diversion rule set includes the diversion rules corresponding to each of the multiple cluster diversion addresses.
[0128] When the diversion address is a node diversion address, the address set of the next-hop gateway node includes: the address of the gateway node corresponding to the node diversion address. When the diverter is bound to multiple node diversion addresses, the diversion rule set includes the diversion rules corresponding to the multiple node diversion addresses.
[0129] For example, see Table 1, which is a diversion rule table provided in an embodiment of the present application.
[0130] Table 1.
[0131]
[0132] The traffic diversion rule table includes 5 traffic diversion rules, numbered 1 to 5. The traffic diversion address of traffic diversion rule 1 is: cluster diversion IP address (cluster_director_ip); the address set of the next-hop gateway node in traffic diversion rule 1 includes: the IP address of gateway node 0 (backend_node0_ip), the IP address of gateway node 1 (backend_node1_ip), the IP address of gateway node 2 (backend_node2_ip), and the IP address of gateway node 3 (backend_node3_ip).
[0133] The diversion address of diversion rule 2 is: the node diversion IP address corresponding to gateway node 0 (node0_director_ip); the address set of the next-hop gateway node in diversion rule 2 includes: the IP address of gateway node 0 (backend_node0_ip).
[0134] The diversion address of diversion rule 3 is: the node diversion IP address corresponding to gateway node 1 (node1_director_ip); the address set of the next-hop gateway node in diversion rule 3 includes: the IP address of gateway node 1 (backend_node1_ip).
[0135] The diversion address of diversion rule 4 is: the node diversion IP address corresponding to gateway node 2 (node2_director_ip); the address set of the next-hop gateway node in diversion rule 4 includes: the IP address of gateway node 2 (backend_node2_ip).
[0136] The diversion address of diversion rule 5 is: the node diversion IP address corresponding to gateway node 3 (node3_director_ip); the address set of the next-hop gateway node in diversion rule 5 includes: the IP address of gateway node 3 (backend_node3_ip).
[0137] It should be noted that the above-mentioned diversion rule set is pre-set in the diverter, and the subsequent diversion process also supports adjustment of the diversion rule set. This application does not make any specific limitation on this.
[0138] In some embodiments, after the diverter obtains the cluster diversion address from the request message, it obtains a first diversion rule that matches the cluster diversion address from a preset diversion rule set, and the first diversion rule includes: the cluster diversion address and the address set of multiple gateway nodes included in the corresponding gateway cluster.
[0139] Specifically, the cluster diversion address is compared with the diversion addresses of each diversion rule in the diversion rule set to determine the first diversion rule that matches. Then, the address set of the next-hop gateway node corresponding to the first diversion rule in the diversion rule set is obtained, that is, the address set of multiple gateway nodes in the gateway cluster corresponding to the cluster diversion address.
[0140] Step S203: the splitter selects a target address that matches the inner protocol header from the address set.
[0141] In some implementations, a target diversion strategy matching the inner protocol header is selected from multiple diversion strategies; associated field information is obtained from the inner protocol header according to the target diversion strategy. Then, a hash calculation is performed on the field information to obtain a target hash value; and then an address in the address set matching the target hash value is used as the target address.
[0142] Specifically, a set of diversion strategies is pre-set in the separator. For different diversion strategies in the diversion strategy set, the corresponding field information obtained from the inner protocol header for hash calculation is also different, that is, the input field of the hash algorithm is different. In the process of hash calculation, the hash algorithms used include but are not limited to: SHA algorithm, SM3 algorithm.
[0143] In actual applications, the diversion strategies in the diversion strategy set can be set according to actual conditions and support subsequent adjustments.
[0144] For example, see Table 2, which is a schematic diagram of a diversion strategy table provided in an embodiment of the present application.
[0145] Table 2.
[0146]
[0147] The header content of the above-mentioned diversion strategy table includes: a strategy name and an input field of a hash algorithm.
[0148] The diversion strategy set includes the following diversion strategies: diversion strategy at flow granularity, diversion strategy at service granularity, diversion strategy at virtual private cloud granularity, and diversion strategy at tenant granularity.
[0149] Specifically, the flow-granularity diversion strategy refers to: using the five-tuple content (source IP address, destination IP address, VPCID, source port number, destination port number) in the inner protocol header of the message as the input field of the hash algorithm to perform hash calculation to obtain a hash value, and based on the hash value query to obtain the IP address of the next-hop gateway node, and then dispatching the message to the next-hop gateway node. In this way, it is ensured that the messages with exactly the same five-tuple content can always be dispatched to the same gateway node at the back end. In practical applications, the flow-granularity diversion strategy can be used as the system default diversion strategy.
[0150] The service-granularity traffic diversion strategy refers to: using the VPCID, destination IP address, and destination port number in the inner protocol header of the message as the input field of the hash algorithm, performing hash calculation to obtain the hash value, and obtaining the IP address of the next-hop gateway node based on the hash value query, and then dispatching the message to the next-hop gateway node. In this way, it is ensured that the message with the same destination IP address and destination port number can always be dispatched to the same gateway node at the back end.
[0151] The virtual private cloud granularity diversion strategy refers to: using the VPCID in the inner protocol header of the message as the input field of the hash algorithm, performing hash calculation to obtain the hash value, and obtaining the IP address of the next-hop gateway node based on the hash value query, and then dispatching the message to the next-hop gateway node. In this way, it is ensured that the messages with the same VPCID can always be dispatched to the same backend gateway node.
[0152] Tenant-granularity traffic diversion strategy: The tenant identifier corresponding to the VPCID in the inner protocol header of the message is used as the input field of the hash algorithm to perform hash calculation to obtain a hash value. One tenant corresponds to one or more VPCIDs. The IP address of the next-hop gateway node is obtained based on the hash value query, and then the message is dispatched to the next-hop gateway node. In this way, it is ensured that the message with the same VPCID can always be dispatched to the same gateway node at the back end.
[0153] The target diversion strategy can be selected from the diversion strategy set or the default diversion strategy. After determining the target diversion strategy, the associated field information is obtained from the inner protocol header according to the target diversion strategy, and the field information is hashed to obtain the target hash value. The IP address of the gateway node with the same target hash value in the address set of the next-hop gateway node is used as the target address that matches the inner protocol header.
[0154] In practical applications, the embodiments of the present application adopt at least the following implementation methods to select a target diversion strategy from a diversion strategy set:
[0155] In the first implementation, the priorities of multiple diversion strategies in the diversion strategy set are preset. In the actual diversion process, the inner layer protocol header is matched with multiple diversion strategies in descending order of priority until a matching target diversion strategy is obtained.
[0156] Specifically, first obtain the diversion strategy of the first priority, and then compare the specific value of the input field of the hash algorithm contained in the diversion strategy with the specific value of the relevant field in the inner protocol header of the request message. If they are consistent, the diversion strategy of the first priority is used as the matching target diversion strategy. If they are inconsistent, obtain the diversion strategy of the second priority to continue the matching process, and so on, until a matching target diversion strategy is found. If there is no matching target diversion strategy among multiple diversion strategies, a message indicating that traffic scheduling failed is returned.
[0157] Implementation method two, set the diversion strategy of flow granularity as the system default diversion strategy, and set the priority of other diversion strategies in the diversion strategy set. In the actual diversion process, the inner protocol header is matched with other diversion strategies in order from high to low priority until a matching target diversion strategy is obtained. The specific matching method has been introduced in the previous article and will not be repeated here. If no matching target diversion strategy is found from other diversion strategies, the diversion strategy of flow granularity is used as the target diversion strategy.
[0158] In the third implementation mode, a diversion strategy (such as a diversion strategy of flow granularity) is selected in advance from the diversion strategy set as the default diversion strategy of the system. In the actual diversion process, the default diversion strategy of the system is directly used as the target diversion strategy.
[0159] It should be noted that the method of matching and obtaining the target diversion strategy is not limited to the above-mentioned implementation modes, and other implementation modes are also possible. This application does not make any specific limitation on this.
[0160] In the actual diversion process, when the target diversion strategy is a flow-granularity diversion strategy, the field information obtained from the inner protocol header of the request message includes: source IP address, destination IP address, identifier of the virtual private cloud where the sender is located, source port number, and destination port number.
[0161] When the target traffic diversion strategy is a traffic diversion strategy at the service granularity level, the field information obtained from the inner protocol header of the request message includes: an identifier of the virtual private cloud where the sender is located, a destination IP address, and a destination port number.
[0162] When the target traffic diversion strategy is a traffic diversion strategy at the virtual private cloud granularity, the field information obtained from the inner protocol header of the request message includes: an identifier of the virtual private cloud where the sender is located.
[0163] When the target traffic diversion strategy is a tenant-granularity traffic diversion strategy, the field information obtained from the inner protocol header of the request message includes: a tenant identifier corresponding to an identifier of the virtual private cloud where the sender is located.
[0164] In the embodiments of the present application, multiple diversion strategies such as flow granularity diversion strategy, service granularity diversion strategy, virtual private cloud granularity diversion strategy, tenant granularity diversion strategy, etc. are pre-set. Therefore, in the actual diversion process, a specific diversion strategy can be selected according to the actual situation and traffic scheduling can be performed based on the diversion strategy, thereby improving the flexibility of traffic scheduling.
[0165] Step S204: the splitter sends the request message to the corresponding target gateway node based on the target address.
[0166] Specifically, the splitter modifies the destination IP address of the first outer layer protocol header of the request message into the target address, and then sends the request message to the corresponding target gateway node.
[0167] Step S205: The target gateway node adds the node diversion address corresponding to the target gateway node to the request message.
[0168] Step S206: The target gateway node sends the request message to the receiving end.
[0169] Specifically, after receiving the request message, the target gateway node executes the specific business logic of the target gateway node, wherein the gateway logic may be different in different application scenarios. Then the source IP address of the first outer layer protocol header of the request message is modified to the node drainage address corresponding to the target gateway node. Then the request message is sent to the corresponding receiving end.
[0170] It should be noted that in some complex gateway scenarios such as load balancing, it may be necessary to forward request messages in FULL NAT mode. At this time, the modified source IP address, destination IP address, source port number, and destination port number all refer to the source IP address, destination IP address, source port number, and destination port number in the inner protocol header. When the splitter is splitting, the request message is mainly dispatched to the target gateway node by modifying the destination IP address of the outer protocol header of the request message. Therefore, this application supports symmetric splitting in FULL NAT mode while ensuring the connection consistency of forward and reverse traffic.
[0171] Step S207: the splitter receives a reply message carrying the node diversion address returned by the receiving end.
[0172] Specifically, after receiving the request message, the receiving end obtains the corresponding node diversion address of the target gateway node from the outer protocol header of the request message. At the same time, the business data in the message body of the request message is processed. After the processing is completed, the receiving end generates a reply message corresponding to the request message and sends the reply message to the diverter, wherein the reply message carries: the corresponding node diversion address of the target gateway node.
[0173] The splitter parses the message protocol header of the reply message to obtain the destination IP address of the second outer layer protocol header, that is, the node diversion address of the target gateway node.
[0174] Step S208: The splitter sends a reply message to the target gateway node associated with the node diversion address.
[0175] Specifically, a second diversion rule matching the node diversion address is obtained from the diversion rule set, the second diversion rule including: the node diversion address and the target address of the corresponding target gateway node. Then, a reply message is sent to the target gateway node based on the target address.
[0176] In actual applications, after the diverter determines the matching second diversion rule, since the node diversion address in the second diversion rule and the target address of the target gateway node are in a one-to-one correspondence, the reply message can be sent directly to the target gateway node based on the target address.
[0177] Of course, the diverter can also select a target diversion strategy from the diversion strategy set, and then obtain the field information associated with the target diversion strategy from the inner protocol header. Then perform hash calculation on the field information to obtain the target hash value; the address in the address set of the next-hop gateway node that matches the target hash value is used as the target address, and then the reply message is sent to the target gateway node based on the target address.
[0178] In some embodiments, before sending the reply message to the target gateway node associated with the node diversion address, the destination IP address of the second outer layer protocol header in the reply message is modified to the target address.
[0179] Step S209: The target gateway node sends a reply message to the sending end.
[0180] Specifically, after receiving the reply message, the target gateway node executes the specific business logic of the target gateway node, wherein the gateway logic may be different in different application scenarios. Then the source IP address of the second outer layer protocol header of the reply message is modified to the cluster drainage address. Then the reply message is sent to the corresponding receiving end.
[0181] The above steps S201 to S206 are the forward flow diversion process, and the above steps S207 to S209 are the reverse flow diversion process. In order to more clearly illustrate the forward and reverse flow diversion process, examples are given below in combination with specific implementation scenarios.
[0182] See also Figure 3 , which is a schematic diagram of a forward traffic diversion method provided in an embodiment of the present application. It is assumed that a gateway cluster in the gateway cluster layer includes four gateway nodes, namely: gateway node 0, gateway node 1, gateway node 2, and gateway node 3. The diversion rule table in the diverter is shown in Table 1, and the diversion strategy table in the diverter is shown in Table 2. The sending end is the client, and the receiving end is the server.
[0183] The splitter receives the request message sent by the client, and parses the message protocol header of the request message to obtain the outer protocol header and the inner protocol header. The destination IP address of the outer protocol header is: the cluster diversion IP address.
[0184] The splitter queries the split rule set according to the cluster diversion IP address and obtains the hit split rule 1, that is, the address set of the next-hop gateway node includes: the IP address of gateway node 0, the IP address of gateway node 1, the IP address of gateway node 2, and the IP address of gateway node 3.
[0185] The splitter selects the default flow granularity splitting strategy, and then obtains the following field information from the inner protocol header of the request message according to the flow granularity splitting strategy: source IP address, destination IP address, virtual private cloud identifier, source port number, destination port number. The obtained field information is input into the hash algorithm for hash calculation to obtain the target hash value.
[0186] Since the target hash value matches the IP address of gateway node 1, the destination IP address of the outer protocol header of the request message is modified to: the IP address of gateway node 1, and the request message is sent to gateway node 1.
[0187] After executing the business logic, gateway node 1 modifies the source IP address of the outer protocol header of the request message to: the node drainage IP address corresponding to gateway node 1, and then sends the request message to the server.
[0188] See also Figure 4 , which is a schematic diagram of a reverse flow diversion method provided in an embodiment of the present application.
[0189] After the server processes the request message, it returns a reply message to the splitter. The splitter parses the message protocol header of the reply message and obtains the destination IP address of the outer message header: the node diversion IP address corresponding to gateway node 1.
[0190] The splitter queries the splitting rule table according to the node diversion IP address corresponding to gateway node 1, and obtains the hit splitting rule 3, that is, the address set of the next-hop gateway node includes: the IP address of gateway node 1.
[0191] Since the address set of the next-hop gateway node has only one IP address, namely, the IP address of gateway node 1, the destination IP address of the outer protocol header of the reply message is modified to: the IP address of gateway node 1, and the reply message is sent to gateway node 1.
[0192] After executing the business logic, gateway node 1 modifies the source IP address of the outer protocol header of the reply message to the cluster drainage address, and then sends the reply message to the client.
[0193] In an embodiment of the present application, the diverter diverts traffic through the cluster diversion address or node diversion address carried in the message, and there is no need to save the cookie ID and connection hash value of each connection. In other words, the diverter in the present application is implemented in a stateless manner, which can greatly reduce the occupancy of storage resources, thereby improving the stability and reliability of the diverter.
[0194] Secondly, for forward traffic, the splitter dispatches the request message to the target gateway node based on the cluster drainage address in the request message and the inner protocol header of the request message, and the target gateway node forwards the request message to the receiving end. For reverse traffic, the splitter dispatches the reply message to the target gateway node based on the node drainage address corresponding to the target gateway node carried in the reply message, and the target gateway node forwards the reply message to the sending end. In this way, both forward and reverse traffic are dispatched to the same target gateway node, ensuring the connection consistency of the forward and reverse traffic of the same connection, and effectively solving the problem of traffic jitter; at the same time, when counting network traffic, the accuracy is higher, thereby improving the accuracy of traffic speed limit and avoiding network congestion.
[0195] In some embodiments, for each gateway cluster in the gateway cluster layer, when a new gateway node is added to the gateway cluster for capacity expansion, the set of traffic diversion rules is updated accordingly.
[0196] Specifically, first determine the diversion rule corresponding to the cluster diversion address corresponding to the gateway cluster, and add the IP address of the new gateway node to the address set of the next-hop gateway node in the diversion rule. In addition, assign a node diversion address to the IP address of the new gateway node, and then add a new diversion rule to the diversion rule set, the new diversion rule includes: the IP address of the new gateway node and the corresponding node diversion address, and the new gateway node saves the corresponding node diversion address locally.
[0197] When the splitter is splitting, it will schedule some connections that were originally scheduled to the gateway nodes in the gateway cluster to the new gateway nodes, and the scheduling method of the remaining connections remains unchanged, thereby avoiding the problem of forwarding deviation between gateway nodes in the gateway cluster when the number of gateway nodes in the gateway cluster changes, and improving the stability and reliability of the backend gateway cluster as a whole.
[0198] For example, see Figure 5 , set the gateway cluster to include gateway node 0, gateway node 1, and gateway node 2. The traffic diversion rule table in the diverter is shown in Table 3:
[0199] Table 3.
[0200]
[0201] The splitter will connect the message of 0 Schedule to gateway node 0, schedule the message of connection 1 (①) to gateway node 1, schedule the message of connection 2 (②) to gateway node 2, and schedule the message of connection 3 (③) to gateway node 0.
[0202] When a new gateway node 3 is added to the gateway cluster, add the IP address of gateway node 3 (backend_node3_ip) to the address set of the next-hop gateway node of diversion rule 1 in the diversion rule table; then add diversion rule 5 to the diversion rule table, and the diversion address of diversion rule 5 is: the node diversion IP address (node3_director_ip) corresponding to gateway node 3; the address set of the next-hop gateway node in diversion rule 5 includes: the IP address of gateway node 3 (backend_node3_ip). The updated diversion rule table is shown in Table 1, which will not be repeated here.
[0203] The splitter still dispatches the packets of connection 0 to gateway node 0, the packets of connection 1 to gateway node 1, and the packets of connection 2 to gateway node 2. However, the packets of connection 3 are dispatched to gateway node 3.
[0204] In some embodiments, for each gateway cluster in the gateway cluster layer, when a gateway node is deleted from the gateway cluster, the traffic diversion rule set is updated accordingly.
[0205] Specifically, first determine the diversion rule where the cluster diversion address corresponding to the gateway cluster is located, and delete the IP address of the deleted gateway node in the address set of the next-hop gateway node of the diversion rule. At the same time, determine the diversion rule where the node diversion address corresponding to the deleted gateway node is located, and then delete the diversion rule from the diversion rule set.
[0206] When the traffic splitter is performing traffic splitting, it will schedule the connections originally scheduled to the deleted gateway node to other gateway nodes in the gateway cluster, and the connections originally scheduled to other gateway nodes will continue to be scheduled to these gateway nodes, thereby avoiding the problem of forwarding deviation between gateway nodes in the gateway cluster when the number of gateway nodes in the gateway cluster changes, and improving the stability and reliability of the backend gateway cluster as a whole.
[0207] For example, see Figure 6 , it is assumed that the gateway cluster includes gateway node 0, gateway node 1, gateway node 2, and gateway node 3. The traffic diversion rule table in the diverter is shown in Table 1, which will not be repeated here.
[0208] The splitter will connect the message of 0 Schedule to gateway node 0, schedule the message of connection 1 (①) to gateway node 1, schedule the message of connection 2 (②) to gateway node 2, and schedule the message of connection 3 (③) to gateway node 3.
[0209] When gateway node 3 is deleted from the gateway cluster, the IP address of gateway node 3 (backend_node3_ip) is deleted from the address set of the next-hop gateway node of diversion rule 1 shown in Table 1; at the same time, diversion rule 5 in Table 1 is deleted. The updated diversion rule table is shown in Table 3 and will not be repeated here.
[0210] When the splitter is splitting, it still dispatches the message of connection 0 to gateway node 0, the message of connection 1 to gateway node 1, and the message of connection 2 to gateway node 2. However, the message of connection 3 is dispatched to gateway node 0.
[0211] In order to ensure that the backend gateway node can achieve automatic disaster recovery when a fault occurs, the embodiment of the present application provides at least the following implementation methods for performing health detection on the gateway node:
[0212] Implementation method 1: For each gateway node in the gateway cluster, a health check strategy based on automatic convergence of the dynamic routing protocol is supported, so that when a gateway node fails, automatic disaster recovery can be achieved without modifying the diversion rules on the diverter.
[0213] The following is an example of the target gateway node:
[0214] The target gateway node obtains the corresponding multiple backup gateway nodes, each backup gateway node corresponds to a backup routing priority; the backup routing priorities of the multiple backup gateway nodes are published, so that when the target gateway node fails, the multiple backup gateway nodes take over the messages forwarded to the target gateway node according to the corresponding backup routing priorities.
[0215] Specifically, the target gateway node publishes a dynamic route of the IP address of the node through a dynamic routing protocol (eg, BGP protocol, OSPF protocol), and the dynamic route corresponds to the highest priority.
[0216] In the gateway cluster, every two gateway nodes are grouped into a group (and each gateway node can only belong to one group at a time), and the group where the target gateway node is located is used as the first priority backup group, and the other gateway node in the first priority backup group is the backup gateway node.
[0217] The target gateway node publishes a backup route of the IP address of the backup gateway node, and the priority of the backup route is set to the first backup priority, which is lower than the highest priority described above.
[0218] In the gateway cluster, the gateway nodes are grouped again into groups of two (and each gateway node can only belong to one group at a time), and the group where the target gateway node is located is used as the second priority backup group. The backup gateway nodes in the second priority backup group are different from the backup gateway nodes in the first priority backup group.
[0219] The target gateway node publishes a backup route of the IP address of the backup gateway node in the second priority backup group, and the priority of the backup route is set to the second backup priority, which is lower than the first backup priority.
[0220] And so on, until every other gateway node in the gateway cluster forms a priority backup group with the target gateway node.
[0221] When the target gateway node fails, the traffic of the target gateway node is taken over by the backup gateway node with the first backup priority.
[0222] If the backup gateway node of the first backup priority also fails, the traffic of the target gateway node is taken over by the backup gateway node of the second backup priority.
[0223] If the backup gateway node with the second backup priority also fails, the traffic of the target gateway node will be taken over by the backup gateway node with the third backup priority. And so on, until a backup gateway node takes over the traffic of the target gateway node. If all backup gateway nodes with the backup priority fail, a message indicating that traffic forwarding failed will be returned.
[0224] For example, see Figure 7 , set the gateway cluster to include 4 gateway nodes, namely: gateway node 0, gateway node 1, gateway node 2, and gateway node 3.
[0225] The gateway node 0 publishes the dynamic route of the IP address of the node through a dynamic routing protocol (for example, BGP protocol, OSPF protocol), and the dynamic route corresponds to the highest priority.
[0226] Gateway node 0 is grouped in the gateway cluster with two gateway nodes as a group to obtain a first priority backup group {gateway node 0 and gateway node 1}. Gateway node 0 publishes a backup route of the IP address of gateway node 1, and the corresponding priority is set to the first backup priority.
[0227] Gateway node 0 is grouped in the gateway cluster with two gateway nodes as a group to obtain the second priority backup group {gateway node 0 and gateway node 2}. Gateway node 0 publishes a backup route of the IP address of gateway node 2, and the corresponding priority is set to the second backup priority.
[0228] Gateway node 0 is grouped in the gateway cluster with two gateway nodes as a group to obtain the second priority backup group {gateway node 0 and gateway node 3}. Gateway node 0 publishes a backup route of the IP address of gateway node 3, and the corresponding priority is set to the third backup priority.
[0229] That is, the routing priority order on gateway node 0 is: IP address of gateway node 0 > IP address of gateway node 1 > IP address of gateway node 2 > IP address of gateway node 3.
[0230] During the traffic scheduling process, when gateway node 0 fails, the traffic of gateway node 0 is taken over by gateway node 1.
[0231] If gateway node 1 also fails, the traffic of gateway node 0 is taken over by gateway node 2.
[0232] If gateway node 2 also fails, the traffic of gateway node 0 is taken over by gateway node 3.
[0233] If gateway node 3 also fails, a message indicating that traffic forwarding has failed is returned.
[0234] Similarly, gateway node 1, gateway node 2, and gateway node 3 can also use the above method to publish different priority routes and take over traffic according to different priority routes. The priority table of routes of each gateway node is shown in Table 4:
[0235] Table 4.
[0236]
[0237] In the above Table 4, the backup groups of different priorities corresponding to gateway node 1 are: first priority backup group {gateway node 1 and gateway node 0}; second priority backup group {gateway node 1 and gateway node 3}; third priority backup group {gateway node 1 and gateway node 2}. In other words, the routing priority order on gateway node 1 is: IP address of gateway node 1>IP address of gateway node 0>IP address of gateway node 3>IP address of gateway node 2.
[0238] The backup groups of different priorities corresponding to gateway node 2 are: first priority backup group {gateway node 2 and gateway node 3}; second priority backup group {gateway node 2 and gateway node 0}; third priority backup group {gateway node 2 and gateway node 1}. In other words, the routing priority order on gateway node 2 is: IP address of gateway node 3>IP address of gateway node 0>IP address of gateway node 1>IP address of gateway node 1.
[0239] The backup groups of different priorities corresponding to gateway node 3 are: first priority backup group {gateway node 3 and gateway node 2}; second priority backup group {gateway node 3 and gateway node 1}; third priority backup group {gateway node 3 and gateway node 0}. In other words, the routing priority order on gateway node 3 is: IP address of gateway node 2>IP address of gateway node 1>IP address of gateway node 1>IP address of gateway node 0.
[0240] In the embodiment of the present application, a health check strategy based on automatic convergence of the dynamic routing protocol is used to set backup groups with different priorities for each gateway node in the back-end gateway cluster. Therefore, when a gateway node fails, the traffic of the gateway node is automatically taken over according to different routing priorities, thereby realizing automatic disaster recovery and improving the disaster recovery capability of the back-end gateway cluster.
[0241] Implementation method 2: For each gateway node in the gateway cluster, a distributed health check strategy is supported. Each diverter in the traffic scheduling layer detects whether each gateway node in the backend is in a faulty state. When the diverter detects that the target gateway node is in a faulty state, the first diversion rule and the second diversion rule associated with the target address are obtained from the diversion rule set. Then the target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
[0242] Specifically, the diverter traverses all diversion rules in the diversion rule set, detects whether all next-hop gateway nodes corresponding to each diversion rule are in a fault state, and updates the diversion rule set if they are in a fault state.
[0243] The following is an example of the next-hop gateway node being the target gateway node described above:
[0244] The splitter constructs an ICMP request message with the destination IP being the target gateway node, and then sends the ICMP request message to the target gateway node.
[0245] Determine whether the ICMP response message from the target gateway node has been received. If the ICMP response message from the target gateway node is not received for N consecutive times (configurable), it is determined that the target gateway node has failed, and the first diversion rule and the second diversion rule associated with the target gateway node are obtained from the diversion rule set. The target address (the IP address of the target gateway node) is removed from the next-hop gateway node IP address set of the first diversion rule, and the second diversion rule is deleted at the same time. If an ICMP response message from the target gateway node is received, it is determined that the target gateway node is alive and there is no need to modify the diversion rules.
[0246] It should be noted that the state detection method of other gateway nodes and the method of updating the diversion rule set are the same and will not be repeated here.
[0247] In an embodiment of the present application, a distributed health check strategy is used to perform health detection on each gateway node in the backend, and when a gateway node failure is detected, the corresponding diversion rule in the diversion rule set is automatically updated, thereby achieving automatic disaster recovery of the gateway node and improving the disaster recovery capability of the backend gateway cluster.
[0248] Implementation method three: the diverter responds to a deletion instruction for a target address in a diverter rule set sent by a controller, obtains a first diverter rule and a second diverter rule associated with the target address from the diverter rule set, and the deletion instruction is sent by calling a remote interface of the diverter when the controller detects that the target gateway node is in a fault state. The target address is deleted from the address set included in the first diverter rule, and the second diverter rule is deleted from the diverter rule set.
[0249] Specifically, the splitter supports the controller's centralized health check strategy. That is, the splitter does not need to detect the health status of the backend gateway node autonomously, but provides a remote call interface for adding, deleting, and modifying split rules, and the controller performs centralized health detection. When the status of the backend gateway node is detected to have changed, the split rule set in all splitters is uniformly modified through the remote call interface.
[0250] The following uses the backend gateway node as the target gateway node described above as an example to explain:
[0251] When the controller detects that the state of the target gateway node changes from a survival state to a failure state, it calls the remote interface of the diverter, deletes the IP address of the target gateway node from the next-hop gateway node IP address set corresponding to the first diversion rule of the target gateway node, and deletes the second flow rule corresponding to the target gateway node.
[0252] When the controller detects that the state of the target gateway node changes from a faulty state to a surviving state, it calls the remote interface of the diverter, adds the IP address of the target gateway node to the next-hop gateway node IP address set corresponding to the first diversion rule of the target gateway node, and adds the second flow rule corresponding to the target gateway node to the diversion rule combination.
[0253] It should be noted that the state detection method of other gateway nodes and the method of updating the diversion rule set are the same and will not be repeated here.
[0254] In an embodiment of the present application, a centralized health check strategy is adopted to perform health detection on each gateway node at the back end, and the corresponding diversion rules in the diversion rule set are adjusted in combination with the remote interface provided by the diverter. The diverter does not need to autonomously detect the health status of the back end gateway nodes. This not only improves the disaster recovery capability of the back end gateway cluster, but also reduces the resource consumption of the diverter.
[0255] In order to better explain the embodiment of the present application, a data splitting method provided by the embodiment of the present application is introduced below in combination with a specific implementation scenario. Figure 8 The process of the method can be interactively executed by the client, traffic scheduling layer, gateway cluster layer and server. Each diverter in the traffic scheduling layer includes: a message parsing unit, a diversion strategy unit, a traffic scheduling unit and a health check unit; the gateway cluster layer includes multiple gateway clusters, and each gateway cluster includes multiple gateway nodes.
[0256] The following describes the forwarding process of forward traffic, which includes the following steps:
[0257] Step 801: The client sends a request message to a traffic splitter in the traffic scheduling layer.
[0258] Step 802: The message parsing unit in the splitter parses the message protocol header of the request message to obtain the cluster diversion IP address and the inner layer protocol header.
[0259] Step 803, the diversion strategy unit in the diverter selects diversion rules and diversion strategies based on the cluster diversion IP address and the inner layer protocol header, and determines the target gateway node (i.e., gateway node 1) for traffic scheduling in the gateway cluster layer based on the diversion rules and diversion strategies.
[0260] Step 804 : The health check unit in the splitter detects the health status of the gateway node 1 .
[0261] Step 805 , the traffic scheduling unit in the splitter modifies the destination IP address of the outer protocol header of the request message to the IP address of gateway node 1 , and schedules the request message to gateway node 1 .
[0262] When a failure of gateway node 1 is detected, the request message will still be forwarded to gateway node 1. At this time, the request message is taken over by the backup gateway node in the priority backup group corresponding to gateway node 1 to achieve automatic disaster recovery.
[0263] Step 806: Gateway node 1 modifies the source IP address of the outer protocol header of the request message to the node diversion IP address corresponding to gateway node 1, and dispatches the request message to the server.
[0264] The following describes the forwarding process of reverse traffic, which includes the following steps:
[0265] Step 807: The server sends a reply message to the splitter in the traffic scheduling layer.
[0266] Step 808: The message parsing unit in the splitter parses the message protocol header of the reply message to obtain the node diversion IP address and the inner layer protocol header.
[0267] Step 809, the diversion strategy unit in the diverter selects diversion rules and diversion strategies based on the node diversion IP address and the inner protocol header, and determines the gateway node 1 for traffic scheduling based on the diversion rules and diversion strategies.
[0268] Step 810: The health check unit in the splitter detects the health status of each gateway node in the gateway cluster layer.
[0269] Step 811 , the splitter modifies the destination IP address of the outer protocol header of the reply message to the IP address of gateway node 1 , and dispatches the reply message to gateway node 1 .
[0270] Step 812: Gateway node 1 modifies the source IP address of the outer protocol header of the reply message to the cluster drainage IP address, and dispatches the reply message to the client.
[0271] In an embodiment of the present application, the diverter diverts traffic by carrying a cluster drainage address or a node drainage address in the message, and there is no need to save the cookie ID and connection hash value of each connection. In other words, the diverter in the present application is implemented in a stateless manner, which can greatly reduce the occupancy of storage resources, thereby improving the stability and reliability of the diverter.
[0272] Secondly, during the diversion process, the diverter dispatches the request message to the target gateway node based on the cluster drainage address and the inner protocol header of the request message. Then, by carrying the node drainage address corresponding to the target gateway node in the reply message, the reply message is also dispatched to the target gateway node. In this way, both forward and reverse traffic are dispatched to the same target gateway node, ensuring the connection consistency of forward and reverse traffic of the same connection, effectively solving the problem of traffic jitter, and achieving higher accuracy when counting network traffic, thereby improving the accuracy of traffic speed limit and avoiding network congestion.
[0273] Based on the same technical concept, the embodiment of the present application provides a structural schematic diagram of a data splitting device, which is applied to a splitter, such as Fig. 9 As shown, the device 900 includes:
[0274] The parsing module 901 is used to parse the request message sent by the sender to obtain the cluster diversion address and the inner layer protocol header;
[0275] A matching module 902 determines a corresponding gateway cluster based on the cluster diversion address, and obtains an address set of multiple gateway nodes included in the gateway cluster;
[0276] The matching module 902 is further used to select a target address that matches the inner protocol header from the address set, and send the request message to the corresponding target gateway node based on the target address, so that the target gateway node adds the node drainage address corresponding to the target gateway node in the request message and then sends the request message to the receiving end;
[0277] The first receiving module 903 is used to receive a reply message carrying a node diversion address returned by the receiving end;
[0278] The first sending module 904 is configured to send the reply message to the target gateway node associated with the node diversion address, so that the target gateway node sends the reply message to the sending end.
[0279] Optionally, the matching module 902 is specifically configured to:
[0280] Select a target diversion strategy that matches the inner protocol header from multiple diversion strategies;
[0281] Obtain the associated field information from the inner protocol header according to the target diversion strategy;
[0282] Perform hash calculation on the field information to obtain the target hash value;
[0283] The address in the address set that matches the target hash value is used as the target address.
[0284] Optionally, when the target traffic diversion strategy is a flow-granularity traffic diversion strategy, the field information includes: a source IP address, a destination IP address, an identifier of a virtual private cloud where the sender is located, a source port number, and a destination port number in an inner protocol header;
[0285] When the target traffic diversion strategy is a service-level traffic diversion strategy, the field information includes: the identifier of the virtual private cloud, the destination IP address, and the destination port number;
[0286] When the target traffic diversion strategy is a traffic diversion strategy at the virtual private cloud granularity, the field information includes: an identifier of the virtual private cloud;
[0287] When the target traffic diversion strategy is a tenant-granularity traffic diversion strategy, the field information includes: a tenant identifier corresponding to the identifier of the virtual private cloud.
[0288] Optionally, the parsing module 901 is specifically used for:
[0289] Parse the message protocol header of the request message sent by the sender to obtain the first outer layer protocol header and the inner layer protocol header, wherein the destination IP address of the first outer layer protocol header is the cluster diversion address;
[0290] The parsing module 901 is also used for:
[0291] After receiving the reply message carrying the node diversion address returned by the receiving end, the message protocol header of the reply message is parsed to obtain the second outer layer protocol header, wherein the destination IP address of the second outer layer protocol header is the node diversion address.
[0292] Optionally, the first sending module 904 is further configured to:
[0293] Before sending the request message to the corresponding target gateway node based on the target address, modify the destination IP address of the first outer protocol header to the target address;
[0294] Before sending the reply message to the target gateway node associated with the node diversion address, the destination IP address of the second outer protocol header is modified to the target address.
[0295] Optionally, the matching module 902 is specifically configured to:
[0296] A first diversion rule matching the cluster diversion address is obtained from a preset diversion rule set, where the first diversion rule includes: the cluster diversion address and an address set of multiple gateway nodes included in the corresponding gateway cluster.
[0297] Optionally, the matching module 902 is specifically configured to:
[0298] From the diversion rule set, obtain a second diversion rule matching the node diversion address, the second diversion rule including: the node diversion address and a target address of a corresponding target gateway node;
[0299] Based on the target address, the reply message is sent to the target gateway node.
[0300] Optionally, a health strategy module 905 is also included;
[0301] The health strategy module 905 is specifically used for:
[0302] In response to a delete instruction for a target address in a diversion rule set sent by a controller, a first diversion rule and a second diversion rule associated with the target address are obtained from the diversion rule set, wherein the delete instruction is sent by calling a remote interface of a diverter when the controller detects that a target gateway node is in a fault state;
[0303] The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
[0304] Optionally, the health policy module 905 is specifically used for:
[0305] When it is detected that the target gateway node is in a fault state, a first diversion rule and a second diversion rule associated with the target address are obtained from the diversion rule set;
[0306] The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
[0307] Based on the same technical concept, the embodiment of the present application provides a structural schematic diagram of a data diversion device, which is applied to a target gateway node, such as Fig.10 As shown, the device 1000 includes:
[0308] The second receiving module 1001 is used to receive a request message sent by the splitter based on the target address corresponding to the target gateway node. The request message is sent by the sender to the splitter, and the request message includes a cluster drainage address and an inner layer protocol header; the target address is the splitter determining the corresponding gateway cluster based on the cluster drainage address, and obtaining the address set of multiple gateway nodes included in the gateway cluster, and based on the inner layer protocol header, obtained from the address set;
[0309] Processing module 1002, used to add a node diversion address corresponding to the target gateway node in the request message;
[0310] The second sending module 1003 is used to send the request message to the receiving end;
[0311] The second receiving module 1001 is further used to receive a reply message sent by the splitter based on the target address, where the target address is determined by the splitter based on the node diversion address carried in the reply message sent by the receiving end;
[0312] The second sending module 1003 is further configured to send a reply message to the sending end.
[0313] Optionally, the processing module 1002 is specifically configured to:
[0314] Modify the source IP address of the first outer protocol header of the request message to the node diversion address;
[0315] Before sending the reply message to the sending end, the source IP address of the second outer layer protocol header of the reply message is modified to the cluster drainage address.
[0316] Optionally, the processing module 1002 is further configured to:
[0317] Obtain multiple backup gateway nodes corresponding to the target gateway node, each backup gateway node corresponds to a backup routing priority;
[0318] The backup routing priorities of the multiple backup gateway nodes are published so that when the target gateway node fails, the multiple backup gateway nodes take over the messages forwarded to the target gateway node according to the corresponding backup routing priorities.
[0319] In an embodiment of the present application, the diverter diverts traffic through the cluster diversion address or node diversion address carried in the message, and there is no need to save the cookie ID and connection hash value of each connection. In other words, the diverter in the present application is implemented in a stateless manner, which can greatly reduce the occupancy of storage resources, thereby improving the stability and reliability of the diverter.
[0320] Secondly, for forward traffic, the splitter dispatches the request message to the target gateway node based on the cluster drainage address in the request message and the inner protocol header of the request message, and the target gateway node forwards the request message to the receiving end. For reverse traffic, the splitter dispatches the reply message to the target gateway node based on the node drainage address corresponding to the target gateway node carried in the reply message, and the target gateway node forwards the reply message to the sending end. In this way, both forward and reverse traffic are dispatched to the same target gateway node, ensuring the connection consistency of the forward and reverse traffic of the same connection, and effectively solving the problem of traffic jitter; at the same time, when counting network traffic, the accuracy is higher, thereby improving the accuracy of traffic speed limit and avoiding network congestion.
[0321] Based on the same technical concept, the embodiment of the present application provides a computer device, which can be Figure 1The transmitter, splitter, gateway node, and receiver are shown in FIG. Fig.11 As shown, it includes at least one processor 1101 and a memory 1102 connected to the at least one processor. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present application. Fig.11 For example, the processor 1101 and the memory 1102 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0322] In the embodiment of the present application, the memory 1102 stores instructions that can be executed by at least one processor 1101, and the at least one processor 1101 can perform the steps of the above-mentioned data diversion method by executing the instructions stored in the memory 1102.
[0323] Among them, the processor 1101 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, and realize data diversion by running or executing instructions stored in the memory 1102 and calling data stored in the memory 1102. Optionally, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0324] Processor 1101 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0325] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer device, but is not limited thereto. The memory 1102 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0326] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned data diversion method.
[0327] Based on the same inventive concept, an embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above-mentioned data diversion method.
[0328] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0329] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer device or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0330] These computer program instructions may also be stored in a computer readable memory capable of directing a computer device or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0331] These computer program instructions can also be loaded onto a computer device or other programmable data processing device so that a series of operation steps are executed on the computer device or other programmable device to produce a process implemented by the computer device, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0332] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0333] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A data splitting method, applied to a splitter, characterized in that: include: Parse the request message sent by the sender to obtain the cluster drainage address and inner protocol header; Determine a corresponding gateway cluster based on the cluster diversion address, and obtain an address set of multiple gateway nodes included in the gateway cluster; Selecting a target address that matches the inner protocol header from the address set, and sending the request message to the corresponding target gateway node based on the target address, so that the target gateway node adds the node drainage address corresponding to the target gateway node in the request message and then sends the request message to the receiving end; Receiving a reply message carrying the node diversion address returned by the receiving end; The reply message is sent to the target gateway node associated with the node diversion address, so that the target gateway node sends the reply message to the sending end.
2. The method according to claim 1, characterized in that The selecting a target address matching the inner protocol header from the address set includes: Selecting a target diversion strategy that matches the inner protocol header from a plurality of diversion strategies; Acquire associated field information from the inner protocol header according to the target diversion strategy; Performing hash calculation on the field information to obtain a target hash value; An address in the address set that matches the target hash value is used as the target address.
3. The method according to claim 2, characterized in that Also includes: When the target diversion strategy is a flow-granular diversion strategy, the field information includes: the source IP address, the destination IP address, the identifier of the virtual private cloud where the sender is located, the source port number, and the destination port number in the inner protocol header; When the target traffic diversion strategy is a traffic diversion strategy at the service granularity, the field information includes: an identifier of the virtual private cloud, the destination IP address, and the destination port number; When the target traffic diversion strategy is a traffic diversion strategy at the virtual private cloud granularity, the field information includes: an identifier of the virtual private cloud; When the target traffic diversion strategy is a tenant-granularity traffic diversion strategy, the field information includes: a tenant identifier corresponding to the identifier of the virtual private cloud.
4. The method according to claim 1, characterized in that The request message sent by the sender is parsed to obtain the cluster diversion address and the inner layer protocol header, including: Parsing the request message sent by the sender based on the message protocol header to obtain a first outer layer protocol header and an inner layer protocol header, wherein the destination IP address of the first outer layer protocol header is the cluster diversion address; After receiving the reply message carrying the node diversion address returned by the receiving end, the method further includes: The reply message is parsed by a message protocol header to obtain a second outer layer protocol header, wherein the destination IP address of the second outer layer protocol header is the node diversion address.
5. The method according to claim 4, characterized in that Before sending the request message to the corresponding target gateway node based on the target address, the method further includes: Modify the destination IP address of the first outer protocol header to the target address; Before sending the reply message to the target gateway node associated with the node diversion address, the method further includes: The destination IP address of the second outer protocol header is modified to the target address.
6. The method according to any one of claims 1 to 5, characterized in that: The determining a corresponding gateway cluster based on the cluster diversion address and obtaining an address set of multiple gateway nodes included in the gateway cluster includes: A first diversion rule matching the cluster diversion address is obtained from a preset diversion rule set, wherein the first diversion rule includes: the cluster diversion address and an address set of multiple gateway nodes included in the corresponding gateway cluster.
7. The method according to claim 6, characterized in that The step of sending the reply message to the target gateway node associated with the node diversion address includes: Acquire a second diversion rule matching the node diversion address from the diversion rule set, wherein the second diversion rule includes: the node diversion address and a target address of a corresponding target gateway node; Based on the target address, the reply message is sent to the target gateway node.
8. The method according to claim 7, characterized in that Also includes: In response to a delete instruction for the target address in the diversion rule set sent by the controller, acquiring the first diversion rule and the second diversion rule associated with the target address from the diversion rule set, wherein the delete instruction is sent by the controller by calling the remote interface of the diverter when the controller detects that the target gateway node is in a fault state; The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
9. The method according to claim 7, characterized in that Also includes: When it is detected that the target gateway node is in a fault state, acquiring the first diversion rule and the second diversion rule associated with the target address from the diversion rule set; The target address is deleted from the address set included in the first diversion rule, and the second diversion rule is deleted from the diversion rule set.
10. A data offloading method, applied to a target gateway node, characterized in that: include: Receive a request message sent by the splitter based on the target address corresponding to the target gateway node, the request message is sent by the sender to the splitter, and the request message includes a cluster drainage address and an inner protocol header; the target address is obtained from the address set obtained by the splitter based on the cluster drainage address to determine the corresponding gateway cluster and obtain the address set of multiple gateway nodes included in the gateway cluster, and based on the inner protocol header; After adding the node diversion address corresponding to the target gateway node in the request message, sending the request message to the receiving end; receiving a reply message sent by the splitter based on the target address, wherein the target address is determined by the splitter based on the node diversion address carried in the reply message sent by the receiving end; The reply message is sent to the sending end.
11. The method according to claim 10, characterized in that After adding the node diversion address corresponding to the target gateway node in the request message, sending the request message to the receiving end includes: After modifying the source IP address of the first outer layer protocol header of the request message to the node diversion address, the request message is sent to the receiving end; Before sending the reply message to the sending end, the method further includes: The source IP address of the second outer layer protocol header of the reply message is modified to the cluster diversion address.
12. The method according to claim 10, characterized in that Also includes: Acquire multiple backup gateway nodes corresponding to the target gateway node, each backup gateway node corresponding to a backup routing priority; The backup routing priorities of the multiple backup gateway nodes are published so that when the target gateway node fails, the multiple backup gateway nodes take over the messages forwarded to the target gateway node according to the corresponding backup routing priorities.
13. A data splitting device, applied to a splitter, characterized in that: include: The parsing module is used to parse the request message sent by the sender to obtain the cluster drainage address and inner protocol header; A matching module, which determines a corresponding gateway cluster based on the cluster diversion address, and obtains an address set of multiple gateway nodes included in the gateway cluster; The matching module is further configured to select a target address matching the inner protocol header from the address set, and send the request message to the corresponding target gateway node based on the target address, so that the target gateway node adds the node drainage address corresponding to the target gateway node to the request message and then sends the request message to the receiving end; A first receiving module, configured to receive a reply message carrying the node diversion address returned by the receiving end; The first sending module is used to send the reply message to the target gateway node associated with the node diversion address, so that the target gateway node sends the reply message to the sending end.
14. A data distribution device, applied to a target gateway node, characterized in that: include: The second receiving module is used to receive a request message sent by the splitter based on the target address corresponding to the target gateway node, the request message is sent by the sending end to the splitter, and the request message includes a cluster drainage address and an inner layer protocol header; the target address is the splitter determining the corresponding gateway cluster based on the cluster drainage address, and obtaining the address set of multiple gateway nodes included in the gateway cluster, and based on the inner layer protocol header, obtained from the address set; A processing module, configured to add a node diversion address corresponding to the target gateway node in the request message; A second sending module, used for sending the request message to a receiving end; The second receiving module is further used to receive a reply message sent by the splitter based on the target address, where the target address is determined by the splitter based on the node diversion address carried in the reply message sent by the receiving end; The second sending module is further used to send the reply message to the sending end.
15. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any one of the methods of claims 1 to 12 are implemented.
16. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 12.
17. A computer program product, characterized in that The computer program product comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer device, the computer device is caused to execute the steps of the method according to any one of claims 1 to 12.