Skip to content
Devgo

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.

When to use
  • Large, cold, durable storage (object storage backends).
  • Where storage cost dominates and latency is OK.
When not to
  • Hot, low-latency data (use replication).
  • Small datasets where overhead isn't worth it.

Definition

(Reed-Solomon) encodes data into k data + m parity fragments, tolerating any m lost fragments. (k=10,m=4) gives durability like 3x at 1.4x storage overhead. Reads reconstruct from any k fragments.

Why it exists

(3x) is expensive at exabyte scale. achieves the same durability with far less storage, trading compute (encode/decode) for space — ideal for cold/large .

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 , less space.

Scaling limits

Reconstruction is CPU- and network-heavy; degraded reads are slower. Not suited to low-latency hot data (use ). Encoding adds write latency. Repair traffic spikes on node loss.

Cost shape

Far less storage than for the same durability. Blow-ups: repair traffic and CPU on failures.

Alternatives

  • Replication — Simpler, lower latency, but 3x storage.
  • RAID — Local-disk ; same idea, smaller scale.

Failure modes

  • Slow degraded reads during reconstruction.
  • Repair storms on correlated failures.
  • CPU overhead on encode.

, ,