Data interaction method and device between clusters, electronic equipment and storage medium
By transmitting shard information between clusters for traffic routing decisions, the problems of automatic load calculation and traffic forwarding between clusters in multiple AZ scenarios are solved, and no traffic breakage and service continuity during cluster switching are achieved.
Patent Information
- Application Number
- CN202411706808.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In multi-AZ scenarios, the existing cluster network controller architecture cannot realize automatic load calculation and traffic forwarding between clusters, resulting in cluster unavailability and traffic outage.
By transmitting shard information between clusters, determining the cluster to which the traffic data belongs, and making routing decisions based on the information, ensuring that the traffic data can be correctly forwarded to the cluster.
It realizes that no need to notify other departments of network elements to modify VIP during cluster switching, avoid traffic outage and ensure the continuity of customer business.
Smart Images

Figure CN119697196A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data interaction, and in particular to a data interaction method between clusters, a data interaction device between clusters, an electronic device and a computer-readable storage medium. Background Art
[0002] The current cluster network controller architecture exists in a single cluster in a multi-AZ (Availability Zones) scenario, and the entire AZ cannot be migrated to other clusters.
[0003] like Figure 1 As shown in the figure, multiple AZs (az-1, az-2, ..., az-n) coexist in one hostgroup (single cluster instance), and all VPCs (Virtual Private Clouds) forward traffic to IDCs (Internet Data Centers) through Controller Hostgroup1 (based on BGP and DP (Data Plane)). The ratio between controllers (Controller3 and Controller4) and data planes DP (Data Plane) (Data Plane1 and Data Plane2) is 1:1, and DP uses a programmable switch. When VPC reaches 10W, the bfswith (Breadth-First Search) bottleneck will be reached.
[0004] against Figure 2 When the number of VPCs reaches a certain threshold, two problems will occur. The first problem is that the controller reconciliation is slow. The second problem is that the DP will encounter OOM (Out of Memory) due to the large amount of data, which will directly cause the current hostgroup to crash. Since multiple clusters cannot automatically learn and calculate loads, the cluster will become unavailable as a whole. At the same time, the clusters cannot forward traffic to each other, resulting in multiple hostgroups being unable to interact normally (az-1, az-2, ..., az-n are disconnected).
[0005] The problem with current technology is that when DP reaches the bottleneck of 100,000, dynamic configuration is performed to switch clusters, such as Figure 3However, when the cluster switching is not completed, VPC Peering, VPN (Virtual Private Network), DC (Data Center) and other services will be disconnected, which will directly cause the traffic to be sent to the hostgroup and cannot be identified as its own traffic, resulting in data packet discard, which directly affects customer services. Summary of the invention
[0006] In view of the above problems, a method for data interaction between clusters, a device for data interaction between clusters, an electronic device and a computer-readable storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:
[0007] A method for data interaction between clusters, wherein the clusters include a first cluster and other clusters, and the method includes:
[0008] The first cluster receives shard information, where the shard information is used to indicate the cluster to which the traffic data belongs;
[0009] After receiving the first traffic data, the first cluster determines, according to the sharding information, whether the cluster to which the first traffic data belongs is the first cluster;
[0010] When it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data;
[0011] When it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0012] Optionally, the cluster is connected to a cluster controller;
[0013] The cluster controller is used to set the slicing information of each flow data according to the data layer plane to which each flow data belongs, and the cluster includes the data layer plane;
[0014] The determining, according to the sharding information, whether the cluster to which the first traffic data belongs is the first cluster includes:
[0015] According to the sharding information, it is determined whether the data layer plane to which the first traffic data belongs belongs to the first cluster.
[0016] Optionally, the cluster controller is used to set the data layering plane to which each flow data belongs based on a preset load balancing strategy.
[0017] Optionally, the cluster controller is used to slice the virtual private cloud corresponding to each flow data in sequence; and set a data layering plane for the flow data corresponding to each slice.
[0018] Optionally, the cluster controller is used to divide the virtual network identifier of each virtual private cloud according to the classless inter-domain routing of the Internet Protocol to obtain multiple slices.
[0019] Optionally, the cluster controller is further used to partition a shard when traffic data belonging to different data layer planes exists in the shard.
[0020] Optionally, the method further comprises:
[0021] receiving second traffic data; the cluster to which the second traffic data belongs has been deleted;
[0022] The second traffic data is routed.
[0023] An embodiment of the present invention further provides a data interaction device between clusters, wherein the clusters include a first cluster and other clusters, and the device includes:
[0024] A receiving module, used for receiving sharding information, where the sharding information is used for indicating the cluster to which the traffic data belongs;
[0025] A judgment module, configured to judge, after receiving the first traffic data, whether the cluster to which the first traffic data belongs is the first cluster according to the sharding information;
[0026] a first transmission module, configured to, when it is determined that the cluster to which the first traffic data belongs is the first cluster, route the first traffic data by the first cluster;
[0027] The second transmission module is used for, when it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sending the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0028] Optionally, the cluster is connected to a cluster controller;
[0029] The cluster controller is used to set the slicing information of each flow data according to the data layer plane to which each flow data belongs, and the cluster includes the data layer plane;
[0030] The judgment module is used to judge whether the data layer plane to which the first traffic data belongs belongs to the first cluster according to the sharding information.
[0031] Optionally, the cluster controller is used to set the data layering plane to which each flow data belongs based on a preset load balancing strategy.
[0032] Optionally, the cluster controller is used to slice the virtual private cloud corresponding to each flow data in sequence; and set a data layering plane for the flow data corresponding to each slice.
[0033] Optionally, the cluster controller is used to divide the virtual network identifier of each virtual private cloud according to the classless inter-domain routing of the Internet Protocol to obtain multiple slices.
[0034] Optionally, the cluster controller is further used to partition a shard when traffic data belonging to different data layer planes exists in the shard.
[0035] Optionally, the device further comprises:
[0036] The third transmission module is used to receive second traffic data; the cluster to which the second traffic data belongs has been deleted; and to route the second traffic data.
[0037] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above-mentioned method for data interaction between clusters when executed by the processor.
[0038] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for data interaction between clusters is implemented.
[0039] The embodiments of the present invention have the following advantages:
[0040] In an embodiment of the present invention, the first cluster receives sharding information, and the sharding information is used to indicate the cluster to which the traffic data belongs; after receiving the first traffic data, the first cluster determines whether the cluster to which the first traffic data belongs is the first cluster based on the sharding information; when it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data; when it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0041] By using the embodiment of the present invention, it is possible to avoid notifying network elements of other departments to modify VIP (Virtual IP Address) when performing cluster switching, and traffic interruption will not occur. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0043] Figure 1 It is a schematic diagram of data interaction in the prior art;
[0044] Figure 2 It is a schematic diagram of another data interaction of the prior art;
[0045] Figure 3 It is another schematic diagram of data interaction in the prior art;
[0046] Figure 4 is a flowchart of the steps of a method for data interaction between clusters according to an embodiment of the present invention;
[0047] Figure 5 is a flowchart of another method for data interaction between clusters according to an embodiment of the present invention;
[0048] Figure 6 is a schematic diagram of data interaction between clusters according to an embodiment of the present invention;
[0049] Figure 7 is a schematic diagram of data interaction according to an embodiment of the present invention;
[0050] Figure 8 is a schematic diagram of another data interaction according to an embodiment of the present invention;
[0051] Fig. 9 is a schematic diagram of a slicing according to an embodiment of the present invention;
[0052] Fig.10 is a schematic diagram of another sharding according to an embodiment of the present invention;
[0053] Fig.11 is a schematic diagram of another data interaction according to an embodiment of the present invention;
[0054] Fig.12 is a schematic diagram of another data interaction according to an embodiment of the present invention;
[0055] Fig.13 It is a structural schematic diagram of a data interaction device between clusters according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] Reference Figure 4 , shows a flow chart of the steps of a data interaction method between clusters according to an embodiment of the present invention; wherein the clusters may include a first cluster and other clusters. The first cluster may refer to any cluster among all clusters, and the other clusters may refer to other clusters among all clusters except the first cluster.
[0058] like Figure 4 As shown, the data interaction method between clusters may include the following steps:
[0059] Step 401: The first cluster receives sharding information, where the sharding information is used to indicate the cluster to which the traffic data belongs.
[0060] Taking the first cluster as an example, the controller may first send sharding information to the first cluster. The sharding information may be generated by the controller and used to indicate the cluster to which the traffic data belongs.
[0061] Specifically, the controller can set the cluster to which each flow data belongs based on strategies such as load balancing; when flow data needs to be transmitted between the virtual private cloud and the Internet data center, the data can be routed through the cluster to which the flow data belongs.
[0062] Data routing refers to the process of transmitting data packets from the source address to the destination address in the network. This process usually involves the following key steps:
[0063] Routing table: A routing table is a table used by network devices (such as routers) to determine the transmission path of data packets. It contains the mapping relationship between the destination address and the next hop address.
[0064] Routing Protocol: A routing protocol is a protocol for exchanging routing information between network devices. Common routing protocols include OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol).
[0065] Routing decision: When a data packet arrives at a router, the router will determine the next hop address of the data packet based on the information in the routing table and routing protocol. This process is called routing decision.
[0066] Forwarding: Once the router determines the next hop address of the data packet, it will forward the data packet to the corresponding interface and continue to transmit to the next network device until the data packet reaches the destination address.
[0067] After receiving the shard information, the first cluster may store it locally, so that after receiving the traffic data subsequently, the cluster to which the traffic data belongs may be determined based on the shard information.
[0068] Step 402: After receiving the first traffic data, the first cluster determines whether the cluster to which the first traffic data belongs is the first cluster according to the sharding information.
[0069] In actual applications, after receiving first traffic data that needs to be routed, the first cluster may first query the shard information.
[0070] Specifically, the first cluster may first query the shard information to determine information about the first traffic data in the shard information.
[0071] Then, the first cluster may determine which cluster the first traffic data belongs to based on the information about the first traffic data in the shard information; specifically, it may further determine whether the cluster to which the first traffic data belongs is the first cluster.
[0072] Step 403: When it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data.
[0073] When it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster may normally route the first traffic data.
[0074] Specifically, the first cluster may route the first traffic data based on BGP and DP.
[0075] Exemplarily, the first cluster exchanges routing information with other autonomous systems through BGP. BGP dynamically updates the network topology to ensure that the first cluster can obtain the latest routing information. When the first traffic data arrives at the first cluster, the first cluster makes a routing decision based on the routing information provided by BGP and the configuration of the data plane.
[0076] For example, cluster 1 can select the optimal path to ensure efficient data packet transmission. Once the routing decision is made, the data plane of cluster 1 forwards the data packet to the corresponding interface.
[0077] Programmable switches process and forward data packets according to preset rules and policies to ensure efficient transmission of traffic.
[0078] Step 404: When it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0079] On the other hand, if it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster first determines the cluster to which the first traffic data actually belongs. For the convenience of subsequent description, the cluster to which the first traffic data actually belongs is called the second cluster.
[0080] After determining the second cluster, the first cluster may send the received first traffic data to the second cluster, and then the second cluster routes the first traffic data.
[0081] Specifically, the second cluster may route the first traffic data based on BGP and DP.
[0082] Exemplarily, the second cluster exchanges routing information with other autonomous systems through BGP. BGP dynamically updates the network topology to ensure that the second cluster can obtain the latest routing information. When the first traffic data reaches the second cluster, the second cluster makes a routing decision based on the routing information provided by BGP and the configuration of the data plane.
[0083] For example, the second cluster can select the optimal path to ensure that the data packet can be transmitted efficiently. Once the routing decision is made, the data plane of the second cluster forwards the data packet to the corresponding interface.
[0084] Programmable switches process and forward data packets according to preset rules and policies to ensure efficient transmission of traffic.
[0085] In an embodiment of the present invention, the first cluster receives sharding information, and the sharding information is used to indicate the cluster to which the traffic data belongs; after receiving the first traffic data, the first cluster determines whether the cluster to which the first traffic data belongs is the first cluster based on the sharding information; when it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data; when it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0086] By using the embodiment of the present invention, it is possible to avoid notifying network elements of other departments to modify VIPs when performing cluster switching, and traffic interruption will not occur.
[0087] Reference Figure 5 , shows a flowchart of another method for data interaction between clusters according to an embodiment of the present invention, which may include the following steps:
[0088] Step 501: The first cluster receives sharding information.
[0089] Taking the first cluster as an example, the controller may first send sharding information to the first cluster. The sharding information may be generated by the controller and used to indicate the cluster to which the traffic data belongs.
[0090] Specifically, the controller can set the cluster to which each flow data belongs based on strategies such as load balancing; when flow data needs to be transmitted between the virtual private cloud and the Internet data center, the data can be routed through the cluster to which the flow data belongs.
[0091] Step 502, the cluster is connected to the cluster controller; the cluster controller is used to set the sharding information of each flow data according to the data layering plane to which each flow data belongs, and the cluster includes the data layering plane; after receiving the first flow data, the first cluster determines whether the data layering plane to which the first flow data belongs belongs to the first cluster according to the sharding information.
[0092] In some feasible embodiments, the first cluster and other clusters may be connected to a cluster controller, and the cluster controller may be used to set sharding information of each flow data according to the data layer plane to which each flow data belongs.
[0093] In actual applications, in the network architecture, the cluster is not only responsible for processing and routing the initial or main traffic data in the network, but also can include the data layering plane; therefore, the first cluster can determine the data layering plane to which the received traffic data belongs based on the sharding information, and then determine the cluster to which the traffic data belongs.
[0094] Specifically, after receiving the first traffic data, the first cluster may first query the shard information.
[0095] Specifically, the first cluster may first query the shard information to determine information about the first traffic data in the shard information.
[0096] Then, the first cluster may determine the data layer plane to which the first traffic data belongs based on the information about the first traffic data in the shard information.
[0097] Next, the first cluster may determine whether the data layering plane to which the first traffic data belongs belongs to the first cluster.
[0098] In one embodiment of the present invention, the cluster controller is used to set the data layer plane to which each flow data belongs based on a preset load balancing strategy.
[0099] In some feasible embodiments, in order to ensure load balancing, the cluster controller can set the data layering plane for each traffic data based on a preset load balancing strategy to avoid different burdens on the clusters, which may cause some clusters to be overloaded or underloaded, thereby affecting the utilization of the entire cluster.
[0100] Exemplarily, the cluster controller may allocate a data layering plane to each flow data based on the load, performance, etc. of each cluster.
[0101] In one embodiment of the present invention, the cluster controller is used to slice the virtual private cloud corresponding to each flow data in sequence; and set the data layering plane corresponding to each slice of flow data.
[0102] In some feasible embodiments, the cluster controller may directly slice the virtual private cloud corresponding to each flow data in sequence to obtain multiple slices.
[0103] Then, the data layering plane to which each flow data belongs can be set for the flow data corresponding to each shard.
[0104] In one embodiment of the present invention, the cluster controller is used to divide the virtual network identifier of each virtual private cloud according to the classless inter-domain routing of the Internet protocol to obtain multiple slices.
[0105] In some feasible embodiments, the cluster controller may shard all virtual private clouds; the sharding logic may be:
[0106] The VNI (Virtual Network Identifier) of the virtual private cloud is divided according to the CIDR (Classless Inter-Domain Routing) of the IP (Internet Protocol) to obtain different shards.
[0107] In one embodiment of the present invention, the cluster controller is further configured to partition a shard when traffic data belonging to different data layer planes exists in the shard.
[0108] In some feasible embodiments, during sharding, traffic data belonging to different data layering planes may also be divided into one shard.
[0109] At this time, the cluster controller may also partition a shard when traffic data belonging to different data layering planes exists in the shard.
[0110] Step 503: When it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data.
[0111] When it is determined that the cluster to which the data layer plane to which the first traffic data belongs belongs is the first cluster, the first cluster may normally route the first traffic data.
[0112] Specifically, the first cluster may route the first traffic data based on BGP and DP.
[0113] Exemplarily, the first cluster exchanges routing information with other autonomous systems through BGP. BGP dynamically updates the network topology to ensure that the first cluster can obtain the latest routing information. When the first traffic data arrives at the first cluster, the first cluster makes a routing decision based on the routing information provided by BGP and the configuration of the data plane.
[0114] For example, cluster 1 can select the optimal path to ensure efficient data packet transmission. Once the routing decision is made, the data plane of cluster 1 forwards the data packet to the corresponding interface.
[0115] Programmable switches process and forward data packets according to preset rules and policies to ensure efficient transmission of traffic.
[0116] Step 504: When it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0117] On the other hand, if it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster first determines the cluster to which the first traffic data actually belongs. For the convenience of subsequent description, the cluster to which the first traffic data actually belongs is called the second cluster.
[0118] After determining the second cluster, the first cluster may send the received first traffic data to the second cluster, and then the second cluster routes the first traffic data.
[0119] Specifically, the second cluster may route the first traffic data based on BGP and DP.
[0120] Exemplarily, the second cluster exchanges routing information with other autonomous systems through BGP. BGP dynamically updates the network topology to ensure that the second cluster can obtain the latest routing information. When the first traffic data reaches the second cluster, the second cluster makes a routing decision based on the routing information provided by BGP and the configuration of the data plane.
[0121] For example, the second cluster can select the optimal path to ensure that the data packet can be transmitted efficiently. Once the routing decision is made, the data plane of the second cluster forwards the data packet to the corresponding interface.
[0122] Programmable switches process and forward data packets according to preset rules and policies to ensure efficient transmission of traffic.
[0123] Step 505: Receive second traffic data; the cluster to which the second traffic data belongs has been deleted.
[0124] In some feasible embodiments, a cluster may be removed. In this case, the traffic data set for the cluster may not be able to continue to modify the cluster routing. To address this problem, the method of the embodiment of the present invention can also perform service switching quickly and losslessly.
[0125] Specifically, the cluster to be deleted is called the third cluster, and the traffic data corresponding to the third cluster is called the second traffic data.
[0126] When transmitting the second traffic data, when it is detected that the third cluster has been deleted, the controller may set the second traffic data to be routed by the first cluster based on a preset load balancing strategy.
[0127] Thus, when transmitting the second traffic data, the DCGW (Data Center Gateway) can transmit the second traffic data to the first cluster.
[0128] Step 506: route the second traffic data.
[0129] After receiving the second traffic data, the first cluster may forward the second traffic data; specifically:
[0130] The first cluster can exchange routing information with other autonomous systems through BGP. BGP dynamically updates the network topology to ensure that the first cluster can obtain the latest routing information. When the first traffic data reaches the first cluster, the first cluster makes a routing decision based on the routing information provided by BGP and the configuration of the data plane.
[0131] For example, Figure 6 As shown, when configuring the cluster controller, you can not only configure it to ControllerHostgroup1 (including Controller3 and Controller4), but also to ControllerHostgroup2 (including Controller1 and Controller2). When both clusters have this data, load balancing is basically achieved.
[0132] Perform sharding on the VPC configuration information (obtain shard 1 and shard 2), sort the VPCs in order and divide the VPCs into shards according to the CIDR of the IP, mark the ControllerHostgroup where the data of the current shard is located, and download the sharding information. When the traffic switching is not completed or involves interaction with other gateways and the VIP cannot be changed, the ControllerHostgroup where the current VPC is located can be queried, and DP forwards the traffic to the corresponding ControllerHostgroup.
[0133] like Figure 7 As shown in the figure, the current shard information (Shard 1 (VPC1-DP1, VPC2-DP1), Shard 2 (VPC3-DP1, VPC4-DP1), Shard 3 (VPC5-DP1, VPC6-DP1), Shard 4 (VPC7-DP1, VPC8-DP1)) is all in DP1, so all traffic data passes through DP1 of Controller Hostgroup1, not DP2 of Controller Hostgroup2.
[0134] like Figure 8 As shown, Figure 7 As shown, DP1 switches after the load reaches the threshold. Even if the traffic data in shard 3 returns to DP1 from other external network elements, DP1 can still forward traffic according to the Controller Hostgroup where the current VPC is located, preventing traffic interruption or service interruption.
[0135] like Fig. 9 As shown, first, all VPCs are sharded. The logic of sharding is to divide the VNI of the created VPC into different shards according to the CIDR of the IP, and obtain shard 1 (VPC1-DP1, VPC2-DP1), shard 2 (VPC3-DP1, VPC4-DP1), shard 3 (VPC5-DP1, VPC6-DP1), shard 4 (VPC7-DP1, VPC8-DP1). Shard 1, shard 2, shard 3 and shard 4 all correspond to Controller Hostgroup1 (hg1).
[0136] like Fig.10 As shown, VPC1, VPC2 and VPC5 are then switched to another (Controller Hostgroup2) hg2. At this time, the traffic of shard 1 needs to be switched to hg2, and shard 3 needs to be split into 2 shards (shard 3-1 and shard 3-2) to complete the data configuration.
[0137] like Fig.11 As shown, after the switching is completed, even if other network elements record the VIP of hg1, it will not affect the forwarding. When hg1 finds that the fragmentation information is in hg2, hg1 will forward the traffic of the current VNI to hg2. When hg2 detects it as its own traffic, it enters its own DP for normal traffic forwarding.
[0138] For example, in the case of dedicated line access to cloud resources, the normal business flow is IDC→DCGW (Data Center Gateway)→VPCGW (Virtual Private Cloud Gateway) (hg1-VPCGW, hg2-VPCGW)→VM (Virtual Machine) (VPC-vm1, VPC-vm2). In this process, if DCGW needs to switch hg, it needs to actively switch. Because DCGW records the VIP of hg1 during active switching, it cannot perceive the switch after the switch is completed, or the switch will be disconnected. On this basis, if sharding is used, even if DCGW traffic is still sent to hg1-VPCGW, hg1-VPCGW can forward the traffic to hg2-VPCGW based on the sharding information to achieve uninterrupted traffic forwarding.
[0139] like Fig.12 As shown in the figure, in the actual deployment process, the VNIs of all VPCs should be sharded. After the sharding is completed, when the traffic is switched, the DCGW sends it to the corresponding hg according to the record; then, the sharding information is queried according to the VNI to perceive whether the current traffic should be processed by the hg to which it belongs, and the corresponding hg is found to forward different traffic.
[0140] In an embodiment of the present invention, the first cluster receives sharding information; the cluster is connected to a cluster controller; the cluster controller is used to set the sharding information of each flow data according to the data layer plane to which each flow data belongs, and the cluster includes a data layer plane; after receiving the first flow data, the first cluster determines whether the data layer plane to which the first flow data belongs belongs to the first cluster according to the sharding information; when it is determined that the cluster to which the first flow data belongs is the first cluster, the first cluster routes the first flow data; when it is determined that the cluster to which the first flow data belongs is not the first cluster, the first cluster sends the first flow data to the cluster to which the first flow data belongs, so that the cluster to which the first flow data belongs routes the first flow data; receives the second flow data; the cluster to which the second flow data belongs has been deleted; and routes the second flow data. Through the embodiment of the present invention, when an irreversible fault occurs in the cluster, service switching can be performed quickly and losslessly; and the shortest millisecond-level jitter is supported, which greatly shortens the time for customer flow switching and reduces the scope of fault impact.
[0141] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0142] Reference Fig.13 , shows a schematic structural diagram of a data interaction device between clusters according to an embodiment of the present invention, where the clusters include a first cluster and other clusters.
[0143] like Fig.13 As shown, the device may include the following modules:
[0144] A receiving module 1301 is used to receive sharding information, where the sharding information is used to indicate the cluster to which the traffic data belongs;
[0145] The judgment module 1302 is used for the first cluster to judge whether the cluster to which the first traffic data belongs is the first cluster according to the sharding information after receiving the first traffic data;
[0146] The first transmission module 1303 is configured to route the first traffic data by the first cluster when it is determined that the cluster to which the first traffic data belongs is the first cluster;
[0147] The second transmission module 1304 is configured to, when it is determined that the cluster to which the first traffic data belongs is not the first cluster, cause the first cluster to send the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0148] In an optional embodiment of the present invention, the cluster is connected to a cluster controller;
[0149] A cluster controller, used for setting slicing information of each flow data according to the data layer plane to which each flow data belongs, the cluster including the data layer plane;
[0150] The judgment module 1302 is used to judge whether the data layer plane to which the first traffic data belongs belongs to the first cluster according to the sharding information.
[0151] In an optional embodiment of the present invention, the cluster controller is used to set the data layering plane to which each flow data belongs based on a preset load balancing strategy.
[0152] In an optional embodiment of the present invention, the cluster controller is used to slice the virtual private cloud corresponding to each flow data in sequence; and set the data layering plane corresponding to the flow data of each slice.
[0153] In an optional embodiment of the present invention, the cluster controller is used to divide the virtual network identifier of each virtual private cloud according to the classless inter-domain routing of the Internet Protocol to obtain multiple slices.
[0154] In an optional embodiment of the present invention, the cluster controller is further used to partition a shard when traffic data belonging to different data layer planes exists in the shard.
[0155] In an optional embodiment of the present invention, the device further comprises:
[0156] The third transmission module is used to receive the second flow data; the cluster to which the second flow data belongs has been deleted; and the second flow data is routed.
[0157] In an embodiment of the present invention, the first cluster receives sharding information, and the sharding information is used to indicate the cluster to which the traffic data belongs; after receiving the first traffic data, the first cluster determines whether the cluster to which the first traffic data belongs is the first cluster based on the sharding information; when it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data; when it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
[0158] By using the embodiment of the present invention, it is possible to avoid notifying network elements of other departments to modify VIP (Virtual IP Address) when performing cluster switching, and traffic interruption will not occur.
[0159] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the above-mentioned method for data interaction between clusters is implemented.
[0160] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for data interaction between clusters is implemented.
[0161] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0163] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of 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 embodiments of 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 codes.
[0164] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the 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 the 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.
[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal 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.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement 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.
[0167] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional 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 embodiments of the present invention.
[0168] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0169] The above provides a detailed introduction to a data interaction method between clusters, a data interaction device between clusters, an electronic device and a computer-readable storage medium. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data interaction method between clusters, characterized in that: The cluster includes a first cluster and other clusters, and the method includes: The first cluster receives shard information, where the shard information is used to indicate the cluster to which the traffic data belongs; After receiving the first traffic data, the first cluster determines, according to the sharding information, whether the cluster to which the first traffic data belongs is the first cluster; When it is determined that the cluster to which the first traffic data belongs is the first cluster, the first cluster routes the first traffic data; When it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sends the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
2. The method according to claim 1, characterized in that The cluster is connected to a cluster controller; The cluster controller is used to set the slicing information of each flow data according to the data layer plane to which each flow data belongs, and the cluster includes the data layer plane; The determining, according to the sharding information, whether the cluster to which the first traffic data belongs is the first cluster includes: According to the sharding information, it is determined whether the data layer plane to which the first traffic data belongs belongs to the first cluster.
3. The method according to claim 2, characterized in that The cluster controller is used to set the data layering plane to which each flow data belongs based on a preset load balancing strategy.
4. The method according to claim 3, characterized in that The cluster controller is used to slice the virtual private cloud corresponding to each flow data in sequence; and set the data layering plane corresponding to the flow data of each slice.
5. The method according to claim 4, characterized in that The cluster controller is used to divide the virtual network identifier of each virtual private cloud according to the classless inter-domain routing of the Internet protocol to obtain multiple slices.
6. The method according to claim 5, characterized in that The cluster controller is further used to partition a shard when traffic data belonging to different data layer planes exists in the shard.
7. The method according to claim 1, characterized in that The method further comprises: receiving second traffic data; the cluster to which the second traffic data belongs has been deleted; The second traffic data is routed.
8. A data interaction device between clusters, characterized in that: The cluster includes a first cluster and other clusters, and the device includes: A receiving module, used for receiving sharding information, where the sharding information is used for indicating the cluster to which the traffic data belongs; A judgment module, configured to judge, after receiving the first traffic data, whether the cluster to which the first traffic data belongs is the first cluster according to the sharding information; a first transmission module, configured to, when it is determined that the cluster to which the first traffic data belongs is the first cluster, route the first traffic data by the first cluster; The second transmission module is used for, when it is determined that the cluster to which the first traffic data belongs is not the first cluster, the first cluster sending the first traffic data to the cluster to which the first traffic data belongs, so that the cluster to which the first traffic data belongs routes the first traffic data.
9. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for data interaction between clusters as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for data interaction between clusters as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data transmission method and streaming data transmission system
CN111970195A
Access flow forwarding method, cluster management method and related devices
CN112565327A
Processing method and device for load balancing of Kubernetes cluster and storage medium
CN113312159A
Cluster communication device and method based on cloud native and related equipment
CN114143313A
Multi-cluster multi-strategy traffic scheduling system
CN115190007A
Cited By
Cross-cluster data processing method and device
CN120011112A