Erasure coding
A fault-tolerance technique that splits data into chunks with parity, surviving failures with less overhead than full replication. Used for durable object storage (S3 backend). 11 9s durability at ~50% overhead vs 3x replication.
- Large, cold, durable storage (object storage backends).
- Where storage cost dominates and latency is OK.
- Hot, low-latency data (use replication).
- Small datasets where overhead isn't worth it.
Definition
Erasure coding (Reed-Solomon) encodes data into k data + m parity fragments, tolerating any m lost fragments. (k=10,m=4) gives durability like 3x replication at 1.4x storage overhead. Reads reconstruct from any k fragments.
Why it exists
Replication (3x) is expensive at exabyte scale. Erasure coding achieves the same durability with far less storage, trading compute (encode/decode) for space — ideal for cold/large object storage.
How it works
Stripe data into k fragments, compute m parity fragments, scatter across failure domains. To read, fetch any k of k+m. To repair a lost fragment, reconstruct from the others. More CPU and latency than replication, less space.
Scaling limits
Reconstruction is CPU- and network-heavy; degraded reads are slower. Not suited to low-latency hot data (use replication). Encoding adds write latency. Repair traffic spikes on node loss.
Cost shape
Far less storage than replication for the same durability. Blow-ups: repair traffic and CPU on failures.
Alternatives
- Replication — Simpler, lower latency, but 3x storage.
- RAID — Local-disk erasure coding; same idea, smaller scale.
Failure modes
- Slow degraded reads during reconstruction.
- Repair storms on correlated failures.
- CPU overhead on encode.