Data replication method, device, storage node and readable storage medium

By dividing nodes in the distributed storage system and performing asynchronous replication, it solves the problems of strong consistency and high throughput compatibility in the existing technology, realizes efficient data replication in high copy redundancy and cross-regional scenarios, and provides Provides better fault tolerance and network tolerance.

CN115396454BActive Publication Date: 2024-10-18CHONGQING UNISINSIGHT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211166317.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2024-10-18
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

Existing data replication methods have limited performance and availability when ensuring strong consistency, making them difficult to apply to application scenarios with high copy redundancy and cross-data center and cross-regional data distribution.

Method used

By dividing the nodes into the master node, the first slave node and the second slave node in the distributed storage system, the client update request is first synchronized to the master node, and synchronous replication is performed between the master node and the first slave node. Asynchronous replication is performed between the node and the second slave node, and update requests and data synchronization requests are separated to achieve data replication and high throughput while ensuring strong consistency and high availability.

Benefits of technology

It provides high throughput and high availability while ensuring strong consistency. It is suitable for application scenarios with high copy redundancy and cross-data center and cross-regional data distribution. It avoids single points of failure and improves fault tolerance and network tolerance. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115396454B_ABST
    Figure CN115396454B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of distributed storage technology, and provides a data replication method, device, storage node and readable storage medium, the method comprising: receiving a data synchronization request sent by a first slave node, the data required to be synchronized by the data synchronization request is synchronized to the first slave node by the master node based on the update request sent by the client; recording a log of the data synchronization request; updating the data required to be synchronized by the data synchronization request to the local. The present invention can provide high throughput and high availability services under the premise of ensuring strong consistency, and is well suited for application scenarios of high copy redundancy and cross-data center and cross-regional data distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to a data replication method, device, storage node and readable storage medium. Background Art

[0002] In order to improve data disaster recovery and redundancy capabilities, expand the overall system throughput, or reduce data access latency, distributed storage system design usually replicates data across nodes, data centers, or even regions.

[0003] The existing data replication method ensures strong consistency, but to a certain extent it sacrifices performance and availability. This method is not suitable for application scenarios with high replica redundancy and cross-data center and cross-regional data distribution. Summary of the invention

[0004] The purpose of the present invention is to provide a data replication method, device, storage node and readable storage medium, which can provide high throughput and high availability services under the premise of ensuring strong consistency, and is well suitable for application scenarios with high copy redundancy and cross-data center and cross-regional data distribution.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a data replication method, which is applied to a second slave node in a distributed storage system, wherein the second slave node is communicatively connected to the first slave node and the master node, and the master node is communicatively connected to the client. The method comprises: receiving a data synchronization request sent by the first slave node, wherein the data required to be synchronized by the data synchronization request is the data synchronized from the master node to the first slave node based on the update request sent by the client, wherein the replication between the master node and the first slave node is synchronous, and the replication between the first slave node and the second slave node is asynchronous; recording a log of the data synchronization request; and updating the data required to be synchronized by the data synchronization request locally.

[0007] Optionally, the data synchronization request sent by the first slave node includes multiple requests sent in a sending order, and the step of recording the log of the data synchronization request includes:

[0008] Determining whether there is a normal request or an abnormal request according to the order of receiving the multiple requests and the order of sending the requests;

[0009] If the normal request exists, a log of the normal request is recorded;

[0010] If the abnormal request exists, a resend request instructing to resend the abnormal request is sent to the first slave node, so that a log of the normal request is recorded when the second slave node receives the normal request.

[0011] Optionally, the step of judging whether there is a normal request or an abnormal request according to the order of receiving and sending the received multiple requests includes:

[0012] Determine the requests whose receiving order is consistent with the corresponding sending order among the multiple received requests as normal requests;

[0013] The remaining requests except the normal request among the multiple requests sent are determined as the abnormal requests.

[0014] Optionally, the master node stores a history identifier of the data synchronization request last processed by the second slave node in the previous cycle; and the method further includes:

[0015] Get the current identifier of the last data synchronization request processed in this cycle;

[0016] The current identifier is sent to the master node, so that the master node deletes the log of the data synchronization request between the current identifier and the historical identifier stored locally.

[0017] Optionally, the second slave node is a target second slave node among a plurality of second slave nodes in the distributed storage system, the target second slave node is also in communication connection with the monitoring node, the data synchronization request last processed by the target second slave node is the latest, and the method further comprises:

[0018] Receiving a switching request sent by the monitoring node, where the switching request is initiated when the monitoring node detects a faulty node in the distributed storage system;

[0019] Based on the switching request, a synchronization relationship is established between the target second slave node and a non-faulty node in the distributed storage system.

[0020] Optionally, the faulty node is the master node, and the step of establishing a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system based on the switching request includes:

[0021] Based on the switching request, establishing a synchronous replication relationship with the first slave node;

[0022] Taking over the first slave node so that the first slave node takes over the master node.

[0023] Optionally, the faulty node is the first slave node, and the step of establishing a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system based on the switching request includes:

[0024] Based on the switching request, establishing a synchronous replication relationship with the master node;

[0025] Take over the first slave node.

[0026] Optionally, the faulty nodes are the master node and the first slave node, and the step of establishing a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system based on the switching request includes:

[0027] Based on the switching request, taking over the master node;

[0028] Establish a synchronous replication relationship with a proxy second slave node among the second slave nodes other than the target second slave node, so that the proxy second slave node takes over the first slave node, and the proxy second slave node is the second slave node whose most recently processed data synchronization request is the latest among the second slave nodes other than the target second slave node.

[0029] Optionally, the method further comprises:

[0030] Receiving node information of a newly added node in the distributed storage system sent by the monitoring node;

[0031] According to the node information, the local data is synchronized to the newly added node in a full synchronization manner.

[0032] In a second aspect, the present invention provides a data replication device, which is applied to a second slave node in a distributed storage system, wherein the second slave node is communicatively connected to both the first slave node and the master node, and the master node is communicatively connected to the client, and the device comprises:

