CN113641692A - Scheme and system for realizing distributed cluster node participation - Google Patents
Scheme and system for realizing distributed cluster node participation Download PDFInfo
- Publication number
- CN113641692A CN113641692A CN202110948463.0A CN202110948463A CN113641692A CN 113641692 A CN113641692 A CN 113641692A CN 202110948463 A CN202110948463 A CN 202110948463A CN 113641692 A CN113641692 A CN 113641692A
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- meetingid
- self
- conference
- 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
Links
- 230000000977 initiatory effect Effects 0.000 claims abstract description 6
- 238000011156 evaluation Methods 0.000 claims description 42
- 230000004044 response Effects 0.000 claims description 16
- 238000001514 detection method Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 6
- 238000012795 verification Methods 0.000 claims description 6
- 238000000034 method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a scheme for realizing participation of distributed cluster nodes, which comprises the following steps: step S1, initiating participation in a selection node in the distributed cluster to generate a selection reference number CID; step S2, the selection nodes in the distributed cluster select the selected nodes and select the main nodes; step S3, after the master node is selected, declaring a selected node to become the master node and informing all the nodes in the distributed cluster; step S4, all nodes receive the notification of the selection result of the main node, take over the work of the last main node through the selected main node, and provide service to the outside, so as to ensure the data consistency; the invention can issue the command by selecting the main node through the multi-service node so as to ensure the data consistency.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a scheme and a system for realizing distributed cluster node participation.
Background
For a distributed system, in order to achieve high availability, it is generally thought that nodes are added to form a cluster, and if one of the nodes is down, other nodes can provide services without affecting the overall service. Service nodes can be divided into two categories, logical services and data services. The logic service means that the service only processes some logic related to the service and does not store data, and the logic service node can provide high availability by adopting horizontal expansion to increase nodes. Data services are stateful, and data nodes need to copy all data to be stored on other nodes without distinction if the data nodes are guaranteed to be highly available, and the data nodes are arranged on the tops of other service nodes if one data node is down. It is known that the existence of multiple copies of data causes a data consistency problem, and if the data is inconsistent, even if any other node is selected to provide data service, the data itself is not up-to-date and unreliable.
Disclosure of Invention
In order to overcome the above problems, an object of the present invention is to provide a solution that can ensure data consistency by selecting a master node by a multi-service node to issue a command.
The invention is realized by adopting the following scheme: a scheme for enabling distributed cluster node election, the scheme comprising the steps of:
step S1, initiating participation in a selection node in the distributed cluster to generate a selection reference number CID;
step S2, the selection nodes in the distributed cluster select the selected nodes and select the main nodes; step S3, after the master node is selected, declaring a selected node to become the master node and informing all the nodes in the distributed cluster;
and step S4, all nodes receive the notification of the selection result of the main node, take over the work of the last main node through the selected main node, and provide service to the outside, so as to ensure the data consistency.
Further, the step S1 further specifically includes the following steps:
step S11, when the nodes are deployed in the distributed cluster, half of the distributed cluster nodes are designated as the selection evaluation nodes, the selection participation nodes send selection participation applications to the selection evaluation nodes, and the selection participation nodes generate selection participation numbers CID;
step S12, after the participation number CID is generated, reading the locally stored self-increased conference MeetingID, and obtaining a new self-increased conference MeetingID on the self-increased conference MeetingID;
and step S13, reading the data lists of all the nodes, and preparing to send the participation application to all the evaluation nodes.
Further, the step S2 further includes the following steps:
step S21, after receiving the application for participating in the selection of the node to be participated in by the evaluation node, judging whether the meetingID of the self-adding conference is smaller than the latest meetingID of the locally stored self-adding conference, if so, representing the overdue conference to be participated in, returning to be invalid, and if not, continuing the next step;
step S22, after receiving the reference number CID of the reference node, the evaluation node judges whether the reference number CID is larger than the minimum reference number MinCID stored in the memory of the reference node, if so, the reference node is not replaced, and the result of the pre-selection stage of the reference node is returned, otherwise, the minimum reference number MinCID is replaced;
step S23, when a participating node receives more than half of the approval responses of the candidate nodes, the election succeeds, and becomes a new master node.
Further, the step S3 further includes the following steps:
step S31, after the participating nodes become the master nodes, updating the name list data of the local distributed cluster nodes;
and step S32, after the participating nodes successfully become the main nodes, reading the node list, and informing all the nodes of the latest node list, the self-adding conference MeetingID and the participating numbers CID used by the participating nodes.
Further, the step S4 further specifically includes: after all the nodes receive the node list information, comparing the received self-adding conference meetingID with the locally stored self-adding conference meetingID, wherein the comparison result comprises the following conditions:
in the first situation, the received self-increment conference meetingID is smaller than the locally stored self-increment conference meetingID, and represents an overdue participating conference without processing;
the situation II is that the received MeetingID of the self-adding conference is equal to the MeetingID of the self-adding conference stored locally, the received MeetingID of the self-adding conference is represented as election information sent by different participated nodes of the same self-adding conference, the received CID of the participated nodes is compared, and a local node list is updated on the basis that the CID of the participated nodes is smaller;
and in the third case, if the received self-adding conference meetingID is larger than the locally stored self-adding conference meetingID, the received self-adding conference meetingID is represented as the latest self-adding conference meetingID, and the local node list information is directly updated.
And further, heartbeat detection of each node is also included, heartbeat verification needs to be sent to the main node by all the nodes every 1 second, each node provides a health detection address, the main node accesses the health address, and if the main node does not return a response, namely the main node goes down, the participation application is re-initiated.
The invention also provides a system for realizing the participation of the distributed cluster nodes, which comprises a participation module, a selection evaluation module, a notification module and a receiving module, wherein the participation module initiates participation in the distributed cluster nodes to generate a participation number CID; the evaluation module evaluates the selected nodes in the distributed cluster and evaluates the master nodes; the notification module announces a selected node as a master node after the master node is selected, and notifies all nodes in the distributed cluster; the receiving module receives the notification of the selection result of the master node, and takes over the work of the last master node through the selected master node to provide service to the outside so as to ensure the data consistency.
Furthermore, the participation module comprises a sending unit, a generating unit and a reading unit, wherein the sending unit is used for appointing half of the number of the distributed cluster nodes as the selection evaluation nodes when the distributed cluster deploys the nodes, the participation nodes send participation applications to the selection evaluation nodes, and the participation nodes generate the participation numbers CID; the generating unit is used for reading the locally stored self-increased conference meetingID after the participation number CID is generated, and obtaining a new self-increased conference meetingID on the self-increased conference meetingID; the reading unit reads the data lists of all the nodes and prepares to send the participation application to all the evaluation nodes.
The evaluation module further comprises a judging unit, a replacing unit and a responding unit, wherein the judging unit judges whether the meeting ID is smaller than the latest meeting ID stored locally after the evaluation node receives the application for participating in the selected node, if yes, the meeting is overdue, if not, the next step is continued; the replacing unit is used for judging whether the reference number CID of the candidate node is greater than the minimum reference number MinCID stored in the memory of the candidate node or not after the candidate node receives the reference number CID of the candidate node, if so, the candidate node is not replaced, and the result of the preselection stage of the candidate node is returned, otherwise, the minimum reference number MinCID is replaced; the response unit is that after a certain participating node receives the approval response of more than half of the selecting nodes, the election succeeds, and becomes a new main node.
Furthermore, the notification module further comprises an updating unit and an election success unit, wherein the updating unit updates the name list data of the local distributed cluster node after the participating node becomes the master node; and the election success unit, namely reading the node list after the participating nodes successfully become the main nodes, and informing all the nodes of the latest node list, the self-adding conference MeetingID and the participating numbers CID used by the participating nodes.
Further, the receiving module is further specifically: after all the nodes receive the node list information, comparing the received self-adding conference meetingID with the locally stored self-adding conference meetingID, wherein the comparison result comprises the following conditions:
in the first situation, the received self-increment conference meetingID is smaller than the locally stored self-increment conference meetingID, and represents an overdue participating conference without processing;
the situation II is that the received MeetingID of the self-adding conference is equal to the MeetingID of the self-adding conference stored locally, the received MeetingID of the self-adding conference is represented as election information sent by different participated nodes of the same self-adding conference, the received CID of the participated nodes is compared, and a local node list is updated on the basis that the CID of the participated nodes is smaller;
and in the third case, if the received self-adding conference meetingID is larger than the locally stored self-adding conference meetingID, the received self-adding conference meetingID is represented as the latest self-adding conference meetingID, and the local node list information is directly updated.
The system further comprises a detection module, wherein the detection module is used for detecting the heartbeat of each node, all the nodes need to send heartbeat verification to the main node every 1 second, each node provides a health detection address, the main node accesses the health address, and if the main node does not return a response, namely the main node is down, the participation application is initiated again.
The invention has the beneficial effects that: the invention can realize that under a distributed system, the multi-service nodes send commands by electing the main node, and all the nodes take the main node as the standard so as to ensure the data consistency. And under the condition that the main node is down, the main node election is automatically initiated, the main node election is realized through a distributed consistency algorithm, the generation of a new main node replaces the down node, the work of the main node is handed over, the external service is continuously provided, and the high availability of the cluster is ensured.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention.
Fig. 2 is a schematic block diagram of the system of the present invention.
FIG. 3 is a node name list data table.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a scheme for implementing node election of a distributed cluster according to the present invention includes the following steps:
step S1, initiating participation in a selection node in the distributed cluster to generate a selection reference number CID;
step S2, the selection nodes in the distributed cluster select the selected nodes and select the main nodes; step S3, after the master node is selected, declaring a selected node to become the master node and informing all the nodes in the distributed cluster;
and step S4, all nodes receive the notification of the selection result of the main node, take over the work of the last main node through the selected main node, and provide service to the outside, so as to ensure the data consistency.
The invention is further illustrated by the following specific examples:
the scheme defines 4 node identities for the cluster nodes
And (3) selecting nodes: and the CNode generates a globally unique participation number CID during participation and applies for participation in election from the election evaluation node. All nodes can become the participating nodes, and the identities of the participating nodes and other nodes can be overlapped.
And (4) selecting nodes: and the PNode participates in the evaluation of the competition selector, responds to the application of the CNode, approves the node after receiving the CID, and becomes a Leader if the CID obtains the approval of a plurality of PNodes and the CID is successfully competitively selected. The evaluation nodes are well designated when the nodes are deployed, and the number of the evaluation nodes is half of the number of the cluster nodes.
And (3) common nodes: and the NNode does not participate in election and election, and only receives and learns election results. The common nodes are well designated when the nodes are deployed, and the rest nodes except the evaluation nodes are the common nodes.
A master node: the MNode successfully participates in the selection to become the main node, and the data is based on the main node during the period when the main node is available. The master node is dynamically generated during the election process.
Step 1.1, the participating node CNode sends a participating application to the selecting node PNode, the participating node generates a globally unique incremental CID, and the generation rule is timestamp + random number + NodeID node ID. The NodeID is a unique ID owned by each node, and assuming that the NodeID of the node is 001, the timestamp is 1627206588326, and the random value is 1234, the generated CID is 16272065883261234001.
And 1.2, after the CID is generated, reading the locally stored self-added conference ID MeetingID, and obtaining a new conference ID on the conference plus 1. The initiation of one participation master node is a conference, the conference ID is used for distinguishing different conferences, and the conference ID of the newly initiated conference is the maximum.
And step 1.3, reading a node list, wherein the list contains data of all nodes, and preparing to send a participation application to all the evaluation nodes. Each node stores a node list issued by a master node last time, the node list includes information of all nodes of the current cluster, and node name list data is shown in fig. 3;
and step 1.4, sending the participation application to all healthy nodes except the healthy nodes carrying the CID and the MeetingID generated by the healthy nodes. Step 5, heartbeat is used for detecting whether all nodes are alive or not, and the alive nodes are healthy nodes.
Step 2, the evaluation nodes are evaluated and selected
And 2.1, after receiving the participation application of the participation node CNode, the selection evaluation node PNode judges whether the MeetingID is smaller than the latest ID stored locally, if so, the representative is an overdue participation conference, and returns to be invalid.
And 2.2, after receiving the CID reference number of the reference node CNode, the evaluation node PNode compares the CID reference number with the minimum reference number MinCID stored in the memory of the node, replaces the MinCID if the MinCID is smaller than the MinCID, does not replace the MinCID if the MinCID is smaller than the MinCID, and returns the result of the pre-selection stage of the reference node CNode. The evaluation stage has and only retains one minimum MinCID per evaluation node, which is intended to respond to the candidate node that responds to the fastest request.
And 2.3, after the participating node CNode receives the approval response of more than half of the selecting nodes PNode, the election succeeds, and the participating node CNode becomes a new main node.
Step 3, declaring to become the master node
And 3.1, updating the name list data of the local node after the participating node CNode becomes the main node MNode.
And 3.2, after the participating node CNode successfully becomes the main node MNode, reading the node list, and informing all the nodes of the latest node list and the meeting MeetingID and CID used by the participating node.
Step 4, all nodes receive result notice
After each node receives the notification of the node list information, the received MeetingID is compared with the locally stored MeetingID, and we need to deal with the following 3 cases.
(1) And if the received MeetingID is smaller than the local MeetingID, the representative is an expired participating conference, and the processing is not carried out.
(2) If the received MeetingID is equal to the local MeetingID, the received MeetingID represents election information sent by different participating nodes of the same conference, and the size of the received CID is compared, and the local node list is updated based on the small CID.
(3) If the received MeetingID is larger than the local MeetingID, the meeting is the latest meeting, and the local node name list information is directly updated.
Step 5, heartbeat detection
And all the nodes send heartbeat verification to the main node every 1 second, each node provides an http health detection address, whether the node is alive or not is judged by accessing the health detection address through http, if the main node does not return a response, namely the main node is down, the participation application is initiated again, and the stage 1-5 is repeated.
In a word, the invention can realize that under a distributed system, the multi-service nodes send commands by selecting the main nodes, all the nodes take the main nodes as the reference to ensure the data consistency, and automatically initiate the main node selection under the condition that the main nodes are down, realize the main node selection by a distributed consistency algorithm, replace the down nodes by the generation of new main nodes, take over the work of the main nodes, continue to provide services to the outside, and ensure the high availability of the cluster.
Referring to fig. 2, the present invention further provides a system for implementing participation of distributed cluster nodes, including a participation module, a selection evaluation module, a notification module and a receiving module, where the participation module initiates participation in a distributed cluster node to generate a selection reference number CID; the evaluation module evaluates the selected nodes in the distributed cluster and evaluates the master nodes; the notification module announces a selected node as a master node after the master node is selected, and notifies all nodes in the distributed cluster; the receiving module receives the notification of the selection result of the master node, and takes over the work of the last master node through the selected master node to provide service to the outside so as to ensure the data consistency.
Furthermore, the participation module comprises a sending unit, a generating unit and a reading unit, wherein the sending unit is used for appointing half of the number of the distributed cluster nodes as the selection evaluation nodes when the distributed cluster deploys the nodes, the participation nodes send participation applications to the selection evaluation nodes, and the participation nodes generate the participation numbers CID; the generating unit is used for reading the locally stored self-increased conference meetingID after the participation number CID is generated, and obtaining a new self-increased conference meetingID on the self-increased conference meetingID; the reading unit reads the data lists of all the nodes and prepares to send the participation application to all the evaluation nodes.
The evaluation module further comprises a judging unit, a replacing unit and a responding unit, wherein the judging unit judges whether the meeting ID is smaller than the latest meeting ID stored locally after the evaluation node receives the application for participating in the selected node, if yes, the meeting is overdue, if not, the next step is continued; the replacing unit is used for judging whether the reference number CID of the candidate node is greater than the minimum reference number MinCID stored in the memory of the candidate node or not after the candidate node receives the reference number CID of the candidate node, if so, the candidate node is not replaced, and the result of the preselection stage of the candidate node is returned, otherwise, the minimum reference number MinCID is replaced; the response unit is that after a certain participating node receives the approval response of more than half of the selecting nodes, the election succeeds, and becomes a new main node.
Furthermore, the notification module further comprises an updating unit and an election success unit, wherein the updating unit updates the name list data of the local distributed cluster node after the participating node becomes the master node; and the election success unit, namely reading the node list after the participating nodes successfully become the main nodes, and informing all the nodes of the latest node list, the self-adding conference MeetingID and the participating numbers CID used by the participating nodes.
Further, the receiving module is further specifically: after all the nodes receive the node list information, comparing the received self-adding conference meetingID with the locally stored self-adding conference meetingID, wherein the comparison result comprises the following conditions:
in the first situation, the received self-increment conference meetingID is smaller than the locally stored self-increment conference meetingID, and represents an overdue participating conference without processing;
the situation II is that the received MeetingID of the self-adding conference is equal to the MeetingID of the self-adding conference stored locally, the received MeetingID of the self-adding conference is represented as election information sent by different participated nodes of the same self-adding conference, the received CID of the participated nodes is compared, and a local node list is updated on the basis that the CID of the participated nodes is smaller;
and in the third case, if the received self-adding conference meetingID is larger than the locally stored self-adding conference meetingID, the received self-adding conference meetingID is represented as the latest self-adding conference meetingID, and the local node list information is directly updated.
The system further comprises a detection module, wherein the detection module is used for detecting the heartbeat of each node, all the nodes need to send heartbeat verification to the main node every 1 second, each node provides a health detection address, the main node accesses the health address, and if the main node does not return a response, namely the main node is down, the participation application is initiated again.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.
Claims (12)
1. A scheme for realizing distributed cluster node participation is characterized by comprising the following steps:
step S1, initiating participation in a selection node in the distributed cluster to generate a selection reference number CID;
step S2, the selection nodes in the distributed cluster select the selected nodes and select the main nodes;
step S3, after the master node is selected, declaring a selected node to become the master node and informing all the nodes in the distributed cluster;
and step S4, all nodes receive the notification of the selection result of the main node, take over the work of the last main node through the selected main node, and provide service to the outside, so as to ensure the data consistency.
2. The scheme of claim 1, wherein the scheme comprises: the step S1 further includes the following steps:
step S11, when the nodes are deployed in the distributed cluster, half of the distributed cluster nodes are designated as the selection evaluation nodes, the selection participation nodes send selection participation applications to the selection evaluation nodes, and the selection participation nodes generate selection participation numbers CID;
step S12, after the participation number CID is generated, reading the locally stored self-increased conference MeetingID, and obtaining a new self-increased conference MeetingID on the self-increased conference MeetingID;
and step S13, reading the data lists of all the nodes, and preparing to send the participation application to all the evaluation nodes.
3. The scheme of claim 1, wherein the scheme comprises: the step S2 further includes the steps of:
step S21, after receiving the application for participating in the selection of the node to be participated in by the evaluation node, judging whether the meetingID of the self-adding conference is smaller than the latest meetingID of the locally stored self-adding conference, if so, representing the overdue conference to be participated in, returning to be invalid, and if not, continuing the next step;
step S22, after receiving the reference number CID of the reference node, the evaluation node judges whether the reference number CID is larger than the minimum reference number MinCID stored in the memory of the reference node, if so, the reference node is not replaced, and the result of the pre-selection stage of the reference node is returned, otherwise, the minimum reference number MinCID is replaced;
step S23, when a participating node receives more than half of the approval responses of the candidate nodes, the election succeeds, and becomes a new master node.
4. The scheme of claim 1, wherein the scheme comprises: the step S3 further includes the steps of:
step S31, after the participating nodes become the master nodes, updating the name list data of the local distributed cluster nodes;
and step S32, after the participating nodes successfully become the main nodes, reading the node list, and informing all the nodes of the latest node list, the self-adding conference MeetingID and the participating numbers CID used by the participating nodes.
5. The scheme of claim 1, wherein the scheme comprises: the step S4 further includes: after all the nodes receive the node list information, comparing the received self-adding conference meetingID with the locally stored self-adding conference meetingID, wherein the comparison result comprises the following conditions:
in the first situation, the received self-increment conference meetingID is smaller than the locally stored self-increment conference meetingID, and represents an overdue participating conference without processing;
the situation II is that the received MeetingID of the self-adding conference is equal to the MeetingID of the self-adding conference stored locally, the received MeetingID of the self-adding conference is represented as election information sent by different participated nodes of the same self-adding conference, the received CID of the participated nodes is compared, and a local node list is updated on the basis that the CID of the participated nodes is smaller;
and in the third case, if the received self-adding conference meetingID is larger than the locally stored self-adding conference meetingID, the received self-adding conference meetingID is represented as the latest self-adding conference meetingID, and the local node list information is directly updated.
6. The scheme of claim 1, wherein the scheme comprises: and heartbeat detection of each node is also included, heartbeat verification needs to be sent to the main node by all the nodes every 1 second, each node provides a health detection address, the main node accesses the health address, and if the main node does not return a response, namely the main node is down, the participation application is restarted.
7. A system for realizing distributed cluster node participation is characterized in that: the system comprises a participation module, a selection evaluation module, a notification module and a receiving module, wherein the participation module initiates participation in a distributed cluster, namely a participation node to generate a participation number CID; the evaluation module evaluates the selected nodes in the distributed cluster and evaluates the master nodes; the notification module announces a selected node as a master node after the master node is selected, and notifies all nodes in the distributed cluster; the receiving module receives the notification of the selection result of the master node, and takes over the work of the last master node through the selected master node to provide service to the outside so as to ensure the data consistency.
8. The system of claim 7, wherein the system further comprises: the participation module comprises a sending unit, a generating unit and a reading unit, wherein the sending unit is used for appointing half of the number of the distributed cluster nodes as selection evaluation nodes when the distributed cluster deploys the nodes, the selection participation nodes send participation applications to the selection evaluation nodes, and the selection participation nodes generate selection participation numbers CID; the generating unit is used for reading the locally stored self-increased conference meetingID after the participation number CID is generated, and obtaining a new self-increased conference meetingID on the self-increased conference meetingID; the reading unit reads the data lists of all the nodes and prepares to send the participation application to all the evaluation nodes.
9. The system of claim 7, wherein the system further comprises: the evaluation module further comprises a judgment unit, a replacement unit and a response unit, wherein the judgment unit judges whether the meeting ID is smaller than the latest meeting ID stored locally or not after the evaluation node receives the application for participating in the selection of the node, if yes, the meeting ID is an overdue meeting, if not, the next step is continued; the replacing unit is used for judging whether the reference number CID of the candidate node is greater than the minimum reference number MinCID stored in the memory of the candidate node or not after the candidate node receives the reference number CID of the candidate node, if so, the candidate node is not replaced, and the result of the preselection stage of the candidate node is returned, otherwise, the minimum reference number MinCID is replaced; the response unit is that after a certain participating node receives the approval response of more than half of the selecting nodes, the election succeeds, and becomes a new main node.
10. The system of claim 7, wherein the system further comprises: the notification module further comprises an updating unit and an election success unit, wherein the updating unit updates the name list data of the local distributed cluster node after the participating node becomes the master node; and the election success unit, namely reading the node list after the participating nodes successfully become the main nodes, and informing all the nodes of the latest node list, the self-adding conference MeetingID and the participating numbers CID used by the participating nodes.
11. The system of claim 7, wherein the system further comprises: the receiving module is further specifically: after all the nodes receive the node list information, comparing the received self-adding conference meetingID with the locally stored self-adding conference meetingID, wherein the comparison result comprises the following conditions:
in the first situation, the received self-increment conference meetingID is smaller than the locally stored self-increment conference meetingID, and represents an overdue participating conference without processing;
the situation II is that the received MeetingID of the self-adding conference is equal to the MeetingID of the self-adding conference stored locally, the received MeetingID of the self-adding conference is represented as election information sent by different participated nodes of the same self-adding conference, the received CID of the participated nodes is compared, and a local node list is updated on the basis that the CID of the participated nodes is smaller;
and in the third case, if the received self-adding conference meetingID is larger than the locally stored self-adding conference meetingID, the received self-adding conference meetingID is represented as the latest self-adding conference meetingID, and the local node list information is directly updated.
12. The system of claim 7, wherein the system further comprises: the detection module is used for detecting the heartbeat of each node, all the nodes need to send heartbeat verification to the main node every 1 second, each node provides a health detection address, the main node accesses the health address, and if the main node does not return a response, namely the main node is down, the participation application is initiated again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110948463.0A CN113641692A (en) | 2021-08-18 | 2021-08-18 | Scheme and system for realizing distributed cluster node participation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110948463.0A CN113641692A (en) | 2021-08-18 | 2021-08-18 | Scheme and system for realizing distributed cluster node participation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113641692A true CN113641692A (en) | 2021-11-12 |
Family
ID=78422607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110948463.0A Pending CN113641692A (en) | 2021-08-18 | 2021-08-18 | Scheme and system for realizing distributed cluster node participation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113641692A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102929696A (en) * | 2012-09-28 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Method and apparatus for constructing, submitting and monitoring center node of distributed system |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN103491168A (en) * | 2013-09-24 | 2014-01-01 | 浪潮电子信息产业股份有限公司 | Cluster election design method |
WO2017000666A1 (en) * | 2015-07-02 | 2017-01-05 | 中兴通讯股份有限公司 | Cluster master node election method and apparatus |
CN108810100A (en) * | 2018-05-22 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of electoral machinery of host node, device and equipment |
CN109995835A (en) * | 2017-12-29 | 2019-07-09 | 浙江宇视科技有限公司 | Host node electoral machinery, device and distributed memory system |
CN113014634A (en) * | 2021-02-20 | 2021-06-22 | 成都新希望金融信息有限公司 | Cluster election processing method, device, equipment and storage medium |
-
2021
- 2021-08-18 CN CN202110948463.0A patent/CN113641692A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102929696A (en) * | 2012-09-28 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Method and apparatus for constructing, submitting and monitoring center node of distributed system |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN103491168A (en) * | 2013-09-24 | 2014-01-01 | 浪潮电子信息产业股份有限公司 | Cluster election design method |
WO2017000666A1 (en) * | 2015-07-02 | 2017-01-05 | 中兴通讯股份有限公司 | Cluster master node election method and apparatus |
CN109995835A (en) * | 2017-12-29 | 2019-07-09 | 浙江宇视科技有限公司 | Host node electoral machinery, device and distributed memory system |
CN108810100A (en) * | 2018-05-22 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of electoral machinery of host node, device and equipment |
CN113014634A (en) * | 2021-02-20 | 2021-06-22 | 成都新希望金融信息有限公司 | Cluster election processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3811597B1 (en) | Zone redundant computing services using multiple local services in distributed computing systems | |
CN108810100B (en) | Method, device and equipment for electing master node | |
KR101429555B1 (en) | System and method for providing high availability data | |
US8055735B2 (en) | Method and system for forming a cluster of networked nodes | |
US7035858B2 (en) | System and method dynamic cluster membership in a distributed data system | |
CN107919977B (en) | Online capacity expansion and online capacity reduction method and device based on Paxos protocol | |
US20180034907A1 (en) | Data access and management system as well as a method for data access and data management for a computer system | |
CN111651291A (en) | Shared storage cluster brain crack prevention method, system and computer storage medium | |
JP4459999B2 (en) | Non-stop service system using voting and information updating and providing method in the system | |
CN110635941A (en) | Database node cluster fault migration method and device | |
CN112822528B (en) | Live list service system, live list management method, server and medium | |
CN108509296B (en) | Method and system for processing equipment fault | |
CN114625566A (en) | Data disaster tolerance method and device, electronic equipment and storage medium | |
CN113641692A (en) | Scheme and system for realizing distributed cluster node participation | |
CN112037873B (en) | Single-point optimization method based on cluster selection and consensus mechanism | |
CN111190707B (en) | Data processing method and device | |
US7668899B2 (en) | Decoupled routing network method and system | |
US20090106781A1 (en) | Remote call handling methods and systems | |
CN115934252A (en) | Method and system for realizing full-automatic load balancing consumption message based on Kafka | |
CN110502460B (en) | Data processing method and node | |
JP2021524085A (en) | Message processing methods, devices and systems | |
CN116204590A (en) | Data processing method, readable storage medium and computer device for database cluster | |
CN116159312A (en) | Game room management method, device, equipment and storage medium | |
CN116938881B (en) | Method, system, equipment and readable storage medium for realizing dynamic IP pool | |
CN114490186B (en) | Data backup rule distribution method, node, system and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211112 |