CN115883563A - Communication method, platform and system - Google Patents

Communication method, platform and system Download PDF

Info

Publication number
CN115883563A
CN115883563A CN202211721300.XA CN202211721300A CN115883563A CN 115883563 A CN115883563 A CN 115883563A CN 202211721300 A CN202211721300 A CN 202211721300A CN 115883563 A CN115883563 A CN 115883563A
Authority
CN
China
Prior art keywords
cluster
openstack
message
forwarding
etcd
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211721300.XA
Other languages
Chinese (zh)
Inventor
卢志祥
邓浩阳
柯少杰
蒋文维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202211721300.XA priority Critical patent/CN115883563A/en
Publication of CN115883563A publication Critical patent/CN115883563A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application discloses a communication method, a communication platform and a communication system, wherein the method comprises the following steps: establishing a plurality of forwarding nodes in the OpenStack cluster, and adding all forwarding nodes in the OpenStack cluster into a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components, and the OpenStack components correspond to the forwarding nodes one by one; deploying a load balancer and a plurality of etcd databases in a k8s cluster; after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, distributing the message to a plurality of etcd databases of a k8s cluster by using a load balancer; and querying a message by a forwarding node corresponding to another OpenStack component in the OpenStack cluster through a Watch mechanism, and after the message is queried, putting the message into an Indexer of the k8s cluster for local caching so as to be read by a local application. The information mechanism of a k8s cluster and the synchronization advantage of a distributed Etcd database are utilized to improve the communication performance; and realizing communication between the k8s cluster and the Openstack cluster by using a mode that the k8s cluster and the Openstack cluster coexist in the same physical machine.

Description