[0033] A receiving module, configured to receive a data synchronization request sent by the first slave node, wherein the data to be synchronized by the data synchronization request is data synchronized from the master node to the first slave node based on an update request sent by the client, wherein synchronous replication is performed between the master node and the first slave node, and asynchronous replication is performed between the first slave node and the second slave node;

[0034] A recording module, used to record the log of the data synchronization request;

[0035] The updating module is used to update the data required to be synchronized by the data synchronization request to the local area.

[0036] In a third aspect, the present invention provides a storage node, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the data replication method as described above when executing the computer program.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the data replication method as described above when the computer program is executed by a processor.

[0038] Compared with the prior art, the present invention divides the storage nodes in the distributed storage system into a master node, a first slave node and a second slave node. The client sends an update request to the master node, and the master node synchronizes the update synchronization request to the first slave node. After the first slave node returns the synchronization success to the master node, the master node returns the update request processing success to the client. The first slave node then sends the data synchronization request to the second slave node in an asynchronous manner, and the second slave node updates the data required for synchronization by the update synchronization request to the local. Therefore, by separating the update request and the data synchronization request, it is possible to achieve timely response to the update request and ensure high throughput, and to achieve data replication between the master node, the first slave node and the second slave node to ensure strong consistency and high availability. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A diagram illustrating the principles of a master / slave replication protocol provided in an embodiment of the present invention.

[0041] Figure 2 This is a diagram showing an example of the principles of a chain replication protocol provided by an embodiment of the present invention.

[0042] Figure 3 A diagram illustrating the principles of a ring replication protocol provided in an embodiment of the present invention.

[0043] Figure 4 This is a diagram showing an example of the principle of the extended ring replication protocol provided in an embodiment of the present invention.

[0044] Figure 5 A block diagram of a storage node provided by an embodiment of the present invention.

[0045] Figure 6 An example of a data replication method provided by an embodiment of the present invention Figure 1 .

[0046] Figure 7 An example of a data replication method provided by an embodiment of the present invention Figure 2 .

[0047] Figure 8 An example of a data replication method provided by an embodiment of the present invention Figure 3 .

[0048] Fig. 9 This is an example diagram of the processing interaction of the Update request according to an embodiment of the present invention.

[0049] Fig.10 This is an example diagram of the processing interaction of a Query request according to an embodiment of the present invention.

[0050] Fig.11 An example of a data replication method provided by an embodiment of the present invention Figure 4 .

[0051] Fig.12 A block diagram of a data replication device provided by an embodiment of the present invention.

[0052] Icons: 10 - second slave node; 20 - first slave node; 30 - master node; 40 - client; 50 - storage node; 51 - processor; 52 - memory; 53 - bus; 54 - communication interface; 100 - data replication device; 110 - receiving module; 120 - recording module; 130 - updating module. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0054] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0056] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the invention is usually placed when used. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0057] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0058] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0059] In distributed storage systems, in order to improve data disaster recovery and redundancy capabilities, or expand the overall system throughput, or reduce data access latency, the commonly used replication principles include Leader-based replication protocol and Leaderless replication protocol. The former divides storage nodes into primary and backup nodes, while the latter has no primary and backup distinction between storage nodes.

[0060] The Primary / Backup replication protocol belongs to the Leader-based replication protocol. In the Primary / Backup replication protocol, the Primary node (master node) is responsible for determining the execution order of Update / Query requests and using synchronous / asynchronous replication to keep data synchronized with the Backups node (backup node). Please refer to Figure 1 , Figure 1 The following is a schematic diagram of the principle of the master / slave replication protocol provided by the embodiment of the present invention. Figure 1 In the example, select one replica storage node as the Primary node, and all other replica storage nodes as Backup nodes. The Primary node is mainly responsible for:

[0061] 1) Receive and determine the execution order of Update / Query requests sent by the client;

[0062] II) Distribute Update requests to the Backup nodes and wait for responses from normal Backup nodes;

[0063] III) Respond to the Client request.

[0064] Service failure recovery in the Primary / Backup replication protocol is divided into the following two categories:

[0065] 1) Primary node failure recovery

[0066] The failure of the Primary node will cause the client's front-end business to be interrupted until the monitoring node reselects and notifies a Backup node to be promoted to the new Primary node. The business interruption lasts for tens of seconds, and the main overhead is service failure detection and message interaction. In addition, when asynchronous replication is used between Primary / Backup, Update requests that have been received but not distributed before the Primary node fails will be lost, resulting in data inconsistency.

[0067] 2) Backup node failure recovery

[0068] The failure of any Backup node will increase the latency of Update / Query requests until the monitoring node detects the failure of the Backup node and notifies the Primary. The reason for the increase in Query request latency is that it needs to wait for the previous Update request to be completed. The increase in Update / Query request latency varies from a few seconds, and the main overhead is service fault detection and message interaction. In particular, when synchronous replication is used between Primary / Backup, the failure of any Backup node may cause the foreground business to be interrupted. Therefore, in actual applications, a semi-synchronous strategy is usually configured.

[0069] The Primary / Backup replication protocol has the advantage of low replication latency. The replication demonstration depends only on the Backup node with the slowest response. However, the latency of Query requests is high, and there is a risk of business interruption and data loss if the Primary node goes down.

[0070] Chain Replication is a leaderless replication protocol. In Chain Replication, the storage nodes of multiple data copies are sequentially organized into a linked list. Update requests are processed by the HEAD storage node and serialized along the FIFO (First In First Out) chain. Query requests and Reply responses are handled by the TAIL storage node. Figure 2 , Figure 2 The following is a schematic diagram of the principle of the chain replication protocol provided by the embodiment of the present invention. Figure 2 In the , all replica storage nodes sequentially form a FIFO linked list. The head node of the linked list is called the HEAD node, and the tail node of the linked list is called the TAIL node. Its main responsibilities are:

