Distributed storage cluster splitting method, apparatus, and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0015] The key or essential features of the embodiments disclosed herein are not intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.
Smart Images

Figure CN122554467A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of distributed storage technology, and in particular to the field of distributed storage cluster splitting and data sharding cross-cluster migration technology. Background Technology
[0002] Distributed storage systems typically employ a layered architecture, primarily comprising data storage nodes (BE), master nodes, and proxy nodes. BE nodes are responsible for carrying actual business data in units of data shards (tablets). The master node, as the core management module of the cluster, uniformly maintains cluster metadata, performs lifecycle management such as data shard creation, deletion, recovery, and migration, and provides metadata query and scheduling services. Proxy nodes receive and process user business requests, obtain target shard routing information from the master node based on the request type, and then complete the read and write operations for the corresponding data shard.
[0003] In a conventional distributed storage architecture, Proxy nodes and BE nodes can be independently scaled up and down according to business load to adapt to different scales of business processing needs. The scaling up and down process of BE nodes is accompanied by the migration and recovery of data shards. Because the system adopts a centralized metadata management model, the Master node uniformly undertakes the maintenance and scheduling of all metadata. Its management functions and scheduling logic cannot be split and coordinated among multiple nodes, making the system as a whole present a centralized management and scheduling operation state with the Master node as the core. Summary of the Invention
[0004] This disclosure presents a method, apparatus, system, device, storage medium, and program product for splitting a distributed storage cluster.
[0005] In a first aspect, this disclosure proposes a distributed storage cluster splitting system, including an original cluster, a new cluster, and a splitting module. Both the original cluster and the new cluster include a master node, data storage nodes, and proxy nodes. The splitting module is communicatively connected to the master node of the original cluster and the master node of the new cluster, respectively. The splitting module is used to register the original cluster as the base cluster of the distributed storage cluster splitting system; initialize itself based on the metadata directory and data sharding range of the original cluster; distribute data sharding identifiers on behalf of the master node of the original cluster; register the new cluster to the distributed storage cluster splitting system; synchronize the metadata directory of the original cluster to the master node of the new cluster; and migrate the target data shards corresponding to the preset target data sharding range from the original cluster to the new cluster.
[0006] Secondly, this disclosure proposes a method for splitting a distributed storage cluster, including: registering the original cluster as the base cluster of the distributed storage cluster splitting system; performing self-initialization based on the metadata directory and data sharding range of the original cluster; distributing data sharding identifiers in place of the master node of the original cluster; registering the new cluster to the distributed storage cluster splitting system; synchronizing the metadata directory of the original cluster to the master node of the new cluster; and migrating the target data shards corresponding to the preset target data sharding range from the original cluster to the new cluster.
[0007] Thirdly, this disclosure proposes a method for splitting a distributed storage cluster, comprising: receiving a migration instruction sent by a splitting module; synchronizing the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster; receiving a control request sent by the master node of the new cluster; migrating at least one copy of the target data shard to the data storage node of the new cluster; receiving a cleanup request sent by the master node of the new cluster; and cleaning up the metadata of the target data shard.
[0008] Fourthly, this disclosure proposes a method for splitting a distributed storage cluster, comprising: receiving metadata of a target data shard synchronized by the master node of the original cluster and metadata of the corresponding data storage node; sending a control request to the master node of the original cluster; after acquiring control of the target data shard, sending a control acquisition notification to the splitting module; receiving at least one copy of the target data shard migrated by the master node of the original cluster; and sending a cleanup request to the master node of the original cluster, wherein the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
[0009] Fifthly, this disclosure provides a distributed storage cluster splitting device, comprising: a first registration module configured to register an original cluster as the base cluster of a distributed storage cluster splitting system; an initialization module configured to initialize itself based on the metadata directory and data shard range of the original cluster; a distribution module configured to replace the master node of the original cluster in distributing data shard identifiers; a second registration module configured to register a new cluster to the distributed storage cluster splitting system; a synchronization module configured to synchronize the metadata directory of the original cluster to the master node of the new cluster; and a migration module configured to migrate the target data shards corresponding to a preset target data shard range from the original cluster to the new cluster.
[0010] In a sixth aspect, embodiments of this disclosure propose a distributed storage cluster splitting apparatus, comprising: a first receiving module configured to receive a migration instruction sent by a splitting module; a synchronization module configured to synchronize the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the newly added cluster; a second receiving module configured to receive a control request sent by the master node of the newly added cluster; a migration module configured to migrate at least one copy of the target data shard to the data storage node of the newly added cluster; a third receiving module configured to receive a cleanup request sent by the master node of the newly added cluster; and a cleanup module configured to clean up the metadata of the target data shard.
[0011] In a seventh aspect, embodiments of this disclosure propose a distributed storage cluster splitting apparatus, comprising: a first receiving module configured to receive metadata of a target data shard synchronized by the master node of the original cluster and metadata of the corresponding data storage node; a first sending module configured to send a control request to the master node of the original cluster; a second sending module configured to send a control acquisition notification to a splitting module after acquiring control of the target data shard; a second receiving module configured to receive at least one copy of the target data shard migrated by the master node of the original cluster; and a third sending module configured to send a cleanup request to the master node of the original cluster, wherein the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
[0012] Eighthly, embodiments of this disclosure provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods described in the second, third, or fourth aspects.
[0013] In a ninth aspect, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods described in the second, third, or fourth aspects.
[0014] In a tenth aspect, embodiments of this disclosure provide a computer program product including a computer program that, when executed by a processor, implements the methods described in the second, third, or fourth aspects.
[0015] The key or essential features of the embodiments disclosed herein are not intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0016] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. Wherein: Figure 1 This is a flowchart of one embodiment of the distributed storage cluster splitting system according to the present disclosure; Figure 2 This is an interaction timing diagram of yet another embodiment of the distributed storage cluster splitting system according to the present disclosure; Figure 3 This is a schematic diagram of an existing distributed storage cluster architecture; Figure 4 This is a schematic diagram of the distributed storage cluster splitting system architecture and interaction process disclosed herein; Figure 5 This is a flowchart of an embodiment of the distributed storage cluster splitting method according to this disclosure; Figure 6 This is a flowchart of yet another embodiment of the distributed storage cluster splitting method according to the present disclosure; Figure 7 This is a flowchart of another embodiment of the distributed storage cluster splitting method according to this disclosure; Figure 8 This is a schematic diagram of a structure of an embodiment of the distributed storage cluster splitting device according to the present disclosure; Figure 9 This is a schematic diagram of the structure of yet another embodiment of the distributed storage cluster splitting device according to the present disclosure; Figure 10 This is a schematic diagram of another embodiment of the distributed storage cluster splitting apparatus according to the present disclosure; Figure 11 This is a block diagram of an electronic device used to implement the distributed storage cluster splitting method of the embodiments of this disclosure. Detailed Implementation
[0017] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0019] Figure 1A flow 100 of one embodiment of a distributed storage cluster splitting system according to the present disclosure is shown.
[0020] The distributed storage cluster splitting system includes the original cluster, the newly added cluster, and the splitting module.
[0021] The distributed storage cluster splitting system is a system used to physically and seamlessly split a single, centrally managed distributed storage cluster according to data sharding range, metadata range, and business traffic range. This enables horizontal scaling of cluster management nodes and solves the single-point-of-failure problem of management nodes. The original cluster is the source cluster before splitting, handling all business traffic, metadata management, data sharding storage, and scheduling. The new cluster is the target cluster after splitting, an independent cluster used to take over some data shards, some metadata, and some business traffic from the original cluster. The splitting module is the core module used to complete cluster splitting, metadata synchronization, data shard migration, routing switching, and state control between the original and new clusters.
[0022] Both the original cluster and the newly added cluster include a master node, a data storage node (BE), and a proxy node.
[0023] The master node is the core management node used for cluster-wide metadata management, data shard lifecycle maintenance, routing scheduling, replica management, and status monitoring. Data storage nodes are the worker nodes that actually store business data, provide data read / write services, and complete data replica synchronization and migration, using data shards as the smallest unit. Proxy nodes are the entry points used to receive upper-layer business access requests, forward requests to the corresponding data storage nodes based on metadata routing information, and complete business traffic access and forwarding.
[0024] The split module communicates with the master node of the original cluster and the master node of the newly added cluster, respectively.
[0025] This refers to the network communication link established between the split module and the master node, which is used to realize communication functions such as command issuance, data reporting, status synchronization, and information exchange.
[0026] The distributed storage cluster split system performs the following steps: Step 101: The splitting module registers the original cluster as the base cluster of the distributed storage cluster splitting system.
[0027] In this embodiment, the splitting module registers the original cluster as the base cluster of the distributed storage cluster splitting system.
[0028] The splitting module registers the original cluster as the foundation cluster of the distributed storage cluster splitting system. This means the original cluster is registered as the source and baseline cluster of the splitting system, serving as the reference source for subsequent new cluster access, metadata synchronization, and data shard migration. The splitting module records information such as the original cluster's cluster identifier, master node address, data storage node list, proxy node list, metadata directory structure, and total data shard range. It completes the access and registration of the original cluster and establishes a communication link and heartbeat mechanism with the original cluster's master node.
[0029] Step 102: The splitting module initializes itself based on the original cluster's metadata directory and data sharding range.
[0030] In this embodiment, the splitting module initializes itself based on the original cluster's metadata directory and data sharding range.
[0031] The splitting module pulls the full metadata directory from the master node of the original cluster, including data shard definitions, replication policies, storage policies, routing rules, freeze policies, and failure policies. It then builds its own management view based on the global data shard scope of the original cluster, completing initialization. After initialization, the splitting module has a global perspective, enabling unified management, allocation, and scheduling of the identifiers, scopes, and affiliations of all data shards.
[0032] Step 103: The split module replaces the original cluster's master node to distribute data shards and identifiers.
[0033] In this embodiment, the splitting module replaces the master node of the original cluster to perform data sharding identification and distribution.
[0034] The splitting module takes over the data shard identifier allocation authority of the original cluster master node, becoming the globally unique identifier distribution node. It assigns a globally unique, non-repeating, and cross-cluster routable identifier to all new, migrated, and split data shards, avoiding issues such as identifier conflicts, routing chaos, and shard management anomalies between different clusters.
[0035] Step 104: The splitting module will register the new cluster to the distributed storage cluster splitting system.
[0036] In this embodiment, the splitting module registers the new cluster to the distributed storage cluster splitting system.
[0037] The splitting module registers new clusters to the splitting system, recording information such as the cluster identifier, master node address, data storage node topology, proxy node service address, upper limit of the data shard range that can be carried, replica number configuration, and migration strategy configuration of the new cluster. It establishes a trusted communication link with the master node of the new cluster, making the new cluster a legitimate cluster that can be managed, scheduled, and allocated data shards by the splitting system.
[0038] Step 105: The split module synchronizes the metadata directory of the original cluster to the master node of the newly added cluster.
[0039] In this embodiment, the splitting module synchronizes the metadata directory of the original cluster to the master node of the newly added cluster.
[0040] The splitting module fully synchronizes the original cluster's complete metadata directory, data sharding structure, replication strategy, routing rules, freeze rules, failure rules, and cleanup rules to the master node of the new cluster. This enables the master node of the new cluster to have the same metadata management capabilities, sharding scheduling capabilities, and status control capabilities as the original cluster, providing a metadata foundation for subsequent takeover of target data shards.
[0041] Step 106: The splitting module migrates the target data shards corresponding to the preset target data shard range from the original cluster to the newly added cluster.
[0042] In this embodiment, the splitting module migrates the target data shards corresponding to the preset target data shard range from the original cluster to the newly added cluster.
[0043] The splitting module filters out the target data shards that need to be migrated across clusters based on the preset target data shard range. It then drives the original cluster and the new cluster to complete a series of operations, such as freezing the target data shards, synchronizing metadata, switching control, migrating replicas, switching states, and cleaning up metadata. This enables a complete, secure, and business-agnostic cross-cluster migration of the target data shards from the original cluster to the new cluster.
[0044] This disclosure provides a distributed storage cluster splitting system. By introducing an independent splitting module, it achieves horizontal splitting of the centralized management capabilities of the cluster. This distributes the metadata management, scheduling, and status maintenance pressures of a single master node to the master nodes of multiple independent clusters, fundamentally solving the single-point bottleneck problem of the master node, supporting unlimited horizontal expansion of the cluster, and meeting the high availability, high stability, and high scalability requirements of large-scale distributed storage.
[0045] Figure 2 Interaction timing 200 is shown for yet another embodiment of the distributed storage cluster splitting system according to this disclosure.
[0046] The distributed storage cluster splitting system includes the original cluster, the newly added cluster, and the splitting module.
[0047] The distributed storage cluster splitting system is a system used to physically and seamlessly split a single, centrally managed distributed storage cluster according to data sharding range, metadata range, and business traffic range. This enables horizontal scaling of cluster management nodes and solves the single-point-of-failure problem of management nodes. The original cluster is the source cluster before splitting, handling all business traffic, metadata management, data sharding storage, and scheduling. The new cluster is the target cluster after splitting, an independent cluster used to take over some data shards, some metadata, and some business traffic from the original cluster. The splitting module is the core module used to complete cluster splitting, metadata synchronization, data shard migration, routing switching, and state control between the original and new clusters.
[0048] Both the original cluster and the newly added cluster include a master node, a data storage node (BE), and a proxy node.
[0049] The master node is the core management node used for cluster-wide metadata management, data shard lifecycle maintenance, routing scheduling, replica management, and status monitoring. Data storage nodes are the worker nodes that actually store business data, provide data read / write services, and complete data replica synchronization and migration, using data shards as the smallest unit. Proxy nodes are the entry points used to receive upper-layer business access requests, forward requests to the corresponding data storage nodes based on metadata routing information, and complete business traffic access and forwarding.
[0050] The split module communicates with the master node of the original cluster and the master node of the newly added cluster, respectively.
[0051] This refers to the network communication link established between the split module and the master node, which is used to realize communication functions such as command issuance, data reporting, status synchronization, and information exchange.
[0052] The distributed storage cluster split system performs the following steps: Step 201: The split module sends a migration command to the master node of the original cluster.
[0053] In this embodiment, the splitting module sends a migration command to the master node of the original cluster.
[0054] After completing cluster registration, metadata synchronization, and range configuration, the splitting module issues fine-grained migration instructions to the master node of the original cluster. The instructions include configuration information such as the target data sharding range, number of replicas, migration priority, freeze duration, failure timing, and cleanup timing.
[0055] Step 202: The master node of the original cluster marks the target data shards as frozen.
[0056] In this embodiment, after receiving the migration instruction, the master node of the original cluster marks the target data shard as frozen.
[0057] Upon receiving the migration command, the master node of the original cluster marks the target data shard as frozen. Frozen status means that the metadata of the target data shard remains valid and consistent with the actual data shard distribution, but any modifications, scheduling, migration, or replica adjustments are prohibited to ensure the target data shard remains stable, consistent, and immutable during the migration process.
[0058] Step 203: The master node of the original cluster synchronizes the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster.
[0059] In this embodiment, after receiving the migration instruction, the master node of the original cluster synchronizes the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster.
[0060] The master node of the original cluster will fully synchronize the metadata of the target data shard, the corresponding data storage node metadata, replica location information, routing information, status information, and freeze information to the master node of the new cluster, so that the master node of the new cluster can obtain complete management information of the target data shard.
[0061] Step 204: The master node of the newly added cluster sends a control request to the master node of the original cluster.
[0062] In this embodiment, the master node of the newly added cluster sends a control request to the master node of the original cluster.
[0063] After completing the receipt and verification of metadata, the master node of the newly added cluster sends a control request to the master node of the original cluster, requesting to take over the management, scheduling, status modification, replica control and routing publication permissions of the target data shard.
[0064] Step 205: The master node of the original cluster marks the target data shard as invalid. In this embodiment, after receiving the control request, the master node of the original cluster marks the target data shard as invalid.
[0065] After receiving a control request, the master node of the original cluster marks the target data shard as invalid. An invalid state means that the metadata of the target data shard is outdated and no longer consistent with the actual data shard distribution. When a business request hits this type of shard, it will be redirected, rejected, or forwarded to the new cluster, and will no longer be served by the original cluster.
[0066] Step 206: The master node of the newly added cluster sends a control acquisition notification to the split module.
[0067] In this embodiment, after acquiring control of the target data shard, the master node of the newly added cluster sends a control acquisition notification to the splitting module.
[0068] After the newly added cluster master node successfully acquires full control of the target data shard, it sends a control acquisition notification to the splitting module, informing the splitting module that the management entity of the target data shard has been switched and subsequent replica migration and routing updates can be performed.
[0069] Step 207: The newly added master node of the cluster marks the data shard range corresponding to the target data shard.
[0070] In this embodiment, after acquiring control of the target data shard, the master node of the newly added cluster marks the data shard range corresponding to the target data shard as belonging; The master node of the newly added cluster assigns ownership to the data shard range corresponding to the target data shard, marking this range as the management range, service range, and routing range of the new cluster, so that subsequent business requests can be directly routed to the new cluster based on the shard range.
[0071] Step 208: The master node of the original cluster migrates at least one copy of the target data shard to the data storage node of the new cluster.
[0072] In this embodiment, the master node of the original cluster migrates at least one copy of the target data shard to the data storage node of the newly added cluster.
[0073] According to the replication strategy, the master node of the original cluster safely, completely and orderly migrates all data replicas of the target data shard from the data storage node of the original cluster to the data storage node of the new cluster, ensuring that the data is not lost, damaged or duplicated.
[0074] Step 209: The master node of the original cluster marks the data storage node corresponding to the target data shard as being in a migration state.
[0075] In this embodiment, during the migration of target data shards, the master node of the original cluster marks the data storage node corresponding to the target data shard as being in a migration state.
[0076] During the migration of target data shards, the master node of the original cluster marks the data storage node corresponding to the target data shard as a migration status. This is used to identify that the node is undertaking cross-cluster data migration tasks, and the system can use this information for traffic control, load balancing, anomaly monitoring, and task scheduling.
[0077] Step 210: Unfreeze the target data shards on the newly added cluster's master node.
[0078] In this embodiment, after the target data shard migration is completed, the master node of the newly added cluster unfreezes the target data shard.
[0079] Once the target data shard migration is complete, the replica verification passes, and the routing takes effect, the master node of the newly added cluster will unfreeze the target data shard, restoring its normal read, write, schedule, modify, and manage capabilities, and officially providing business services to the outside world.
[0080] Step 211: The master node of the newly added cluster sends a cleanup request to the master node of the original cluster.
[0081] In this embodiment, the master node of the newly added cluster sends a cleanup request to the master node of the original cluster.
[0082] After confirming that the target data shard has been running stably and that all business routes have been switched, the master node of the newly added cluster sends a cleanup request to the master node of the original cluster, requesting the original cluster to clean up the expired metadata of the target data shard.
[0083] Step 212: The master node of the original cluster cleans up the metadata of the target data shard.
[0084] In this embodiment, upon receiving a cleanup request, the master node of the original cluster cleans up the metadata of the target data shard.
[0085] Upon receiving the cleanup request, the master node of the original cluster safely and completely cleans up all expired metadata of the target data shard, releases memory, storage and computing resources, and completes the entire cross-cluster splitting and migration process.
[0086] This disclosure provides a distributed storage cluster splitting system that achieves seamless cross-cluster migration of data shards through a standardized seven-step process of freezing, synchronizing, invalidating, switching, migrating, deactivating, and cleaning. The entire process does not affect business read / write operations, does not generate data inconsistencies, and does not cause routing errors, enabling secure, smooth, and horizontal scaling of large-scale clusters.
[0087] Figure 3 A schematic diagram of an existing distributed storage cluster architecture is shown. For example... Figure 3 As shown, the existing distributed storage cluster adopts a centralized architecture, including a proxy node Proxy 310, a master node 320, and data storage nodes BE 331, BE332, and BE 333. The number of BEs is for illustrative purposes only and can be adjusted according to actual deployment needs. Each BE includes multiple data shards (Tablets), and the number of Tablets is for illustrative purposes only and can be adjusted according to actual business scale.
[0088] In this cluster, Proxy node 310 receives user service requests and requests routing information for target data shards (Tablets) from Master node 320. Master node 320, as the sole management center of the cluster, maintains the metadata of all data shards and performs shard scheduling, status management, and routing queries. Data storage nodes BE 331, BE 332, and BE 333 actually store service data in units of data shards (Tablets). All data shard metadata is uniformly managed, scheduled, and maintained by Master node 320. After receiving a service request, Proxy node 310 queries the Master node 320 for routes. Data storage nodes BE 331, BE 332, and BE 333 store data shards, and all status reporting, replica management, and shard scheduling are centrally controlled by Master node 320. As the number of shards increases, Master node 320 easily becomes a performance bottleneck and cannot be horizontally scaled.
[0089] Figure 4 This diagram illustrates the distributed storage cluster splitting system architecture and interaction process of this disclosure. Figure 4 As shown, this disclosure introduces an independent splitting module, Divider 410, as the global coordination and management center, responsible for cluster registration, metadata synchronization, shard identifier distribution, shard range configuration, control switching, and migration scheduling. The system includes the original cluster master node Master Old 421, the newly added cluster master node Master New 431, the original cluster data storage node group BEs Old 422, the newly added cluster data storage node group BEs New 432, and the splitting module Divider 410. The splitting module Divider 410 establishes communication connections with both the original cluster master node Master Old 421 and the newly added cluster master node Master New 431. The original cluster master node Master Old 421 is connected to the original cluster data storage node group BEs Old 422 and is used to manage the metadata, status, and scheduling of all data shards within the original cluster. The newly added cluster master node Master New 431 is connected to the newly added cluster data storage node group BEs New 432 and is used to take over the migrated data shards and provide independent management services.
[0090] The overall interaction process includes steps 1 through 6, and the details of each step are as follows: Step 1: The Divider 410 module sends a migration command to the original cluster master node Master Old 421, instructing the original cluster to start the cross-cluster migration process of the specified target data shard.
[0091] Step 2: The original cluster master node Master Old 421 marks the target data shard as frozen (i.e., prohibits writing, modifying and scheduling of the shard, only retains read permissions to ensure data consistency during the migration process), and synchronizes the complete metadata of the target data shard to the newly added cluster master node Master New 431.
[0092] Step 3: The newly added cluster master node, Master New 431, sends a control request to the original cluster master node, Master Old 421. After receiving the request, the original cluster master node, Master Old 421, marks the target data shard as invalid (i.e., it no longer assumes the management and service responsibilities of the shard, and the routing is automatically switched to the newly added cluster), thus completing the transfer of control.
[0093] Step 4: The newly added cluster master node, Master New 431, sends a control acquisition notification to the splitting module, Divider 410. The splitting module, Divider 410, updates the global routing table and marks the access route of the target data shard as belonging to the newly added cluster.
[0094] Step 5: The newly added cluster master node, Master New 431, issues a migration scheduling command to schedule the original cluster data storage node group BEs Old 422 to migrate all data copies of the target data shard to the newly added cluster data storage node group BEs New 432. During the migration process, data consistency is verified to ensure that the data is complete and without loss.
[0095] Step 6: After the data replica migration is completed, the newly added cluster master node Master New 431 unfreezes the target data shard, restores normal read and write services for the shard, and sends a cleanup request to the original cluster master node Master Old 421. The original cluster master node Master Old 421 cleans up the expired metadata of the target data shard, completing the entire cluster splitting and shard migration process.
[0096] Both the original cluster and the newly added cluster contain independent Master nodes, BE data storage nodes, and Proxy nodes (not shown in the diagram; the Proxy nodes receive business requests and forward them to the corresponding BE data storage nodes according to the routing). The Divider module communicates with both the original cluster Master node and the newly added cluster Master node to achieve metadata synchronization, shard freezing, failure marking, replica migration, routing switching, and metadata cleanup. This architecture allows a single centralized cluster to be split into multiple independently managed, scalable, and serviced sub-clusters, enabling horizontal scaling of the Master node and completely resolving the single point of failure bottleneck problem.
[0097] Figure 5 A flow 500 of an embodiment of a distributed storage cluster splitting method according to the present disclosure is shown. This distributed storage cluster splitting method is applied to a splitting module and includes the following steps: Step 501: Register the original cluster as the base cluster of the distributed storage cluster splitting system.
[0098] Step 502: Initialize itself based on the original cluster's metadata directory and data sharding range.
[0099] Step 503: Replace the original cluster's master node to distribute data shard identifiers.
[0100] Step 504: Register the new cluster to the distributed storage cluster splitting system.
[0101] Step 505: Synchronize the metadata directory of the original cluster to the master node of the newly added cluster.
[0102] Step 506: Migrate the target data shards corresponding to the preset target data shard range from the original cluster to the newly added cluster.
[0103] In this embodiment, the specific operations of steps 501-506 can be found in the following reference. Figure 1 The relevant descriptions of steps 101-106 in the corresponding embodiments will not be repeated here.
[0104] In some optional implementations of this embodiment, migrating the target data shards corresponding to the preset target data shard range from the original cluster to the new cluster includes: sending a migration instruction to the master node of the original cluster, wherein the master node of the original cluster synchronizes the metadata of the target data shards and the metadata of the corresponding data storage nodes to the master node of the new cluster; and receiving a control acquisition notification sent by the master node of the new cluster after acquiring control of the target data shards.
[0105] Figure 6 A flow 600 of another embodiment of the distributed storage cluster splitting method according to this disclosure is shown. This distributed storage cluster splitting method is applied to the original cluster and includes the following steps: Step 601: Receive the migration instruction sent by the splitting module.
[0106] Step 602: Synchronize the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the newly added cluster.
[0107] Step 603: Receive the control request sent by the master node of the newly added cluster.
[0108] Step 604: Migrate at least one copy of the target data shard to the data storage node of the newly added cluster.
[0109] Step 605: Receive the cleanup request sent by the master node of the newly added cluster.
[0110] Step 606: Clean up the metadata of the target data shard.
[0111] In this embodiment, the specific operations of steps 601-606 can be referred to Figure 2 The relevant descriptions of steps 201-212 in the corresponding embodiments will not be repeated here.
[0112] In some optional implementations of this embodiment, the distributed storage cluster splitting method further includes: marking the target data shard as frozen after receiving a migration instruction; marking the target data shard as invalid after receiving a control request; and marking the data storage node corresponding to the target data shard as migrated during the migration of the target data shard.
[0113] Figure 7 A flow 700 of another embodiment of the distributed storage cluster splitting method according to this disclosure is shown. This distributed storage cluster splitting method is applied to a new cluster and includes the following steps: Step 701: Receive the metadata of the target data shard synchronized by the master node of the original cluster and the metadata of the corresponding data storage node.
[0114] Step 702: Send a control request to the master node of the original cluster.
[0115] Step 703: After obtaining control of the target data fragment, send a control acquisition notification to the splitting module.
[0116] Step 704: Receive at least one copy of the target data shard from the master node migration of the original cluster.
[0117] Step 705: Send a cleanup request to the master node of the original cluster.
[0118] In this process, the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
[0119] In this embodiment, the specific operations of steps 701-705 can be referred to Figure 2 The relevant descriptions of steps 201-212 in the corresponding embodiments will not be repeated here.
[0120] In some optional implementations of this embodiment, the distributed storage cluster splitting method further includes: after obtaining control of the target data fragment, marking the data fragment range corresponding to the target data fragment as belonging; and after the target data fragment migration is completed, releasing the frozen state of the target data fragment.
[0121] Further reference Figure 8 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a distributed storage cluster splitting device, which is similar to... Figure 5 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0122] like Figure 8 As shown, the distributed storage cluster splitting device 800 of this embodiment may include: a first registration module 801, an initialization module 802, a distribution module 803, a second registration module 804, a synchronization module 805, and a migration module 806. Specifically, the first registration module 801 is configured to register the original cluster as the base cluster of the distributed storage cluster splitting system; the initialization module 802 is configured to initialize itself based on the metadata directory and data shard range of the original cluster; the distribution module 803 is configured to replace the master node of the original cluster in distributing data shard identifiers; the second registration module 804 is configured to register the new cluster to the distributed storage cluster splitting system; the synchronization module 805 is configured to synchronize the metadata directory of the original cluster to the master node of the new cluster; and the migration module 806 is configured to migrate the target data shards corresponding to the preset target data shard range from the original cluster to the new cluster.
[0123] In this embodiment, the specific processing of the first registration module 801, initialization module 802, distribution module 803, second registration module 804, synchronization module 805, and migration module 806 in the distributed storage cluster splitting device 800, and the resulting technical effects, can be found in the following references: Figure 5 The relevant descriptions of steps 501-506 in the corresponding embodiments will not be repeated here.
[0124] In some optional implementations of this embodiment, the migration module 806 is further configured to: send a migration instruction to the master node of the original cluster, wherein the master node of the original cluster synchronizes the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster; and receive a control acquisition notification sent by the master node of the new cluster after acquiring control of the target data shard.
[0125] Further reference Figure 9 As an implementation of the methods shown in the above figures, this disclosure provides another embodiment of a distributed storage cluster splitting device, which is similar to... Figure 6 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0126] like Figure 9As shown, the distributed storage cluster splitting device 900 of this embodiment may include: a first receiving module 901, a synchronization module 902, a second receiving module 903, a migration module 904, a third receiving module 905, and a cleanup module 906. The first receiving module 901 is configured to receive migration instructions sent by the splitting module; the synchronization module 902 is configured to synchronize the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster; the second receiving module 903 is configured to receive a control request sent by the master node of the new cluster; the migration module 904 is configured to migrate at least one copy of the target data shard to the data storage node of the new cluster; the third receiving module 905 is configured to receive a cleanup request sent by the master node of the new cluster; and the cleanup module 906 is configured to clean up the metadata of the target data shard.
[0127] In this embodiment, the specific processing and technical effects of the first receiving module 901, synchronization module 902, second receiving module 903, migration module 904, third receiving module 905, and cleanup module 906 in the distributed storage cluster splitting device 900 can be found in the following references. Figure 6 The relevant descriptions of steps 601-606 in the corresponding embodiments will not be repeated here.
[0128] In some optional implementations of this embodiment, the distributed storage cluster splitting device 900 further includes: a marking module, configured to mark the target data shard as frozen after receiving a migration instruction; mark the target data shard as invalid after receiving a control request; and mark the data storage node corresponding to the target data shard as migrated during the migration of the target data shard.
[0129] Further reference Figure 10 As an implementation of the methods shown in the above figures, this disclosure provides another embodiment of a distributed storage cluster splitting device, which is similar to... Figure 7 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0130] like Figure 10As shown, the distributed storage cluster splitting device 1000 of this embodiment may include: a first receiving module 1001, a first sending module 1002, a second sending module 1003, a second receiving module 1004, and a third sending module 1005. The first receiving module 1001 is configured to receive the metadata of the target data shard synchronized by the master node of the original cluster and the metadata of the corresponding data storage node; the first sending module 1002 is configured to send a control request to the master node of the original cluster; the second sending module 1003 is configured to send a control acquisition notification to the splitting module after acquiring control of the target data shard; the second receiving module 1004 is configured to receive at least one copy of the target data shard migrated by the master node of the original cluster; and the third sending module 1005 is configured to send a cleanup request to the master node of the original cluster, wherein the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
[0131] In this embodiment, the specific processing and technical effects of the first receiving module 1001, the first sending module 1002, the second sending module 1003, the second receiving module 1004, and the third sending module 1005 in the distributed storage cluster splitting device 1000 can be found in the following references. Figure 7 The relevant descriptions of steps 701-705 in the corresponding embodiments will not be repeated here.
[0132] In some optional implementations of this embodiment, the distributed storage cluster splitting device 1000 further includes: a marking module, configured to mark the data fragment range corresponding to the target data fragment after acquiring control of the target data fragment; and to release the frozen state of the target data fragment after the target data fragment migration is completed.
[0133] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0134] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0135] Figure 11A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0136] like Figure 11 As shown, device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1102 or a computer program loaded into random access memory (RAM) 1103 from storage unit 1108. The RAM 1103 may also store various programs and data required for the operation of device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Input / output (I / O) interface 1105 is also connected to bus 1104.
[0137] Multiple components in device 1100 are connected to I / O interface 1105, including: input unit 1106, such as keyboard, mouse, etc.; output unit 1107, such as various types of monitors, speakers, etc.; storage unit 1108, such as disk, optical disk, etc.; and communication unit 1109, such as network card, modem, wireless transceiver, etc. Communication unit 1109 allows device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0138] The computing unit 1101 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the distributed storage cluster partitioning method. For example, in some embodiments, the distributed storage cluster partitioning method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the distributed storage cluster partitioning method described above can be performed. Alternatively, in other embodiments, computing unit 1101 may be configured to perform a distributed storage cluster splitting method by any other suitable means (e.g., by means of firmware).
[0139] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0140] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0141] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0144] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0145] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A distributed storage cluster splitting system, comprising an original cluster, a new cluster, and a splitting module, wherein the original cluster and the new cluster each include a master node, a data storage node, and a proxy node, and the splitting module is communicatively connected to the master node of the original cluster and the master node of the new cluster, respectively. The splitting module is used to register the original cluster as the base cluster of the distributed storage cluster splitting system; perform its own initialization based on the metadata directory and data sharding range of the original cluster; replace the master node of the original cluster to distribute data sharding identifiers; register the new cluster to the distributed storage cluster splitting system; and synchronize the metadata directory of the original cluster to the master node of the new cluster. The target data shards corresponding to the preset target data shard range are migrated from the original cluster to the newly added cluster.
2. The system according to claim 1, wherein, The splitting module is used to send migration instructions to the master node of the original cluster; The master node of the original cluster is used to synchronize the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster after receiving the migration instruction. The newly added cluster master node is used to send a control request to the original cluster master node, and after obtaining control of the target data shard, send a control acquisition notification to the splitting module. The master node of the original cluster is used to migrate at least one replica of the target data shard to the data storage node of the newly added cluster; The newly added cluster's master node is used to send a cleanup request to the original cluster's master node; The master node of the original cluster is used to clean up the metadata of the target data shard after receiving the cleanup request.
3. The system according to claim 2, wherein, The master node of the original cluster is used to mark the target data shard as frozen after receiving the migration instruction, and to mark the target data shard as invalid after receiving the control request. The master node of the newly added cluster is used to assign ownership to the data shard range corresponding to the target data shard after acquiring control of the target data shard. The master node of the original cluster is used to mark the data storage node corresponding to the target data shard as a migration status during the migration of the target data shard. The newly added cluster master node is used to unfreeze the target data shard after the target data shard migration is completed.
4. A method for splitting a distributed storage cluster, comprising: Register the original cluster as the base cluster of the distributed storage cluster splitting system; It initializes itself based on the metadata directory and data sharding range of the original cluster; Replace the master node of the original cluster for data sharding identification and distribution; Register the new cluster to the distributed storage cluster splitting system; Synchronize the metadata directory of the original cluster to the master node of the newly added cluster; The target data shards corresponding to the preset target data shard range are migrated from the original cluster to the newly added cluster.
5. The method according to claim 4, wherein, The step of migrating the target data shards corresponding to the preset target data shard range from the original cluster to the newly added cluster includes: A migration command is sent to the master node of the original cluster, wherein the master node of the original cluster synchronizes the metadata of the target data shard and the metadata of the corresponding data storage node to the master node of the new cluster; Receive the control acquisition notification sent by the master node of the newly added cluster after acquiring control of the target data shard.
6. A method for splitting a distributed storage cluster, comprising: Receive migration instructions sent by the splitting module; Synchronize the metadata of the target data shards and the metadata of the corresponding data storage nodes to the master node of the newly added cluster; Receive the control request sent by the master node of the newly added cluster; Migrate at least one copy of the target data shard to the data storage node of the newly added cluster; Receive the cleanup request sent by the master node of the newly added cluster; Clean up the metadata of the target data fragment.
7. The method according to claim 6, wherein, The method further includes: Upon receiving the migration instruction, the target data fragments are marked as frozen. Upon receiving the control request, the target data fragment is marked as invalid. During the migration of the target data shard, the data storage node corresponding to the target data shard is marked as being in a migration state.
8. A method for splitting a distributed storage cluster, comprising: Receive the metadata of the target data shard synchronized from the master node of the original cluster, as well as the metadata of the corresponding data storage node; Send a control request to the master node of the original cluster; After acquiring control of the target data fragment, a control acquisition notification is sent to the splitting module; Receive at least one copy of the target data shard from the master node migration of the original cluster; A cleanup request is sent to the master node of the original cluster, wherein the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
9. The method according to claim 8, wherein, The method further includes: After acquiring control of the target data segment, the data segment range corresponding to the target data segment is assigned a classification mark; After the target data fragment migration is completed, the frozen state of the target data fragment is released.
10. A distributed storage cluster splitting device, comprising: The first registration module is configured to register the original cluster as the base cluster of the distributed storage cluster splitting system; The initialization module is configured to initialize itself based on the metadata directory and data sharding range of the original cluster; The distribution module is configured to replace the master node of the original cluster in distributing data shard identifiers; The second registration module is configured to register the newly added cluster to the distributed storage cluster splitting system; The synchronization module is configured to synchronize the metadata directory of the original cluster to the master node of the newly added cluster; The migration module is configured to migrate target data shards corresponding to a preset target data shard range from the original cluster to the newly added cluster.
11. A distributed storage cluster splitting device, comprising: The first receiving module is configured to receive migration instructions sent by the splitting module; The synchronization module is configured to synchronize the metadata of the target data shards and the metadata of the corresponding data storage nodes to the master node of the newly added cluster. The second receiving module is configured to receive control requests sent by the master node of the newly added cluster. The migration module is configured to migrate at least one copy of the target data shard to the data storage node of the newly added cluster; The third receiving module is configured to receive cleanup requests sent by the master node of the newly added cluster; The cleanup module is configured to clean up the metadata of the target data fragment.
12. A distributed storage cluster splitting device, comprising: The first receiving module is configured to receive the metadata of the target data shard synchronized by the master node of the original cluster and the metadata of the corresponding data storage node. The first sending module is configured to send a control request to the master node of the original cluster. The second sending module is configured to send a control acquisition notification to the splitting module after acquiring control of the target data fragment. The second receiving module is configured to receive at least one copy of the target data shard migrated from the master node of the original cluster; The third sending module is configured to send a cleanup request to the master node of the original cluster, wherein the master node of the original cluster cleans up the metadata of the target data shard after receiving the cleanup request.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 4-9.
14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 4-9.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 4-9.