Communication method, platform and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication method, a platform, and a system.
Background
OpenStack is a combination of a series of open-source cloud computing management tools (or open-source projects), primarily using pooled virtual resources to build and manage private and public clouds. There are over ten alternative services of varying degrees of development maturity. The other six core services are mainly responsible for the infrastructure of the outline system and are responsible for processing core cloud computing services including computing, network, storage, identity and mirroring services.
The internal component interaction of each module of the OpenStack completely depends on the RabbitMQ, and in the production environment of the OpenStack, when the cluster size exceeds three hundred nodes, the RabbitMQ is very easy to cause problems, such as high memory occupation and easy crash of the RabbitMQ. The RabbitMQ has poor message transmission performance exceeding 4M, and is easy to cause the crash of the RabbitMQ.
Disclosure of Invention
An object of the present application is to provide a communication method, a communication platform, and a communication system, which have advantages that the advantage of the node load capability of a k8s cluster is utilized to solve the bottleneck of OpenStack node expansion, and the advantage of the information mechanism of the k8s cluster and the database synchronization of a distributed Etcd are utilized to improve the communication performance; and realizing message cluster communication by using the coexistence of the k8s cluster and the Openstack cluster and the same physical machine mode.
In a first aspect, an embodiment of the present application discloses a communication method, which includes:
establishing a plurality of forwarding nodes in an OpenStack cluster, and enabling all the forwarding nodes in the OpenStack cluster to be added into a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components, and the OpenStack components correspond to the forwarding nodes one by one;
deploying a load balancer and a plurality of etcd databases in the k8s cluster;
after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node of the OpenStack component, distributing the message to a plurality of etcd databases of the k8s cluster by using the load balancer;
and the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8s cluster for local caching so as to be read by a local application.
In a possible implementation manner, the establishing a plurality of forwarding nodes in an OpenStack cluster, and enabling all the forwarding nodes in the OpenStack cluster to join a k8s cluster includes:
enabling the OpenStack cluster and the plurality of forwarding nodes to coexist in the same physical machine;
and deploying an actor message communication interface at each forwarding node to enable the OpenStack cluster and the k8s cluster to access each other.
In a possible implementation manner, a plurality of master nodes are further deployed in the k8s cluster, and each master node is deployed in an independent physical machine.
In one possible implementation, each master node deploys an apiserver interface, and the distributing the message to the plurality of etcd databases of the k8s cluster by using the load balancer includes:
transmitting the message to one apiserver interface for authentication through the load balancer;
after the authentication is successful, the message is transmitted to an etcd database corresponding to the apiserver interface for authenticating the message;
and the etcd database receiving the message synchronizes the message to other etcd databases in the k8s cluster through a raft algorithm.
In one possible implementation, the method further includes: after the message is put into the Indexer of the k8s cluster for local caching, the forwarding node corresponding to another OpenStack component in the OpenStack cluster inquires whether the message is updated through a Watch mechanism, and if yes, the updated message is transmitted to the local cache in the Indexer of the k8s cluster.
In a possible implementation manner, after the message is put into an Indexer of the k8s cluster for local caching, the message is received through an informer message communication interface, or the message is put into a work list to wait for being received.
In a second aspect, the application discloses a communication platform, which includes an OpenStack cluster and a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components and a plurality of forwarding nodes, wherein the OpenStack components correspond to the forwarding nodes one by one; all the forwarding nodes in the OpenStack cluster are added into a k8s cluster; deploying a load balancer and a plurality of etcd databases in the k8s cluster;
after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, the message is distributed to a plurality of etcd databases of the k8s cluster by using the load balancer;
and the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8s cluster for local caching so as to be read by a local application.
In one possible implementation manner, the OpenStack cluster and the plurality of forwarding nodes coexist in the same physical machine; and each forwarding node deploys an informer message communication interface.
In a possible implementation manner, the k8s cluster is deployed with a plurality of master nodes, and each master node is deployed in an independent physical machine.
In a third aspect, the present application discloses a communication system comprising a memory for storing computer instructions and a processor for invoking the computer instructions to perform a method as described above.
According to the embodiment of the application, the bottleneck of OpenStack node expansion is solved by using the advantage of the node load capacity of a k8s cluster; the information mechanism of a k8s cluster and the synchronization advantage of a distributed Etcd database are utilized to improve the communication performance; the communication between the k8s cluster and the Openstack cluster is realized by utilizing the mode that the k8s cluster and the Openstack cluster coexist in the same physical machine; the advantages of the k8s cluster are utilized to make up the weakness of the OpenStack, and node expansion of the OpenStack cluster is better realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a communication method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a communication platform according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of another communication platform according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a communication system according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the embodiments of the present application.
The terms "including" and "having," and any variations thereof, in the description and claims of this application and the drawings described above, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements recited, but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, an embodiment of the present application provides a communication method, which includes, but is not limited to, the following steps:
s101, establishing a plurality of forwarding nodes in an OpenStack cluster, and enabling all the forwarding nodes in the OpenStack cluster to be added into a k8S cluster; the OpenStack cluster comprises a plurality of OpenStack components, and the OpenStack components correspond to the forwarding nodes one by one.
In the embodiment provided by the application, the OpenStack cluster and the k8s cluster can be deployed in the same physical machine. Since all the forwarding nodes in the OpenStack cluster are added to the k8s cluster, openStack components in the OpenStack cluster can communicate with each other through an informer mechanism of the k8s cluster, and specifically, when two OpenStack components in the OpenStack cluster transmit messages, one OpenStack component in the OpenStack cluster can transmit the messages to the k8s cluster through a corresponding forwarding node, and the informer mechanism of the k8s cluster is used for transmitting the messages to the other OpenStack component.
S102, deploying a load balancer and a plurality of etcd databases in the k8S cluster.
In embodiments provided herein, a load balancer is used to distribute messages. The etcd database is used for service discovery, illustratively, one OpenStack component in an OpenStack cluster issues a message, the message issued by the OpenStack component is distributed into the etcd database through a load balancer, another OpenStack component in the OpenStack cluster can subscribe the message of the etcd database, and whether the message of the etcd database is updated or not is discovered through a Watch mechanism. When the information of the etcd database is updated, another OpenStack component in the OpenStack cluster can acquire the information from the etcd database.
And S103, after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, distributing the message to a plurality of etcd databases of the k8S cluster by using the load balancer.
And S104, the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8S cluster for local caching so as to be read by a local application.
In the embodiment provided by the present application, please refer to fig. 2 and fig. 3, taking an example that an OpenStack cluster includes a first OpenStack component (OpenStack-node 1) and a second OpenStack component (OpenStack-node 2), a forwarding node corresponding to the first OpenStack component and the first OpenStack component coexist in the same physical machine (k 8s-worker 1); and the forwarding node corresponding to the second OpenStack component and the second OpenStack component coexist in the same physical machine (k 8s-worker 2).
The k8s cluster comprises 3 master nodes, wherein the 3 master nodes are k8s-master1, k8s-master2 and k8s-master3 respectively.
When the first OpenStack component issues the message, the message is transmitted to the load balancer through a forwarding node (k 8 s-operator-api) corresponding to the first OpenStack component, and the load balancer distributes the message to the etcd database. The etcd database which acquires the message synchronizes the message to other etcd databases of the k8s cluster through a raft algorithm. And the forwarding node corresponding to the second OpenStack component can find that the message of the etcd database of the k8s cluster is updated through a Watch mechanism, and pull the message to a Delta FIFO queue of the local informar. The second OpenStack component will also put the message into Indexer local cache, waiting for local application reading, making the message highly available in the k8s cluster.
In a possible implementation manner, the establishing a plurality of forwarding nodes in an OpenStack cluster, and enabling all the forwarding nodes in the OpenStack cluster to join a k8s cluster includes:
enabling the OpenStack cluster and the plurality of forwarding nodes to coexist in the same physical machine;
and deploying an informer message communication interface at each forwarding node so that the OpenStack cluster and the k8s cluster can access each other.
In the embodiment provided by the application, the OpenStack cluster and the multiple forwarding nodes are deployed in the same physical machine, and in a large cluster environment, load and memory occupation caused by synchronization of messages in a k8s cluster can be directly shared, and network intercommunication between the OpenStack cluster and the k8s cluster is solved.
In the embodiment provided by the present application, a plurality of master nodes are further deployed in the k8s cluster, and each master node is deployed in an independent physical machine.
The number of the master nodes is odd, the number of the master nodes can be three or five, and the number of the master nodes is not specifically limited in the embodiment of the application.
And a plurality of master nodes are deployed in the independent physical machine, and the Etcd database corresponds to the master nodes one by one, so that the message synchronization performance of the Etcd database under a large cluster can be improved, and the OpenStack cluster performance is not influenced.
In one possible implementation, each master node deploys an apiserver interface, and the distributing the message to the plurality of etcd databases of the k8s cluster by using the load balancer includes:
transmitting the message to one apiserver interface for authentication through the load balancer;
after the authentication is successful, the message is transmitted to an etcd database corresponding to the apiserver interface for authenticating the message;
and the etcd database receiving the message synchronizes the message to other etcd databases in the k8s cluster through a raft algorithm.
In a possible implementation manner, after the message is put into the Indexer of the k8s cluster for local caching, the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries whether the message is updated through a Watch mechanism, and if so, transmits the updated message to the local cache in the Indexer of the k8s cluster.
In a possible implementation manner, after the message is put into an Indexer of the k8s cluster for local caching, the message is received through an informer message communication interface, or the message is put into a work list to wait for being received.
In the embodiment provided by the application, the K8s cluster uses a List/Watch mechanism to selectively pull the message subscribed by the current node, maintains the local cache of each master node, can keep the local cache data consistent with the server without any other resync mechanism, and reduces the performance of the server. If a master node fault causes machine restart, the messages of all master nodes are not required to be synchronized, but the messages subscribed by the failed master node are synchronized, so that the performance loss and memory occupation of the service caused by message synchronization are reduced.
Referring to fig. 2, an embodiment of the present application further discloses a communication platform, which includes an OpenStack cluster and a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components and a plurality of forwarding nodes, wherein the OpenStack components correspond to the forwarding nodes one by one; all the forwarding nodes in the OpenStack cluster are added into a k8s cluster; deploying a load balancer and a plurality of etcd databases in the k8s cluster;
after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, the message is distributed to a plurality of etcd databases of the k8s cluster by using the load balancer;
and the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8s cluster for local caching so as to be read by a local application.
In one possible implementation manner, the OpenStack cluster and the plurality of forwarding nodes coexist in the same physical machine; and each forwarding node deploys an informer message communication interface.
In a possible implementation manner, the k8s cluster is deployed with a plurality of master nodes, and each master node is deployed in an independent physical machine.
It should be noted that the master node further includes a node controller (controller-manager) and a scheduler, the master node receives a message issued by the OpenStack component through the apiserver interface, and the node controller monitors the k8s cluster state.
In an embodiment provided by the present application, an OpenStack cluster comprises
For the concepts, explanations, details and other steps related to the technical solutions provided in the embodiments of the present application related to the communication platform, please refer to the description of the content of the method steps executed by the apparatus in the foregoing method or other embodiments, which is not described herein again.
Referring to fig. 4, in the communication system 100 provided in the embodiment of the present application, the communication system 100 may include a processor 110, a memory 120, and a communication interface 130. The processor 110, the memory 120, and the communication interface 130 are coupled by a bus 140, the memory 120 is configured to store instructions, and the processor 110 is configured to execute the instructions stored by the memory 120.
The processor 110 is configured to execute the instructions stored in the memory 120 to control the communication interface 130 to receive and transmit signals, thereby implementing the steps of the above-described method. The memory 120 may be integrated in the processor 110, or may be provided separately from the processor 110.
In one possible implementation, the function of the communication interface 130 may be implemented by a transceiver circuit or a dedicated chip for transceiving. The processor 110 may be considered to be implemented by a dedicated processing chip, processing circuit, processor, or a general purpose chip.
In another possible implementation, program code implementing the functions of the processor 110, the communication interface 130, may be stored in the memory 120, and a general-purpose processor implements the functions of the processor 110, the communication interface 130 by executing the code in the memory 120.
For the concepts, explanations, details and other steps related to the technical solutions provided in the embodiments of the present application related to the communication system, reference is made to the description of the content of the method steps executed by the communication system in the foregoing method or other embodiments, which is not described herein again.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of communication, comprising:
establishing a plurality of forwarding nodes in an OpenStack cluster, and enabling all the forwarding nodes in the OpenStack cluster to be added into a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components, and the OpenStack components correspond to the forwarding nodes one by one;
deploying a load balancer and a plurality of etcd databases in the k8s cluster;
after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, distributing the message to a plurality of etcd databases of the k8s cluster by using the load balancer;
and the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8s cluster for local caching so as to be read by a local application.
2. The communication method of claim 1, wherein the establishing a plurality of forwarding nodes in an OpenStack cluster and joining all the forwarding nodes in the OpenStack cluster to a k8s cluster comprises:
enabling the OpenStack cluster and the plurality of forwarding nodes to coexist in the same physical machine;
and deploying an actor message communication interface at each forwarding node to enable the OpenStack cluster and the k8s cluster to access each other.
3. The communication method of claim 1, wherein a plurality of master nodes are also deployed in the k8s cluster, each of the master nodes being deployed at a separate physical machine.
4. The communication method of claim 1, wherein each master node deploys an apiserver interface, and wherein said distributing the message to the plurality of etcd databases of the k8s cluster using the load balancer comprises:
transmitting the message to one apiserver interface for authentication through the load balancer;
after the authentication is successful, the message is transmitted to an etcd database corresponding to the apiserver interface for authenticating the message;
and the etcd database receiving the message synchronizes the message to other etcd databases in the k8s cluster through a raft algorithm.
5. The communication method of claim 2, wherein the method further comprises: after the message is put into the Indexer of the k8s cluster for local caching, the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries whether the message is updated through a Watch mechanism, and if so, the updated message is transmitted to the local cache in the Indexer of the k8s cluster.
6. The communication method of claim 5, wherein the message is received through an informer messaging interface after being put in Indexer of the k8s cluster for local caching, or is put in a worklist waiting to be received.
7. A communication platform, comprising an OpenStack cluster and a k8s cluster; the OpenStack cluster comprises a plurality of OpenStack components and a plurality of forwarding nodes, wherein the OpenStack components correspond to the forwarding nodes one by one; all the forwarding nodes in the OpenStack cluster are added into a k8s cluster; deploying a load balancer and a plurality of etcd databases in the k8s cluster;
after an OpenStack component in the OpenStack cluster issues a message by using a corresponding forwarding node, the message is distributed to a plurality of etcd databases of the k8s cluster by using the load balancer;
and the forwarding node corresponding to another OpenStack component in the OpenStack cluster queries the message through a Watch mechanism, and after the message is queried, the message is put into an Indexer of the k8s cluster for local caching so as to be read by a local application.
8. The communications platform of claim 7, wherein the OpenStack cluster and the plurality of forwarding nodes coexist in the same physical machine; and each forwarding node deploys an informer message communication interface.
9. The communication platform of claim 7, wherein the k8s cluster is deployed with a plurality of master nodes, each of the master nodes being deployed at a separate physical machine.
10. A communication system, comprising a memory for storing computer instructions and a processor for invoking the computer instructions to perform the method of any of claims 1-6.
CN202211721300.XA 2022-12-30 2022-12-30 Communication method, platform and system Pending CN115883563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211721300.XA CN115883563A (en) 2022-12-30 2022-12-30 Communication method, platform and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211721300.XA CN115883563A (en) 2022-12-30 2022-12-30 Communication method, platform and system