[0071] I) All Reply responses are handled by the TAIL node;

[0072] II) The HEAD node is responsible for receiving and confirming the execution order of the Update request sent by the Client, and passing it along the FIFO chain until it reaches the TAIL node;

[0073] III) The TAIL node is responsible for receiving the Query request sent by the Client and processing the Update / Query request in a certain order. After the Update request is processed, an ACK message will be sent to its upstream node, and the ACK message will be transmitted along the reverse FIFO chain until it reaches the HEAD node.

[0074] Chain Replication protocol service failure recovery is divided into the following three categories:

[0075] 1) HEAD node failure recovery

[0076] When the HEAD node fails, Query requests are not affected, but Update request services are interrupted until the monitoring node detects the HEAD node failure and notifies its downstream nodes to promote it to the new HEAD.

[0077] 2) MIDDLE node (nodes other than HEAD node and TAIL node) failure recovery

[0078] If any MIDDLE node fails, Query requests will not be affected, but Update request latency will increase until the monitoring node detects the MIDDLE node failure and notifies its downstream and upstream nodes. To ensure strong consistency, it is necessary to ensure that Update requests that have been received but not delivered before the MIDDLE node fails can continue to be delivered along the FIFO linked list, because these requests have been processed in all the nodes in the front of the linked list.

[0079] 3) TAIL node failure recovery

[0080] The failure of a TAIL node will cause the front-end business to be interrupted until the monitoring node notifies its upstream node to be promoted to a new TAIL node. The reason for the interruption of the Update request business is that the new TAIL node cannot confirm which requests need to be replied to.

[0081] The Chain Replication protocol has the advantages of strong consistency and low query request latency, allowing N-1 nodes to fail simultaneously without affecting data availability, but the replication delay is high, which is equivalent to the sum of the replication delays of all replica storage nodes.

[0082] The above two methods either have low replication delay but high query request delay, or low query request delay but high replication delay. Both are not suitable for application scenarios with high replica redundancy and cross-data center and cross-regional data distribution. In view of this, the present embodiment provides a data replication method, device, storage node and readable storage medium, which can provide high throughput and high availability services while ensuring strong consistency, and are particularly suitable for application scenarios with high replica redundancy and cross-data center and cross-regional data distribution, which will be described in detail below.

[0083] Different from the Primary / Backup replication protocol and Chain Replication protocol described above, the data replication method, device, storage node and readable storage medium proposed in this embodiment are based on the Ring Replication protocol proposed in this embodiment. Its main innovation is to separate the foreground Update / Query request processing logic from the background data replication logic, realize the load relief offload of the primary copy storage node, and finally realize the provision of high throughput and high availability services under the premise of ensuring strong consistency. Please refer to Figure 3 , Figure 3 Principle example of the ring replication protocol provided for the embodiment of the present invention Figure 1 , Figure 3 In the embodiment, the storage nodes of any two data copies are respectively used as the Master node (master node 30) and the First Slave node (first slave node 20). As a preferred implementation, the Master node and the First Slave node can be located in the same computer room or the same data center. The Master node and the First Slave node are connected in communication, and synchronous replication is used to keep data synchronized. The storage nodes of the remaining data copies are all used as Second Slave nodes (second slave nodes 10). The Second Slave nodes can be located in different data centers and different regions. The First Slave node and the Second Slave node are connected in communication, and asynchronous replication is used to keep data synchronized.

[0084] All Update requests are processed by the Master node. When the Master node receives an Update request sent by the Client (client 40), it first records the replication log, then performs the modification operation in the background, and simultaneously replicates it to the First Slave node. It does not reply to the Client request until it receives a response from the First Slave node.

[0085] The First Slave node receives the Update request from the Master node, records the replication log, and replies to the Master node synchronization request after completion. Then, the modification operation is performed as a background task and synchronized to all Second Slave nodes through asynchronous replication.

[0086] The Second Slave node receives the Update request synchronized by the First Slave node, also records the replication log, and then performs the modification operation in the background.

[0087] Query requests are processed by the Master node and the First Slave node. You can choose to have the Master node or the First Slave node process the Query request based on the Client. The Master node and the First Slave node have completely consistent data copies, so the Ring Replication protocol has strong consistency. In scenarios where strong consistency is not too high and the overall system throughput is high, Query requests can also be distributed to the Second Slave node for processing, but this will sacrifice strong consistency and only provide monotonic read consistency guarantees.

[0088] The Second Slave node periodically sends a Trim Log request to the Master node, which carries the ID of the currently completed Update request. The Master node records the ID of the latest replication log of all Second Slave nodes, then deletes the locally expired replication log and carries the ID of the replication log in the next synchronization request message sent to the First Slave.

[0089] Figure 3 The principle of the ring replication protocol can also be expanded into a multi-ring structure as needed. Please refer to Figure 4 , Figure 4 The following is a schematic diagram of the principle of the extended ring replication protocol provided by the embodiment of the present invention. Figure 4 In the example, one of the Second Slave nodes is further expanded. The Second Slave node also serves as the Master node of the expansion ring, and performs synchronous replication with the expanded first slave node, and asynchronous replication between the expanded first slave node and the expanded second slave node.

[0090] It should be noted that Figure 4 This is just an example of an expansion method. In fact, corresponding expansion can be performed according to the needs of the scenario. For example, the Second Slave node can be used as both the expanded Master node and the expanded first slave node.

[0091] It should also be noted that the storage nodes for data backup in the above three replication protocols do not necessarily include all storage nodes in the distributed storage system, but may only include some storage nodes in the distributed storage system. When data copies exist in all storage nodes in the distributed storage system, the storage nodes for data backup are all storage nodes in the distributed storage system. When data copies exist in some storage nodes in the distributed storage system, the storage nodes for data backup are the storage nodes that store the data copies.

