Port Switch Service Distributed Coordination
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional distributed coordination services using consensus algorithms like Paxos and Raft face performance issues due to high network consumption and difficulty in deploying distributed clusters with strong consistency and high availability, often leading to system crashes and service interruptions.
Innovation Solution
The Port Switch Service (PSS) integrates standard message routing with distributed coordination functions, eliminating unnecessary operations like disk I/O and network broadcasting, and uses a master node with in-memory data storage for high-concurrency and high-throughput message forwarding, enabling scalable distributed clusters without additional network requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If consensus algorithms like Paxos and Raft are used for distributed coordination services, then strong consistency is achieved, but network consumption increases and performance decreases
Solution Approach 1:
The patent extracts and eliminates the network broadcasting mechanism from traditional consensus algorithms. Instead of requiring three times of network broadcasting to confirm voting, the invention uses a lease mechanism with timeout-based master node election that eliminates unnecessary network communications while maintaining consistency through in-memory data storage and asynchronous I/O operations.
Solution Approach 2:
The patent changes the fundamental parameter of consistency verification from quorum-based voting to lease-based time validation. By introducing a lease timeout parameter, the system transitions from active consensus verification to passive lease expiration detection, dramatically reducing network consumption while maintaining strong consistency through the lease mechanism.
2Reliability
If quorum-based consensus algorithms are used, then distributed coordination is achieved, but system performance and throughput decrease
Solution Approach 1:
The patent replaces the mechanical quorum voting system with an information-based lease mechanism. Instead of requiring multiple nodes to mechanically vote and broadcast consensus, the system uses lease tokens with time-based validation, eliminating the need for continuous voting mechanics and dramatically improving throughput while maintaining distributed coordination reliability.
Solution Approach 2:
The patent implements periodic lease renewal actions instead of continuous consensus voting. Nodes periodically renew their leases to maintain master status, replacing the continuous periodic broadcasting and voting required by quorum algorithms. This periodic lease renewal mechanism maintains coordination while allowing much higher system throughput between renewal intervals.
3Reliability
If disk I/O operations are performed for data persistence, then data reliability is improved, but operation speed and response time decrease
Solution Approach 1:
The patent replaces mechanical disk I/O operations with in-memory data storage and asynchronous I/O mechanisms. Data is stored in memory for immediate access and persistence is handled asynchronously without blocking operations, eliminating the mechanical bottleneck of disk writes while maintaining data reliability through the lease mechanism and asynchronous persistence operations.
Solution Approach 2:
The patent performs preliminary data loading into memory before operations are needed, and uses asynchronous I/O to prepare persistence operations in advance. By pre-loading data and preparing persistence operations asynchronously, the system eliminates wait times associated with synchronous disk I/O while maintaining data integrity through the lease-based coordination mechanism.
4Reliability
If network broadcasting is used for consensus verification, then distributed agreement is achieved, but network throughput and latency are negatively impacted
Solution Approach 1:
The patent extracts and removes the network broadcasting component from the consensus verification process. Instead of broadcasting votes and acknowledgments across the network, the system uses unicast lease renewal messages between the master and follower nodes, eliminating the cubic network consumption of traditional quorum algorithms while maintaining distributed agreement through the lease mechanism.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
Provided is a port switch service (Port Switch Service, PSS), including a server cluster and a client cluster, wherein a master node in the current cluster is elected from the server cluster through a quorum algorithm and is guaranteed to be unique within a specified period in a lease form; the client cluster contains various client nodes needing to use the PSS, and each client node can establish connection with the master node as needed; and each of the client node is identified in the server cluster through the unique node ID. The port switch service is a message routing service integrating distributed coordination functions such as fault detection, service electing, service discovery, and distributed lock. By sacrificing reliability under the extreme condition, the port switch service realizes very high performance, capacity and concurrency capability in the premise of ensuring strong consistency, high availability and scalability.