Consensus Node Election with Cached Pre-Voting Verification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed node devices in a consensus system face network isolation and process failures leading to unnecessary master node switching and consensus interruption, affecting service request processing.
Innovation Solution
A node election voting method where a node device sends a pre-election message when the master node is not working, stores it in a cache if the master node is still active, and sends a pre-voting message only after receiving a threshold of support messages, avoiding immediate election attempts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If node devices immediately initiate election when master node is perceived as failed, then election response speed is improved, but unnecessary master node switching occurs due to transient network isolation
Solution Approach 1:
The patent applies preliminary action by implementing a pre-election message mechanism before formal election. When a node perceives master node failure, it first sends a pre-election message to verify the situation before initiating full election. This preliminary verification step prevents premature election due to transient network issues, thus improving reliability while maintaining reasonable response speed.
Solution Approach 2:
The pre-election message acts as an intermediary mechanism between failure detection and formal election. Instead of directly transitioning from failure detection to election, the system uses this intermediate verification step to confirm actual master node status, preventing unnecessary switching while ensuring timely response to genuine failures.
2Loss of time
If node devices send pre-election messages immediately upon detecting master node failure, then election initiation speed is improved, but consensus interruption occurs due to premature election
Solution Approach 1:
The patent implements preliminary action by sending pre-election messages before formal election to verify actual master node status. This ensures that election is only initiated when truly necessary, preventing consensus interruption during transient network issues while maintaining efficient response to genuine failures.
Solution Approach 2:
The system uses feedback mechanisms where nodes respond to pre-election messages with their current master node status information. This feedback allows the initiating node to verify whether the perceived failure is real before proceeding with election, thus preventing unnecessary consensus interruptions while maintaining efficient service processing.
3Measurement precision
If nodes cache pre-election messages and wait for master node status confirmation, then master node switching accuracy is improved, but election response delay increases
Solution Approach 1:
The patent applies preliminary action by implementing a two-stage verification process: first caching the pre-election message with timeout, then sending it for confirmation before formal election. This staged approach balances accuracy and timing by allowing brief waiting for status confirmation while ensuring timely election initiation if no response is received.
Solution Approach 2:
The system uses parameter changes by implementing timeout mechanisms and status verification thresholds. The cache timeout parameter and confirmation threshold are tuned to balance between waiting for accurate status information and initiating election promptly, thus resolving the contradiction between detection accuracy and response delay.
Data Source
AI summary
Embodiments of this specification provide node election voting methods and apparatuses based on a consensus system. The consensus system includes a first node device and a second node device, and a master node device. When determining that the master node device is not in a working state, the first node device sends a first pre-election message. When receiving the first pre-election message, the second node device stores the first pre-election message in a cache. When determining that the master node device is still in the working state, the second node device maintains a waiting state of the first pre-election message in the cache; and when determining that the master node device is not in the working state, the second node device sends a pre-voting message to the corresponding first node device, so that the first node device sends a formal first election message to another node device.