[0092] This embodiment also provides Figure 3 and Figure 4 For a block diagram of the second slave node, please refer to Figure 5 , Figure 5 A block diagram of a storage node 50 provided in an embodiment of the present invention. The storage node 50 may be Figure 3 and Figure 4 The storage node 50 includes a processor 51, a memory 52, a bus 53, and a communication interface 54. The processor 51 and the memory 52 are connected via the bus 53, and the processor 51 communicates with the first slave node 20 or the master node 30 via the communication interface 54.

[0093] The processor 51 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 51 or the instructions in the form of software. The above processor 51 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0094] The memory 52 is used to store programs, such as the data replication device 100 in the embodiment of the present invention. The data replication device 100 includes at least one software function module that can be stored in the memory 52 in the form of software or firmware. After receiving the execution instruction, the processor 51 executes the program to implement the data replication method in the embodiment of the present invention.

[0095] The memory 52 may include a high-speed random access memory (RAM) or a non-volatile memory. Optionally, the memory 52 may be a storage device built into the processor 51 or a storage device independent of the processor 51.

[0096] The bus 53 may be an ISA bus, a PCI bus, an EISA bus, or the like. Figure 5 It is represented by only one bidirectional arrow, but it does not mean that there is only one bus or one type of bus.

[0097] based on Figure 3 and Figure 4 The present embodiment also provides a data replication method implemented by using the principle of the ring replication protocol. The data replication method is applied to Figure 3 and Figure 4 For the second slave node in Figure 6 , Figure 6 An example of a data replication method provided by an embodiment of the present invention Figure 1 , the method comprises the following steps:

[0098] Step S100, receiving a data synchronization request sent by the first slave node. The data required to be synchronized by the data synchronization request is synchronized from the master node to the first slave node based on the update request sent by the client. Synchronous replication is performed between the master node and the first slave node, and asynchronous replication is performed between the first slave node and the second slave node.

[0099] In this embodiment, the client sends an update request to the master node, the master node records a log, and sends a data synchronization request to the first slave node. The data to be synchronized in the data synchronization request is the data that the master node needs to update according to the update request. After receiving the data synchronization request, the first slave node records the log and sends a response message to the master node. After receiving the response message from the first slave node, the master node responds to the client. At this point, the update request has been processed, that is, the master node and the first slave node are synchronously replicated. This process is the processing process of the update request to ensure strong consistency of the data.

[0100] In this embodiment, the background task of the first slave node asynchronously synchronizes the data to be synchronized to the local, and then sends a data synchronization request to the second slave node to synchronize the data to be synchronized to the second slave node, that is, the data to be synchronized is written to the first slave node, and synchronized from the first slave node to the second slave node. Both processes are asynchronous replication, and this process is the processing process of data synchronization. Thus, the processing process of the update request and the data process of data synchronization are separated, avoiding the high delay caused by the need to respond to the client only after all the data to be synchronized are synchronized to the first slave node and the second slave node.

[0101] Step S101, recording a log of a data synchronization request.

[0102] In this embodiment, the purpose of recording logs is to correctly update the data to be synchronized according to the recorded logs when a node failure occurs. As a specific implementation method, an identification ID can be set for each update request, and the log ID of each update request and the log ID of the corresponding data synchronization request are the same. For example, the client sends an update request a to the master node, and the log ID corresponding to request a is 1. The master node sends a data synchronization request a' to the first slave node to synchronize the data that a needs to be synchronized. After the first slave node receives a', it records the log, and the corresponding log ID is also 1. The first slave node sends a synchronization request a' to the second slave node. After the second slave node receives a', it records the log, and the corresponding log ID is also 1.

[0103] Step S102: Update the data required for synchronization by the data synchronization request to the local computer.

[0104] In this embodiment, when the second slave node updates the data to be synchronized locally, at this time, the master node, the first slave node and the second slave node have all updated the data to be synchronized, and the data of the three are consistent.

[0105] The above method provided in this embodiment can achieve timely response to update requests and ensure high throughput by separating update requests from data synchronization requests, and can also achieve data replication between the master node, the first slave node and the second slave node to ensure strong consistency and high availability.

[0106] In this embodiment, the first slave node can send requests to the second slave node in batches for data synchronization. In order to avoid a failure when the first slave node sends batch requests to the second slave node, resulting in the second slave node being unable to correctly update the data to be synchronized to the local, resulting in inconsistent data on the first slave node and the second slave node, Figure 6 Based on this, this embodiment also provides a specific implementation method for recording a log of a data synchronization request, please refer to Figure 7 , Figure 7 An example of a data replication method provided by an embodiment of the present invention Figure 2 , step S101 includes the following sub-steps:

[0107] Sub-step S1010, judging whether there are normal requests or abnormal requests according to the receiving order and sending order of the received multiple requests.

[0108] In this embodiment, the data synchronization request sent by the first slave node includes multiple requests sent in a sending order, and the sending order is also the order in which the second slave node needs to update data according to the data synchronization requests. If the receiving order of the second slave node is inconsistent with the sending order, an exception may occur in the request sending process. At this time, it is necessary to identify the request in which the exception occurs so as to process the abnormal request, for example, resending the abnormal request.

[0109] As a specific implementation, the process of determining whether there is a normal request or an abnormal request may be:

[0110] Determine the requests whose receiving order is consistent with the corresponding sending order among the multiple received requests as normal requests;

[0111] The remaining requests except normal requests among the multiple requests sent are determined to be abnormal requests.

[0112] In this embodiment, the order in which all requests are received in the multiple requests may be consistent with the corresponding order in which they are sent. In this case, all requests in the multiple requests are normal requests. The order in which some requests are received in the multiple requests may be consistent with the corresponding order in which they are sent. In this case, the requests that are consistent are normal requests, and the remaining requests are abnormal requests. For example, the first slave node sends requests in the order a, b, c, d, and the second slave node receives requests a, b, d, then a and b are normal requests, and c and d are abnormal requests.

[0113] Sub-step S1011, if there is a normal request, record the log of the normal request.

