A cross availability zone communication method and related device and cloud network
By introducing availability zone gateways into the cloud network and utilizing the mapping relationship between user instances and network element interfaces for cross-availability zone communication, the problems of low efficiency and high configuration update pressure in cross-availability zone communication are solved, achieving a lightweight and efficient communication solution.
Patent Information
- Application Number
- CN202310338737.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In cloud network architecture, communication between network elements across availability zones suffers from low efficiency and high pressure for configuration updates. Especially when network element deployments change frequently, existing technologies require broadcasting updated configuration information, leading to operational risks.
An availability zone gateway is introduced to enable cross-availability zone communication by storing relevant information of the message receiver. The gateway also stores the mapping relationship between user instances and network element interfaces, reducing information interaction between availability zones. The Geneve protocol is used for message encapsulation and forwarding.
It enables lightweight communication across availability zones, reduces the amount of information processed by network elements, lowers the operational and maintenance pressure, and improves communication efficiency and response speed, making it suitable for cloud network architecture scenarios.
Smart Images

Figure CN116389356B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud network technology, and in particular to a communication method and related apparatus and cloud network that spans availability zones. Background Technology
[0002] In cloud network architecture, Availability Zones (AZs) are commonly used for deployment. An AZ refers to a physical area within the same region where power and network are independent of each other. Network elements or platforms employing AZ-based deployment schemes can provide better disaster recovery capabilities. If one AZ experiences a problem, services can be switched to another AZ within the same region to continue providing services to users.
[0003] A network architecture for a cloud network deployed using the Availability and Range (AZ) approach can be referenced. Figure 1 As shown, in Figure 1 In cloud computing, different regions contain several availability zones (AZs), and these AZs are independent of each other. In most cloud network scenarios, network elements in different AZs do not need to communicate with each other; they only need to provide services within their respective AZs.
[0004] However, in certain scenarios, network elements need to communicate across Availability Zones (AZs). For example, if a region-level network element, such as a Transit Router (TR), connects to two Virtual Private Clouds (VPCs) deployed in different Availability Zones (AZs), then the interfaces (attachments) of the two VPCs will be distributed across two different AZs. TR traffic needs to be routed between TR instances in the two Availability Zones to complete cross-VPC access. Another example is the service chain scenario. If different network elements in the service chain are deployed in different Availability Zones, then it is necessary to connect these network elements across AZs.
[0005] How to effectively solve the problem of connectivity between network elements across Availability Zones (AZs) has become one of the research hotspots in the field of cloud network deployment. Summary of the Invention
[0006] In view of the above problems, the present invention is proposed to provide a cross-availability zone communication method, related apparatus and cloud network that overcomes or at least partially solves the above problems.
[0007] In a first aspect, embodiments of the present invention provide a cross-availability zone communication method, applicable to an availability zone gateway connected to multiple availability zones, including:
[0008] In response to a message forwarded by a first network element in a first availability zone, the second network element in a second availability zone that the message needs to be forwarded to is determined based on the information of the message receiver in the message.
[0009] The message is forwarded to the second network element, so that the second network element processes the message and sends it to the receiving end.
[0010] In one embodiment, in response to a packet forwarded by a first network element in a first availability zone, determining a second network element in a second availability zone that needs to be forwarded based on information from the packet receiver in the packet includes:
[0011] Based on the identifier of the receiving user instance and the network identifier of the virtual private cloud carried in the message, the local routing table is searched, and the interface identifier of the second network element in the second availability zone that the message needs to be forwarded is determined based on the search result; the routing table stores the mapping relationship between the user instance identifier, the network identifier of the virtual private cloud and the interface identifier of the network element in the availability zone.
[0012] In one embodiment, before forwarding the message to the second network element, the method further includes:
[0013] The destination address of the message is modified to the interface identifier of the second network element, and the message is re-encapsulated.
[0014] The step of forwarding the message to the second network element includes:
[0015] Based on the interface identifier of the second network element, the re-encapsulated message is sent to the node corresponding to the interface identifier of the second network element.
[0016] In one embodiment, if an update message for the availability zone network element interface identifier is received, the routing table is updated according to the update message.
[0017] In one embodiment, the method further includes:
[0018] In response to a message forwarded by a first network element in the first availability zone, the system checks whether the address of the receiving end is stored locally based on the information of the receiving end in the message.
[0019] If found, the message is sent to the message receiving end according to the address of the receiving end.
[0020] In one embodiment, the availability zone gateway stores multiple different routes corresponding to the user instance identifier and the virtual private cloud network identifier. Each route includes the next-hop availability zone and the network element interface identifier in the next-hop availability zone.
[0021] Based on the information from the message receiver in the message, determine the second network element of the second availability zone from which the message needs to be forwarded, and forward the message to the second network element, including:
[0022] Based on the next-hop availability zone identifier and the next-hop availability zone network element identifier carried in the message forwarded by the first network element, determine the second network element of the second availability zone for which the message needs to be forwarded;
[0023] The routing table is searched, the interface identifier of the second network element in the second availability zone is selected from multiple routes, the destination address of the packet is modified to the interface identifier of the second network element, the packet is re-encapsulated, and the re-encapsulated packet is sent to the node corresponding to the interface identifier of the second network element according to the interface identifier of the second network element.
[0024] In one embodiment, if the received packet forwarded by the first network element carries a multi-hop availability zone identifier and a corresponding network element identifier, then based on the information of the packet receiver in the packet, the second network element of the second availability zone to which the packet needs to be forwarded is determined, and the packet is forwarded to the second network element, including:
[0025] Based on the availability zone identifier and the network element identifier of the first hop in the multi-hop process carried in the message forwarded by the first network element, the message is forwarded to the first hop network element; the result message returned by the first hop network element after processing the message is received, the result message containing the availability zone identifier and network element identifier of the remaining number of hops in the multi-hop process after removing the availability zone identifier and the network element identifier of the first hop;
[0026] Based on the availability zone identifier and network element identifier of the remaining hops carried in the result message, the result message is forwarded to the first availability zone identifier and the first network element of the remaining hops;
[0027] Repeat the above operation until the message is forwarded and processed by the network element of each available area in the multi-hop.
[0028] Secondly, embodiments of the present invention provide a cross-availability zone communication method, characterized in that the network elements applicable to the availability zone include:
[0029] In response to a message sent by an availability zone gateway received from a network element interface, the message is processed according to a preset procedure, and then sent to the corresponding receiving end based on the receiving end information carried in the message; the availability zone network element is connected to multiple availability zones.
[0030] In one embodiment, sending a message to the corresponding receiver includes:
[0031] Based on the identifier of the receiving user instance and the network identifier of the virtual private cloud carried in the message, the destination address in the message is modified to the address of the receiving end, and the message is sent to the corresponding receiving end.
[0032] In one embodiment, the preset processing includes:
[0033] NAT translation or load balancing.
[0034] In one embodiment, the method further includes:
[0035] In response to an access request from a user instance, the access request is processed, and the resulting message is forwarded to the availability zone gateway through a preset network element interface.
[0036] Thirdly, embodiments of the present invention provide an availability zone gateway, comprising:
[0037] The first receiving module is used to receive packets forwarded by the first network element in the first availability zone;
[0038] The determination module is used to respond to a message forwarded by a first network element in a first availability zone, and determine, based on the information of the message receiver in the message, a second network element in a second availability zone for which the message needs to be forwarded;
[0039] The first sending module is used to forward the message to the second network element, so that the second network element can process the message and send it to the receiving end.
[0040] Fourthly, embodiments of the present invention provide an availability zone network element, wherein the availability zone network element is connected to multiple availability zones, including:
[0041] The second receiving module is used to receive messages sent by the availability zone gateway from the network element interface;
[0042] A processing module is used to perform preset processing on the message;
[0043] The second sending module is used to send the message to the corresponding receiving end according to the receiving end information carried in the message.
[0044] Fifthly, embodiments of the present invention provide a cloud network, including: a first availability zone, a second availability zone, and an availability zone gateway connecting the first availability zone and the second availability zone; a first network element is configured in the first availability zone, and a second network element is configured in the second availability zone, wherein:
[0045] The first network element is used to send the message to the availability zone gateway;
[0046] The availability zone gateway is configured to respond to a message forwarded by a first network element in the first availability zone, determine the second network element in the second availability zone from which the message needs to be forwarded based on the information of the message receiver in the message, and forward the message to the second network element.
[0047] The second gateway is used to respond to a message sent by the availability zone gateway received from the network element interface, perform preset processing on the message, and send the message to the corresponding receiving end according to the receiving end information carried in the message.
[0048] In a sixth aspect, embodiments of the present invention provide a network device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned cross-availability zone communication method, or to execute the aforementioned cross-availability zone communication method.
[0049] In a seventh aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements or performs the aforementioned cross-availability zone communication method.
[0050] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0051] This invention introduces an availability zone gateway into the cloud network architecture. The gateway stores relevant information of the second gateway to which the message receiver belongs, thereby enabling cross-AZ communication from the first availability zone to the second availability zone. Furthermore, each availability zone only needs to store user information within its own availability zone and access point information of the availability zone gateway, without needing to care about access points and user information of other availability zones. This makes the network elements of each availability zone lightweight, allowing them to better focus on core functions such as logic processing, message encapsulation and decapsulation, and message forwarding.
[0052] The availability zone gateway in this embodiment of the invention searches the locally stored routing table based on the identifier of the receiving user instance and the network identifier of the virtual private cloud carried in the message. Based on the search result, it determines the interface identifier of the second network element of the second availability zone that the message needs to be forwarded to. This method routes according to the network element instance carried by the network element and does not rely on the five-tuple information of the message. Compared with the function of traditional gateways, it is more suitable for cloud network architecture scenarios.
[0053] In some embodiments of the present invention, the source end of the message can also participate in a route that specifies one hop or multiple hops. Each hop forwarding will further forward the result message to the next hop via the availability zone gateway, until the last hop, which can better serve scenarios such as service chains.
[0054] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0055] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0056] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0057] Figure 1 A schematic diagram of the network architecture of a cloud network deployed in an Availability Zone (AZ) configuration;
[0058] Figure 2 and Figure 3 A schematic diagram of the network architecture of existing technical solutions for addressing cross-AZ network elements;
[0059] Figure 4 A network architecture diagram of the cross-availability zone communication method provided in this embodiment of the invention;
[0060] Figure 5 A flowchart of the cross-availability zone communication method provided in this embodiment of the invention on the availability zone gateway side;
[0061] Figure 6 A flowchart of the cross-availability zone communication method provided in this embodiment of the invention on the second network element side;
[0062] Figure 7 This is a network architecture diagram corresponding to the example provided in the embodiments of the present invention;
[0063] Figure 8 This is a schematic diagram of the structure of an availability zone gateway provided in an embodiment of the present invention;
[0064] Figure 9 This is a schematic diagram of the structure of the availability zone network element provided in an embodiment of the present invention. Detailed Implementation
[0065] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0066] The inventors of this invention have discovered that, among the existing technical solutions attempting to address cross-AZ network element communication, one solution employs, for example... Figure 2 The network architecture shown is in Figure 2In the network architecture shown, AZ1 and AZ2 are different availability zones. Users 1 and 3 are users of network elements in AZ1, while users 2 and 4 are users of network elements in AZ2. Users can have access points in network elements in different AZs, so network elements in different AZs can serve the same user. For example, user 3 has access points in both AZ1 and AZ2, enabling communication with users 2 and 4 in AZ2. However, in some scenarios, a user only has an access point in network elements within their own AZ. In this case, network elements in other AZs cannot communicate with user 1. For example, network elements in AZ1 can only serve user 1 and cannot directly communicate with user 2, resulting in user 1 and user 2 being unable to communicate with each other.
[0067] Another existing technical solution for addressing cross-AZ network elements refers to the network architecture reference. Figure 3 As shown, in Figure 3 In the network architecture shown, network elements in different Availability Zones (AZs) can communicate across AZs. Regardless of which AZ an element belongs to, it needs to know the node information of all other AZs that can communicate across AZs to communicate with each other. For example, user 1 in AZ1 and user 2 in AZ2 can communicate, and user 3 and user 4 in AZ2 can communicate. When a network element in an AZ fails or changes, all other AZs interacting with that AZ are aware of it. In other words, that AZ (taking AZ2 as an example) needs to notify all other AZs interacting with it in the network (e.g., via broadcast). This causes the AZs in the entire region to need to update their configuration information. In scenarios with a large number of deployed AZs or frequent configuration changes, this may put significant pressure on the configured links or create operational risks.
[0068] Based on the problems found in the prior art, the inventors of this invention have discovered that the problem of cross-AZ communication can be solved by introducing a gateway.
[0069] For example, in this embodiment of the invention, it is referred to as an Availability Zone Gateway (AZ Gateway). The cross-availability zone communication method provided in this embodiment of the invention may have a possible network architecture, which can be referred to... Figure 4 As shown, in Figure 4 In this architecture, each Availability Zone Gateway (AZGateway) connects to different Availability Zones. Different Availability Zones do not communicate directly with each other. Therefore, each AZ does not need to obtain information about other AZ network elements, nor does it need to update the locally stored configuration information when other AZ network elements change.
[0070] The cross-availability zone communication method provided in this embodiment of the invention, for availability zone gateways, refers to... Figure 5 As shown, the communication method includes:
[0071] S51, in response to a message forwarded by a first network element in the first availability zone, determine the second network element in the second availability zone from which the message needs to be forwarded based on the information of the message receiver in the message;
[0072] S52 forwards the message to the second network element so that the second network element can process the message and send it to the receiving end.
[0073] This invention introduces an availability zone gateway into the cloud network architecture. The availability zone gateway stores relevant information of the second gateway to which the message receiver belongs, thereby enabling cross-AZ communication from the first availability zone to the second availability zone. Furthermore, each availability zone only needs to store user information within its own availability zone and access point information of the availability zone gateway, without needing to care about access points and user information of other availability zones. This makes the network elements of each availability zone lightweight, allowing them to better focus on core functions such as logical processing, message encapsulation and decapsulation, and message forwarding.
[0074] In this embodiment of the invention, the aforementioned network element may refer to a single cloud server or a cloud server cluster.
[0075] The first network element in the first availability zone receives the user's ( Figure 4 After receiving an access request from a client in the first network element (the sending end), the first network element processes the request logically and determines whether cross-availability zone forwarding is necessary. If the receiving end of the processing result is connected to the first network element, it can be directly forwarded to the receiving end within the same availability zone. If the receiving end of the processing result is connected to another availability zone, cross-availability zone forwarding is required. In this case, the first network element in the first availability zone will indirectly forward the processing result packet to the receiving end through the availability zone gateway. Figure 4 (The receiving end user in the middle).
[0076] When an availability zone gateway receives a packet forwarded by a first network element, it determines which availability zone network element to forward the packet to based on the information from the receiving end in the packet. In this embodiment of the invention, the availability zone to which the packet needs to be forwarded is referred to as the second availability zone, and the network element to which it needs to be forwarded is referred to as the second network element.
[0077] It should be noted that, in this embodiment of the invention, for the sake of distinction, the two different availability zones are referred to as the first availability zone and the second availability zone, respectively. Network elements within different availability zones with cross-AZ communication needs are referred to as the "first network element" and the "second network element." The first availability zone and the first network element respectively represent the AZ to which the message source belongs and the corresponding network element in a single communication process. The second availability zone and the second network element respectively represent the AZ to which the message receiver belongs and the corresponding network element in a single communication process. The terms "first availability zone" and "second availability zone," and "first network element" and "second network element" are relative. "First" and "second" do not represent a position, level, or other meaning.
[0078] In one embodiment, the availability zone gateway stores a routing table containing a mapping relationship between the user instance identifier, the virtual private cloud network identifier, and the network element interface identifier in the availability zone. Based on this, in step S51 above, in response to a packet forwarded by the first network element in the first availability zone, the second network element in the second availability zone that needs to be forwarded is determined according to the information from the packet receiver in the packet. This can be achieved in the following way:
[0079] Based on the identifier of the receiving user instance and the network identifier of the virtual private cloud (VPC) carried in the message, the local routing table is searched, and the interface identifier of the second network element in the second availability zone that the message needs to be forwarded is determined according to the search result; the routing table stores the mapping relationship between the user instance identifier, the network identifier of the virtual private cloud and the interface identifier of the network element in the availability zone.
[0080] The availability zone gateway in this embodiment of the invention queries the routing table based on the identifier of the user instance at the receiving end and the network identifier of the virtual private cloud to which it belongs. It distinguishes the availability zone and network element of the availability zone that need to be forwarded according to the user instance. This is different from the traditional gateway routing method. It routes according to the network element instance carried by the network element and does not rely on the five-tuple information of the packet. It is more suitable for cloud network architecture scenarios.
[0081] In one embodiment, the interface of the second network element can be, for example, various elastic interfaces (ENIs, Elastic Network Interfaces), such as Fake ENI or Binding ENI, and the interface identifier of the second network element can be, for example, the identifier of Fake ENI or Binding ENI.
[0082] ENI is an elastic network interface (also known as an elastic network card) that is bound to a cloud server within a private network. Multiple ENIs can be bound to a cloud server to achieve multiple available network solutions.
[0083] For the availability zone gateway, it can also receive messages sent by the first network element through its own ENI.
[0084] In one embodiment, the first network element processes the result logically, encapsulates it into a message, and then sends the message to the corresponding forwarding node of the availability zone gateway based on the network interface identifier of the availability zone gateway. The encapsulated message carries the identifier of the receiving end's user instance and the network identifier of the virtual private cloud.
[0085] For an availability zone gateway, after receiving a message forwarded by the first network element in the first availability zone, before forwarding the message to the second network element, in order to accurately send the message to the actual receiving end, it is necessary to modify the destination address of the message to the interface identifier of the second network element and re-encapsulate the message.
[0086] Correspondingly, based on the interface identifier of the second network element, the re-encapsulated message is sent to the node corresponding to the interface identifier of the second network element.
[0087] The encapsulation of packets by the first network element and the availability zone gateway can be accomplished, for example, by using the Generic Network Virtualization Encapsulation (Geneve, defined by the IETF draft). Geneve packets adopt the tunnel encapsulation approach, specifying tunnel endpoints in the packet, so that the destination of the data can be known without accessing the actual data.
[0088] Of course, the embodiments of the present invention are not limited to the above-mentioned protocol for message encapsulation; any network protocol capable of message encapsulation can be used.
[0089] For an Availability Zone (AZ) gateway, it stores the interface identifiers of all network elements in all Availability Zones (AZs) that require cross-AZ communication. Therefore, if the interface of one or more network elements in an AZ changes, it needs to notify the AZ gateway so that the AZ gateway can update its stored information, such as changing the interface identifier of the AZ network element, without broadcasting the change to all AZs. For network elements in an AZ, they only need to store information about user instances within their local AZ and the network interface information of the AZ gateway, without needing to be concerned with information about other Availability Zone network elements and users.
[0090] In addition, in this embodiment of the invention, the availability zone gateway is a stateless network element, that is, it does not need to record the state of the forwarded packets. Therefore, the information processing volume of the availability zone gateway can be greatly reduced, so as to save resources.
[0091] If the second network element's role in the message is only forwarding and does not require pre-processing, then in one embodiment, the message can be forwarded directly from the availability zone gateway to the corresponding user instance without going through the second network element. This eliminates the need for the second network element to hop, reducing message transmission latency and achieving higher response requirements.
[0092] In this scenario, for example, to enable direct forwarding by the availability zone gateway, it's necessary to store the addresses of receivers that require forwarding without the need for a second network element within the availability zone. This can be achieved by storing the receiver's user instance identifier, the network identifier of its virtual private cloud (VPN), and the user instance's address in a corresponding manner. The availability zone gateway checks its local storage for the corresponding receiver address based on the user instance identifier and VPN network identifier in the packet. If the address exists, it forwards the packet directly to that address. If not, it looks up the network interface information of the corresponding second network element in its routing table and forwards the packet to the receiver's address via that second network element.
[0093] In one embodiment, the first network element at the source end can also participate in the routing of a specified availability zone gateway, such as in the following two cases:
[0094] In the first scenario, if the gateway records multiple routes, and if the availability zone gateway has multiple routes for the same user instance, the source packet can specify which route to forward the packet via.
[0095] The availability zone gateway stores multiple different routes corresponding to user instance identifiers and virtual private cloud network identifiers. Each route includes the next-hop availability zone and the network element interface identifier in the next-hop availability zone.
[0096] Based on the information from the message receiver in the message, determine the second network element of the second availability zone from which the message needs to be forwarded, and forward the message to the second network element, including:
[0097] Based on the next-hop availability zone identifier and the next-hop availability zone network element identifier carried in the message forwarded by the first network element, determine the second network element of the second availability zone for which the message needs to be forwarded;
[0098] The routing table is searched, the interface identifier of the second network element in the second availability zone is selected from multiple routes, the destination address of the packet is modified to the interface identifier of the second network element, the packet is re-encapsulated, and the re-encapsulated packet is sent to the node corresponding to the interface identifier of the second network element according to the interface identifier of the second network element.
[0099] In the second scenario, in this embodiment of the invention, the source end can participate in multi-hop routing. However, in traditional gateway forwarding, the source end cannot participate in gateway-side routing, nor can it determine the specific route.
[0100] If a multi-hop route is specified at the source, after each hop forwarding process, the route of that hop will be removed and forwarded back to the availability zone gateway, so that the availability zone gateway can continue forwarding to the next hop, until it is forwarded to the last hop network element and the corresponding receiving end.
[0101] Specifically, if the availability zone gateway receives a packet forwarded by the first network element that carries a multi-hop availability zone identifier and a corresponding network element identifier, then it forwards the packet to the first hop network element according to the first hop availability zone identifier and the first hop network element identifier carried in the multi-hop packet forwarded by the first network element; it receives a result packet returned by the first hop network element after processing the packet, and the result packet contains the availability zone identifier and network element identifier of the remaining number of hops after removing the first hop availability zone identifier and the first hop network element identifier from the multi-hop packet;
[0102] Based on the availability zone identifier and network element identifier of the remaining hops carried in the result message, the result message is forwarded to the first availability zone identifier and the first network element of the remaining hops;
[0103] Repeat the above operation until the message is forwarded and processed by the network element of each available area in the multi-hop.
[0104] For example, if an availability zone gateway receives a packet from network element 1 of AZ1 containing the following multi-hop path: AZ2 network element 2 → AZ3 network element 3 → AZ4 network element 4, then the availability zone network element forwards the packet to the user instance on the AZ2 network element 2 side for processing. After processing, the user instance removes its own hop information and returns the packet to the availability zone gateway. The availability zone gateway then forwards the packet to the next hop, AZ3 network element 3, based on the remaining routing information. AZ3 network element 3 forwards the packet to the corresponding user instance for processing, and similarly removes its own hop routing information, returning the result to the availability zone gateway. The availability zone gateway then forwards the packet again to the final hop, AZ4 network element 4, based on the remaining routing information, to facilitate reception and processing by the user instance at the final hop. This also includes the mapping relationship between the user instance identifier, the virtual private cloud network identifier, and the network element interface identifier in the availability zone.
[0105] The above-mentioned source-end specified routing method is better suited for service chain scenarios, making it easier for each execution node on the service chain to perform its corresponding processing and then forward the results through the availability zone gateway.
[0106] This invention also provides a cross-availability zone communication method, referring to... Figure 6 As shown, it includes:
[0107] S61. In response to a message sent by the availability zone gateway received from the network element interface, perform preset processing on the message;
[0108] S62. Based on the information of the receiving end carried in the message, send the message to the corresponding receiving end; wherein, the above-mentioned availability zone network element is connected to multiple availability zones.
[0109] The above method is applicable to the second network element acting as the receiver.
[0110] In step S62, the destination address in the message can be modified to the address of the receiving end based on the identifier of the receiving end user instance and the network identifier of the virtual private cloud to which it belongs, and the message can be sent to the corresponding receiving end.
[0111] The second network element may perform pre-defined processing on the packets. The type of processing is related to the function definition of the network element, such as performing Network Address Translation (NAT) or load balancing.
[0112] To better illustrate the cross-availability zone communication method provided in the embodiments of the present invention, an example is given below.
[0113] The network architecture corresponding to this instance is as follows: Figure 7 As shown, in this network architecture, network element A is located in AZ1, network element A' is located in AZ2, the AZ gateway connects network element A and network element A', user 1 and user 3 are both connected to network element A, and user 2 is connected to network element A'.
[0114] First scenario:
[0115] User 1 accesses network element A, and network element A processes the request and then directly sends it to user 3.
[0116] Second scenario:
[0117] 1. User 1 accesses network element A.
[0118] 2. After processing its own network element logic, network element A looks up the identifier of the network interface whose next hop is the AZ Gateway, such as a Fake ENI or Binding ENI. Network element A encapsulates user 1's packet using the Geneve protocol and sends it to a forwarding node of the AZ Gateway. The Geneve packet carries information such as user 1's user instance and the VPC it belongs to.
[0119] 3. After receiving the packet, the AZ Gateway uses the user instance and VPC information carried in the Geneve packet to find the Binding ENI information on network element A' that needs to be forwarded. The AZ Gateway re-encapsulates the packet using the Geneve protocol, with the destination address being the identifier of the Binding ENI of network element A', carrying information such as the user instance and VPC, and sends the re-encapsulated Geneve packet to the corresponding node of network element A'.
[0120] 4. After receiving the message, network element A' decapsulates it to obtain the information of the corresponding user instance and the VPC to which it belongs. After processing, it sends the message to the corresponding destination address, i.e., user 2.
[0121] Based on the same inventive concept, embodiments of the present invention also provide an availability zone gateway, an availability zone network element, and a cloud network. Since the principles by which these devices and cloud networks solve problems are similar to the aforementioned cross-availability zone communication methods, the implementation of these devices and cloud networks can refer to the implementation of the aforementioned methods, and repeated details will not be repeated.
[0122] An availability zone gateway is provided in this embodiment of the invention, with reference to... Figure 8 As shown, it includes:
[0123] The first receiving module 81 is used to receive packets forwarded by the first network element in the first availability zone;
[0124] The determination module 82 is used to respond to a message forwarded by a first network element in the first availability zone, and determine the second network element in the second availability zone that the message needs to be forwarded to based on the information of the message receiver in the message;
[0125] The first sending module 83 is used to forward the message to the second network element, so that the second network element can process the message and send it to the receiving end.
[0126] This invention provides an availability zone network element, which is connected to multiple availability zones, as described in the following embodiment. Figure 9 As shown, it includes:
[0127] The second receiving module 91 is used to receive messages sent by the availability zone gateway from the network element interface;
[0128] Processing module 92 is used to perform preset processing on the message;
[0129] The second sending module 93 is used to send the message to the corresponding receiving end according to the receiving end information carried in the message.
[0130] This invention provides a cloud network comprising: a first availability zone, a second availability zone, and an availability zone gateway connecting the first and second availability zones; a first network element is configured in the first availability zone, and a second network element is configured in the second availability zone, wherein:
[0131] The first network element is used to send the message to the availability zone gateway;
[0132] The availability zone gateway is configured to respond to a message forwarded by a first network element in the first availability zone, determine the second network element in the second availability zone from which the message needs to be forwarded based on the information of the message receiver in the message, and forward the message to the second network element.
[0133] The second gateway is used to respond to a message sent by the availability zone gateway received from the network element interface, perform preset processing on the message, and send the message to the corresponding receiving end according to the receiving end information carried in the message.
[0134] An embodiment of the present invention provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the aforementioned cross-availability zone communication method, or executes the aforementioned cross-availability zone communication method.
[0135] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements or performs the aforementioned cross-availability zone communication method.
[0136] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0137] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0140] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A communication method across availability zones, characterized in that, It is applied to availability zone gateways, which store the interface identifiers and routing tables of network elements that need to communicate across availability zones in all the availability zones they are connected to. The routing tables store the mapping relationship between the identifiers of user instances, the network identifiers of virtual private clouds and the interface identifiers of network elements in availability zones. The availability zone gateway is connected to multiple network elements located in different availability zones. The availability zone gateway is a stateless network element, including: In response to a message forwarded by a first network element in a first availability zone, the second network element in a second availability zone that the message needs to be forwarded to is determined based on the information of the message receiver in the message. The message is forwarded to the second network element, so that the second network element processes the message and sends it to the receiving end.
2. The method as described in claim 1, characterized in that, In response to a message forwarded by a first network element in the first availability zone, based on information from the message receiver in the message, a second network element in the second availability zone that needs to be forwarded is determined, including: Based on the identifier of the receiving user instance and the network identifier of the virtual private cloud carried in the message, the local routing table is searched, and the interface identifier of the second network element of the second availability zone to which the message needs to be forwarded is determined according to the search result.
3. The method as described in claim 2, characterized in that, Before forwarding the message to the second network element, the process also includes: The destination address of the message is modified to the interface identifier of the second network element, and the message is re-encapsulated. The step of forwarding the message to the second network element includes: Based on the interface identifier of the second network element, the re-encapsulated message is sent to the node corresponding to the interface identifier of the second network element.
4. The method as described in claim 2 or 3, characterized in that, If an update message for the availability zone network element interface identifier is received, the routing table is updated according to the update message.
5. The method according to any one of claims 1-3, characterized in that, The method further includes: In response to a message forwarded by a first network element in the first availability zone, the system checks whether the address of the receiving end is stored locally based on the information of the receiving end in the message. If found, the message is sent to the message receiving end according to the address of the receiving end.
6. The method as described in claim 1, characterized in that, The availability zone gateway stores multiple different routes corresponding to user instance identifiers and virtual private cloud network identifiers. Each route includes the next-hop availability zone and the network element interface identifier in the next-hop availability zone. Based on the information from the message receiver in the message, determine the second network element of the second availability zone from which the message needs to be forwarded, and forward the message to the second network element, including: Based on the next-hop availability zone identifier and the next-hop availability zone network element identifier carried in the message forwarded by the first network element, determine the second network element of the second availability zone for which the message needs to be forwarded; The routing table is searched, the interface identifier of the second network element in the second availability zone is selected from multiple routes, the destination address of the packet is modified to the interface identifier of the second network element, the packet is re-encapsulated, and the re-encapsulated packet is sent to the node corresponding to the interface identifier of the second network element according to the interface identifier of the second network element.
7. The method as described in claim 6, characterized in that, If the received packet forwarded by the first network element carries a multi-hop availability zone identifier and a corresponding network element identifier, then based on the information of the packet receiver in the packet, the second network element of the second availability zone to which the packet needs to be forwarded is determined, and the packet is forwarded to the second network element, including: Based on the availability zone identifier and the network element identifier of the first hop in the multi-hop process carried in the message forwarded by the first network element, the message is forwarded to the first hop network element; the result message returned by the first hop network element after processing the message is received, the result message containing the availability zone identifier and network element identifier of the remaining number of hops in the multi-hop process after removing the availability zone identifier and the network element identifier of the first hop; Based on the availability zone identifier and network element identifier of the remaining hops carried in the result message, the result message is forwarded to the first availability zone identifier and the first network element of the remaining hops; Repeat the above operation until the message is forwarded and processed by the network element of each available area in the multi-hop.
8. A communication method across availability zones, characterized in that, Applied to network elements in availability zones, the availability zone gateway is connected to multiple network elements located in different availability zones. The availability zone gateway stores the interface identifiers and routing tables of network elements in all the availability zones it connects to that need to communicate across availability zones. The routing table stores the mapping relationship between the user instance identifier, the network identifier of the virtual private cloud, and the interface identifiers of network elements in the availability zone. The availability zone gateway is a stateless network element, including: In response to a message sent by an availability zone gateway received from a network element interface, the message is processed according to a preset procedure, and then sent to the corresponding receiving end based on the receiving end information carried in the message.
9. The method as described in claim 8, characterized in that, Send the message to the corresponding receiver, including: Based on the identifier of the receiving user instance and the network identifier of the virtual private cloud carried in the message, the destination address in the message is modified to the address of the receiving end, and the message is sent to the corresponding receiving end.
10. The method as described in claim 9, characterized in that, The preset processing includes: NAT translation or load balancing.
11. The method according to any one of claims 8-10, characterized in that, The method further includes: In response to an access request from a user instance, the access request is processed, and the resulting message is forwarded to the availability zone gateway through a preset network element interface.
12. An availability zone gateway, characterized in that, The availability zone gateway is connected to multiple network elements located in different availability zones. The availability zone gateway is a stateless network element. The availability zone gateway stores the interface identifiers and routing tables of all network elements in all its connected availability zones that need to communicate across availability zones. The routing table stores the mapping relationship between the user instance identifier, the virtual private cloud network identifier, and the network element interface identifier in the availability zone. include: The first receiving module is used to receive packets forwarded by the first network element in the first availability zone; The determination module is used to respond to a message forwarded by a first network element in a first availability zone, and determine, based on the information of the message receiver in the message, a second network element in a second availability zone for which the message needs to be forwarded; The first sending module is used to forward the message to the second network element, so that the second network element can process the message and send it to the receiving end.
13. An availability zone network element, characterized in that, An availability zone gateway connects to multiple network elements located in different availability zones. The availability zone gateway is a stateless network element. It stores the interface identifiers and routing tables of all network elements in its connected availability zones that require cross-availability zone communication. The routing tables store a mapping relationship between user instance identifiers, virtual private cloud network identifiers, and network element interface identifiers in the availability zones. The second receiving module is used to receive messages sent by the availability zone gateway from the network element interface; A processing module is used to perform preset processing on the message; The second sending module is used to send the message to the corresponding receiving end according to the receiving end information carried in the message.
14. A cloud network, characterized in that, include: First Availability Zone, Second Availability Zone, and Availability Zone Gateway; The availability zone gateway is connected to multiple network elements located in different availability zones. The availability zone gateway is a stateless network element. It stores the interface identifiers and routing tables of network elements in all connected availability zones that require cross-availability zone communication. The routing tables store the mapping relationship between user instance identifiers, virtual private cloud network identifiers, and network element interface identifiers in the availability zones. A first network element is configured in the first availability zone, and a second network element is configured in the second availability zone, wherein: The first network element is used to send the message to the availability zone gateway; The availability zone gateway is used to respond to a message forwarded by a first network element in the first availability zone, and determine the second network element in the second availability zone that the message needs to be forwarded to based on the information of the message receiver in the message; The message is forwarded to the second network element; The second network element is used to respond to a message sent by the availability zone gateway received from the network element interface, perform preset processing on the message, and send the message to the corresponding receiving end according to the receiving end information carried in the message.
15. A network device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the cross-availability zone communication method as described in any one of claims 1-7, or implements the cross-availability zone communication method as described in any one of claims 8-11.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the cross-availability zone communication method as described in any one of claims 1-7, or performs the cross-availability zone communication method as described in any one of claims 8-11.
Citation Information
Patent Citations
Cloud network system, message forwarding method, chip and cloud gateway equipment
CN114726773A