Safe Buffer Transfer in Distributed Storage via RPC and RDMA
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed storage systems, data inconsistencies can arise when nodes fail during Remote Direct Memory Access (RDMA) operations, leading to incorrect data updates and system failures due to the lack of robust mechanisms for ensuring data consistency during partial updates.
Innovation Solution
A method involving a two-step sequence where a first node sends a Remote Procedure Call (RPC) command to a second node to execute an RDMA write operation for updating a buffer, ensuring data integrity by discarding incomplete writes and re-establishing connections to prevent data corruption upon node failure, and waiting for in-flight RPC commands to terminate before restarting nodes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If RDMA write operation is used for buffer update, then data transfer speed is improved, but data consistency is compromised when nodes fail during the operation
Solution Approach 1:
The system performs preliminary actions by sending an RPC command before the RDMA write operation to prepare the receiving node. This preliminary step establishes the intent to update and allows the receiving node to prepare its buffer state, ensuring that if a failure occurs during RDMA, the system can detect and handle the incomplete update properly.
Solution Approach 2:
The system implements feedback mechanisms by monitoring the completion status of RDMA write operations. When a node failure is detected during or after an RDMA operation, the system receives feedback about the failed operation and responds by discarding incomplete writes and re-establishing connections, thereby maintaining data consistency.
2Reliability
If node failure handling is implemented to ensure data consistency, then system reliability is improved, but operation complexity increases due to additional protocols and connection management
Solution Approach 1:
The system employs self-service mechanisms where nodes automatically detect their own failure states and handle incomplete RDMA operations without requiring complex external coordination. Each node monitors its own buffer updates and can independently discard incomplete writes, reducing the need for complex inter-node failure handling protocols.
Solution Approach 2:
The system applies the discarding and recovering principle by automatically discarding incomplete buffer updates when node failures are detected. Rather than attempting to recover complex partial states, the system cleanly discards the failed operation and re-establishes connections, simplifying the failure handling logic while maintaining data consistency.
3Manufacturing precision
If incomplete RDMA writes are discarded to prevent data corruption, then data integrity is maintained, but update throughput decreases due to re-transmission requirements
Solution Approach 1:
By performing preliminary actions through RPC commands before RDMA operations, the system prepares receiving nodes in advance. This allows for more efficient failure detection and handling, reducing the impact of discarded incomplete writes on overall throughput since the system is already prepared to manage potential failures.
Solution Approach 2:
The system applies the skipping principle by rapidly detecting and discarding incomplete writes without prolonged recovery attempts. When a failure is detected, the system quickly moves past the failed operation rather than spending time on complex recovery procedures, thereby minimizing the throughput impact of data integrity checks.
Data Source
AI summary
A method is provided for use in a distributed storage system having a write cache, the method comprising: receiving, by a first node in the distributed storage system, a first Remote Procedure Call (RPC) command to perform a partial update to a buffer that is stored in a memory of the first node, the partial update including replacing old data that is present in the buffer with new data that is stored in the write cache; transmitting, from the first node to a second node, a second RPC command instructing the second node to provide the new data to the first node by executing a Remote Direct Memory Access (RDMA) write operation into the memory of the first node; and performing the partial update based on the new data when the RDMA. write operation is completed and the new data is received by the first node as a result.


