r/compsci • u/No_Astronomer7655 • 23d ago
Exploring Data Integrity and Fault Tolerance in Erasure-Coded Distributed Storage Systems
Hello everyone!
I've been exploring a research direction around distributed storage systems, particularly the challenge of maintaining data integrity and availability when information is distributed across multiple storage nodes.
The research idea I'm investigating is titled:
Verifiable Erasure-Coded Cloud Storage Systems
The problem I'm interested in
Erasure coding allows a system to divide data into fragments and distribute them across multiple storage nodes. This improves storage efficiency and fault tolerance because the original data can be reconstructed even when some fragments become unavailable.
However, distributing data introduces another challenge: how can a storage system efficiently verify that its fragments remain intact and have not been corrupted or improperly modified?
Traditional integrity checks can help detect corruption, but I am interested in exploring verification mechanisms that can operate without requiring the entire original dataset to be reconstructed.
The technical direction
I'm particularly interested in investigating the interaction between:
- Erasure Coding: Distributing data fragments to improve fault tolerance and storage efficiency.
- Cryptographic Verification: Establishing confidence in the integrity of stored fragments.
- Distributed Storage Architecture: Handling node failures, corrupted fragments, and verification across multiple storage nodes.
One challenge I find particularly interesting is balancing verification overhead against storage efficiency, fault tolerance, and system performance.
A question for the community
When combining erasure coding with cryptographic integrity verification, what are the most significant architectural or theoretical challenges that should be considered?
In particular, are there established approaches that allow efficient verification of individual or distributed fragments without reconstructing the entire original dataset?
I'd be interested in relevant research papers, established techniques, and alternative approaches that address this problem.
I'm currently exploring the research literature and refining the problem formulation before moving towards an experimental prototype.
I'd appreciate technically grounded discussion and critical perspectives.
Thanks for reading!
6
u/celestrion 23d ago edited 23d ago
I've been on a team that implemented the design for distributed erasure coding for a major cloud provider. This was about six years ago, so the details have likely changed, but the challenges tend to be fundamental.
Our architecture used erasure coding to split writes across nodes in a tight cluster (multiple 100Gb/s RDMA links between nodes) with hashes at the node level to detect corruption. We relied on sufficient redundancy in the erasure coding matrix for that dataset so that the corruption needed to just be "okay / not okay" rather than something we could recover independent bits from. If one of the chunks was bad, we just threw it out and ran the syndrome to recover the whole stripe.
Cryptographic verification was something we left up to the next level of abstraction. The obvious use-case for this was deduplication and content-based addressing (common in object storage schemes). The biggest performance hit in this pipeline is the place where the writes went from moving RDMA pointers in memory to hitting actual bytes (for hashing), so this is a great place to run the stripe-hash and the individual-chunk hashes in parallel; you're already taking the hit once, so let the actual storage nodes trust the striping node to provide the checksum in sideband.
In my design for this part of the subsystem, that "trust" meant that the node which owned the stripe would allocate storage en bloc from the storage nodes and write directly over RDMA to NVMe drives on the far end. The storage nodes only did traffic-cop stuff by verifying that the LBAs under write were allocated to the node requesting the write.
Node failures is always a fun topic if you have multiple writers for a given dataset. That either implies explicit locking or a follow-the-leader style consensus algorithm, and your lock-holder/leader can always be the node that fell over. I had some novel work in this, as I designed our initial consensus algorithm. We never applied for a patent under which to publish that work (translation: I cannot give you details) so, suffice it to say that the major common consensus algorithms have support for calling elections when the leader goes away, and you want a way to signal that with minimum latency. It's also very wasteful to have one leader for all the storage in play, so that's another knob to turn.
One of the other novel things in our design was that we had per-stripe matrices to support different qualities of service and to keep the level of redundancy constant under failure (normally write to 14 nodes with 4 redundant chunks, but now 2 nodes are down? Write to 12 nodes with 4 redundant chunks and shrink the stripe). For object storage (our target audience), this is probably fine, but for traditional filesystems, this makes performance unpredictable.
The really surprising (not really, when you think about it for a minute) finding we had was that anything we did in the datapath to add redundancy or verification on the sub-block level just murdered performance. Even something as simple as a parity byte blew latency up because RDMA and DMA really work. When you can take a bunch of pointers to 4k blocks, stripe them into scatter-gather I/O vectors and point them at NVMe drives, the hardware does everything apart from the book-keeping. Once you want to look inside, you've got the CPU involved, and SIMD can only do so much to keep things moving. There's probably work to be done in moving that work out of the fast path, where there's some dirty-block list and a background-job that hashes the recently-written blocks asynchronously from some very reliable storage and then shuffles them off to cheap QLC.
The obvious next step in all of this is to add redundancy by mirroring I/Os offsite, and that's when you've really got to decide where you stand with CAP because time-of-flight latency is always considerable when sending bits to somewhere far enough away to not be taken out by the same weather system or enemy action or utility-scale power glitch. Some implementations would mirror a hash-protected copy of the intent log and rely on the far side to to striping, and that always seemed like the sanest compromise to me.
Also complecting the situation is the notion of multi-tenancy. Customers probably don't want to read each other's data. You can enforce this with namespacing in the case of NVMe. Or, you can use per-customer crypto keys. Every approach has nasty trade-offs.