Cluster Transaction Processing via Cached Global Snapshots
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed database systems, the centralized management of transaction snapshots leads to network bandwidth and CPU resource limitations, resulting in slow message processing and reduced concurrent processing performance, especially under heavy load conditions.
Innovation Solution
A transaction processing method where processing nodes in a cluster receive and locally cache global snapshot information periodically sent by a central node, allowing them to process transactions without frequent interactions with the central node for snapshot updates, thereby reducing network overhead and improving processing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If processing nodes frequently interact with the central node to obtain transaction snapshots, then transaction visibility accuracy is improved, but network bandwidth consumption increases and message processing speed decreases
Solution Approach 1:
The central node pre-generates and pushes transaction snapshot information to processing nodes before the processing nodes need to query it. This proactive approach ensures that snapshot data is already available at the processing nodes when needed, eliminating the need for frequent request-response interactions and improving message processing speed while maintaining transaction visibility accuracy.
Solution Approach 2:
Processing nodes maintain local copies of transaction snapshot information obtained from the central node. Instead of repeatedly querying the central node for the same snapshot data, nodes use their local copies to determine transaction visibility, significantly reducing network bandwidth consumption and message processing overhead while preserving the accuracy of transaction visibility determination.
2Device complexity
If the central node manages all transaction snapshots centrally, then transaction visibility control is simplified, but CPU resource consumption and processing speed of the central node increase
Solution Approach 1:
The patent extracts the function of maintaining and providing transaction snapshot information from the central node and implements it locally at each processing node. Processing nodes independently maintain their own snapshot copies and use them to determine transaction visibility, removing the computational burden of snapshot management from the central node while preserving the simplicity of centralized control through periodic synchronization.
Solution Approach 2:
Processing nodes serve themselves by maintaining local copies of transaction snapshot information and using these local copies to determine transaction visibility without requiring continuous intervention from the central node. This self-service approach significantly reduces the CPU resource consumption and processing speed requirements of the central node while maintaining accurate transaction visibility control.
3Loss of information
If processing nodes obtain transaction snapshots on-demand from the central node, then snapshot freshness is improved, but network overhead increases and concurrent processing performance decreases
Solution Approach 1:
The central node periodically pushes transaction snapshot information to processing nodes at predetermined intervals rather than waiting for on-demand requests. This periodic update mechanism ensures that processing nodes receive fresh snapshot information regularly while avoiding the network overhead and performance degradation associated with frequent on-demand queries, thereby maintaining both snapshot freshness and concurrent processing performance.
Data Source
Figure 1~2
Figure 3
Figure 4~5
AI summary
The present invention discloses a transaction processing method, a processing node, a central node, and a cluster. The method includes: receiving, by the processing node in the cluster, global snapshot information sent by the central node in the cluster according to a preset time interval, where the global snapshot information includes a transaction identifier of a running transaction in the cluster; storing, by the processing node, the received global snapshot information in a cache; and processing, by the processing node, the transaction according to the global snapshot information stored in the cache. In the transaction processing method in embodiments of the present invention, a central node in a cluster sends latest global snapshot information to each processing node according to a preset time interval, so that the processing node can store the global snapshot information. When applying for global snapshot information during transaction processing, the processing node does not need to obtain latest snapshot information from the central node in a complex message receiving and transmitting manner, but obtains locally cached global snapshot information. Therefore, network overheads can be reduced, and transaction processing efficiency can be improved.