Cloud system based on public cloud service, packet processing method, and related device
By adopting public cloud services in VPC scenarios, using load balancers and message processing clusters, combined with bidirectional consistency hashing algorithms, the problems of VPC communication reliability and configuration complexity are solved, and high performance and high performance are achieved Reliable communication processing.
Patent Information
- Application Number
- PCT/CN2023/136257
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-22
- Filing Date
- 2023-12-04
- Publication Date
- 2024-11-28
AI Technical Summary
In the VPC scenario, it is difficult for the existing technology to effectively ensure communication reliability, and tenants need to perform complex overlay protocol configurations on the load balancer and message processing clusters, affecting system performance and operability.
Adopt a cloud system based on public cloud services, by setting up multiple subnets and routers, using load balancers and message processing clusters for message processing, and using a two-way consistent hashing algorithm to determine the destination node, simplifying the message processing process and avoiding additional header encapsulation and overlay protocol configuration.
It improves communication reliability and performance in VPC scenarios, simplifies the tenant's operation process, reduces the complexity of system configuration, and improves the operability and fault tolerance of cloud systems.
Smart Images

Figure CN2023136257_28112024_PF_FP_ABST
Abstract
Description
Cloud system, message processing method and related device based on public cloud service Technical Field
[0001] The present application relates to the field of cloud technology, and in particular to a cloud system, a message processing method, and related devices based on public cloud services. Background Art
[0002] With the development of communications technology, cloud services have emerged. Virtual private clouds (VPCs) are widely used across various industries. In VPC scenarios, users can build various instances on the VPC and utilize them for business communications. Ensuring communication reliability in VPC scenarios is a hot topic in the industry.
[0003] Summary of the Invention
[0004] This application provides a cloud system, message processing method, and related devices based on public cloud services, which can improve communication reliability in VPC scenarios. The technical solution is as follows:
[0005] In a first aspect, a cloud system based on a public cloud service is provided. The cloud system is provided in an infrastructure that provides the public cloud service. The infrastructure includes multiple data centers, each of which is provided with at least one server. The public cloud service runs on one or more servers in the infrastructure. The cloud system includes:
[0006] The VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is configured with a first virtual instance, the second subnet is configured with a second virtual instance, and the third subnet is configured with a message processing cluster, which includes multiple nodes configured with message processing services.
[0007] The load balancer includes a first elastic network interface (ENI) and a second ENI, wherein the first ENI is connected to the first subnet and the second subnet respectively, and the second ENI is connected to the third subnet.
[0008] The cloud system is used to implement the message processing process based on public cloud services. This message processing process includes both the outbound and return journeys. The following describes the outbound journey of messages by focusing on the process of the cloud system processing request messages.
[0009] The first virtual instance is configured to send a request message to the first ENI, wherein the destination Internet Protocol (IP) address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet;
[0010] The load balancer is configured to receive the request message from the first ENI, determine a destination node from a plurality of nodes based on a source IP address and a destination IP address of the request message, and send the request message to the destination node via the second ENI, wherein the destination node is configured with a message processing rule defined by a tenant of the VPC;
[0011] The destination node is configured to send the request message to the second virtual instance through a router according to the destination IP address of the request message when confirming that the request message complies with the message processing rule.
[0012] From the above, it can be seen that when the first instance in the first subnet in the cloud system provided by this solution sends a request message to the second instance in the second subnet, the message is forwarded to the message processing service node in the third subnet via the first elastic network card ENI and the second ENI. In this way, the message is forwarded through the message processing service node in the third subnet without the need for additional message header encapsulation, which simplifies the message processing operation and improves the performance of the cloud system.
[0013] Among them, the source IP address and destination IP address of the request message are set in the five-tuple of the request message, and the five-tuple of the request message also includes the source port, destination port and transport layer protocol of the request message. Based on this, the load balancer is specifically used to operate on the five-tuple of the request message according to the bidirectional consistent hashing algorithm, and determine the destination node among multiple nodes according to the first operation result generated by the operation. Since the consistent hashing algorithm only needs to reallocate the nodes corresponding to some data streams for the increase or decrease of nodes, and does not need to adjust the nodes corresponding to all data streams, this solution has good fault tolerance and scalability.
[0014] In this solution, the load balancer is further configured to modify the destination media access control (MAC) address of the request message to the MAC address of the destination node and the source MAC address to the MAC address of the second ENI before sending the request message to the destination node via the second ENI.
[0015] This eliminates the need for tenants to configure additional overlay protocols for load balancers and message processing clusters, simplifying operations and improving the operability and performance of the cloud system. In other words, this solution ensures load balancing and reliability for user services without requiring tenants to perform any additional development on their load balancers and message processing clusters.
[0016] Next, the return journey of the message is introduced by the process of the cloud system processing the response message corresponding to the request message.
[0017] The second virtual instance is configured to receive the request message, generate a response message based on the request message, and send the response message to the first ENI, wherein the destination IP address of the response message is the private network address of the first virtual instance in the first subnet, and the source IP address is the private network address of the second virtual instance in the second subnet;
[0018] The load balancer is further configured to receive the response message from the first ENI, determine a destination node from a plurality of nodes according to a source IP address and a destination IP address of the response message, and send the response message to the destination node via the second ENI;
[0019] The destination node is further configured to, when confirming that the response message complies with the message processing rule, send the response message to the first virtual instance through the router according to the destination IP address of the response message.
[0020] Similarly, when the virtual instance in the second subnet transmits a message to the virtual instance in the first subnet, the message is also forwarded through the node in the third subnet, without the need for additional message header encapsulation, which simplifies the message processing operation and improves the performance of the cloud system.
[0021] Among them, the source IP address and destination IP address of the reply message are set in the quintuple of the reply message, and the quintuple of the reply message also includes the source port, destination port and transport layer protocol of the reply message; the load balancer is specifically used to operate the quintuple of the reply message according to the two-way consistent hashing algorithm, and determine the destination node among the multiple nodes according to the second operation result generated by the operation, wherein the numerical values of the first operation result and the second operation result are the same. In this way, the reply message and the request message pass through the same destination node. To put it another way, by introducing the two-way consistent hashing algorithm, the outbound and return trips of the message pass through the same destination node, and no additional information such as tunnels and sessions based on other overlay protocols is recorded, which is conducive to improving performance, simplifying the configuration of the load balancer, and improving reliability.
[0022] In the present application, the destination node is further configured to discard the request message if it is determined that the request message does not comply with the message processing rules, and / or discard the reply message if it is determined that the reply message does not comply with the message processing rules. In this way, the message processing cluster within the third subnet filters the message according to the message processing rules to improve communication security.
[0023] The message processing rules include firewall message filtering rules or security group rules.
[0024] Taking firewall filtering rules as an example, tenants can create multiple firewall nodes in the third subnet as a message processing cluster. In this way, the messages can be securely filtered through the firewall nodes in the third subnet, thereby improving communication security.
[0025] In this application, the cloud system also includes a cloud management platform. The cloud management platform is configured to receive one or more public cloud service configuration instructions input by tenants and, based on the one or more public cloud service configuration instructions, create a VPC, load balancer, and packet processing cluster within the aforementioned infrastructure. This eliminates the need for tenants to perform complex overlay protocol configuration on the load balancer and packet processing cluster, ensuring communication reliability.
[0026] In a second aspect, a method for processing a message based on a public cloud service is provided. The method is applied to an infrastructure providing a public cloud service, the infrastructure including a VPC and a load balancer, wherein the VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, and the third subnet is provided with a message processing cluster, the message processing cluster includes multiple nodes provided with message processing services, and the load balancer includes a first ENI and a second ENI, wherein the first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet. The method includes:
[0027] The first virtual instance sends a request message to the first ENI, wherein the destination IP address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet; the load balancer receives the request message from the first ENI, determines the destination node from multiple nodes based on the source IP address and the destination IP address of the request message, and sends the request message to the destination node via the second ENI, wherein the destination node is set with a message processing rule defined by the tenant of the VPC; after confirming that the request message complies with the message processing rule, the destination node sends the request message to the second virtual instance through a router based on the destination IP address of the request message.
[0028] The second aspect or any implementation of the second aspect is the step implementation of the method corresponding to the first aspect or any implementation of the first aspect. The description in the second aspect or any implementation of the second aspect is applicable to the first aspect or any implementation of the first aspect and will not be repeated here.
[0029] In a third aspect, a configuration method based on a public cloud service is provided. The method is applied to a cloud management platform, where the cloud management platform is used to manage an infrastructure that provides the public cloud service. The infrastructure includes multiple data centers, each of which is provided with at least one server. The public cloud service runs on one or more servers of the infrastructure. The method includes:
[0030] The cloud management platform receives one or more public cloud service configuration instructions input by the tenant;
[0031] The cloud management platform creates a VPC, a load balancing node, and a message processing cluster in the infrastructure according to the one or more public cloud service configuration instructions, wherein the VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively; wherein the first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, and the third subnet is provided with a message processing cluster, the message processing cluster includes multiple nodes provided with message processing services, and the load balancer includes a first ENI and a second ENI, wherein the first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet.
[0032] This solution provides a cloud system that allows tenants to build a multi-node message processing cluster within the third subnet of their VPC. Leveraging these nodes improves message processing reliability. Specifically, tenant traffic can be distributed to multiple next hops after passing through the load balancer—that is, to multiple nodes in the message processing cluster—thus improving communication reliability.
[0033] In a fourth aspect, a cloud management platform is provided. The cloud management platform is used to manage an infrastructure that provides public cloud services. The infrastructure includes multiple data centers, each of which is equipped with at least one server. The public cloud service runs on one or more servers in the infrastructure. The cloud management platform includes:
[0034] A configuration instruction receiving module, configured to receive one or more public cloud service configuration instructions input by a tenant;
[0035] A cloud system creation module is used to create a VPC, a load balancing node, and a message processing cluster in the infrastructure according to the one or more public cloud service configuration instructions, wherein the VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively; wherein the first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, and the third subnet is provided with a message processing cluster, the message processing cluster includes multiple nodes provided with message processing services, and the load balancer includes a first ENI and a second ENI, wherein the first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet.
[0036] In a fifth aspect, the present application provides a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method disclosed in the second aspect and any possible implementation of the second aspect.
[0037] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computer device cluster, enables the computer device cluster to implement the method disclosed in the second aspect and any possible implementation manner of the second aspect.
[0038] In a seventh aspect, the present application provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method disclosed in the second aspect and any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] FIG1 is an architectural diagram of a cloud data center provided in an embodiment of the present application;
[0040] FIG2 is a diagram of a cloud system architecture based on a public cloud service provided in an embodiment of the present application;
[0041] FIG3 is a workflow diagram of a cloud system provided in an embodiment of the present application;
[0042] FIG4 is an architecture diagram of a VPC system provided in an embodiment of the present application;
[0043] FIG5 is an architecture diagram of another VPC system provided in an embodiment of the present application;
[0044] FIG6 is a flowchart of a method for processing messages based on a public cloud service according to an embodiment of the present application;
[0045] FIG7 is a flowchart of another method for processing messages based on a public cloud service according to an embodiment of the present application;
[0046] FIG8 is a flowchart of another method for processing messages based on a public cloud service according to an embodiment of the present application;
[0047] FIG9 is a schematic diagram of the processing logic of a load balancer provided in an embodiment of the present application;
[0048] FIG10 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0049] FIG11 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0050] FIG12 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application;
[0051] FIG13 is a flowchart of a configuration method based on a public cloud service provided in an embodiment of the present application;
[0052] FIG14 is a schematic diagram of the structure of a cloud management platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0054] First, the terms involved in the embodiments of this application are explained:
[0055] Container (Docker): Utilizes the namespace and control groups (Cgroup) technologies supported by the operating system kernel (such as the Linux kernel) to isolate the application process and its dependent packages (the bins / libs of the operating environment, specifically including all files required to run the application) in an independent operating environment.
[0056] A virtual machine (VM) is a complete computer system that simulates complete hardware system functions through software and runs in a completely isolated environment. Anything that can be done on a server can also be done on a VM. When creating a VM on a server, part of the physical machine's hard drive and memory capacity is used as the VM's hard drive and memory capacity. Each VM has its own independent hard drive and operating system, and users can operate the VM just like they would on a server.
[0057] Virtual Private Cloud: A Virtual Private Cloud (VPC) is an isolated, private virtual network environment applied by tenants on the cloud.
[0058] Elastic Load Balancing: Elastic Load Balancing (ELB) automatically distributes access traffic to multiple cloud servers, expanding the application system's external service capabilities and achieving a higher level of application fault tolerance.
[0059] Consistent Hashing Algorithm: By optimizing the traditional hashing algorithm, it minimizes the impact on existing hash results and maintains a good balance in the event of backend node failure or expansion.
[0060] Next, the technical background of the embodiments of the present application is briefly introduced.
[0061] In traditional physical network technology, when a packet destined for the same IP address or network segment can choose multiple paths with the same cost, equal-cost multi-path (ECMP) is formed. Network devices hash the packet's five-tuple and select a path to send the packet. ECMP technology allows users to distribute their workloads across multiple back-end servers, achieving load balancing without an intermediary.
[0062] In the VPC scenario, all messages in the VPC intranet are forwarded based on deterministic table entries. That is, the next hop of a certain IP address / network segment is the device corresponding to the specific IP / MAC address. There is no ability for one IP address / network segment to correspond to multiple next hops, and communication reliability is low.
[0063] This solution provides a cloud system that allows tenants to build a load balancer and a multi-node message processing cluster. This allows tenants to direct their traffic to multiple next hops (i.e., nodes) after passing through the load balancer, thereby improving communication reliability. Furthermore, this solution eliminates the need for tenants to perform additional overlay protocol configuration on the load balancer and message processing cluster, simplifying tenant operations and enhancing the operability and performance of the cloud system.
[0064] Next, the cloud system based on public cloud services, the message processing method, the cloud management platform and the configuration method based on public cloud services provided in the embodiments of the present application are introduced.
[0065] The embodiments of the present application provide a cloud system and message processing method based on public cloud services, which are used to improve the reliability of tenants' business communications. Detailed descriptions are provided below.
[0066] FIG1 is an architectural diagram of a cloud data center provided in an embodiment of the present application. Referring to FIG1 , a cloud data center 101 includes a cloud management platform 20, an internal data center network 30 (which may be implemented via a switch), multiple clients, and multiple servers. FIG1 illustrates two clients and four servers as an example, for example, client 21 and client 22, and servers 1011, 1021, 1012, and 1022. Servers 1011, 1021, 1012, and 1022 interact with the cloud management platform 20 via the internal data center network via network cards 10116, 10216, 10126, and 10226, respectively. The cloud management platform 20 interacts with the multiple clients via the Internet 40.
[0067] Taking server 1011 as an example, server 1011 comprises software and hardware layers. The host operating system 10113 on the software layer includes a cloud instance manager 101131, which runs a cloud management platform client 1011311. The software layer also runs virtual instances such as virtual instance 10111 and virtual instance 10112. The hardware layer includes memory 10114, processor 10115, hard disk 10117, and network card 10116, all interconnected via a bus.
[0068] Server 1021, server 1012 and server 1022 have similar structures to server 1011, which will not be described in detail here.
[0069] Each virtual instance may be, for example, a virtual machine (VM) or a container, and correspondingly, the virtual instance manager may be a virtual machine manager or a container manager.
[0070] Specifically, the cloud management platform 20 provides an access interface, such as a configuration interface for tenant configuration or an application program interface (API) for tenant configuration. Tenants of the cloud data center 101 can operate client 21 or client 22 to remotely access the access interface, register a cloud account and password on the cloud management platform 20, and log in to the cloud management platform 20. After the cloud management platform 20 successfully authenticates the cloud account and password, the tenant can further pay to select and purchase a virtual instance of specific specifications (processor, memory, disk) on the cloud management platform 20. After the payment is successfully purchased, the cloud management platform 20 provides the remote login account and password of the purchased virtual instance. Client 21 or client 22 can remotely log in to the virtual instance and install and run the tenant's application in the virtual instance. The cloud management platform client receives the control plane commands sent by the cloud management platform 20 and creates and manages the virtual instance throughout its life cycle on the host machine according to the control plane control commands. Therefore, the tenant can create, manage, log in to, and operate the virtual instance in the cloud data center 101 through the cloud management platform 20.
[0071] The following describes the cloud system based on public cloud services, message processing, configuration method based on public cloud services, and cloud management platform provided in the embodiments of the present application in combination with the architecture of the above-mentioned cloud data center.
[0072] Figure 2 is a diagram of a cloud system architecture based on a public cloud service, according to an embodiment of the present application. The cloud system is deployed within an infrastructure that provides public cloud services. The infrastructure includes multiple data centers, each of which is equipped with at least one server. The public cloud service runs on one or more of these servers. Each data center can be implemented in part or in whole by cloud data center 101 shown in Figure 1.
[0073] Referring to Figure 2, the cloud system includes a virtual private cloud (VPC) and a load balancer, wherein:
[0074] The VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is configured with a first virtual instance, the second subnet is configured with a second virtual instance, and the third subnet is configured with a message processing cluster. The message processing cluster includes multiple nodes configured with message processing services, such as node 1 to node N, where N is an integer not less than 1. These multiple nodes may also be referred to as multiple backend service nodes.
[0075] The load balancer (also called a load balancing node) includes a first elastic network interface (ENI) and a second elastic network interface (ENI). The first ENI is connected to the first and second subnets, respectively, and the second ENI is connected to the third subnet. The first ENI is, for example, a northbound network interface (NIC), and the second ENI is, for example, a southbound network interface (NIC).
[0076] The IP address of the second ENI and the IP addresses of the multiple backend service nodes belong to the network segment of the third subnet.
[0077] Based on the structure of the above cloud system, the embodiments of the present application further disclose a workflow based on the cloud system, as detailed below:
[0078] Please refer to Figure 3 to further illustrate the workflow of the cloud system provided in the embodiment of the present application. Referring to Figure 3, the workflow includes the outbound and return leg of a message. The outbound leg includes the processing of a request message, and the return leg includes the processing of a response message.
[0079] During the outbound message, the first virtual instance sends a request message to the first ENI, where the destination IP address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet. The load balancer receives the request message from the first ENI, determines the destination node from the multiple nodes mentioned above based on the source IP address and destination IP address of the request message, and sends the request message to the destination node via the second ENI. The destination node is configured with message processing rules defined by the tenants of the VPC. If the destination node confirms that the request message complies with the message processing rules, it sends the request message to the second virtual instance via a router based on the destination IP address of the request message. The second virtual instance receives the request message.
[0080] During the return journey, the second virtual instance generates a response message based on the request message and sends it to the first ENI. The destination IP address of the response message is the private network address of the first virtual instance in the first subnet, and the source IP address is the private network address of the second virtual instance in the second subnet. The load balancer receives the response message from the first ENI, determines the destination node from the multiple nodes based on the source and destination IP addresses of the response message, and sends the response message to the destination node via the second ENI. If the destination node confirms that the response message complies with the message processing rules, it forwards the response message to the first virtual instance via the router based on the destination IP address of the response message.
[0081] It should be understood that the outbound and return legs of the message may pass through the same destination node in the third subnet, or may pass through different destination nodes in the third subnet. In other words, the request message and the response message may pass through the same destination node, or may pass through different destination nodes.
[0082] For example, the source IP address and destination IP address of the request message are set in the five-tuple of the request message, and the five-tuple also includes the source port, destination port and transport layer protocol of the request message. The load balancer operates on the five-tuple of the request message according to a two-way consistent hashing algorithm, and determines the destination node among the above-mentioned multiple nodes according to the first operation result generated by the operation. Correspondingly, the source IP address and destination IP address of the reply message are set in the five-tuple of the reply message, and the five-tuple also includes the source port, destination port and transport layer protocol of the reply message. The load balancer operates on the five-tuple of the reply message according to a two-way consistent hashing algorithm, and determines the destination node among the above-mentioned multiple nodes according to the second operation result generated by the operation, wherein the numerical values of the first operation result and the second operation result are the same. In this way, the destination node passed by the request message is the same as the destination node passed by the reply message.
[0083] For example, if the load balancer performs operations on the quintuples of the request and response messages using a non-bidirectional consistent hashing algorithm or other hashing algorithm, the values of the first and second operation results may be different. As a result, the destination node that the request message passes through may be different from the destination node that the response message passes through.
[0084] Optionally, the above-mentioned message processing rules include firewall message filtering rules or security group rules or other processing rules.
[0085] The destination node is further configured to discard the request message if it is determined that the request message does not comply with the message processing rules, and / or discard the reply message if it is determined that the reply message does not comply with the message processing rules. For example, if the message processing rules are firewall message filtering rules, and the destination node is a firewall node, the firewall node will, upon confirming that the request message does not comply with the firewall message filtering rules, denote that the request message is an abnormal message and discard the request message.
[0086] In an embodiment of the present application, before sending the request message to the destination node via the second ENI, the load balancer modifies the destination MAC address of the request message to the MAC address of the destination node and the source MAC address to the MAC address of the second ENI. Similarly, before sending the reply message to the destination node via the second ENI, the load balancer modifies the destination MAC address of the reply message to the MAC address of the destination node and the source MAC address to the MAC address of the second ENI. In this way, by modifying the MAC address, the load balancer can send the message (request message or reply message) to the destination node via the second ENI through Layer 2 forwarding without encapsulating an additional virtual local area network (VLAN) header based on an additional overlay protocol. After receiving the message, the destination node can obtain the quintuple of the message without additional decapsulation, so as to continue transmitting the message based on the quintuple.
[0087] In related technologies, the load balancer must also encapsulate a VLAN header on the message and transmit the message through the overlay tunnel between the load balancer and the destination node. Accordingly, after receiving the message, the destination node must also decapsulate the VLAN header to obtain the message's five-tuple.
[0088] It should be noted that the content of the workflow of the above-mentioned cloud system is only an example, and the content of the workflow of the cloud system is not limited here.
[0089] From the above introduction to the workflow of the cloud system, it can be seen that a key point of this solution lies in the message processing logic of the message processing cluster and load balancer within the VPC. Based on this, the embodiment of this application further discloses the VPC system. Next, please refer to Figures 4 and 5 to introduce the VPC system.
[0090] FIG4 is an architectural diagram of a VPC system provided in an embodiment of the present application. The VPC system is part of the aforementioned cloud system. Referring to FIG4 , the VPC system includes a controller, multiple load balancers, a message processing cluster (not shown), and first and second ENIs of the multiple load balancers. The controller is configured to select a load balancer from the multiple load balancers to process the request message or response message according to a load balancing policy. Accordingly, the multiple load balancers are configured to share tenant traffic according to the load balancing policy.
[0091] The controller may be a software defined network (SDN) controller or other forms of controllers.
[0092] Figure 5 is an architectural diagram of another VPC system provided in an embodiment of the present application. Figure 5 differs from Figure 4 in that the multiple load balancers shown in Figure 5 are distributed across at least two availability zones (AZs), including a first AZ in which the first ENI is located; and the controller is specifically configured to determine, based on identification information of the first AZ, a load balancer located in the first AZ from the multiple load balancers, and select a load balancer from the load balancers located in the first AZ to process the request message or response message.
[0093] In an embodiment of the present application, the cloud system further includes a cloud management platform (not shown in FIG2 ). The cloud management platform is configured to receive one or more public cloud service configuration instructions input by a tenant and, based on the one or more public cloud service configuration instructions, create a VPC, a load balancer, and a message processing cluster on the aforementioned infrastructure. The cloud management platform may be the cloud management platform shown in FIG1 .
[0094] The load balancer and cloud management platform described above can be implemented in software or hardware. For example, the following describes the implementation of a load balancer, using the load balancer as an example. Similarly, the implementation of a cloud management platform can refer to the implementation of a load balancer.
[0095] As an example of a software functional unit, a load balancer may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, a load balancer may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, and each AZ includes one data center or multiple data centers with close geographical locations. Typically, a region may include multiple AZs.
[0096] Similarly, multiple hosts / virtual machines / containers running the code can be distributed across the same load balancer or across multiple load balancers. Typically, a load balancer is deployed within a region. Cross-region communication between load balancers within the same region, or between load balancers in different regions, requires a communication gateway within each load balancer to interconnect the load balancers.
[0097] As an example of a hardware functional unit, a load balancer may include at least one computing device, such as a server. Alternatively, the load balancer may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0098] The multiple computing devices included in a load balancer can be distributed in the same region or in different regions. The multiple computing devices included in a load balancer can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in a load balancer can be distributed in the same load balancer or across multiple load balancers. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0099] It should be understood that the network architecture, system architecture, and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture, system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0100] Next, the message processing method based on public cloud service provided by the embodiment of the present application is introduced.
[0101] Figure 6 is a flowchart of a message processing method based on a public cloud service provided in an embodiment of the present application. The method is applied to an infrastructure that provides public cloud services, and the infrastructure includes a VPC and a load balancer, wherein the VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, the third subnet is provided with a message processing cluster, the message processing cluster includes a plurality of nodes provided with message processing services, and the load balancer includes a first ENI and a second ENI. The first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet. Please refer to Figure 6, the method includes the following steps.
[0102] Step 601: The first virtual instance sends a request message to the first ENI, wherein the destination IP address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet.
[0103] As can be seen from the foregoing, this solution includes the outbound and return journeys of the message, and steps 601 to 603 correspond to the outbound journey of the message, ie, the processing of the request message.
[0104] A tenant wants to send a request message from a first virtual instance in a first subnet to a second virtual instance in a second subnet. The first virtual instance first sends the request message to the first ENI of the load balancer in the cloud system. The first ENI is a northbound network interface card (NIC), which serves as the entry point for user traffic and receives user traffic.
[0105] The source IP address of the request message is the private network address of the first virtual instance in the first subnet, and the destination IP address is the private network address of the second virtual instance in the second subnet.
[0106] Generally speaking, the request message also includes a source MAC address and a destination MAC address. The source MAC address in the request message obtained by the first virtual instance is the MAC address of the first virtual instance, and the destination MAC address is the MAC address of the first ENI. In addition, the request message also includes the source port, destination port, transport layer protocol, and payload. Among them, the source IP address, destination IP address, source port, destination port, and transport layer protocol constitute the quintuple of the request message. For an introduction to the quintuple, please refer to the relevant technology and will not be introduced in detail here.
[0107] Step 602: The load balancer receives the request message from the first ENI, determines the destination node among multiple nodes in the message processing cluster based on the source IP address and destination IP address of the request message, and sends the request message to the destination node via the second ENI, wherein the destination node is set with the message processing rules defined by the tenant of the VPC.
[0108] After the first virtual instance sends the request message to the first ENI, the load balancer receives the request message from the first ENI. The load balancer parses the request message to obtain the source IP address and destination IP address of the request message. Based on the source IP address and destination IP address of the request message, the load balancer determines the destination node from among the multiple nodes in the message processing cluster.
[0109] As can be seen from the foregoing, the source IP address and destination IP address of the request message are set in the request message's quintuple, which also includes the request message's source port, destination port, and transport layer protocol. Based on this, the load balancer operates on the request message's quintuple using a bidirectional consistent hashing algorithm and determines the destination node from the multiple nodes based on the first operation result generated by the operation.
[0110] For example, the consistent hashing algorithm organizes the entire hash space into a virtual ring in a clockwise direction. The virtual ring is called a hash ring. The hash ring has 2 32 The load balancer uses a two-way consistent hashing algorithm to calculate the five-tuple of the request message and obtain a hash value. The load balancer determines the position of each node in the hash ring based on the IP address or host name or other information of each node in the multiple nodes, thereby allocating the entire hash space to the multiple nodes. 32 The position of the modulo value on the hash ring is determined. The node is searched in a clockwise direction from the determined position, and the first node encountered is recorded as the destination node.
[0111] The consistent hashing algorithm only requires repositioning some nodes on the hash ring to adjust the positions of nodes, rather than adjusting the positions of all nodes. This provides good fault tolerance and scalability. For an introduction to the consistent hashing algorithm, please refer to the related technologies.
[0112] Of course, the load balancer may also use other methods to select a node from the multiple nodes as the destination node corresponding to the request message, for example, using a traditional hash algorithm, random selection, or sequential selection to select a node.
[0113] After determining the destination node, the load balancer sends the request message to the destination node via the second ENI.
[0114] In this embodiment of the present application, before sending the request message to the destination node via the second ENI, the load balancer modifies the destination MAC address of the request message to the destination node's MAC address and the source MAC address to the MAC address of the second ENI. This allows the second ENI to transmit the request message to the destination node via Layer 2 forwarding. Upon receiving the request message, the destination node parses it according to traditional communication protocols. This solution ensures load balancing and reliability for user services without requiring tenants to perform any additional development on their nodes.
[0115] However, the related art requires the load balancer to encapsulate the message with an additional VLAN header, and transmit the message through an additional overlay tunnel created between the load balancer and the destination node. Accordingly, multiple tenant nodes also need to develop additional kernel modules to identify the overlay-encapsulated messages sent by the load balancer. That is, after receiving the message, the destination node needs to decapsulate the VLAN header to obtain the message's five-tuple and send it to the user-mode process for processing. In addition, because the related art requires an additional overlay tunnel and VLAN encapsulation, it also needs to record additional tunnel information and session information within the tunnel. This introduces session performance issues, and when the session exceeds the node's processing capacity, it can cause node failure. This shows that the related art places high demands on tenants. However, most tenants simply deploy their services on backend service nodes without modifying or even understanding the node's kernel behavior, which is detrimental to the widespread use of the related art. This solution can alleviate these problems.
[0116] Optionally, the load balancer determines the first instance to which the destination node belongs based on the identification information of the destination node; the load balancer searches for a first mapping relationship corresponding to the first instance from multiple mapping relationships based on the identification information of the first instance; the load balancer searches for the MAC address of the destination node from the first mapping relationship, and the first mapping relationship includes the MAC addresses of the above-mentioned multiple nodes.
[0117] As can be seen from the foregoing, the cloud system also includes a cloud management platform. The cloud management platform receives a first instance construction request (including at least one public cloud service configuration instruction) input by the tenant. The first instance construction request indicates multiple nodes of the above-mentioned message processing cluster. The cloud management platform builds a first instance in the first subnet based on the first instance creation request, and generates a first mapping relationship. The first instance includes the above-mentioned multiple nodes. That is, in the process of creating an instance in the third subnet of the VPC, a mapping relationship is generated that stores the MAC address of the corresponding node. This makes it easier to find the MAC address of the target node from the corresponding mapping relationship according to the identifier of a certain instance. It should be understood that one instance can correspond to one mapping relationship.
[0118] In addition, the cloud management platform receives a load balancing service request (including at least one public cloud service configuration instruction) from the tenant. The load balancing service request indicates the third subnet. Based on the load balancing service request, the cloud management platform creates a second ENI with an IP address belonging to the third subnet. In other words, when the user requests the load balancing service provided by the VPC system, an ENI is created in the same subnet as the tenant's backend service nodes.
[0119] In some embodiments, a tenant may request to set up an instance at the same time as requesting the load balancing service. In this case, the load balancing service request and the first instance setup request may be the same request. In other embodiments, a tenant may first request to obtain the load balancing service and then request to set up an instance. In this case, the load balancing service request and the first instance setup request may be different requests.
[0120] The second ENI in this article is a southbound network card, which serves as the user traffic egress and is used to send user traffic to the tenant's backend service node.
[0121] To ensure the reliability of user services, multiple load balancers are used to distribute tenant traffic according to a load balancing policy. In one implementation, a controller corresponds to each of the multiple load balancers. After the first ENI receives the request message, the controller selects a load balancer from the multiple load balancers according to the load balancing policy to process the request message. In other words, the selected load balancer executes step 602. Of course, the controller may also select a load balancer according to other policies, such as random selection or sequential selection.
[0122] As can be seen from the foregoing, the multiple load balancers may be distributed across at least two AZs, including the first AZ, in which the first ENI is located. Based on the identification information of the first AZ, the controller determines a load balancer located in the first AZ from among the multiple load balancers, selects a load balancer from among the load balancers located in the first AZ, and executes step 602 above with the selected load balancer. In other words, the controller selects a load balancer based on proximity, which improves packet processing efficiency and overall performance.
[0123] If there is more than one load balancer located in the first AZ, the controller may select a load balancer from the load balancers located in the first AZ according to any load balancing strategy or other strategies.
[0124] Step 603: When the destination node confirms that the request message complies with the message processing rule, the destination node sends the request message to the second virtual instance through the router according to the destination IP address of the request message.
[0125] The destination node is configured with packet processing rules defined by the tenant of the VPC. The packet processing rules include firewall packet filtering rules, security group rules, or other rules.
[0126] Taking the message processing rules including firewall message filtering rules as an example, when the target node confirms that the request message complies with the firewall message filtering rules, it sends the request message to the second virtual instance through the router according to the destination IP address of the request message.
[0127] As can be seen from the foregoing, after receiving the request message, the destination node parses the request message according to traditional communication protocols to obtain the request message's five-tuple, including the destination IP address. The destination node then searches the routing table to confirm that the next-hop network device to the destination IP address is a router, and then transmits the request message to the second virtual instance through the router.
[0128] The destination node discards the request message when determining that the request message does not comply with the message processing rule.
[0129] Still taking the example of the message processing rules including the firewall message filtering rules, when the destination node confirms that the request message does not comply with the firewall message filtering rules, it means that the request message may be an abnormal message, and the destination node discards the request message to ensure the communication security of the tenant.
[0130] After the destination node sends the request message to the second virtual instance, the second virtual instance receives the request message and generates a response message based on the request message. Next, the response message processing process, that is, the message return process, is introduced.
[0131] Referring to FIG. 7 , the above-mentioned message processing method based on public cloud service further includes the following steps.
[0132] The specific contents of steps 701 to 703 are similar to those of steps 601 to 603 and are not repeated here.
[0133] Step 704: The second virtual instance sends a response message to the first ENI, wherein the destination IP address of the response message is the private network address of the first virtual instance in the first subnet, and the source IP address is the private network address of the second virtual instance in the second subnet.
[0134] It should be understood that the process of the second virtual instance sending a response message to the first ENI is similar to the process of the first virtual instance sending a request message to the first ENI.
[0135] The source MAC address in the response message generated by the second virtual instance is the MAC address of the second virtual instance, and the destination MAC address is the MAC address of the first ENI. The response message also includes the source port, destination port, transport layer protocol, and payload. The source IP address, destination IP address, source port, destination port, and transport layer protocol constitute the five-tuple of the response message.
[0136] Step 705: The load balancer receives the response message from the first ENI, determines the destination node among the multiple nodes according to the source IP address and the destination IP address of the response message, and sends the response message to the destination node via the second ENI.
[0137] After the second virtual instance sends the response message to the first ENI, the load balancer receives the response message from the first ENI. The load balancer parses the response message to obtain the source IP address and destination IP address of the response message. Based on the source IP address and destination IP address of the response message, the load balancer determines the destination node among the multiple nodes in the message processing cluster.
[0138] As can be seen from the foregoing, the source IP address and destination IP address of the reply message are set in the reply message's five-tuple, which also includes the reply message's source port, destination port, and transport layer protocol. Based on this, the load balancer operates on the reply message's five-tuple using a bidirectional consistent hashing algorithm and determines the destination node from the multiple nodes based on the second operation result generated by the operation. The first operation result and the second operation result have the same numerical value, so the reply message and the request message pass through the same destination node.
[0139] Of course, the load balancer may also use other methods to select a node from the multiple nodes as the destination node corresponding to the response message, for example, using a traditional hash algorithm, random selection, or sequential selection to select a node.
[0140] After determining the destination node, the load balancer sends the response message to the destination node via the second ENI.
[0141] In this embodiment of the present application, before sending the response message to the destination node via the second ENI, the load balancer modifies the destination MAC address of the response message to the destination node's MAC address and the source MAC address to the second ENI's MAC address. This allows the second ENI to transmit the response message to the destination node via Layer 2 forwarding. Upon receiving the response message, the destination node parses it using traditional communication protocols. This solution ensures load balancing and reliability for user services without requiring tenants to perform any additional development on their nodes.
[0142] Optionally, the load balancer determines the first instance to which the destination node belongs based on the identification information of the destination node; the load balancer searches for a first mapping relationship corresponding to the first instance from the multiple mapping relationships above based on the identification information of the first instance; the load balancer searches for the MAC address of the destination node from the first mapping relationship, and the first mapping relationship includes the MAC addresses of the above multiple nodes.
[0143] As can be seen from the foregoing, to ensure the reliability of user services, there are multiple load balancers, which are used to share tenant traffic. Each of these multiple load balancers corresponds to a controller. In one implementation, after the first ENI receives the response message, the controller selects a load balancer from the multiple load balancers according to the load balancing policy to process the request message. That is, the selected load balancer executes step 605. Of course, the controller can also select a load balancer according to other policies, such as random selection or sequential selection.
[0144] In the case where the multiple load balancers are located in multiple AZs, the controller may also select a load balancer according to a proximity principle similar to that introduced in step 602, thereby improving the packet processing efficiency.
[0145] Step 706: When the destination node confirms that the response message complies with the message processing rule, the destination node sends the response message to the first virtual instance through the router according to the destination IP address of the response message.
[0146] Taking the message processing rules including firewall message filtering rules as an example, when the target node confirms that the response message complies with the firewall message filtering rules, it sends the response message to the first virtual instance through the router according to the destination IP address of the response message.
[0147] As can be seen from the foregoing, after receiving the response message, the destination node parses the response message according to a traditional communication protocol to obtain the response message's five-tuple, including the destination IP address. The destination node then searches the routing table to confirm that the next-hop network device to the destination IP address is a router, and transmits the response message to the first virtual instance via the router.
[0148] The destination node discards the response message when confirming that the response message does not comply with the message processing rule.
[0149] Still taking the example of the message processing rules including firewall message filtering rules, when the destination node confirms that the reply message does not comply with the firewall message filtering rules, it indicates that the reply message may be an abnormal message, and the destination node discards the reply message to ensure the communication security of the tenant.
[0150] To improve the reliability of this solution, the load balancer regularly detects the connectivity between each of the multiple nodes and the load balancer. Based on this connectivity, the load balancer maintains node information for the multiple nodes. Connectivity indicates whether the corresponding node is experiencing anomalies. Simply put, the load balancer performs health checks on the multiple nodes.
[0151] Next, please refer to Figure 8 to exemplify the message processing method based on public cloud service provided in an embodiment of the present application.
[0152] Figure 8 is a flowchart of another method for message processing based on a public cloud service provided by an embodiment of the present application. In Figure 8, the private network address / subnet mask of the VPC is, for example, 10.0.0.0 / 16, and three subnets are deployed in the VPC, including subnet 01, subnet 02, and subnet 03. The private network addresses / subnet masks of subnet 01, subnet 02, and subnet 03 are 10.0.0.1 / 24, 10.0.1.0 / 24, and 10.0.2.0 / 24, respectively. The tenant creates at least one virtual instance in subnet 01, including VM1, and creates at least one virtual instance in subnet 02, including VM2. A firewall cluster is created in subnet 03, which serves as a message processing cluster. The firewall cluster includes multiple firewall nodes, and each firewall node is provided with firewall message filtering rules. The first ENI in the VPC system is a northbound ENI, and the second ENI is a southbound ENI. The IP address of the southbound ENI and the IP address of the firewall cluster both belong to the network segment corresponding to subnet 03.
[0153] Subnet 01, Subnet 02, and Subnet 03 are configured with routing tables 1, 2, and 3, respectively. Routing table 1 indicates that the next hop for routes to 10.0.1.0 / 24 is the northbound ENI, and the next hop for routes to 10.0.0.0 / 16 is the local address. Routing table 2 indicates that the next hop for routes to 10.0.0.0 / 24 is the northbound ENI, and the next hop for routes to 10.0.0.0 / 16 is the local address. Routing table 3 indicates that the next hop for routes to 10.0.0.0 / 16 is the local address.
[0154] When VM1 in subnet 01 accesses VM2 in subnet 02, the traffic must be filtered by the firewall cluster deployed in subnet 03. The traffic returned by VM2 in subnet 02 to VM1 in subnet 01 must also be filtered by the firewall cluster, and the outbound and return packets of the same flow must pass through the same firewall node.
[0155] This example includes the following steps:
[0156] a1. When a tenant purchases a routed load balancing service within a VPC, the VPC system attaches the northbound ENI to subnet 01 and the southbound ENI to subnet 03 based on the tenant's load balancing service request.
[0157] a2. Based on the tenant's instance creation request, the VPC system sets up a firewall cluster in subnet 03 and configures health checks for it.
[0158] a3. Set the consistent hashing algorithm on the load balancer and select the bidirectional consistent hashing algorithm.
[0159] a4. In the routing table of Subnet 01, configure the next hop for routes to Subnet 02 as the northbound ENI. In the routing table of Subnet 02, configure the next hop for routes to Subnet 01 as the northbound ENI.
[0160] b1. A request packet from VM1 in subnet 01 is transmitted to the load balancer via the northbound ENI. The source IP address of the request packet received by VM1 is 10.0.0.1, the destination IP address is 10.0.1.1, the source port is 3000, the destination port is 80, the source MAC address is VM1's MAC address, and the destination MAC address is the MAC address of the northbound ENI. 10.0.0.1 is VM1's private network address, and 10.0.1.1 is VM2's private network address.
[0161] b2. Based on the request message, the load balancer selects a firewall node as the destination node according to the two-way consistent hashing algorithm, such as selecting firewall 01 as the destination node.
[0162] b3. The load balancer modifies the source MAC address of the request message to the MAC address of the southbound ENI and the destination MAC address to the MAC address of the destination node.
[0163] b4. The load balancer forwards the request message to the destination node via the southbound ENI at Layer 2.
[0164] b5. The destination node can address VM2 in subnet 02 according to the destination IP address of the request message.
[0165] c1. VM2 generates a response message based on the request message, which is transmitted to the load balancer via the northbound ENI. The source IP address of the response message generated by VM2 is 10.0.1.1, the destination IP address is 10.0.0.1, the source port is 80, the destination port is 3000, the source MAC address is VM2's MAC address, and the destination MAC address is the MAC address of the northbound ENI.
[0166] c2. Based on the response message, the load balancer still selects firewall 01 as the destination node according to the bidirectional consistent hashing algorithm.
[0167] c3. The load balancer modifies the source MAC address of the response message to the MAC address of the southbound ENI and the destination MAC address to the MAC address of the destination node.
[0168] c4. The load balancer forwards the response message to the destination node via the southbound ENI at Layer 2.
[0169] c5. The destination node can address VM1 in subnet 01 based on the destination IP address of the response message.
[0170] As can be seen from the above, this solution uses IP routing for traffic diversion in a cloud scenario, processing packets based on IP addresses. The load balancer selects the next-hop node (i.e., the destination node) using a bidirectional consistent hashing algorithm and forwards the packet to the next-hop node at Layer 2 by modifying the packet's MAC address, without the need for additional tunnel encapsulation.
[0171] Figure 9 is a processing logic diagram of a load balancer provided by an embodiment of the present application. The load balancer has built-in flow table judgment module, health check module and two-way consistent hashing algorithm, etc. Referring to Figure 9, after the load balancer obtains the traffic (such as after receiving the request message or response message through the first ENI), that is, after the inflow, the load balancer searches the routing table through the flow table judgment module, matches the next hop node, determines the destination node according to the two-way consistent hashing algorithm, and then modifies the MAC address, that is, modifies the destination MAC address of the message to the MAC address of the destination node, and modifies the source MAC address to the MAC address of the southbound ENI. After modifying the MAC address, the load balancer performs the outflow operation, that is, forwards the message to the destination node via the southbound ENI. In addition, the load balancer also checks its connectivity with multiple nodes in real time through the health check module.
[0172] In summary, in the embodiments of the present application, the cloud system can allow tenants to build a load balancer and a message processing cluster including multiple nodes, etc., so as to divert the tenant's traffic to multiple next hops through the load balancer, that is, to the multiple nodes, thereby improving communication reliability. In addition, this solution does not require tenants to perform additional overlay protocol configurations on the load balancer and the message processing cluster, which simplifies the tenant's operation, improves the practicality of the cloud system, and at the same time improves the performance of the cloud system. In a specific implementation, by introducing a north-south separation structure, the southbound ENI goes deep into the backend group, that is, the southbound ENI and the tenant's backend service node belong to the same subnet segment, and the message can be forwarded directly from the load balancer to the southbound ENI through the second layer to the backend service node, avoiding other overlay protocol encapsulation from the load balancer to the tenant's backend service node, and simplifying the scenario. By introducing a consistent hashing algorithm or a two-way consistent hashing algorithm, etc., no additional recording of information such as tunnels and sessions based on other overlay protocols is required, which is conducive to improving performance, simplifying the configuration of the load balancer, and improving reliability.
[0173] The present application also provides a computing device 100. As shown in FIG10 , computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. Processor 104, memory 106, and communication interface 108 communicate with each other via bus 102. Computing device 100 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 100.
[0174] Bus 102 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG10 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 102 may include a path for transmitting information between various components of computing device 100 (e.g., memory 106, processor 104, and communication interface 108).
[0175] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0176] The memory 106 may include volatile memory, such as random access memory (RAM). The processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0177] The memory 106 stores executable program code, and the processor 104 executes the executable program code to implement the functions of the aforementioned load balancer, backend service node, etc., thereby implementing the message processing method based on the public cloud service provided in the embodiment of the present application. In other words, the memory 106 stores instructions for executing the message processing method based on the public cloud service provided in the embodiment of the present application.
[0178] Alternatively, the memory 106 stores executable code, and the processor 104 executes the executable code to implement the functions of the aforementioned load balancer, controller, or backend service node, thereby implementing the message processing method based on the public cloud service provided in the embodiment of the present application. That is, the memory 106 stores instructions for executing the message processing method based on the public cloud service provided in the embodiment of the present application.
[0179] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.
[0180] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0181] As shown in Figure 11, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the message processing method based on the public cloud service provided in the embodiment of the present application.
[0182] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the message sending method provided in the embodiments of the present application. In other words, the combination of one or more computing devices 100 can jointly execute instructions for executing the message sending method provided in the embodiments of the present application.
[0183] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, each for executing a portion of the functions of the load balancer. In other words, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules such as the load balancer, controller, and backend service node.
[0184] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), among others. FIG. 12 illustrates a possible implementation. As shown in FIG. 12 , two computing devices 100A and 100B are connected via a network. Specifically, each computing device is connected to the network via a communication interface within the computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of a load balancer. Simultaneously, the memory 106 in the computing device 100B stores instructions for executing the functions of multiple backend service nodes.
[0185] The connection method between the computing device clusters shown in Figure 12 can be considered to be that the message processing method based on public cloud services provided in the embodiment of the present application needs to ensure the reliability of the transmission business load and achieve business load balancing, so it is considered to entrust the functions implemented by multiple back-end service nodes to the computing device 100B for execution.
[0186] It should be understood that the functions of the computing device 100A shown in FIG12 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.
[0187] The present application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection methods of the computing device clusters shown in Figures 11 and 12. However, the memory 106 in one or more computing devices 100 in this computing device cluster can store the same instructions for executing the message processing method based on the public cloud service.
[0188] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the message processing method based on the public cloud service. In other words, the combination of one or more computing devices 100 can jointly execute the instructions for executing the message processing method based on the public cloud service.
[0189] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions for executing partial functions of the cloud system. In other words, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more devices in the load balancer, controller, and backend service node.
[0190] The present application also provides a computer program product containing instructions. This computer program product can be software or a program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute the public cloud service-based message processing method provided in the present application.
[0191] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute a message processing method based on a public cloud service.
[0192] Next, a configuration method based on public cloud services provided in an embodiment of the present application is introduced.
[0193] Figure 13 is a flow chart of a configuration method based on a public cloud service provided in an embodiment of the present application. The configuration method is applied to a cloud management platform, which can be the cloud management platform in any of the above embodiments. The cloud management platform is used to manage the infrastructure that provides public cloud services. The infrastructure includes multiple data centers, each of which is equipped with at least one server. The public cloud service runs on one or more servers of the infrastructure. The method includes the following steps:
[0194] Step 1301: The cloud management platform receives one or more public cloud service configuration instructions input by a tenant.
[0195] In an embodiment of the present application, a tenant may input one or more public cloud service configuration instructions to the cloud management platform through a client (such as client 21 or client 22 in FIG1 ). The one or more public cloud service configuration instructions are used to instruct the creation of a VPC, a load balancer, and a packet processing cluster on the public cloud service infrastructure.
[0196] The one or more public cloud service configuration instructions may be included in one or more requests, and the VPC, load balancer, and message processing cluster, etc., may be created through the one or more requests. For example, the one or more requests may include a VPC creation request, a load balancing service setup request, and a first instance setup request. The VPC creation request instructs the creation of a VPC, the load balancing service setup request instructs the creation of a load balancer, and the first instance setup request instructs the setup of a message processing cluster.
[0197] Step 1302: The cloud management platform creates a VPC, a load balancer, and a message processing cluster on the infrastructure according to the one or more public cloud service configuration instructions.
[0198] The VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, and the third subnet is provided with a message processing cluster. The message processing cluster includes multiple nodes provided with message processing services. The load balancer includes a first ENI and a second ENI. The first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet.
[0199] The VPC, load balancer, and message processing cluster in the embodiments of the present application may be the VPC, load balancer, and message processing cluster in any of the above embodiments, and the corresponding functions of the VPC, load balancer, and message processing cluster will not be repeated here.
[0200] In the embodiments of the present application, the cloud system allows tenants to build a load balancer and a message processing cluster consisting of multiple nodes, so that their traffic can be diverted to multiple next hops (i.e., to these multiple nodes) via the load balancer, thereby improving communication reliability. Furthermore, this solution does not require tenants to perform additional overlay protocol configuration on the load balancer and message processing cluster, simplifying tenant operations, improving the practicality of the cloud system, and enhancing its performance.
[0201] FIG14 is a schematic diagram of the structure of a cloud management platform 1400 provided in an embodiment of the present application. The cloud management platform 1400 can be implemented as part or all of the cloud system infrastructure by software, hardware, or a combination of both. The cloud system infrastructure can be the infrastructure of any of the cloud systems in the above embodiments. The cloud management platform is used to manage the infrastructure that provides public cloud services. The infrastructure includes multiple data centers, each of which is equipped with at least one server. The public cloud service runs on one or more servers of the infrastructure. Referring to FIG14 , the cloud management platform 1400 includes:
[0202] Configuration instruction receiving module 1401, used to receive one or more public cloud service configuration instructions input by the tenant;
[0203] A cloud system creation module 1402 creates a VPC, a load balancer, and a message processing cluster on the infrastructure according to the one or more public cloud service configuration instructions;
[0204] The VPC includes a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively. The first subnet is configured with a first virtual instance, the second subnet is configured with a second virtual instance, and the third subnet is configured with a message processing cluster. The message processing cluster includes multiple nodes configured with message processing services. The load balancer includes a first ENI and a second ENI. The first ENI is connected to the first subnet and the second subnet, respectively, and the second ENI is connected to the third subnet.
[0205] Both the configuration instruction receiving module 1401 and the cloud system creation module 1402 can be implemented in software or hardware. For example, the implementation of the configuration instruction receiving module 1401 will be described below using the configuration instruction receiving module 1401 as an example. Similarly, the implementation of the cloud system creation module 1402 can refer to the implementation of the configuration instruction receiving module 1401.
[0206] As an example of a software functional unit, the configuration instruction receiving module 1401 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the configuration instruction receiving module 1401 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, and each AZ includes one data center or multiple data centers with close geographical locations. Generally, a region may include multiple AZs.
[0207] Similarly, the multiple hosts / virtual machines / containers running the code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0208] As an example of a hardware functional unit, configuration instruction receiving module 1401 may include at least one computing device, such as a server. Alternatively, configuration instruction receiving module 1401 may be implemented using an ASIC or a PLD. The PLD may be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0209] The multiple computing devices included in the configuration instruction receiving module 1401 can be distributed in the same region or in different regions. The multiple computing devices included in the configuration instruction receiving module 1401 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the configuration instruction receiving module 1401 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0210] It should be noted that, in other embodiments, the configuration instruction receiving module 1401 can be used to execute any step in the configuration method based on public cloud services, and the cloud system creation module 1402 can be used to execute any step in the configuration method based on public cloud services. The steps that the configuration instruction receiving module 1401 and the cloud system creation module 1402 are responsible for implementing can be specified as needed. The full functions of the cloud management platform are realized by respectively implementing different steps in the configuration method based on public cloud services through the configuration instruction receiving module 1401 and the cloud system creation module 1402.
[0211] In the embodiments of the present application, the cloud system provided by this solution allows tenants to build a load balancer and a message processing cluster comprising multiple nodes, thereby diverting the tenant's traffic through the load balancer to multiple next hops, that is, to these multiple nodes, thereby improving communication reliability. In addition, this solution does not require tenants to perform additional overlay protocol configuration on the load balancer and message processing cluster, simplifying tenant operations, improving the practicality of the cloud system, and enhancing the performance of the cloud system.
[0212] It should be noted that the cloud management platform provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the configuration of the cloud system. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the cloud management platform provided in the above embodiment and the configuration method embodiment based on public cloud services are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0213] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0214] It should be understood that the "at least one" mentioned herein refers to one or more, and "a plurality of" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0215] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0216] The above description is an embodiment provided for this application and is not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the principles of this application should be included in the scope of protection of this application.
Claims
1. A cloud system based on public cloud services, characterized in that: The cloud system is arranged in an infrastructure providing a public cloud service, the infrastructure comprising a plurality of data centers, each data center being provided with at least one server, the public cloud service running in one or more servers of the infrastructure, and the cloud system comprising: A virtual private cloud VPC, comprising a first subnet, a second subnet, a third subnet, and routers connected to the first subnet, the second subnet, and the third subnet, respectively, wherein the first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, the third subnet is provided with a message processing cluster, and the message processing cluster includes a plurality of nodes provided with message processing services; A load balancer, comprising a first elastic network interface card (ENI) and a second ENI, wherein the first ENI is connected to the first subnet and the second subnet respectively, and the second ENI is connected to the third subnet; The first virtual instance is used to send a request message to the first ENI, wherein the destination Internet Protocol IP address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet; The load balancer is configured to receive the request message from the first ENI, determine a destination node among the multiple nodes according to a source IP address and a destination IP address of the request message, and send the request message to the destination node via the second ENI, wherein the destination node is provided with a message processing rule defined by a tenant of the VPC; The destination node is used to send the request message to the second virtual instance through the router according to the destination IP address of the request message when confirming that the request message complies with the message processing rule.
2. The cloud system according to claim 1, characterized in that: The second virtual instance is used to receive the request message, generate a response message according to the request message, and send the response message to the first ENI, wherein the destination IP address of the response message is the private network address of the first virtual instance in the first subnet, and the source IP address is the private network address of the second virtual instance in the second subnet; The load balancer is further configured to receive the response message from the first ENI, determine the destination node among the multiple nodes according to the source IP address and the destination IP address of the response message, and send the response message to the destination node via the second ENI; The destination node is further configured to send the reply message to the first virtual instance through the router according to the destination IP address of the reply message when confirming that the reply message complies with the message processing rule.
3. The cloud system according to claim 2, characterized in that: The destination node is further configured to discard the request message when it is confirmed that the request message does not comply with the message processing rule, and / or discard the response message when it is confirmed that the response message does not comply with the message processing rule.
4. The cloud system according to claim 2 or 3, characterized in that: The source IP address and the destination IP address of the request message are set in the quintuple of the request message, and the quintuple of the request message also includes the source port, the destination port and the transport layer protocol of the request message; The load balancer is specifically used to operate the quintuple of the request message according to a bidirectional consistent hashing algorithm, and determine the destination node among the multiple nodes according to a first operation result generated by the operation.
5. The cloud system according to claim 4, characterized in that: The source IP address and the destination IP address of the reply message are set in the quintuple of the reply message, and the quintuple of the reply message also includes the source port, the destination port and the transport layer protocol of the reply message; The load balancer is specifically used to operate the quintuple of the response message according to a bidirectional consistent hashing algorithm, and determine the destination node among the multiple nodes according to a second operation result generated by the operation, wherein the first operation result and the second operation result have the same numerical value.
6. The cloud system according to any one of claims 1 to 5, characterized in that: The message processing rules include firewall message filtering rules or security group rules.
7. The cloud system according to any one of claims 1 to 6, characterized in that: The cloud system also includes a cloud management platform; The cloud management platform is used to receive one or more public cloud service configuration instructions input by the tenant, and create the VPC, the load balancer, and the message processing cluster in the infrastructure according to the one or more public cloud service configuration instructions.
8. The cloud system according to any one of claims 1 to 7, characterized in that: The load balancer is further configured to modify the destination media access control MAC address of the request message to the MAC address of the destination node and the source MAC address to the MAC address of the second ENI before sending the request message to the destination node via the second ENI.
9. A message processing method based on public cloud service, characterized in that: The method is applied to an infrastructure for providing a public cloud service, the infrastructure comprising a virtual private cloud (VPC) and a load balancer, wherein the VPC comprises a first subnet, a second subnet, a third subnet, and a router respectively connected to the first subnet, the second subnet, and the third subnet, wherein the first subnet is provided with a first virtual instance, the second subnet is provided with a second virtual instance, the third subnet is provided with a message processing cluster, the message processing cluster comprises a plurality of nodes provided with message processing services, the load balancer comprises a first elastic network card (ENI) and a second ENI, wherein the first ENI is respectively connected to the first subnet and the second subnet, and the second ENI is connected to the third subnet, and the method comprises: The first virtual instance sends a request message to the first ENI, wherein the destination Internet Protocol IP address of the request message is the private network address of the second virtual instance in the second subnet, and the source IP address is the private network address of the first virtual instance in the first subnet; The load balancer receives the request message from the first ENI, determines a destination node among the multiple nodes according to a source IP address and a destination IP address of the request message, and sends the request message to the destination node via the second ENI, wherein the destination node is provided with a message processing rule defined by a tenant of the VPC; When the destination node confirms that the request message complies with the message processing rule, the destination node sends the request message to the second virtual instance through the router according to the destination IP address of the request message.
10. The method according to claim 9, characterized in that The method further comprises: The second virtual instance receives the request message, generates a response message according to the request message, and sends the response message to the first ENI, wherein the destination IP address of the response message is the private network address of the first virtual instance in the first subnet, and the source IP address is the private network address of the second virtual instance in the second subnet; The load balancer receives the response message from the first ENI, determines the destination node among the multiple nodes according to the source IP address and the destination IP address of the response message, and sends the response message to the destination node via the second ENI; When the destination node confirms that the response message complies with the message processing rule, the destination node sends the response message to the first virtual instance through the router according to the destination IP address of the response message.
11. The method according to claim 10, characterized in that The method further comprises: The destination node discards the request message when confirming that the request message does not comply with the message processing rule, and / or discards the response message when confirming that the response message does not comply with the message processing rule.
12. The method according to claim 10 or 11, characterized in that: The source IP address and the destination IP address of the request message are set in a quintuple of the request message, the quintuple of the request message also includes a source port, a destination port, and a transport layer protocol of the request message, and the load balancer determines a destination node from the multiple nodes according to the source IP address and the destination IP address of the request message, including: The load balancer operates on the quintuple of the request message according to a bidirectional consistent hashing algorithm, and determines the destination node among the multiple nodes according to a first operation result generated by the operation.
13. The method according to any one of claims 10 to 12, characterized in that: The source IP address and the destination IP address of the reply message are set in a quintuple of the reply message, the quintuple of the reply message also includes a source port, a destination port, and a transport layer protocol of the reply message, and the load balancer determines the destination node among the multiple nodes according to the source IP address and the destination IP address of the reply message, specifically including: The load balancer operates the quintuple of the response message according to a bidirectional consistent hashing algorithm, and determines the destination node among the multiple nodes according to a second operation result generated by the operation, wherein the first operation result has the same numerical value as the second operation result.
14. The method according to any one of claims 10 to 13, characterized in that The message processing rules include firewall message filtering rules or security group rules.
15. The method according to any one of claims 9 to 14, characterized in that: The method further comprises: Before sending the request message to the destination node via the second ENI, the load balancer modifies the destination media access control MAC address of the request message to the MAC address of the destination node and modifies the source MAC address to the MAC address of the second ENI.
16. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 9 to 15.
17. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 9 to 15.
18. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 9 to 15.
Citation Information
Patent Citations
Data forwarding method and system, and related device
CN106789667A
Network system and data transmission method
CN110336730A
Data processing method and device
CN114301665A
Cross-VPC traffic forwarding method
CN115499434A
Virtual private cloud and under-cloud data center communication and configuration method and related device
CN115699699A
Cited By
Data transmission method and device, computer equipment and storage medium
CN119743289A
Dynamic cloud connection method and device applied to VPC, equipment and medium
CN119865524A
Firewall traffic balancing method and device, electronic equipment and storage medium
CN120034540A