[0114] Sub-step S1012: If there is an abnormal request, a resend request instructing to resend the abnormal request is sent to the first slave node, so that a log of the normal request is recorded when the second slave node receives a normal request.

[0115] In this embodiment, if a and b are normal requests and c and d are abnormal requests, the logs of a and b requests are recorded, and the first slave node is requested to resend c and d requests. When the order in which the second slave node receives c and d requests is consistent with the order in which c and d requests were sent, the logs of c and d requests are recorded.

[0116] In this embodiment, as a specific implementation method, the log of normal requests can be recorded in advance by WAL (Write-Ahead Logging, WAL) mode. WAL technology means writing logs and memory first, and then writing to the hard disk when it is not busy. Its function is to convert random writes into sequential writes, reducing disk writing consumption. A unique self-incrementing identification ID is assigned to each request. For the same request, whether it is the master node, the first slave node, or the second slave node, the log ID corresponding to the request is the same, and the way of recording logs can be WAL mode.

[0117] In this embodiment, in order to delete the synchronized logs recorded on the master node in time, this embodiment also provides a corresponding processing method, please refer to Figure 8 , Figure 8 An example of a data replication method provided by an embodiment of the present invention Figure 3 , the method comprises the following steps:

[0118] Step S103, obtaining the current identifier of the data synchronization request processed last in this cycle.

[0119] In this embodiment, there may be one or more second slave nodes, and each second slave node periodically sends a Trim Log request to the master node, which carries the identifier of the data synchronization request last processed by the second slave node in this period, that is, the current identifier.

[0120] Step S104: Send the current identifier to the master node, so that the master node deletes the log of the data synchronization request between the current identifier and the historical identifier stored locally.

[0121] In this embodiment, the master node stores the historical identifier of the data synchronization request last processed by each second slave node in the previous cycle, and the log between the current identifier and the historical identifier is the log of the synchronized request, which can be deleted.

[0122] In this embodiment, as a specific implementation method, the master node can record logs in a file, and the file size can be preset to 64MB. When a file is full, a new file is automatically created, and the logs are recorded in the new file. The logs of requests that have been synchronized can be deleted. When there are multiple second slave nodes, in order to avoid frequent file operations, the file can be deleted after all requests corresponding to the logs of the entire file have been processed by all second slave nodes. For example, a file can record 10,000 logs, and the logs recorded in file 1 are 1 to 10,000. When all second slave nodes have updated the data that needs to be updated in the 10,000th log, file 1 can be deleted.

[0123] It should also be noted that the master node carries the current identifier in the next synchronization request message sent to the first slave node, so that the first slave node deletes the current identifier and its previous logs.

[0124] The above method provided in this embodiment periodically notifies the master node of the latest log updated by the second slave node, so that the master node can delete the logs that are no longer needed in time and release the space occupied by them in time.

[0125] In order to more clearly illustrate the processing flow of Update request and Query request, this embodiment is described with a specific example.

[0126] Take the case of five storage nodes for data replicas, including one Master node, one FirstSlave node, and three SecondSlave nodes. The backend of each node uses the RocksDB storage engine, and all key-value pairs KVpairs are stored in a mechanical hard disk. The replication log uses the WAL method and is saved in a solid-state drive at a granularity of 64MB per log file.

[0127] Please refer to Fig. 9 , Fig. 9 This is an example diagram of the processing interaction of the Update request in an embodiment of the present invention. The interaction process is as follows:

[0128] S11: Client sends Update request r to the Master node;

[0129] S12: After receiving the request r, the Master node assigns it a unique log ID and records the replication log;

[0130] S13: Synchronously replicate to the First Slave node and wait for a response;

[0131] S14: After receiving the request r, the First Slave node directly records the replication log;

[0132] S15: After the First Slave node is completed, it replies with an ACK(r) response to the Master node;

[0133] S16: After receiving the ACK(r) response, the Master node responds to the Client request;

[0134] S17: The Master node replays the replication logs one by one as a background task and makes modifications to the backend RocksDB.

[0135] S18: The First Slave node uses asynchronous replication to synchronize the replication log to all Second Slaves, and replays the replication log to modify the backend RocksDB.

[0136] S19: The Second Slave node receives the request r, directly records the replication log, and then makes modifications to the backend RocksDB.

[0137] Please refer to Fig.10 , Fig.10 This is an example diagram of the processing interaction of a Query request according to an embodiment of the present invention. The interaction process is as follows:

[0138] S21: The Client selects the Master node or the First Slave node according to its own ID. Taking the selection of the Master node as an example, it sends a Query request r' to the Master node.

[0139] S22: After receiving the request r', the Master node searches RocksDB for it.

[0140] S23: Respond to the client request.

[0141] In this embodiment, based on Figure 3 and Figure 4 Based on the principle of the ring replication protocol, in order to ensure high reliability without interrupting the service when a node fails, this embodiment also provides methods for handling various failures. Fig.11 , Fig.11 An example of a data replication method provided by an embodiment of the present invention Figure 4 , the method comprises the following steps:

[0142] Step S105: receiving a switching request sent by a monitoring node. The switching request is initiated when the monitoring node detects a faulty node in the distributed storage system.

[0143] In this embodiment, the monitoring node can be used to detect and recover service failures, and the monitoring node is responsible for keeping all nodes alive with heartbeats. The monitoring node can be an independent device independent of the master node, the first slave node, and the second slave node, or it can be software deployed on the master node, the first slave node, and the second slave node, such as Zookeeper, which can timely learn the operation status of each node.

[0144] In this embodiment, the faulty node may be at least one of a master node, a first slave node, and a second slave node.

[0145] Step S106: Based on the switching request, a synchronization relationship is established between the target second slave node and a non-faulty node in the distributed storage system.

[0146] In this embodiment, the target second slave node is one of multiple second slave nodes in the distributed storage system. The target second slave node is also communicated with the monitoring node. The data synchronization request most recently processed by the target second slave node is the latest one. Taking the example that each request corresponds to a log ID and the log ID increases incrementally, the log ID of the data synchronization request most recently processed by the target second slave node is the largest.

[0147] In this embodiment, the non-faulty node may also be at least one of the master node, the first slave node, and the second slave node. The synchronization relationship includes a synchronous replication relationship between the master node and the first slave node and an asynchronous replication relationship between the first slave node and the second slave node, and between the second slave node and the master node.

[0148] Service failures include at least the following four categories: (1) master node failure; (2) first slave node failure; (3) both the master node and the first slave node failure; (4) second slave node failure. The following will introduce these four failure handling methods one by one.

[0149] (1) The processing method of the master node failure is as follows:

[0150] Based on the switching request, establishing a synchronous replication relationship with the first slave node;

[0151] Take over the first slave node so that the first slave node takes over the master node.

[0152] In this embodiment, the monitoring node sends a switching request to the target second slave node, the target second slave node establishes a synchronous replication relationship with the first slave node based on the switching request, the target second slave node takes over the first slave node, and the target second slave node becomes the new first slave node. The monitoring node sends a switching request to the first slave node, and the switching request carries information about the new first slave node. The first slave node takes over the master node based on the switching request.

[0153] From the above process flow, we can see that when the master node fails, the Query request is not affected, and the Update request service is briefly interrupted until the monitoring node detects the master node failure, reselects the target second slave node to be promoted as the new first slave node, and notifies the original first slave node to be promoted as the new master node. Since the first slave node and the master node have completely consistent data copies, the service interruption duration is very short, and can even be 0 interruption.

[0154] (2) The processing method for the failure of the first slave node is:

[0155] Based on the switching request, a synchronous replication relationship is established with the primary node;

[0156] Take over the first slave node.

[0157] The monitoring node sends a switching request to the target second slave node. The target second slave node establishes a synchronous replication relationship with the master node based on the switching request, takes over the first slave node, and the target second slave node becomes the new first slave node. The monitoring node sends information about the new first slave node to the master node.

[0158] It can be seen from the above processing flow that when the first slave node fails, the Query request is not affected, but the Update request delay increases until the monitoring node detects the failure of the first slave node and reselects the target second slave node to be promoted as the new first slave node.

[0159] (3) The processing method when both the master node and the first slave node fail is as follows:

[0160] Based on the switch request, take over the master node;

[0161] A synchronous replication relationship is established between the proxy second slave node and the second slave node other than the target second slave node, so that the proxy second slave node takes over the first slave node. The proxy second slave node is the second slave node whose most recently processed data synchronization request is the latest among the second slave nodes other than the target second slave node. In fact, the IDs of the most recently processed data synchronization requests of the target second slave node and the proxy second slave node can be the same or different. For example, there are three second slave nodes, namely nodes a, b, and c. If the IDs of the most recently processed data synchronization requests are 3, 3, and 3, then two of the three second slave nodes can be selected as the target second slave node and the proxy second slave node, respectively. If the IDs of the most recently processed data synchronization requests are 3, 2, and 1, then node a is used as the target second slave node and node b is used as the proxy second slave node.

[0162] In this embodiment, the proxy second slave node is the second slave node whose most recently processed data synchronization request is the latest among the second slave nodes other than the target second slave node. The monitoring node sends a switching request to the target second slave node, and the target second slave node takes over the master node based on the switching request. The target second slave node establishes a synchronous replication relationship with the proxy second slave node and becomes the new master node. The monitoring node sends a switching request to the proxy second slave node, and the proxy second slave node takes over the first slave node based on the switching request and becomes the new first slave node. It should be noted that when the monitoring node sends a switching request to the target second slave node, it will carry the information of the new first slave node, and when the monitoring node sends a switching request to the proxy second slave node, it will carry the information of the new master node.

[0163] It should also be noted that in application scenarios where the storage nodes of replica data are distributed across data centers and regions, it is usually to support off-site disaster recovery backup. In principle, if all the storage nodes of replica data in the local data center fail at the same time, it is best to manually restore the storage nodes of the off-site replicas. If it is to support off-site active-active to reduce access latency, completely different distributed technologies need to be used, such as automatic conflict detection technology.

[0164] (4) Second slave node failure

[0165] When the monitoring node detects a failure of any second slave node, it notifies the first slave node, and subsequently the first slave node no longer sends a data synchronization request to the second slave node to synchronize data with the second slave node.

[0166] From the above process flow, we can see that if any second slave node fails, Update / Query requests will not be affected. The reason is that the ring replication protocol separates the foreground business processing logic from the background data replication logic. The master node is responsible for the foreground business processing logic, and the first slave node is mainly responsible for the background data replication logic.

[0167] From the above fault handling process, we can see that the data replication method based on Ring Replication has obvious advantages over the Primary / Backup protocol and Chain Replication in the following aspects:

[0168] 1) Throughput

[0169] For the Primary / Backup protocol, all Update / Query requests are processed by the Primary, and the latency depends on the Backup node with the slowest response, and the Primary node is prone to become a bottleneck. For the Chain Replication protocol, Update / Query requests are separated and processed by the HEAD and TAIL nodes. The Query latency is short, but the Update latency is high, equal to the sum of the latency of all replica nodes. The Ring Replication protocol also adopts the strategy of separating Update / Query requests. Update requests are processed by the Master node, and the latency depends only on the First Slave node. Query requests are distributed to the Master node and the First Slave node. Therefore, the Ring Replication protocol has the highest overall throughput (about 2 times), and the Update request latency is slightly better than the latency of the Primary / Backup protocol, and much lower than the latency of the Chain Replication protocol, while the Query request latency is comparable to that of Chain Replication, which is better than the latency of Primary / Backup.

[0170] 2) Replication topology

[0171] For the Primary / Backup protocol and Chain Replication protocol, the front-end business processing logic and the back-end data replication logic are fully coupled, and are unaware of the physical topology of the replica nodes. In application scenarios where replica data is distributed across data centers and regions, the overall throughput and latency of the front-end business will be seriously affected. Ring Replication separates the front-end business processing logic from the back-end data replication logic, which can handle this application scenario very well. In actual applications, the Master and First Slave can be deployed in the same data center, and the Second Slave can be deployed in a different location to support disaster recovery and backup across data centers and regions.

[0172] 3) Fault tolerance

[0173] For the Primary / Backup protocol, the failure of the Primary node may cause data loss and business interruption, and its security level and service availability level are the lowest. For Chain Replication, N-1 nodes can be down without affecting data availability, and its security level and service availability level are the highest. Ring Replication is in between the two, and the front-end business may be affected only when the Master node and the First Slave node fail at the same time.

[0174] In this embodiment, when the failed node is restored, in order to restore it to normal in time or when a new node is added as a storage node for the replica data, so that it can play the role of replica backup in time, this embodiment also provides a specific processing method applied to the target second slave node:

[0175] First, node information of a newly added node in the distributed storage system is received from the monitoring node.

[0176] In this embodiment, the newly added node can be a node that is added to the distributed storage system for the first time, or it can be a master node, a first slave node, a second slave node, etc. that has previously failed. Regardless of the type of node, it will be processed as a node that is added to the distributed storage system for the first time.

[0177] Secondly, based on the node information, the local data is synchronized to the newly added node in a full synchronization manner.

[0178] In this embodiment, the target second slave node synchronizes the data of the target second slave node to the newly added node in a full synchronization manner according to the node information, so that the newly added node is added to the distributed storage system as a new second slave node.

[0179] In order to execute the corresponding steps in the above embodiment and various possible implementations, an implementation method of the data replication device 100 is provided below. Fig.12 , Fig.12 It is a block diagram of a data replication device according to an embodiment of the present invention. It should be noted that the basic principle and technical effects of the data replication device 100 provided in this embodiment are the same as those of the above embodiments, and are not mentioned in this embodiment for the sake of brief description.

[0180] The data replication device 100 includes a receiving module 110 , a recording module 120 and an updating module 130 .

[0181] The receiving module 110 is used to receive a data synchronization request sent by the first slave node. The data required to be synchronized in the data synchronization request is synchronized from the master node to the first slave node based on the update request sent by the client. The master node and the first slave node are synchronously replicated, and the first slave node and the second slave node are asynchronously replicated.

[0182] The recording module 120 is used to record the log of the data synchronization request.

[0183] Optionally, the recording module 120 is specifically used to: determine whether there is a normal request or an abnormal request based on the receiving order and the sending order of the multiple requests received; if there is a normal request, record the log of the normal request; if there is an abnormal request, send a retransmission request to the first slave node to instruct the resending of the abnormal request, so as to record the log of the normal request when the second slave node receives the normal request.

[0184] Optionally, when the recording module 120 is used to determine whether there are normal requests or abnormal requests based on the receiving order and the sending order of multiple requests received, it is specifically used to: determine the requests whose receiving order among the multiple requests received is consistent with the corresponding sending order as normal requests; and determine the remaining requests among the multiple requests sent except the normal requests as abnormal requests.

[0185] The updating module 130 is used to update the data required to be synchronized by the data synchronization request to the local computer.

[0186] Optionally, the master node stores the historical identifier of the data synchronization request that was last processed by the second slave node in the previous cycle; the update module 130 is also used to: obtain the current identifier of the data synchronization request that was last processed in this cycle; send the current identifier to the master node so that the master node deletes the log of the data synchronization request between the current identifier and the historical identifier stored locally.

[0187] Optionally, the second slave node is a target second slave node among multiple second slave nodes in the distributed storage system, the target second slave node is also communicated with the monitoring node, the data synchronization request most recently processed by the target second slave node is the latest, and the update module 130 is also used to: receive a switching request sent by the monitoring node, the switching request is initiated when the monitoring node detects the presence of a faulty node in the distributed storage system; based on the switching request, establish a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system.

[0188] Optionally, the faulty node is a master node, and the update module 130, when used to establish a synchronization relationship between the target second slave node and the non-faulty node in the distributed storage system based on a switching request, is specifically used to: establish a synchronous replication relationship with the first slave node based on the switching request; take over the first slave node so that the first slave node takes over the master node.

[0189] Optionally, the faulty node is the first slave node, and the update module 130, when used to establish a synchronization relationship between the target second slave node and the non-faulty node in the distributed storage system based on a switching request, is specifically used to: establish a synchronous replication relationship with the master node based on the switching request; and take over the first slave node.

[0190] Optionally, the faulty node is a master node and a first slave node, and the update module 130, when used to establish a synchronization relationship between a target second slave node and a non-faulty node in a distributed storage system based on a switching request, is specifically used to: take over the master node based on the switching request; establish a synchronization replication relationship with a proxy second slave node among the second slave nodes other than the target second slave node, so that the proxy second slave node takes over the first slave node, and the proxy second slave node is the second slave node whose most recently processed data synchronization request is the latest among the second slave nodes other than the target second slave node.

[0191] Optionally, the update module 130 is further used to: receive node information of a newly added node in the distributed storage system sent by the monitoring node; and synchronize local data to the newly added node in a full synchronization manner according to the node information.

[0192] The present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the data replication method as described above is implemented.

[0193] In summary, the embodiments of the present invention provide a data replication method, device, storage node and readable storage medium, which are applied to the second slave node in a distributed storage system, the second slave node is communicatively connected to the first slave node and the master node, the master node is communicatively connected to the client, and the method includes: receiving a data synchronization request sent by the first slave node, the data required to be synchronized by the data synchronization request is synchronized to the first slave node by the master node based on the update request sent by the client, the master node and the first slave node are synchronously replicated, and the first slave node and the second slave node are asynchronously replicated; recording a log of the data synchronization request; updating the data required to be synchronized by the data synchronization request to the local. Compared with the prior art, the data replication method provided in this embodiment has at least the following advantages: 1) providing higher throughput and lower latency while ensuring strong consistency; 2) no single point of failure, providing better fault tolerance; 3) supporting higher replica redundancy without sacrificing foreground business performance; 4) better network tolerance, suitable for application scenarios where data is distributed across data centers and regions.

