Distributed Database Node Grouping for Maintenance Availability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed databases face data access failures during maintenance tasks due to incorrect shard locations during migration, leading to suspended external services and poor user experience.
Innovation Solution
Group storage nodes into node groups based on data copies, allowing maintenance tasks to be performed on a subset of groups while other groups continue providing external services.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the external data access service is suspended during operation or maintenance tasks, then data access failures are avoided, but the database availability and user experience deteriorate
Solution Approach 1:
The system segments storage nodes into multiple isolated groups, where each group can independently perform maintenance operations without affecting other groups. This segmentation allows the database to maintain partial availability during maintenance by routing requests to non-maintenance groups, thus resolving the contradiction between ensuring data access reliability and maintaining database availability
Solution Approach 2:
The system enables continuous data access service during maintenance by allowing non-maintenance node groups to continue providing external services while maintenance operations are performed on specific target groups. This continuity principle ensures that the database maintains overall availability even when individual groups are undergoing maintenance, thus resolving the contradiction between reliability and productivity
2Productivity
If data shards are migrated during operation or maintenance tasks, then storage capacity is optimized, but data access failures occur due to incorrect shard locations
Solution Approach 1:
By segmenting storage nodes into isolated groups, the system allows migration operations to be performed on data shards within target groups without affecting the location accuracy of shards in non-target groups. This segmentation isolates the migration impact to specific groups, maintaining data access accuracy for the overall system while enabling storage optimization through targeted migrations
Solution Approach 2:
The system extracts target node groups requiring maintenance from the overall database system, performing migration operations only on these isolated groups. This extraction approach allows storage capacity optimization through selective migration while preventing data access failures by keeping non-target groups operational with correct shard locations
3Ease of manufacture
If all storage nodes are used for maintenance tasks, then comprehensive maintenance is achieved, but external data access services are completely suspended
Solution Approach 1:
The system divides storage nodes into multiple groups, allowing maintenance tasks to be comprehensively applied to specific target groups while non-target groups continue providing external services. This segmentation enables maintenance completeness on selected groups without compromising overall service continuity, thus resolving the contradiction between ease of manufacture and ease of operation
Solution Approach 2:
The system applies different operational qualities to different node groups: target groups undergo maintenance operations while non-target groups maintain normal service operations. This local differentiation allows comprehensive maintenance on specific groups while preserving service continuity overall, resolving the contradiction between maintenance completeness and service continuity
Data Source
AI summary
Implementations of the present specification provide a method for managing a distributed database, a device, and a storage medium. The distributed database includes a plurality of storage nodes, the plurality of storage nodes are divided into a plurality of node groups, and each node group includes at least one storage node configured to store a data copy corresponding to the data. The method includes: receiving a data access request for the data stored in the distributed database; and determining, in response to the data access request, whether a target node group on which an online operation or maintenance task is being executed exists in the plurality of node groups; and allocating the data access request to storage nodes in node groups other than the target node group for execution in response to that the target node group exists in the plurality of node groups. Through the above manner, the distributed database can also provide an external data access service while the operation or maintenance task is executed on the distributed database.