Publications (1)

Publication Number Publication Date
CN115883563A true CN115883563A (en) 2023-03-31

Family

ID=85757451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211721300.XA Pending CN115883563A (en) 2022-12-30 2022-12-30 Communication method, platform and system

Country Status (1)

Country Link
CN (1) CN115883563A (en)

Similar Documents

Publication Publication Date Title
CN111091429A (en) Electronic bill identification distribution method and device and electronic bill generation system
CN108712332B (en) Communication method, system and device
JP6076480B2 (en) Service processing method and apparatus
MXPA04008848A (en) Metaspace: communication middleware for partially connected mobile ad hoc networks.
CN112583931B (en) Message processing method, message middleware, electronic device, and storage medium
CN108063813B (en) Method and system for parallelizing password service network in cluster environment
WO2011130940A1 (en) Multi-service integration processing method and service integration platform
US20200167186A1 (en) Container isolation method and apparatus for netlink resource
CN111163172B (en) Message processing system, method, electronic device and storage medium
CN113347257A (en) Communication method, communication device, server and storage medium
CN113179324A (en) Block chain node and service processing method executed by same
CN107547605B (en) message reading and writing method based on node queue and node equipment
CN115883563A (en) Communication method, platform and system
CN113905094B (en) Industrial Internet integration method, device and system
CN116192872A (en) Method, system, electronic device and storage medium for accelerating supply of edge environment container
CN110063050B (en) Service scheduling method and system
CN115277707A (en) Service processing method, device, electronic equipment and storage medium
US20140040380A1 (en) System and method for providing push service for reducing network loads
CN111813795B (en) Method and apparatus for confirming transactions in a blockchain network
CN114422526A (en) Block synchronization method and device, electronic equipment and storage medium
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
CN115514698A (en) Protocol calculation method, switch, cross-device link aggregation system and storage medium
Han et al. Online data caching in edge computing
CN111541667A (en) Method, equipment and storage medium for intersystem message communication
CN115412530B (en) Domain name resolution method and system for service under multi-cluster scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination