Cloud system based on public cloud service, message processing method and related device
By introducing a load balancer and packet processing cluster in the VPC scenario, and utilizing a bidirectional consistent hashing algorithm and a north-south separation structure, the problem of low VPC communication reliability is solved, achieving efficient traffic splitting and simplified configuration, thereby improving the system's communication reliability and performance.
Patent Information
- Application Number
- CN202310579623.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2024-11-29
AI Technical Summary
In Virtual Private Cloud (VPC) scenarios, communication reliability is low, and existing technologies are unable to effectively improve it.
A cloud system based on public cloud services is provided, including a load balancer and a message processing cluster. It utilizes a bidirectional consistent hashing algorithm and a north-south separation structure to distribute traffic to multiple next-hop nodes through the load balancer, simplifying tenant configuration and improving communication reliability.
It improves communication reliability and performance in VPC scenarios, simplifies tenant operations, reduces additional configuration requirements, and enhances the system's usability and performance.
Smart Images

Figure CN119052233A_ABST
Abstract
Description
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 communication technology, cloud service technology has emerged. Among them, virtual private cloud (VPC) is widely used in various industries. In the VPC scenario, users can build various instances on the VPC and use the built instances to achieve business communications. How to ensure the reliability of communication in the VPC scenario is a hot topic in the industry. Summary of the invention
[0003] The present application provides a cloud system based on public cloud services, a message processing method and related devices, which can improve the communication reliability in VPC scenarios. The technical solution is as follows:
[0004] In a first aspect, a cloud system based on a public cloud service is provided. The cloud system is arranged in an infrastructure providing a public cloud service. The infrastructure includes a plurality of data centers, each data center is provided with at least one server, and the public cloud service runs in one or more servers of the infrastructure. The cloud system includes:
[0005] 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, and the message processing cluster includes a plurality of nodes provided with message processing services;
[0006] The load balancer includes a first elastic network interface (ENI) and a second ENI, wherein the first ENI is connected to a first subnet and a second subnet respectively, and the second ENI is connected to a third subnet.
[0007] The cloud system is used to implement a message processing flow based on a public cloud service, which includes the outbound and inbound messages. Next, the outbound message process is introduced based on the process of the cloud system processing a request message.
[0008] 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;
[0009] The load balancer is used to receive the request 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 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;
[0010] The destination node is used 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.
[0011] 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 node of the message processing service 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.
[0012] Among them, the source IP address and the 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, the destination port and the transport layer protocol of the request message. Based on this, the load balancer is specifically used to operate 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.
[0013] 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.
[0014] In this way, tenants do not need to perform additional overlay protocol configuration on the load balancer and message processing cluster, which simplifies tenant operations, improves the operability of the cloud system, and improves the performance of the cloud system. In other words, this solution ensures the load balancing and reliability of user services without requiring tenants to perform any additional development on the load balancer and message processing cluster they have built.
[0015] 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.
[0016] 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;
[0017] The load balancer is further configured to receive the response message from the first ENI, determine a destination node among the 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;
[0018] The destination node is further configured to send the reply message to the first virtual instance through a router according to the destination IP address of the reply message when confirming that the reply message complies with the message processing rule.
[0019] 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 by 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.
[0020] Among them, 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 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 first operation result and the second operation result have the same numerical value. In this way, the reply message and the request message pass through the same destination node. In other words, 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.
[0021] In the present application, the destination node is also used to discard the request message when it is confirmed that the request message does not comply with the message processing rules, and / or discard the reply message when it is confirmed that the reply message does not comply with the message processing rules. In this way, the message processing cluster in the third subnet filters the message according to the message processing rules to improve communication security.
[0022] The message processing rules include firewall message filtering rules or security group rules.
[0023] 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 are securely filtered through the firewall nodes in the third subnet, thereby improving communication security.
[0024] In the present application, 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 a VPC, a load balancer, and a message processing cluster in the above infrastructure according to the one or more public cloud service configuration instructions. The tenant does not need to perform complex overlay protocol configuration on the load balancer and the message processing cluster, which ensures communication reliability.
[0025] In a second aspect, a method for processing a message based on a public cloud service is provided, the method being applied to an infrastructure for providing a public cloud service, the infrastructure comprising a 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 a message processing service, the load balancer comprises a first 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, the method comprising:
[0026] 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 according to 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 provided with a message processing rule defined by a tenant of the VPC; when 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 according to the destination IP address of the request message.
[0027] The second aspect or any implementation method of the second aspect is the step implementation of the method corresponding to the first aspect or any implementation method of the first aspect. The description in the second aspect or any implementation method of the second aspect is applicable to the first aspect or any implementation method of the first aspect and will not be repeated here.
[0028] In a third aspect, a configuration method based on a public cloud service is provided. The method is applied to a cloud management platform. The cloud management platform is used to manage an infrastructure that provides a public cloud service. The infrastructure includes multiple data centers, each data center is provided with at least one server, and the public cloud service runs in one or more servers of the infrastructure. The method includes:
[0029] The cloud management platform receives one or more public cloud service configuration instructions input by the tenant;
[0030] 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 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 includes a plurality of nodes provided with message processing services, and the load balancer includes a first 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.
[0031] The cloud system provided by this solution allows tenants to build a message processing cluster including multiple nodes in the third subnet of the VPC, and the reliability of message processing can be improved by using these multiple nodes. Specifically, the tenant traffic can be diverted to multiple next hops after the load balancer, that is, diverted to multiple nodes of the message processing cluster, thereby improving communication reliability.
[0032] In a fourth aspect, a cloud management platform is provided, the cloud management platform is used to manage an infrastructure for providing public cloud services, the infrastructure includes multiple data centers, each data center is provided with at least one server, the public cloud service runs in one or more servers of the infrastructure, the cloud management platform includes:
[0033] A configuration instruction receiving module, used to receive one or more public cloud service configuration instructions input by a tenant;
[0034] 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 a router 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, 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, 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.
[0035] In a fifth aspect, the present application provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method disclosed in the second aspect and any possible implementation of the second aspect.
[0036] 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.
[0037] 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
[0038] Figure 1 This is an architecture diagram of a cloud data center provided in an embodiment of the present application;
[0039] Figure 2 This is a cloud system architecture diagram based on a public cloud service provided in an embodiment of the present application;
[0040] Figure 3 This is a workflow diagram of a cloud system provided by an embodiment of the present application;
[0041] Figure 4 is an architecture diagram of a VPC system provided in an embodiment of the present application;
[0042] Figure 5 is an architecture diagram of another VPC system provided in an embodiment of the present application;
[0043] Figure 6 It is a flow chart of a message processing method based on a public cloud service provided in an embodiment of the present application;
[0044] Figure 7 This is a flowchart of another method for processing a message based on a public cloud service provided in an embodiment of the present application;
[0045] Figure 8 is a flowchart of another method for processing messages based on public cloud services provided in an embodiment of the present application;
[0046] Fig. 9 It is a processing logic diagram of a load balancer provided in an embodiment of the present application;
[0047] Fig.10 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0048] Fig.11 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0049] Fig.12 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application;
[0050] Fig.13 It is a flow chart of a configuration method based on public cloud services provided in an embodiment of the present application;
[0051] Fig.14 It is a structural diagram of a cloud management platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] 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 in conjunction with the accompanying drawings.
[0053] First, the terms involved in the embodiments of the present application are explained:
[0054] Container (Docker): Use the namespace and control groups (Cgroup) technology supported by the operating system kernel (such as the Linux kernel) to isolate the application process and its dependent packages (running environment bins / libs, including all files required to run the application) in an independent running environment.
[0055] Virtual machine (VM): refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. Any work that can be done in a server can be done in a virtual machine. When creating a virtual machine in a server, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent hard disk and operating system, and the user of the virtual machine can operate the virtual machine just like using a server.
[0056] Virtual Private Cloud: A Virtual Private Cloud (VPC) is an isolated, private virtual network environment applied for by tenants on the cloud.
[0057] Elastic Load Balancing: Elastic Load Balancing (ELB) automatically distributes access traffic to multiple cloud servers, expanding the external service capabilities of the application system and achieving a higher level of application fault tolerance.
[0058] Consistent Hashing Algorithm: By optimizing the traditional hashing algorithm, it can minimize the impact on the stored hash results and maintain a good balance in the event of backend node failure or capacity expansion.
[0059] Next, the technical background of the embodiments of the present application is briefly introduced.
[0060] In traditional physical network technology, when a message to the same IP address / network segment can choose multiple paths with the same cost, equal-cost multi-path (ECMP) is formed. The network device selects one of the paths to send the message by hashing the five-tuple of the message. Based on ECMP technology, users can direct business loads to multiple user backend servers to achieve load balancing without intermediaries.
[0061] 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. It does not have the ability to correspond to multiple next hops for one IP address / network segment, and the communication reliability is low.
[0062] The cloud system provided by this solution allows tenants to build a load balancer and a message processing cluster including multiple nodes, so that the tenant's traffic can be directed to multiple next hops, that is, to the multiple nodes after passing through 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, which simplifies tenant operations, improves the operability of the cloud system, and improves the performance of the cloud system.
[0063] 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.
[0064] The embodiments of the present application provide a cloud system and a message processing method based on a public cloud service, which are used to improve the service communication reliability of tenants.
[0065] Figure 1 is an architecture diagram of a cloud data center provided in an embodiment of the present application. Figure 1 The cloud data center 101 includes a cloud management platform 20, an internal network 30 of the data center (which can be implemented by a switch), multiple clients and multiple servers. Figure 1In the example, two clients and four servers are used for explanation, such as client 21 and client 22, and server 1011, server 1021, server 1012, and server 1022. Server 1011, server 1021, server 1012, and server 1022 respectively complete information interaction with cloud management platform 20 through network card 10116, network card 10216, network card 10126, and network card 10226 via the internal network of the data center, and cloud management platform 20 completes information interaction with the multiple clients through Internet 40.
[0066] Taking server 1011 as an example, server 1011 includes a software layer and a hardware layer. The host operating system 10113 on the software layer includes a cloud instance manager 101131, and a cloud management platform client 1011311 runs on the cloud instance manager. The software layer also runs virtual instances such as virtual instance 10111 and virtual instance 10112. The hardware layer includes a memory 10114, a processor 10115, a hard disk 10117, and a network card 10116, etc., which are interconnected through a bus.
[0067] Server 1021, server 1012 and server 1022 have similar structures to server 1011, which will not be described in detail here.
[0068] Each virtual instance may be, for example, a virtual machine (VM) or a container, etc. Correspondingly, the virtual instance manager may be a virtual machine manager or a container manager, etc.
[0069] Specifically, the cloud management platform 20 provides an access interface, such as a configuration interface for tenants to configure or an application program interface (API) for tenants to configure. Tenants of the cloud data center 101 can operate the client 21 or the 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 a specific specification (processor, memory, disk) on the cloud management platform 20. After the paid purchase is successful, the cloud management platform 20 provides the remote login account and password of the purchased virtual instance, and the client 21 or the client 22 can remotely log in to the virtual instance, install and run the tenant's application in the virtual instance. The cloud management platform client receives the control plane command sent by the cloud management platform 20, creates and manages the virtual instance on the host machine according to the control plane control command, and performs full life cycle management on the virtual instance. Therefore, the tenant can create, manage, log in and operate the virtual instance in the cloud data center 101 through the cloud management platform 20.
[0070] 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.
[0071] Figure 2 This is a cloud system architecture diagram based on a public cloud service provided by an embodiment of the present application. The cloud system is set up in 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 in one or more servers of the infrastructure. Each data center can be Figure 1 A partial or complete implementation of the cloud data center 101 is shown.
[0072] See also Figure 2 , the cloud system includes: a virtual private cloud VPC and a load balancer, wherein:
[0073] 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, and the message processing cluster includes a plurality of nodes provided with message processing services, such as node 1 to node N, where N is an integer not less than 1. The plurality of nodes may also be referred to as a plurality of backend service nodes.
[0074] The load balancer (also referred to as a load balancing node) includes a first elastic network interface card (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. The first ENI is, for example, a northbound network interface card, and the second ENI is, for example, a southbound network interface card.
[0075] 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.
[0076] Based on the structure of the above cloud system, the present application embodiment further discloses a workflow based on the cloud system, see below for details:
[0077] Please combine Figure 3 The workflow of the cloud system provided in the embodiment of the present application is described in detail. Figure 3 The work flow includes the outbound process of the message and the return process of the message. The outbound process of the message includes the processing process of the request message, and the return process of the message includes the processing process of the response message.
[0078] In the outbound process of the message, 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 among the above-mentioned multiple nodes according to 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 provided with the message processing rules defined by the tenant of the VPC. When the destination node confirms that the request message complies with the message processing rules, the request message is sent to the second virtual instance through the router according to the destination IP address of the request message. The second virtual instance receives the request message.
[0079] In the return of the message, the second virtual instance generates a reply message according to the request message and sends the reply message to the first ENI, wherein the destination IP address of the reply 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 reply 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 reply message, and sends the reply message to the destination node through the second ENI. When the destination node confirms that the reply message complies with the message processing rule, the reply message is sent to the first virtual instance through the router according to the destination IP address of the reply message.
[0080] It should be understood that the outbound and return trips 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. That is, the request message and the response message may pass through the same destination node, or may pass through different destination nodes.
[0081] For example, the source IP address and the 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, the destination port and the transport layer protocol of the request message. The load balancer operates the five-tuple of the request message according to the 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 the 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, the destination port and the transport layer protocol of the reply message. The load balancer operates the five-tuple of the reply message according to the 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 first operation result and the second operation result have the same numerical value. In this way, the destination node passed by the request message is the same as the destination node passed by the reply message.
[0082] For another example, the load balancer operates the quintuples of the request message and the response message respectively according to the non-bidirectional consistent hashing algorithm or other hashing algorithms, and the values of the first operation result and the second operation result generated by the operation may be different. In this way, the destination node passed by the request message and the destination node passed by the response message may not be the same.
[0083] Optionally, the above-mentioned message processing rules include firewall message filtering rules or security group rules or other processing rules.
[0084] The destination node is also used 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 reply message when it is confirmed that the reply message does not comply with the message processing rule. Taking the message processing rule as a firewall message filtering rule as an example, the destination node is a firewall node. When the firewall node confirms that the request message does not comply with the firewall message filtering rule, it indicates that the request message is an abnormal message, and then discards the request message.
[0085] In an embodiment of the present application, before the load balancer sends the request message to the destination node via the second ENI, the destination MAC address of the request message is modified to the MAC address of the destination node, and the source MAC address is modified to the MAC address of the second ENI. Similarly, before the load balancer sends the reply message to the destination node via the second ENI, the destination MAC address of the reply message is modified to the MAC address of the destination node, and the source MAC address is modified 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 the destination node receives the message, it can obtain the five-tuple of the message without additional decapsulation, so as to continue to transmit the message according to the five-tuple.
[0086] In the related art, the load balancer needs to encapsulate an additional VLAN header for 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 needs to decapsulate the VLAN header to obtain the five-tuple of the message.
[0087] It should be noted that the content of the workflow of the above cloud system is only an example, and the content of the workflow of the cloud system is not limited here.
[0088] 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 the load balancer in the VPC. Based on this, the embodiment of this application further discloses the VPC system. Please refer to Figure 4 and Figure 5 This section introduces the VPC system.
[0089] Figure 4 is an architecture diagram of a VPC system provided in an embodiment of the present application. The VPC system is part of the above cloud system. Figure 4 The VPC system includes a controller, multiple load balancers, a message processing cluster (not shown), and a first ENI and a second ENI of the multiple load balancers. The controller is used to select a load balancer from the multiple load balancers to process the request message or the response message according to the load balancing strategy. Accordingly, the multiple load balancers are used to share tenant traffic according to the load balancing strategy.
[0090] The controller may be a software defined network (SDN) controller or other forms of controllers.
[0091] Figure 5 This is an architecture diagram of another VPC system provided in an embodiment of the present application. Figure 5 and Figure 4 The difference is that Figure 5 The multiple load balancers shown are distributed in at least two availability zones (AZ), the at least two AZs include a first AZ, and the first ENI is located in the first AZ; the controller is specifically used to determine the load balancer located in the first AZ from the multiple load balancers based on the identification information of the first AZ, and select a load balancer from the load balancers located in the first AZ to process the above-mentioned request message or response message.
[0092] In the embodiment of the present application, the cloud system also includes a cloud management platform ( Figure 2 (not shown). The cloud management platform is used to receive one or more public cloud service configuration instructions input by the tenant, and create a VPC, a load balancer, and a message processing cluster on the above infrastructure according to the one or more public cloud service configuration instructions. Figure 1 The cloud management platform shown.
[0093] The above-mentioned load balancer and cloud management platform can be implemented by software or hardware. For example, the implementation of the load balancer is introduced below by taking the load balancer as an example. Similarly, the implementation of the cloud management platform can refer to the implementation of the load balancer.
[0094] 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 multiple hosts / virtual machines / containers for running the application may be distributed in the same region or in different regions. Multiple hosts / virtual machines / containers for running the code may be distributed in the same AZ or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Typically, a region may include multiple AZs.
[0095] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same load balancer or in multiple load balancers. Usually, a load balancer is set in one region. For cross-region communication between two load balancers in the same region and between load balancers in different regions, a communication gateway needs to be set in each load balancer to realize the interconnection between load balancers through the communication gateway.
[0096] As an example of a hardware functional unit, the load balancer may include at least one computing device, such as a server, etc. Alternatively, the load balancer may also be a device 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.
[0097] The multiple computing devices included in the load balancer can be distributed in the same region or in different regions. The multiple computing devices included in the load balancer can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the load balancer can be distributed in the same load balancer or in multiple load balancers. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0098] 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.
[0099] Next, the message processing method based on public cloud service provided in an embodiment of the present application is introduced.
[0100] Figure 6 This 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 a router 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 comprises the following steps.
[0101] 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.
[0102] 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, that is, the processing of the request message.
[0103] The tenant expects to send a request message to the second virtual instance in the second subnet through the first virtual instance in the first 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 card, which serves as a user traffic entrance and is used to receive user traffic.
[0104] 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.
[0105] 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 a source port, a destination port, a transport layer protocol, and a payload. Among them, the source IP address, the destination IP address, the source port, the destination port, and the transport layer protocol constitute the five-tuple of the request message. For the relevant introduction of the five-tuple, please refer to the relevant technology, which will not be introduced in detail here.
[0106] Step 602: The load balancer receives the request message from the first ENI, determines the destination node from multiple nodes in the message processing cluster according to 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 the message processing rules defined by the tenant of the VPC.
[0107] 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 the destination IP address of the request message. The load balancer determines the destination node from multiple nodes in the message processing cluster according to the source IP address and the destination IP address of the request message.
[0108] As can be seen from the foregoing, the source IP address and the 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, the destination port and the transport layer protocol of the request message. Based on this, the load balancer operates the five-tuple of the request message according to the bidirectional consistent hashing algorithm, and determines the destination node among the multiple nodes according to the first operation result generated by the operation.
[0109] 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 32The load balancer uses a two-way consistent hashing algorithm to calculate the five-tuple of the request message to obtain a hash value, and determines the hash value for 2 32 The position of the modulo value on the hash ring is determined, and the node is searched in a clockwise direction from the determined position. The first node encountered is recorded as the destination node.
[0110] The consistent hashing algorithm only needs to reposition some nodes on the hash ring when adding or removing nodes, instead of adjusting the positions of all nodes on the hash ring. It has good fault tolerance and scalability. For an introduction to the consistent hashing algorithm, please refer to related technologies.
[0111] Of course, the load balancer may also select a node from the multiple nodes as the destination node corresponding to the request message in other ways, such as selecting a node by using a traditional hash algorithm, a random selection method, or a sequential selection method.
[0112] After determining the destination node, the load balancer sends the request message to the destination node via the second ENI.
[0113] In an embodiment of the present application, before the load balancer sends the request message to the destination node via the second ENI, the destination MAC address of the request message is modified to the MAC address of the destination node, and the source MAC address is modified to the MAC address of the second ENI. In this way, the second ENI can transmit the request message to the destination node through layer 2 forwarding, and the destination node can parse the request message according to the traditional communication protocol after receiving the request message. While ensuring the load balancing and reliability of user services, this solution does not require tenants to perform any additional development on the nodes they build.
[0114] In the related art, the load balancer needs to encapsulate an additional layer of VLAN header for the message, and transmit the message through the overlay tunnel created additionally between the load balancer and the destination node. Accordingly, multiple nodes of the tenant need to develop additional kernel modules to identify the overlay-encapsulated messages sent by the load balancer. That is, after the destination node receives the message, it needs to decapsulate the VLAN header additionally to obtain the five-tuple of the message and send it to the user-mode process for processing. In addition, since the related art requires additional overlay tunnels and VLAN encapsulation, it is also necessary to record additional tunnel information and session information in the tunnel, which will introduce session performance problems. When the session exceeds the node processing capacity, it will cause node failure. It can be seen that the related art has high requirements for tenants. However, most tenants only deploy the business on the backend service node, do not change or even understand the kernel behavior of the node, which will be detrimental to the promotion and use of the related technology. This solution can reduce these problems.
[0115] 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.
[0116] As can be seen from the foregoing, the cloud system also includes a cloud management platform. The cloud management platform receives a first instance building request (including at least one public cloud service configuration instruction) input by a tenant. The first instance building 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 storing the MAC addresses of the corresponding nodes is generated, so that it is convenient to subsequently search for 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.
[0117] In addition, the cloud management platform receives a load balancing service request (including at least one public cloud service configuration instruction) input by the tenant, the load balancing service request indicates the third subnet, and the cloud management platform creates a second ENI whose IP address belongs to the third subnet based on the load balancing service request. That is, in the process of the user requesting to obtain the load balancing service provided by the VPC system, an ENI belonging to the same subnet as the tenant's backend service node is created.
[0118] In some embodiments, the tenant may request to build an instance while requesting to obtain the load balancing service, so the load balancing service request and the first instance building request may be the same request. In other embodiments, the tenant may first request to obtain the load balancing service and then request to build an instance, so the load balancing service request and the first instance building request are different requests.
[0119] 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.
[0120] In order to ensure the reliability of user services, there are multiple load balancers, and the multiple load balancers are used to share tenant traffic according to the load balancing strategy. In one implementation, the multiple load balancers correspond to a controller. After the first ENI receives the request message, the controller selects a load balancer from the multiple load balancers according to the load balancing strategy to process the request message, that is, the selected load balancer executes step 602. Of course, the controller can also select the load balancer according to other strategies, such as random selection or sequential selection.
[0121] As can be seen from the foregoing, the multiple load balancers may be distributed in at least two AZs, the at least two AZs include the first AZ, and the first ENI is located in the first AZ. Based on this, the controller determines the load balancer located in the first AZ from the multiple load balancers based on the identification information of the first AZ, and selects a load balancer from the load balancers located in the first AZ, and the selected load balancer performs the above step 602. That is, the controller selects the load balancer according to the principle of proximity, so that the message processing efficiency can be improved and the overall performance can be improved.
[0122] 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.
[0123] 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 a router according to the destination IP address of the request message.
[0124] The destination node is configured with a message processing rule defined by the tenant of the VPC, including a firewall message filtering rule, a security group rule, or other rules.
[0125] 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, the target node sends the request message to the second virtual instance through the router according to the destination IP address of the request message.
[0126] As can be seen from the foregoing, after receiving the request message, the target node can parse the request message according to the traditional communication protocol to obtain the five-tuple of the request message, including the destination IP address, etc. The destination node confirms that the next-hop network device to the destination IP address is a router by searching the routing table, and transmits the request message to the second virtual instance through the router.
[0127] The destination node discards the request message when confirming that the request message does not comply with the message processing rule.
[0128] 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 indicates 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.
[0129] 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 according to the request message. Next, the response message processing process, that is, the message return, is introduced.
[0130] See also Figure 7 The above-mentioned message processing method based on public cloud service also includes the following steps.
[0131] The specific contents of step 701 to step 703 are similar to those of step 601 to step 603 and will not be repeated here.
[0132] 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.
[0133] 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.
[0134] 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. In addition, the response message also includes the source port, the destination port, the transport layer protocol, and the payload, etc. Among them, the source IP address, the destination IP address, the source port, the destination port, and the transport layer protocol constitute the five-tuple of the response message.
[0135] 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.
[0136] 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 the destination IP address of the response message. The load balancer determines the destination node from the multiple nodes of the message processing cluster according to the source IP address and the destination IP address of the response message.
[0137] As can be seen from the foregoing, 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. Based on this, the load balancer operates the five-tuple of the reply message according to the bidirectional consistent hashing algorithm, and determines the destination node among the multiple nodes according to the second operation result generated by the operation. Among them, 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.
[0138] Of course, the load balancer may also select a node from the multiple nodes as the destination node corresponding to the response message in other ways, such as selecting a node by using a traditional hash algorithm, a random selection method, or a sequential selection method.
[0139] After determining the destination node, the load balancer sends the response message to the destination node via the second ENI.
[0140] In an embodiment of the present application, before the load balancer sends the response message to the destination node via the second ENI, the destination MAC address of the response message is modified to the MAC address of the destination node, and the source MAC address is modified to the MAC address of the second ENI. In this way, the second ENI can transmit the response message to the destination node through layer 2 forwarding, and the destination node can parse the response message according to the traditional communication protocol after receiving the response message. While ensuring the load balancing and reliability of user services, this solution does not require tenants to perform any additional development on the nodes they build.
[0141] 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-mentioned multiple nodes.
[0142] As can be seen from the foregoing, in order to ensure the reliability of user services, there are multiple load balancers, which are used to share tenant traffic, and the multiple load balancers correspond to controllers. 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 strategy to process the request message, that is, the selected load balancer executes step 605. Of course, the controller can also select the load balancer according to other strategies, such as random selection or sequential selection.
[0143] 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 message processing efficiency.
[0144] 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.
[0145] Taking the message processing rules including firewall message filtering rules as an example, when the target node confirms that the reply message complies with the firewall message filtering rules, the target node sends the reply message to the first virtual instance through the router according to the destination IP address of the reply message.
[0146] As can be seen from the foregoing, after receiving the response message, the target node parses the response message according to the traditional communication protocol to obtain the five-tuple of the response message, including the destination IP address, etc. The destination node confirms that the next-hop network device to the destination IP address is a router by searching the routing table, and transmits the response message to the first virtual instance through the router.
[0147] The destination node discards the response message when confirming that the response message does not comply with the message processing rule.
[0148] 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.
[0149] In order to improve the reliability of this solution, the load balancer regularly detects the connectivity between each of the multiple nodes and the load balancer, and maintains the node information of the multiple nodes based on the connectivity. The connectivity is used to indicate whether the corresponding node is abnormal. In short, the load balancer can perform health checks on the multiple nodes.
[0150] Please refer to the following Figure 8The message processing method based on the public cloud service provided in the embodiment of the present application is exemplarily explained.
[0151] Figure 8 is a flowchart of another method for processing messages based on public cloud services provided in an embodiment of the present application. Figure 8 In the example, the private network address / subnet mask of the VPC is 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, and the firewall cluster serves as a message processing cluster. The firewall cluster includes multiple firewall nodes, and each firewall node is set with a firewall message filtering rule. The first ENI in the VPC system is a northbound ENI, and the second ENI is a southbound ENI, wherein 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.
[0152] Subnet 01, Subnet 02, and Subnet 03 are configured with routing table 1, routing table 2, and routing table 3, respectively. Among them, routing table 1 indicates that the next hop to '10.0.1.0 / 24' is the northbound ENI, and the next hop to '10.0.0.0 / 16' is local. Routing table 2 indicates that the next hop to '10.0.0.0 / 24' is the northbound ENI, and the next hop to '10.0.0.0 / 16' is local. Routing table 3 indicates that the next hop to '10.0.0.0 / 16' is local.
[0153] When VM1 in subnet 01 accesses VM2 in subnet 02, the traffic needs to be filtered by the firewall cluster deployed in subnet 03. The traffic returned by VM2 in subnet 02 to VM1 in subnet 01 also needs to be filtered by the firewall cluster, and the outbound and return packets of the same flow are required to pass through the same firewall node.
[0154] This example includes the following steps:
[0155] a1. When a tenant purchases a routed load balancing service in 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.
[0156] a2. Based on the tenant's instance creation request, the VPC system sets up a firewall cluster in subnet 03 and sets up a health check for it.
[0157] a3. Set the consistent hashing algorithm on the load balancer and select the bidirectional consistent hashing algorithm.
[0158] a4. In the routing table of subnet 01, configure the next hop to subnet 02 as the northbound ENI; in the routing table of subnet 02, configure the next hop to subnet 01 as the northbound ENI.
[0159] b1. The request message from VM1 in subnet 01 is transmitted to the load balancer via the northbound ENI. The source IP address of the request message obtained 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 the MAC address of VM1, and the destination MAC address is the MAC address of the northbound ENI. Among them, 10.0.0.1 is the private network address of VM1, and 10.0.1.1 is the private network address of VM2.
[0160] b2. Based on the request message, the load balancer selects a firewall node as the destination node according to the bidirectional consistent hashing algorithm, such as selecting firewall 01 as the destination node.
[0161] 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.
[0162] b4. The load balancer forwards the request message to the destination node via the southbound ENI at Layer 2.
[0163] b5. The destination node can address VM2 in subnet 02 according to the destination IP address of the request message.
[0164] c1. VM2 generates a response message based on the request message, and the response message 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 the MAC address of VM2, and the destination MAC address is the MAC address of the northbound ENI.
[0165] c2. Based on the response message, the load balancer still selects firewall 01 as the destination node according to the bidirectional consistent hashing algorithm.
[0166] 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.
[0167] c4. The load balancer forwards the response message to the destination node via the southbound ENI at Layer 2.
[0168] c5. The destination node can address VM1 in subnet 01 according to the destination IP address of the response message.
[0169] As can be seen from the above, this solution is based on IP routing in the cloud scenario to divert traffic, that is, to process messages according to IP addresses. Among them, the load balancer can select the next hop node (i.e., the destination node) based on the two-way consistent hashing algorithm, and forward the message to the next hop node at Layer 2 by modifying the MAC address of the message, without the need for additional tunnel encapsulation.
[0170] Fig. 9 Schematic diagram of the processing logic of a load balancer provided in an embodiment of the present application. The load balancer has a built-in flow table judgment module, a health check module, and a bidirectional consistent hashing algorithm. Fig. 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 flow enters, 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, the destination MAC address of the message is modified to the MAC address of the destination node, and the source MAC address is modified to the MAC address of the southbound ENI. After modifying the MAC address, the load balancer performs the outflow operation, that is, forwarding 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.
[0171] In summary, in the embodiments of the present application, the cloud system can be used by tenants to build a load balancer and a message processing cluster including multiple nodes, 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 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 directly forwarded from the load balancer to the backend service node through the southbound ENI through the second layer, avoiding other overlay protocol encapsulations from the load balancer to the tenant's backend service node, and simplifying the scene. 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.
[0172] The present application embodiment also provides a computing device 100. Fig.10As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the embodiment of the present application does not limit the number of processors and memories in the computing device 100.
[0173] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).
[0174] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0175] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0176] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively 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. 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.
[0177] Alternatively, the memory 106 stores executable code, and the processor 104 executes the executable code to respectively implement the functions of the aforementioned load balancer, controller, or backend service node, etc., 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.
[0178] 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.
[0179] The embodiment of the present application also provides 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 smart phone.
[0180] like Fig.11 As shown, 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.
[0181] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also respectively store some instructions for executing the message sending method provided in the embodiment of the present application. In other words, the combination of one or more computing devices 100 can jointly execute the instructions for executing the message sending method provided in the embodiment of the present application.
[0182] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the load balancer. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules in the load balancer, controller, backend service node, etc.
[0183] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.12 A possible implementation is shown. Fig.12As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each 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. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of multiple backend service nodes.
[0184] Fig.12 The connection method between the computing device clusters shown 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 hand over the functions implemented by multiple back-end service nodes to the computing device 100B for execution.
[0185] It should be understood that Fig.12 The functions of the computing device 100A shown in FIG. 1 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.
[0186] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.11 and Fig.12 The connection mode of the computing device cluster is shown. The difference is that 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.
[0187] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also respectively 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 may jointly execute the instructions for executing the message processing method based on the public cloud service.
[0188] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions for executing some functions of the cloud system. That is, 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.
[0189] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be a software or program product including 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, the at least one computing device executes the message processing method based on the public cloud service provided in the embodiment of the present application.
[0190] 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 containing 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 hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute a message processing method based on a public cloud service.
[0191] Next, a configuration method based on public cloud services provided in an embodiment of the present application is introduced.
[0192] Fig.13 : is a flowchart 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 an infrastructure that provides public cloud services, the infrastructure includes multiple data centers, each data center is provided with at least one server, and the public cloud service runs in one or more servers of the infrastructure. The method includes the following steps:
[0193] Step 1301: The cloud management platform receives one or more public cloud service configuration instructions input by a tenant.
[0194] In the embodiment of the present application, the tenant can use the client (such as Figure 1 The client 21 or the client 22 in the example inputs one or more public cloud service configuration instructions to the cloud management platform. The one or more public cloud service configuration instructions are used to instruct the creation of a VPC, a load balancer, and a message processing cluster on the infrastructure of the public cloud service.
[0195] 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 include a VPC creation request, a load balancing service setup request, and a first instance setup request. The VPC creation request indicates the creation of a VPC, the load balancing service setup request indicates the creation of a load balancer, and the first instance setup request indicates the setup of a message processing cluster.
[0196] 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.
[0197] 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, 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.
[0198] 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.
[0199] In the embodiment of the present application, the cloud system allows 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 configuration on the load balancer and the message processing cluster, which simplifies the tenant's operation, improves the practicality of the cloud system, and improves the performance of the cloud system.
[0200] Fig.14 1 is a schematic diagram of a structure based on a cloud management platform 1400 provided in an embodiment of the present application. The cloud management platform 1400 can be implemented by software, hardware or a combination of both to become part or all of the infrastructure of the cloud system. The infrastructure of the cloud system can be the infrastructure of any cloud system in the above embodiments. The cloud management platform is used to manage the infrastructure for providing 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. Fig.14 , the cloud management platform 1400 includes:
[0201] The configuration instruction receiving module 1401 is used to receive one or more public cloud service configuration instructions input by the tenant;
[0202] 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;
[0203] 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, 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.
[0204] Among them, the configuration instruction receiving module 1401 and the cloud system creation module 1402 can be implemented by software or by hardware. Exemplarily, the configuration instruction receiving module 1401 is taken as an example to introduce the implementation of the configuration instruction receiving module 1401. Similarly, the implementation of the cloud system creation module 1402 can refer to the implementation of the configuration instruction receiving module 1401.
[0205] As an example of a software functional unit, the configuration instruction receiving module 1401 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned 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 a data center or multiple data centers with similar geographical locations. Among them, usually a region can include multiple AZs.
[0206] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0207] As an example of a hardware functional unit, the configuration instruction receiving module 1401 may include at least one computing device, such as a server, etc. Alternatively, the configuration instruction receiving module 1401 may also be a device implemented using ASIC or PLD, etc. The PLD may be implemented using CPLD, FPGA, GAL or any combination thereof.
[0208] 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 computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0209] 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.
[0210] In the embodiment of the present application, the cloud system provided by the solution allows 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, the solution does not require tenants to perform additional overlay protocol configuration on the load balancer and the message processing cluster, which simplifies the tenant's operation, improves the practicality of the cloud system, and improves the performance of the cloud system.
[0211] 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 when configuring 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 belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0212] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction 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 instruction can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (digital subscriber line, DSL)) or wireless (for example: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0213] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" 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 only a description of the association relationship of the 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 the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0214] 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 the present 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 relevant laws, regulations and standards of relevant countries and regions.
[0215] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present 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
Cited By
Database VPC network access method and device, electronic equipment and program product
CN120856491A
A database VPC network access method and device, electronic equipment and program product
CN120856491B
