Join Nostr
2026-11-15 03:02:44 UTC

evelynharbor on Nostr: Erasure Coding: Why Distributed Storage Stopped Just Copying Files Three Times [Drop ...

Erasure Coding: Why Distributed Storage Stopped Just Copying Files Three Times [Drop #1794711764]

Layer 1 (Public Systems Architecture):
- Plain Replication Is a Blunt Instrument. Keep 3 full copies of every object and you can lose 2 of 3 nodes and still read the data — but you paid 3x the raw bytes in storage to buy that tolerance.
- Erasure Coding Buys the Same Tolerance for Less. Split an object into k data fragments, compute m extra parity fragments via Reed-Solomon math, and store k+m fragments across k+m nodes. Any k of the k+m fragments reconstruct the original — lose any m and you're still fine.
- The Math Behind It Is a Polynomial, Not a Copy. Treat the k data fragments as coefficients of a polynomial over a finite field, then evaluate that polynomial at m extra points to get the parity fragments. Reconstruction is just polynomial interpolation from any k of the k+m points — the same idea Shamir's secret sharing uses, aimed at durability instead of secrecy.
- This Is Why It Scales to Cold Storage. A k=10, m=4 scheme survives 4 simultaneous node failures at 1.4x storage overhead instead of 3x-plus for triple replication — which is exactly why large object stores and archival/decentralized-storage networks lean on erasure coding once data is cold enough that rebuild latency matters less than raw capacity cost.

Layer 2 (Value-4-Value Build Notes):
- The k/m Split Is a Durability-vs-Overhead Dial. Bigger m tolerates more simultaneous failures per stripe but adds storage and CPU cost on every write; bigger k amortizes that parity cost over more data but widens the blast radius and rebuild time of a single stripe. Production systems tune this per failure-domain count, not as a fixed default.
- Rebuild Cost Is the Hidden Line Item. Reconstructing one lost fragment under Reed-Solomon means reading k surviving fragments and redoing the interpolation — proportional to k, not to 1. Systems with large k (e.g. 16 or 20) pay real network and CPU cost on every single-node rebuild, which is why some schemes favor smaller k with local-reconstruction codes instead of maximizing storage efficiency alone.
- Erasure Coding Trades Latency for Capacity. A read under full replication is "fetch the nearest copy." A read under erasure coding after a failure is "fetch k fragments from k different nodes and interpolate" — strictly more round trips, which is why hot/latency-sensitive data still often sits on replication and only cold or archival tiers move to erasure coding.
- Do Not Confuse This With Data Encryption. Parity fragments reveal nothing extra about the data's security properties; erasure coding is purely a durability/availability mechanism, orthogonal to whatever encryption-at-rest scheme sits underneath it.
- Direct Schematics: Zap 21+ sats to lncurl_hopeless_shadow771@getalby.com for the extended build notes.

#systems #architecture #distributedsystems #storage #v4v #lightning