Message middleware, creation method, creation system, device, medium and product
By distributing processing nodes across different container clusters and managing them with different container orchestration tools, the problem of limited availability and disaster recovery capabilities of message middleware is solved, thereby improving high availability and disaster recovery capabilities.
Patent Information
- Application Number
- PCT/IB2025/052465
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-28
- Filing Date
- 2025-03-07
- Publication Date
- 2025-12-04
AI Technical Summary
The availability and disaster recovery capabilities of existing message middleware are directly affected by the availability of container orchestration tools, causing message middleware to malfunction in the event of a failure.
By distributing the message middleware's processing nodes across different container clusters and managing them with different container orchestration tools, high availability and disaster recovery capabilities are achieved, ensuring that if one container orchestration tool fails, another processing node can continue to function normally.
It improves the availability and disaster recovery capabilities of the message middleware, avoids the impact of a single container orchestration tool failure on the message middleware, and ensures that the system can still operate normally in the event of a failure.
Smart Images

Figure IB2025052465_04122025_PF_FP_ABST
Abstract
Description
[0001] Message middleware, creation method, creation system, device, medium and product The present disclosure claims priority to Chinese Patent Application No. 202410676081.0, filed on May 28, 2024 with the Chinese Patent Office and entitled "Message middleware, creation method, creation system, device, medium and product", the entire contents of which are incorporated herein by reference. TECHNICAL FIELD The present disclosure relates to the field of cloud computing technology, and particularly relates to a message middleware, a creation method, a creation system, a device, a medium and a product. BACKGROUND A message middleware is a supporting software system that provides synchronous or asynchronous and reliable message transmission for application systems in a network environment based on queue and message passing technology. The message middleware adopts an asynchronous communication mode, so that the message generator does not need to wait for the response of the message consumer, and can return immediately, thereby improving the response speed and throughput of the message. At the same time, the message middleware can also realize the decoupling between the message generator and the message consumer, that is, the message sender only needs to send the message to the message middleware, and the message middleware routes the message to the corresponding message consumer, thereby reducing the coupling degree between the two ends of the message transmission. Based on the above description, in order to ensure the normal consumption of the message, how to improve the availability of the message middleware has become a problem to be solved. SUMMARY In view of this, the embodiments of the present disclosure provide a message middleware, a creation method, a creation system, a device, a medium and a product to improve the availability of the message middleware. In a first aspect, the embodiments of the present disclosure provide a message middleware, comprising: a first processing node, the first processing node is deployed in a first container, and the first container is located in a first container cluster; a second processing node, the second processing node is deployed in a second container, and the second container is located in a second container cluster; wherein the first processing node and the second processing node are managed by different container orchestration tools; the first container and the second container are deployed under the same virtual private cloud network and have fixed network addresses, so that the first processing node and the second processing node are communicatively connected.In a second aspect, the embodiments of the present disclosure provide a message middleware creation system, comprising: a deployment program, a plurality of container orchestration tools, any container orchestration tool of the plurality of container orchestration tools comprising a controller and a network configuration component; the deployment program being configured to assign respective creation tasks to the plurality of container orchestration tools; the controller in any container orchestration tool being configured to execute the assigned creation task to create a container in which a processing node is deployed, the container being located in a container cluster, and the processing node deployed in the container being managed by the any container orchestration tool; and the network configuration component in any container orchestration tool being configured to establish a communication connection between processing nodes deployed in different containers, the different containers being created by different container orchestration tools including the any container orchestration tool; wherein the message middleware comprises processing nodes managed by the controllers in the plurality of container orchestration tools respectively, the processing nodes in the message middleware are deployed under the same virtual private cloud network, and have fixed network addresses. In a third aspect, the embodiments of the present disclosure provide a message middleware creation method, comprising: generating respective creation tasks of a plurality of container orchestration tools; obtaining processing nodes obtained after the plurality of container orchestration tools execute the respective creation tasks, to form a message middleware by the obtained plurality of processing nodes, wherein the plurality of processing nodes are deployed in different containers, the different containers are located in different container clusters respectively, the plurality of processing nodes are managed by different container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network, and have fixed network addresses; and establishing a communication connection between the plurality of processing nodes in the message middleware. In a fourth aspect, the embodiments of the present disclosure provide an electronic device, comprising a processor and a memory, the memory being configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the message middleware creation method in the third aspect. The electronic device can further comprise a communication interface configured to communicate with other devices or communication networks. In a fifth aspect, the embodiments of the present disclosure provide a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium storing executable code, when the executable code is executed by a processor of an electronic device, the processor can at least implement the message middleware creation method in the third aspect. In a sixth aspect, the embodiments of the present disclosure provide a computer program product, the computer program product comprising a computer program or instructions, when the computer program or instructions are executed by a processor, the processor can implement the message middleware creation method in the third aspect. The message middleware provided by the embodiments of the present disclosure comprises a first processing node and a second processing node.The plurality of processing nodes can be managed by different container orchestration tools. The first processing node is deployed in a first container, and the first container is located in a first container cluster. The second processing node is deployed in a second container, and the second container is located in a second container cluster. In addition, the first container and the second container are in the same virtual private cloud network and have fixed private network addresses, so that the first processing node and the second processing node have a communication connection. In the message middleware, because different processing nodes are managed by different container orchestration tools, when the container orchestration tool managing the first processing node fails and further causes the first processing node to be unable to normally process the to-be-processed message, the second processing node can continue to process the to-be-processed message. On the other hand, although the plurality of processing nodes can improve the disaster recovery capability of the message middleware, because the processing nodes of the message middleware are directly managed by the container orchestration tools, the failure of the processing node can also be caused by the failure of the container orchestration tool managing the node. That is, the availability of the container orchestration tool can directly affect the availability of the processing node and the disaster recovery capability of the message middleware. In the message middleware, because different processing nodes in the message middleware are controlled by different container orchestration tools, even if the container orchestration tool managing the first processing node fails, it will not affect the normal work of the second processing node and the container orchestration tool corresponding to the second processing node, so that the message middleware can still work normally, that is, the availability and the disaster recovery capability of the message middleware are improved. BRIEF DESCRIPTION OF DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained without creative labor. FIG. 1 is a structural schematic diagram of a message middleware provided by an embodiment of the present disclosure; FIG. 2 is an application process schematic diagram of a message middleware provided by an embodiment of the present disclosure; FIG. 3 is a structural schematic diagram of a message middleware creation system provided by an embodiment of the present disclosure; FIG. 4 is a structural schematic diagram of another message middleware creation system provided by an embodiment of the present disclosure; FIG. 5 is a flowchart of a message middleware creation method provided by an embodiment of the present disclosure; FIG. 6 is a structural schematic diagram of a message middleware creation apparatus provided by an embodiment of the present disclosure; and FIG. 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.DETAILED DESCRIPTION In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some but not all of the embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative effort are within the scope of protection of the present disclosure. The terms used in the embodiments of the present disclosure are only for the purpose of describing particular embodiments and are not intended to limit the present disclosure. The singular forms "a", "said" and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. "Plural" generally includes at least two, but does not exclude the case of including at least one, unless the context clearly indicates otherwise. It should be understood that the term "and / or" used herein only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally means that the front and rear associated objects are a "or" relationship. Depending on the context, the words "if", "if" as used herein can be interpreted as "when" or "when" or "in response to determining" or "in response to identifying". Similarly, depending on the context, the phrase "if determined" or "if identified (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when identified (stated condition or event)" or "in response to identifying (stated condition or event)". It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions, and provide corresponding operation portal for user to choose authorization or refusal. It should also be noted that the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the goods or systems including a series of elements not only include those elements, but also include other elements not explicitly listed, or also include elements inherent to such goods or systems.Without more limitations, an element specified by the statement "comprising a" does not exclude the presence of additional identical elements in the composition or system including the element. The embodiments of the present disclosure can be understood more specifically with the following detailed description in conjunction with the accompanying drawings. The following embodiments and features described below can be combined with each other in the case of no conflict between the embodiments. In addition, the sequence of steps in the following method embodiments is only an example, not a strict limitation. FIG. 1 is a structural schematic diagram of a message middleware provided by an embodiment of the present disclosure. The message middleware can include: a plurality of processing nodes in communication connection. Among them, the message middleware composed of a plurality of processing nodes is a node cluster, and any two processing nodes in the cluster can communicate. And the plurality of processing nodes in the message middleware can be created and managed by different container orchestration tools. Optionally, the container orchestration tool and the processing node can be in a one-to-many or one-to-one relationship. Optionally, the message middleware can be a distributed message middleware, such as Kafka, RocketMQ, RabbitMQ, etc. The container orchestration tool can include Kubernetes (K8S for short), Docker Swarm, Apache Mesos, etc. As shown in FIG. 1, the figure schematically shows two processing nodes, i.e., a first processing node and a second processing node in communication connection, but the present disclosure does not limit the number of processing nodes in the message middleware. Among them, the first processing node is deployed in a first container, and the first container is located in a first container cluster. The second processing node is deployed in a second container, and the second container is located in a second container cluster. The first processing node and the second processing node are deployed in the same virtual private cloud (Virtual Private Cloud, VPC for short) network, and also have a fixed private network address. In addition, since the processing node is deployed in the container, the management of the processing node by the container orchestration tool is more accurate, that is, the management of the container in which the processing node is deployed. And since the processing node in the message middleware is deployed in the container, the message middleware provided by the embodiment of the present disclosure is actually a containerized message middleware. Compared with purchasing fixed cloud computing resources, such as cloud servers (Elastic Compute Service, ECS for short), the containerized message middleware provided by the embodiment of the present disclosure also has the advantages of simple deployment, rapid scaling, etc.Based on this, the working process of the containerized message middleware shown in FIG. 1 can be described in detail as follows: for a first processing node normally working in the message middleware, the first processing node can receive a message generated by a message producer, and can further forward the message to a message consumer for consumption by the message consumer. Meanwhile, the first processing node can also synchronize, to a second processing node in the message middleware, a to-be-processed message in the received message which is not consumed by the message consumer. After the message synchronization, when the first processing node fails, the second processing node starts to normally work, that is, the second processing node can forward the to-be-processed message synchronized from the first processing node to the message consumer. Optionally, the synchronization process of the to-be-processed message can specifically include that the first processing node can send a message synchronization request to the second processing node. The domain name server can parse the message synchronization request according to a correspondence between a node name and a private network address recorded locally, to obtain the private network address of the second processing node. The domain name server can further send the to-be-processed message in the message synchronization request to the second processing node according to the network address, so as to realize synchronization of the to-be-processed message. The specific process of the establishment of the communication connection between the processing nodes in the message middleware and the sending process of the message synchronization request can be referred to the related description in the following embodiments. Optionally, the first processing node can be considered as a master node of the message middleware, the second processing node can be considered as a backup node in the message middleware, and the first processing node and the second processing node can be created and managed by different container orchestration tools. It can be seen that the setting of the plurality of processing nodes in the message middleware can improve the disaster recovery performance of the message middleware. However, in actual application, the failure of the first processing node can be caused by the failure of the processing node itself, or can be caused by the failure of the container orchestration tool managing the first processing node, so that the availability of the processing node can be limited by the availability of the container orchestration tool. The lower the availability of the container orchestration tool is, the more serious the availability of the processing node is limited. Optionally, the availability can be represented by a percentage of the uptime to the total running time. Since the first processing node and the second processing node are dispersed and managed by different container orchestration tools in the message middleware provided in this embodiment, the availability of the container orchestration tool managing the first processing node does not affect the availability of the second processing node and the container orchestration tool managing the second processing node, so that the availability of the message middleware can be improved, and the disaster recovery capability of the message middleware can also be improved. In this embodiment, the plurality of processing nodes in the message middleware which are in the same VPC can be managed by different container orchestration tools.In the case that the first processing node cannot normally process the to-be-processed message after the container orchestration tool managing the first processing node fails, the second processing node can process the to-be-processed message. Since the processing nodes in the message middleware are directly managed by the container orchestration tool, the failure of the processing node can also be caused by the failure of the container orchestration tool managing the node. That is, the availability of the container orchestration tool can directly affect the availability of the processing node, and thus the disaster recovery capability of the message middleware. In the above solution, since different processing nodes in the message middleware are scattered and controlled by different container orchestration tools, even if the container orchestration tool corresponding to the first processing node fails, the second processing node and the container orchestration tool corresponding to the second processing node can still work normally, that is, the message middleware can still work normally, and thus the availability and disaster recovery capability of the message middleware are improved. In addition, the beneficial effects of the message middleware provided by the embodiment shown in FIG. 1 can also be understood in combination with the following content: Although the arrangement of multiple processing nodes in the message middleware can improve the disaster recovery capability of the message middleware to some extent, a common way is to manage all the multiple processing nodes included in the message middleware by one container orchestration tool, that is, to centrally manage the processing nodes. This centralized management can make the availability of multiple processing nodes all limited by one container orchestration tool, which is obviously not conducive to further improvement of the availability and disaster recovery capability of the message middleware. Compared with the above common way, since the multiple processing nodes included in the message middleware provided by the embodiments of the present disclosure are scattered and managed by different container orchestration tools, the availability of one processing node is limited by the container orchestration tool managing the processing node, while the availability of other processing nodes is not limited by the availability of the container orchestration tool, and thus the availability and disaster recovery capability of the message middleware can be improved. In addition, in order to improve the disaster recovery capability and availability of the message middleware, optionally, the first container cluster and the second container cluster can be located in different availability zones, and the container orchestration tool used to create and manage the containers in the container cluster can be located in the same availability zone as the containers created by the container orchestration tool. And different container orchestration tools can be deployed in the same or different VPCs. For example, the message middleware can include three processing nodes, i.e., processing node 1-processing node 3. And the processing node 1 is managed by the container orchestration tool 1, the processing node 2 is managed by the container orchestration tool 2, and so on. Among them, the container orchestration tool 1 and the processing node 1 can be deployed in the region 1, and the other container orchestration tools and processing nodes are similar. The above example can also be understood in combination with the embodiment shown in FIG. 2.In the case of handing the processing nodes to different container orchestration tools, the embodiment further hands the processing nodes to the container orchestration tools in different available zones. At this time, the availability of one processing node is limited by the availability of the available zone where the container orchestration tool managing the processing node is located, while the availability of other processing nodes is not limited by the available zone. Compared with the manner in the embodiment shown in FIG. 2, if different container orchestration tools are all deployed in the same available zone, a large-area failure of the available zone will greatly affect the availability of the processing nodes, that is, the availability of multiple processing nodes can all be limited by the availability of the available zone, and thus the availability and disaster recovery capability of the message middleware cannot be guaranteed. The message middleware mentioned in the above embodiment can reduce the influence range of a large-area failure of one available zone on the processing nodes, so as to guarantee the availability and disaster recovery capability of the message middleware. For ease of understanding, the specific working process of the message middleware can be described in a specific scenario below. The following content can also be understood in combination with FIG. 2. Continuing the above example, the message middleware can include three processing nodes, i.e., processing node 1-processing node 3. Among them, processing node 1 can serve as the master node of the message middleware, and the remaining processing nodes can serve as the standby nodes. And processing node 1 is managed by container orchestration tool 1, processing node 2 is managed by container orchestration tool 2, and so on. Among them, container orchestration tool 1 and processing node 1 can be deployed in region 1, container orchestration tool 2 and processing node 2 can be deployed in region 2, and so on. In the online shopping scenario, during the peak consumption period, a large number of orders, i.e., messages, can be generated by user terminals as message consumers. Processing node 1 normally working in the message middleware can receive a large number of orders generated by user terminals, and further forward them to order servers as message consumers to process the orders, i.e., realize the consumption of messages. And in the process of normal generation and consumption of messages, processing node 1 can also synchronize messages not processed by the order service to other processing nodes of the message middleware, such as processing node 2, in real time. During the consumption of messages, the situation that region 1 is paralyzed may occur, and thus processing node 1 cannot work normally. As shown in FIG. 2, the communication link between the message producer, processing node 1 and the message consumer is in a disconnected state. In this case, since processing node 1 and other processing nodes in the message middleware are scattered to different regions, the failure of processing node 1 does not affect other processing nodes.At this time, as shown in FIG. 2, the communication link between the message producer, the processing node 2 and the message consumer is in a connected state, so that the processing node 2 can continue to forward the message to the order server instead of the processing node 1, thereby ensuring the normal operation of the message middleware. In addition, the above only schematically gives the use of the message middleware in the online shopping scenario. But the present disclosure is not limited to the use scenario of the message middleware, and any scenario that needs to use the message middleware can use the message middleware provided by the present embodiment with high availability and high disaster recovery capability. And the contents not described in detail in the present embodiment and the technical effects that can be achieved can also be referred to the related description in the above embodiments, which will not be described here. Based on the above embodiments, the creation process of the message middleware provided by the above embodiments can be further described in detail below. FIG. 3 is a structural schematic diagram of a message middleware creation system provided by an embodiment of the present disclosure. As shown in FIG. 3, the system can include a deployment program, a plurality of container orchestration tools, and any container orchestration tool in the plurality of container orchestration tools can specifically include a controller and a network configuration component. The deployment program can assign respective creation tasks to the plurality of container orchestration tools. The controller in any container orchestration tool can execute the creation task assigned by the deployment program to create a container in which a processing node is deployed, such as a container in which a first processing node is deployed. Similar to any container orchestration tool, other container orchestration tools can also execute the creation task to create other processing nodes in the message middleware, such as a second processing node. Then, after different container orchestration tools execute respective creation tasks, the message middleware provided by the embodiment shown in FIG. 1, which includes a plurality of processing nodes, can be obtained. And after the container orchestration tool creates the container in which the processing node is deployed, the container orchestration tool continues to be responsible for the subsequent management of the processing node. Similar to the embodiment shown in FIG. 1, since the processing node is deployed in the container, the message middleware created by the creation system provided by the present embodiment is actually a containerized message middleware. Optionally, when the container orchestration tool is K8S, the controller in the container orchestration tool can include the resource type, the resource name and the resource quantity in the creation task assigned by the deployment program operator o. Optionally, the resource type includes a container group, a custom resource definition (CRD) and the like, the resource quantity can be the number of containers, and the resource name can be the container name. After the above controller executes the creation task, the network configuration component in the container orchestration tool can further establish the communication connection between different processing nodes, at this time, the creation of the message middleware is completed.And when the message middleware is a containerized message middleware, the processing nodes with the communication connection actually constitute a container network. The communication connection between the processing nodes can be used to synchronize the to-be-processed messages between different processing nodes, so that the message middleware has availability and disaster recovery capability. When the container orchestration tool is K8S, optionally, the network configuration component has a container network interface (CNI) plugin, and the network configuration component can be terway. For the establishment of the communication connection between the processing nodes, optionally, the network configuration components included in different container orchestration tools can establish the communication connection between the processing nodes in a cooperative manner. Specifically, the network configuration component in any container orchestration tool can process the elastic network interfaces (ENIs) corresponding to the processing node cluster. oThen, a binding relationship between the elastic network card and the processing node created by any of the container orchestration tools is created. Similarly, another container cluster corresponding to the elastic network card created by the other container orchestration tool can also have a binding relationship between the processing node created by the other container orchestration tool. After each processing node is bound to the network card, a container network is formed, that is, a communication connection between different processing nodes in the message middleware is established, and the communication connection can be used to realize the synchronization of messages between the processing nodes. With reference to the message middleware shown in FIG. 1, the message synchronization process between the first processing node and the second processing node can be described as follows: The first processing node can send a message synchronization request to the second processing node, the message synchronization request can be received by the elastic network card having a binding relationship with the first processing node, and the elastic network card can send the message synchronization request to the elastic network card having a binding relationship with the second processing node according to the routing information stored in the elastic network card, so that the elastic network card finally sends the message synchronization request to the second processing node. Since the message synchronization request can include a to-be-processed message, at this time, the synchronization of the message between the processing nodes is completed. The elastic network cards created by different container orchestration tools can store routing information of different processing nodes, and the routing information can specifically include private network addresses of different processing nodes. Since the message synchronization request can include a to-be-processed message that needs to be synchronized, the sending process of the message synchronization request can also be regarded as the synchronization process of the to-be-processed message. In the sending process of the message synchronization request, there is also a domain name resolution process, and the specific process of the domain name resolution can be referred to the related description in the embodiment shown in FIG. 4. The embodiment provides a message middleware creation system, which can include a deployment program and a plurality of container orchestration tools. Any container orchestration tool can specifically include a controller and a network configuration component. The deployment program can assign a processing node creation task to different container orchestration tools. The container orchestration tools can execute the task to complete the creation of the processing nodes, and can further establish a communication connection between the processing nodes created by different container orchestration tools. Thus, the creation system can create a message middleware including a plurality of processing nodes and a communication connection. During the running of the message middleware, a normal processing node can process a to-be-processed message, and another processing node can process the to-be-processed message after the container orchestration tool managing the processing node fails. Since the processing nodes of the message middleware are directly managed by the container orchestration tools, the failure of the processing nodes can also be caused by the failure of the container orchestration tool managing the nodes.That is, the availability of the container orchestration tool can directly affect the availability of the processing node and the disaster recovery capability of the message middleware. In the message middleware created by using the scheme, because different processing nodes are dispersed and controlled by different container orchestration tools, even if the container orchestration tool corresponding to one processing node fails, the normal work of another processing node and the container orchestration tool corresponding to the another processing node will not be affected, so that the message middleware can still work normally, that is, the availability and disaster recovery capability of the message middleware are improved. Optionally, in order to improve the communication security between the processing nodes, the network configuration component of the container orchestration tool can also divide the processing nodes into a security group, and the processing nodes in the security group are equivalent to being in the whitelist. Because the security group can control the inflow and outflow of data in the processing nodes, that is, only the data sent to the processing nodes in the whitelist can safely flow out, and only the data from the processing nodes in the whitelist can safely flow in, so the communication security between the processing nodes can be ensured. FIG. 4 is a structural schematic diagram of another message middleware creation system provided by an embodiment of the present disclosure. As shown in FIG. 4, on the basis of the system shown in FIG. 3, a domain name resolution server is further included. The domain name resolution server can be used in the creation stage and the use stage of the message middleware. Specifically, in the creation stage, the processing node managed by any container orchestration tool can register the node name and the private network address of the processing node in the domain name resolution server. The domain name resolution server can record the correspondence between the node name and the private network address of the processing node in response to the registration of the information. In the use stage, the domain name resolution server can use the correspondence recorded locally to resolve the private network address of the processing node, so as to realize the synchronization of data between the processing nodes. Then, the process of using the correspondence recorded by the domain name resolution server to realize the synchronization of data of the message middleware shown in FIG. 1 can be as follows: the domain name resolver can record the node name, the private network address of the processing node, and the correspondence therebetween in response to the registration of the processing node. When the first processing node sends a message synchronization request to the second processing node, the message synchronization request can be sent to the domain name resolution server by the elastic network card bound to the first processing node. The domain name resolution server can analyze the message synchronization request based on the above-mentioned correspondence to obtain the private network address of the second processing node. Then, the domain name resolution server can feed back the resolved private network address to the elastic network card bound to the first processing node, and the network card can further send the message synchronization request to the elastic network card bound to the second processing node according to the routing information stored by the network card, so that the elastic network card sends the message synchronization request to the second processing node, that is, the synchronization of the message between the processing nodes is completed.It can be seen that, in the above synchronization process, since the domain name resolution server records the correspondence between the processing nodes in different container clusters and the respective private network addresses, the domain name resolution server can query the locally recorded correspondence based on the name of the second processing node contained in the message synchronization request, and after querying the name of the second processing node, the network address of the second processing node can be further obtained. Alternatively, after the domain name server queries the network address of the second processing node, it can also feed back an A record or an AAAA record to the first processing node. The A record indicates that the network address of the second processing node is an Internet Protocol version 4 (Internet Protocol version 4, abbreviated as IPv4) address. The AAAA record indicates that the network address of the second processing node is an Internet Protocol version 6 (Internet Protocol version 6, IPv6) address. In the present embodiment, for the containerized message middleware, even if the network address changes due to container scaling, since the domain name resolution server performs domain name resolution based on the fixed node name of the processing node, the accurate and effective network address of the processing node can also be obtained. Based on the effective network address, the message synchronization can be finally completed. In addition, according to the description in the above embodiments, the processing nodes created by different container orchestration tools can be in different availability zones or can be located in different container clusters. In this case, during the implementation of message synchronization, the domain name resolution server needs to perform cross-cluster domain name resolution. Compared with the domain name resolution server coreDNS provided by the container orchestration tool K8S, the domain name resolution server used in the present embodiment provides a Private Zone service. Since the domain name resolution server can record the correspondence between the node name and the private network address, the domain name resolution server can use the Private Zone service to implement cross-cluster domain name resolution. In the present embodiment, for the processing nodes in different container clusters, the Private Zone service provided by the domain name resolution server can be used to perform domain name resolution on the cross-cluster processing nodes, so as to obtain the private network address of the processing node and finally complete the message synchronization. In addition, the contents not described in detail in the present embodiment and the technical effects that can be achieved can be referred to the related description in the above embodiments, which will not be described here. Based on the above provided message middleware creation system, the message middleware creation process can be further described from the perspective of method. FIG. 5 is a flowchart of a message middleware creation method provided by an embodiment of the present disclosure.The method provided by the embodiments of the present disclosure can be executed by the message middleware creation system shown in the above embodiments. As shown in FIG. 5, the method can include the following steps.
[0002] 5101, generating a plurality of container orchestration tools respectively corresponding to a creation task. This step S101 can be executed by the deployment program in the message middleware creation system described above. The deployment program can allocate a corresponding processing node creation task for each of the plurality of container orchestration tools. The contents not described in detail in this step can be referred to the related description in the above system embodiments, and will not be described here again.
[0003] 5102, obtain the processing nodes obtained after the plurality of container orchestration tools execute the respective creation tasks, to form a message middleware by the obtained plurality of processing nodes, wherein the plurality of processing nodes are deployed in different containers, the different containers are respectively in different container clusters, the plurality of processing nodes are managed by different container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network and have fixed private network addresses. Step S102 is specifically executed by the controller in the different container orchestration tools in the message middleware creation system. Specifically, the controller included in any of the plurality of container orchestration tools can execute the creation task allocated by the deployment program to create a container in which the processing node is deployed. Similar to any container orchestration tool, other container orchestration tools can also execute the creation task to create other processing nodes in the message middleware. Moreover, the container orchestration tool is also responsible for the subsequent management of the processing node deployed in the container after the container is created. After the different container orchestration tools execute the respective creation tasks, a plurality of processing nodes as shown in the embodiment of FIG. 1 can be obtained. Moreover, the processing nodes obtained after the different container orchestration tools execute the creation tasks can be deployed under the same VPC and have fixed private network addresses. Meanwhile, the different processing nodes can also be deployed in different containers, and the different containers are respectively in different container clusters. As described in the embodiment of FIG. 1, the different container orchestration tools can obtain the first processing node and the second processing node after executing the creation task. The first processing node is deployed in the first container, and the first container is in the first container cluster. The second processing node is deployed in the second container, and the second container is in the second container cluster. Therefore, the message middleware created by the system provided by the embodiment of the present disclosure is also a containerized message middleware. Optionally, when the container orchestration tool is specifically K8S, the controller in the container orchestration tool can be specifically an operator. The creation task allocated by the deployment program can include a resource type, a resource name, and a resource quantity. Optionally, the resource type includes a container, a custom resource definition (CRD), etc. The resource quantity can be the number of containers, and the resource name can be a container name. Then, any container orchestration tool can create a container running according to the resource type and the resource quantity included in the creation task, and the container can be deployed with a processing node.
[0004] S103, establish communication connections between multiple processing nodes in the message middleware. Step S103 can be implemented by the network configuration components in different container orchestration tools in the message middleware creation system working together. Specifically, after the controller completes the creation task, the network configuration components in the container orchestration tools can further establish communication connections between different processing nodes, at which time the message middleware provided in the embodiment shown in FIG. 1 is created. And for the containerized message middleware, the processing nodes that establish communication connections actually constitute a container network. With the communication connections between the processing nodes, the messages to be processed can be synchronized between different processing nodes, so that the message middleware has availability and disaster recovery capability. For the establishment of communication connections between the processing nodes, the network configuration components included in different container orchestration tools can establish communication connections between the processing nodes in a cooperative manner. Specifically, the network configuration components in any container orchestration tool can process the elastic network cards (Elastic Network Interfaces, ENIs for short) corresponding to the processing node cluster oThen, a binding relationship between the elastic network card and the processing node created by any of the container orchestration tools is created. Similarly, another container cluster corresponding to an elastic network card created by another container orchestration tool can also have a binding relationship between the elastic network card and the processing node created by the other container orchestration tool. After the processing nodes are bound to the network cards, a container network is formed, that is, a communication connection between different processing nodes in the message middleware is established, and the communication connection can be used to synchronize messages between the processing nodes. In the embodiment, the message middleware created in the embodiment includes multiple processing nodes connected by communication connections, and the multiple processing nodes can be managed by different container orchestration tools. The first processing node running normally can process the to-be-processed messages. After the container orchestration tool managing the first processing node fails, the second processing node can process the to-be-processed messages. Although the multiple processing nodes can improve the disaster recovery capability of the message middleware, the failure of the processing nodes can also be caused by the failure of the container orchestration tool managing the nodes. That is, the availability of the container orchestration tool can directly affect the availability of the processing nodes and the disaster recovery capability of the message middleware. In the above scheme, because different processing nodes in the message middleware are controlled by different container orchestration tools, even if the container orchestration tool corresponding to the first processing node fails, the second processing node and the container orchestration tool corresponding to the second processing node can still work normally, that is, the message middleware can still work normally, and thus the availability and the disaster recovery capability of the message middleware are improved. In addition, the technical effects that can be achieved by the embodiment can be referred to the related descriptions in the above embodiments, which will not be repeated here. Optionally, to improve the communication security between the processing nodes, the network configuration component of the container orchestration tool can also divide the processing nodes into a security group, and the processing nodes in the security group are equivalent to being in a white list. Because the security group can control the inflow and outflow of data in the processing nodes, that is, only the data sent to the processing nodes in the white list can safely flow out, and only the data from the processing nodes in the white list can safely flow in, the communication security between the processing nodes can be ensured. It should be noted that the process of creating the security group by the network configuration component can be performed after step S102. After the communication connection is established by allocating the elastic network card according to the method shown in FIG. 5, the communication connection can be used to further synchronize messages between the processing nodes.The message synchronization process between the first processing node and the second processing node can be described as follows: the first processing node can send a message synchronization request to the second processing node, the message synchronization request can be received by the elastic network card having a binding relationship with the first processing node, and the elastic network card can send the message synchronization request to the elastic network card having a binding relationship with the second processing node according to the routing information stored in the elastic network card, so that the elastic network card finally sends the message synchronization request to the second processing node. Since the message synchronization request can include the to-be-processed message, at this time, the synchronization of the message between the processing nodes is completed. Optionally, the system can also have domain name resolution capability, and the domain name resolution capability can be provided by a domain name resolution server. Specifically, in the creation stage, the processing node managed by any container orchestration tool can register the node name and private network address of the processing node in the domain name resolution server. The domain name resolution server can record the correspondence between the node name and the private network address of the processing node in response to the information registration. In the use stage, the domain name resolution server can use the correspondence recorded locally to resolve the private network address of the processing node, so as to realize the synchronization of data between the processing nodes. Therefore, the process of using the correspondence recorded by the domain name resolution server to realize data synchronization can be as follows: the domain name resolver can record the node name, the private network address of the processing node, and the correspondence therebetween in response to the registration of the processing node. When the first processing node sends a message synchronization request to the second processing node, the message synchronization request can be sent to the domain name resolution server by the elastic network card bound to the first processing node. The domain name resolution server can parse the message synchronization request based on the correspondence to obtain the private network address of the second processing node. Then, the domain name resolution server can feed back the parsed private network address to the elastic network card bound to the first processing node, and the elastic network card can further send the message synchronization request to the elastic network card bound to the second processing node according to the routing information stored in the elastic network card, so that the elastic network card sends the message synchronization request to the second processing node, that is, the synchronization of the message between the processing nodes is completed. In this embodiment, the domain name resolution server can query the correspondence recorded locally based on the name of the second processing node contained in the message synchronization request, and after the name of the second processing node is queried, the network address of the second processing node can be further obtained. Since the name of the second processing node is fixed and unchangeable, and the domain name resolution server also records the real-time updated correspondence, the network address obtained by querying can be guaranteed to be valid, and the successful transmission of the message synchronization request can be finally guaranteed, that is, the successful synchronization of the to-be-processed message can be guaranteed.In addition, according to the description in the above embodiments, the processing nodes created by different container orchestration tools can be in different availability zones, or can be located in different container clusters. In this case, during the implementation of message synchronization, the domain name resolution server needs to perform cross-cluster domain name resolution. Compared with the domain name resolution server coreDNS in the container orchestration tool K8S, the domain name resolution server used in this embodiment provides a Private Zone service. Since the domain name resolution server can record the correspondence between the node name and the private network address, the domain name resolution server can use the Private Zone service to implement cross-cluster domain name resolution. In this embodiment, for processing nodes in different container clusters, the Private Zone service provided by the domain name resolution server can be used to perform domain name resolution on the cross-cluster processing nodes, so as to obtain the private network address of the processing nodes, and finally complete the synchronization of messages. In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can be seen from the related description in the above embodiments, and will not be described here. The message middleware creation device of one or more embodiments of the present disclosure will be described in detail below. Those skilled in the art can understand that these creation devices can be configured by using commercially available hardware components through the steps taught by the present solution. FIG. 6 is a structural schematic diagram of a message middleware creation device provided by an embodiment of the present disclosure. As shown in FIG. 6, the device includes: a generation module 11, configured to generate a plurality of creation tasks corresponding to a plurality of container orchestration tools respectively. An acquisition module 12, configured to acquire processing nodes obtained after the plurality of container orchestration tools execute the respective creation tasks, to form a message middleware by the acquired plurality of processing nodes, wherein the plurality of processing nodes are deployed in different containers, the different containers are respectively in different container clusters, the plurality of processing nodes are managed by different container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network, and have fixed private network addresses. An establishment module 13, configured to establish a communication connection between the plurality of processing nodes in the message middleware. Optionally, the device further includes: a creation module 14, configured to create containers according to a resource type and a resource quantity contained in the creation task; and divide the created containers into a security group.Optionally, the establishing module 13 is configured to create an elastic network card corresponding to a container cluster in which any processing node is deployed, the any processing node is deployed in a container created by any container orchestration tool, the any container orchestration tool is any one of the plurality of container orchestration tools; create a binding relationship between the elastic network card and the any processing node; and establish a communication connection between the plurality of processing nodes according to the binding relationship corresponding to each of the plurality of processing nodes. Optionally, the message middleware includes a first processing node and a second processing node, the first processing node is managed by a target container orchestration tool of the plurality of container orchestration tools, the first processing node is deployed in a first container, the second processing node is deployed in a second container, the second processing node is managed by another container orchestration tool of the plurality of container orchestration tools, and the first container and the second container are located in different availability zones. The device further includes a recording module 15 and an analyzing module 16. The recording module 15 is configured to record a correspondence between a node name of a processing node managed by different container orchestration tools and a private network address of the processing node in response to information registration. The analyzing module 16 is configured to perform domain name resolution on the message synchronization request according to the correspondence to obtain the private network address of the second processing node, so that the elastic network card having the binding relationship with the first processing node sends the message synchronization request to the second processing node according to the private network address analyzed. The device shown in FIG. 6 can perform the method of the embodiment shown in FIG. 5, and parts of the embodiment not described in detail can refer to the related description of the embodiment shown in FIG. 5. The execution process and technical effects of the technical solution can refer to the description of the embodiment shown in FIG. 5, and will not be described here again. In a possible design, the message middleware creation method provided in each of the above embodiments can be applied in an electronic device. As shown in FIG. 7, the electronic device can include a processor 21 and a memory 22. The memory 22 is configured to store a program supporting the electronic device to perform the message middleware creation method provided in the embodiment shown in FIG. 5, and the processor 21 is configured to execute the program stored in the memory 22.The program includes one or more computer instructions, wherein the one or more computer instructions can realize the following steps when executed by the processor 21: generating a plurality of container orchestration tools respectively corresponding to a creation task; obtaining a plurality of processing nodes obtained after the plurality of container orchestration tools execute the respective creation tasks, to form a message middleware by the plurality of obtained processing nodes, wherein the plurality of processing nodes are deployed in different containers, the different containers are respectively in different container clusters, the plurality of processing nodes are managed by different container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network and have a fixed private network address; and establishing a communication connection between the plurality of processing nodes in the message middleware. Optionally, the processor 21 is further configured to execute all or part of the steps in the embodiment shown in FIG. 5. The electronic device can further include a communication interface 23 for communication between the electronic device and other devices or communication networks. In addition, the embodiment of the present disclosure provides a computer storage medium for storing computer software instructions for the electronic device, which includes a program for executing the message middleware creation method shown in FIG. 5. In addition, the embodiment of the present disclosure provides a computer storage medium for storing computer software instructions for the electronic device, which includes a program for executing the message middleware creation method shown in FIG. 5. In addition, the embodiment of the present disclosure provides a computer program product. The computer program product includes computer programs or instructions. When the computer programs or instructions are executed by the processor, the processor can realize the steps or functions of the method shown in FIG. 5. Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present disclosure, but not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
CLAIM 1. A message middleware, wherein, The method comprises: a first processing node, the first processing node is deployed in a first container, the first container is located in a first container cluster; a second processing node, the second processing node is deployed in a second container, the second container is located in a second container cluster; Wherein, the first processing node and the second processing node are managed by different container orchestration tools; the first container and the second container are deployed under the same virtual private cloud network and have fixed network addresses, so that the first processing node and the second processing node are connected in communication.
2. The middleware according to claim 1, wherein, The first processing node is used for receiving a to-be-processed message generated by a message producer; and synchronizing the to-be-processed message to the second processing node; the second processing node is used for sending the to-be-processed message to a message consumer after a container orchestration tool managing the first processing node fails.
3. The middleware according to claim 1 or 2, wherein, The first container cluster and the second container cluster are located in different availability zones.
4. The middleware according to claim 2, wherein, The first processing node is used for sending the to-be-processed message to the second processing node according to routing information configured in a flexible network card, wherein the flexible network card has a binding relationship with the first processing node, and the binding relationship is created by a container orchestration tool managing the first processing node.
5. The middleware according to claim 4, wherein, The routing information comprises a private network address of the second processing node, the private network address is obtained by a domain name resolution server according to a correspondence relationship of the message synchronization request, the to-be-processed message is contained in the message synchronization request, and the correspondence relationship is a correspondence relationship between a node name of a processing node managed by different container orchestration tools and a private network address of the processing node in the message middleware.
6. A message middleware creation method in which, The method comprises: generating a plurality of container orchestration tools each corresponding to a creation task; obtaining processing nodes obtained after the plurality of container orchestration tools execute the respective creation tasks, to form a message middleware by the obtained plurality of processing nodes, wherein the plurality of processing nodes are deployed in different containers, the different containers are respectively located in different container clusters, the plurality of processing nodes are managed by different container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network and have fixed network addresses; and establishing a communication connection between the plurality of processing nodes in the message middleware.
7. The method according to claim 6, wherein, The method further comprises: creating a container according to a resource type and a resource quantity contained in the creation task; and dividing the created container into a security group.
8. The method according to claim 6 or 7, wherein, The method further comprises: creating a container according to a resource type and a resource quantity contained in the creation task; and dividing the created container into a security group. The method further comprises: creating a container according to a resource type and a resource quantity contained in the creation task; and dividing the created container into a security group. The container is created by any container orchestration tool of the plurality of container orchestration tools; a binding relationship between the elastic network card and the any processing node is created; and a communication connection between the plurality of processing nodes is established according to the respective binding relationship of the plurality of processing nodes.
9. The method according to claim 8, wherein, The message middleware includes a first processing node and a second processing node, the first processing node is managed by a target container orchestration tool of the plurality of container orchestration tools, the first processing node is deployed in a first container, the second processing node is deployed in a second container, the second processing node is managed by other container orchestration tools of the plurality of container orchestration tools, and the first container and the second container are located in different container clusters in different availability zones; the method further includes: in response to information registration, recording a correspondence between a node name of a processing node managed by different container orchestration tools and a private network address of the processing node; and performing domain name resolution on the message synchronization request according to the correspondence to obtain a private network address of the second processing node, so that the elastic network card having the binding relationship with the first processing node sends the message synchronization request to the second processing node according to the resolved private network address.
10. A message middleware creation system, wherein, The method includes a deployment program and a plurality of container orchestration tools, any container orchestration tool of the plurality of container orchestration tools includes a controller and a network configuration component; the deployment program is used to allocate a respective creation task to the plurality of container orchestration tools; the controller in the any container orchestration tool is used to execute the allocated creation task to create a container in which a processing node is deployed, the container is located in a container cluster, and the processing node deployed in the container is managed by the any container orchestration tool; and the network configuration component in the any container orchestration tool is used to establish a communication connection between processing nodes deployed in different containers, the different containers are respectively created by different container orchestration tools including the any container orchestration tool. The message middleware includes processing nodes managed by controllers in the plurality of container orchestration tools, the processing nodes in the message middleware are deployed under the same virtual private cloud network and have fixed network addresses.
11. The system of claim 10, wherein, The controller in the any container orchestration tool is used to create a container according to a resource type and a resource quantity included in the creation task.
12. The system according to claim 10 or 11, wherein, The network configuration component in the any container orchestration tool is used to create an elastic network card corresponding to a container cluster in which a processing node is deployed; and a binding relationship between the elastic network card and the processing node managed by the any container orchestration tool is created, so that container networks are formed by the binding relationships respectively created by the plurality of container orchestration tools.
13. The system of claim 12, wherein, The message middleware comprises a first processing node and a second processing node, the first processing node is managed by a target container orchestration tool in the plurality of container orchestration tools, the first processing node is deployed in a first container, the second processing node is deployed in a second container, the second processing node is managed by another container orchestration tool in the plurality of container orchestration tools, and the container cluster in which the first container and the second container are located is located in different availability zones. The first processing node is configured to generate a message synchronization request containing a message to be processed, and send the message synchronization request to the second processing node according to routing information configured in an elastic network card having a binding relationship with the first processing node, so that the second processing node sends the message to be processed to a message consumer after the target container orchestration tool fails. The system further comprises a domain name resolution server, a processing node managed by any container orchestration tool, configured to register a node name of the processing node and a private network address of the processing node in the domain name resolution server, and the domain name resolution server, configured to record a correspondence between node names and private network addresses of different processing nodes in the message middleware in response to information registration, and perform domain name resolution on the message synchronization request according to the correspondence to obtain a private network address of the second processing node, so that the elastic network card bound to the first processing node sends the message synchronization request to the second processing node according to the private network address.
14. The system of claim 13, wherein, Comprise:
15. An electronic device, wherein, a memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the message middleware creation method according to any one of claims 6-9. The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by the computing system of the electronic device, the computing system executes the message middleware creation method according to any one of claims 6-9.
16. A non-transitory machine-readable storage medium, wherein, The computer program product comprises a computer program or instructions, which enable the computer program or instructions to implement the steps in the message middleware creation method according to any one of claims 6-9.
17. A computer program product, wherein, 18
Citation Information
Patent Citations
Resource control method and system, computing equipment and storage medium
CN113296931A
Message middleware layout method and device, server and storage medium
CN114153623A
Middleware deployment method and device based on K8s cluster and storage medium
CN117648156A