[0194] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data replication method, characterized in that: Applied to a second slave node in a distributed storage system, the second slave node is communicatively connected to both the first slave node and the master node, and the master node is communicatively connected to the client, the method comprising: A data synchronization request is received from the first slave node. The data to be synchronized by the data synchronization request is the data that the master node synchronizes to the first slave node based on the update request sent by the client. Synchronous replication is performed between the master node and the first slave node. The processing procedure of synchronous replication between the master node and the first slave node is as follows: the client sends an update request to the master node, the master node records a log, and sends the data synchronization request to the first slave node. The data to be synchronized by the data synchronization request is the data that the master node needs to update according to the update request. After receiving the data synchronization request, the first slave node records a log and then sends a response message to respond to the master node. After receiving the response message from the first slave node, the master node responds to the client. Asynchronous replication is performed between the first slave node and the second slave node. The processing procedure of asynchronous replication between the first slave node and the second slave node is as follows: after the background task of the first slave node asynchronously synchronizes the data to be synchronized to the local, the first slave node sends the data synchronization request to the second slave node to synchronize the data to be synchronized to the second slave node. Recording a log of the data synchronization request; The data required to be synchronized by the data synchronization request is updated locally.

2. The data replication method according to claim 1, characterized in that: The data synchronization request sent by the first slave node includes a plurality of requests sent in a sending order, and the step of recording a log of the data synchronization request includes: Determining whether there is a normal request or an abnormal request according to the order of receiving the multiple requests and the order of sending the requests; If the normal request exists, a log of the normal request is recorded; If the abnormal request exists, a resend request instructing to resend the abnormal request is sent to the first slave node, so that a log of the normal request is recorded when the second slave node receives the normal request.

3. The data replication method according to claim 2, characterized in that: The step of judging whether there is a normal request or an abnormal request according to the order of receiving and sending the received multiple requests comprises: Determine the requests whose receiving order is consistent with the corresponding sending order among the multiple received requests as normal requests; The remaining requests except the normal request among the multiple requests sent are determined as the abnormal requests.

4. The data replication method according to claim 1, characterized in that: The master node stores a historical identifier of the data synchronization request last processed by the second slave node in the previous cycle; the method further includes: Get the current identifier of the last data synchronization request processed in this cycle; The current identifier is sent to the master node, so that the master node deletes the log of the data synchronization request between the current identifier and the historical identifier stored locally.

5. The data replication method according to claim 1, characterized in that: The second slave node is a target second slave node among a plurality of second slave nodes in the distributed storage system, the target second slave node is also in communication connection with the monitoring node, the data synchronization request last processed by the target second slave node is the latest, and the method further includes: Receiving a switching request sent by the monitoring node, where the switching request is initiated when the monitoring node detects a faulty node in the distributed storage system; Based on the switching request, a synchronization relationship is established between the target second slave node and a non-faulty node in the distributed storage system.

6. The data replication method according to claim 5, characterized in that: The faulty node is the master node, and the step of establishing a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system based on the switching request includes: Based on the switching request, establishing a synchronous replication relationship with the first slave node; Taking over the first slave node so that the first slave node takes over the master node.

7. The data replication method according to claim 5, characterized in that: The faulty node is the first slave node, and the step of establishing a synchronization relationship between the target second slave node and a non-faulty node in the distributed storage system based on the switching request includes: Based on the switching request, establishing a synchronous replication relationship with the master node; Take over the first slave node.

8. The data replication method according to claim 5, characterized in that: The faulty nodes are the master node and the first slave node, and the step of establishing a synchronization relationship between the target second slave node and the non-faulty nodes in the distributed storage system based on the switching request includes: Based on the switching request, taking over the master node; Establish a synchronous replication relationship with a proxy second slave node among the second slave nodes other than the target second slave node, so that the proxy second slave node takes over the first slave node, and the proxy second slave node is the second slave node whose most recently processed data synchronization request is the latest among the second slave nodes other than the target second slave node.

9. The data replication method according to claim 5, characterized in that: The method further comprises: Receiving node information of a newly added node in the distributed storage system sent by the monitoring node; According to the node information, the local data is synchronized to the newly added node in a full synchronization manner.

10. A data replication device, characterized in that: Applied to a second slave node in a distributed storage system, the second slave node is communicatively connected to the first slave node and the master node, the master node is communicatively connected to the client, and the device comprises: A receiving module is used to receive a data synchronization request sent by the first slave node, the data required to be synchronized by the data synchronization request is synchronized to the first slave node by the master node based on the update request sent by the client, the master node and the first slave node are synchronously replicated, and the processing process of synchronous replication between the master node and the first slave node is: the client sends an update request to the master node, the master node records a log, and sends the data synchronization request to the first slave node, the data required to be synchronized by the data synchronization request is the data that the master node needs to update according to the update request, after receiving the data synchronization request, the first slave node records the log and then sends a response message to respond to the master node, and after receiving the response message of the first slave node, the master node responds to the client; the first slave node and the second slave node are asynchronously replicated, and the processing process of asynchronous replication between the first slave node and the second slave node is: after the background task of the first slave node asynchronously synchronizes the required synchronized data to the local, the first slave node sends the data synchronization request to the second slave node to synchronize the required synchronized data to the second slave node; A recording module, used to record the log of the data synchronization request; The updating module is used to update the data required to be synchronized by the data synchronization request to the local area.

11. A storage node, comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the processor executes the computer program, the data replication method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data replication method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Distributed storage system control method and device and readable storage medium

    CN114637475A

  • Fault tolerant multi-stage data replication with relaxed coherency guarantees

    US7653668B1