Erasure Coding (EC)
In plain English
Plain definition
Erasure coding breaks data into k pieces and creates m extra 'parity' pieces using maths, so if some pieces are lost, the original data can still be rebuilt from any k surviving pieces. It uses far less storage than keeping multiple full copies, but rebuilding lost pieces takes CPU time and network bandwidth.
Erasure coding replaces the naive N-way replica model with a systematic linear code. An object is split into k data fragments, and a coding matrix (usually a Cauchy or Vandermonde-based Reed-Solomon generator) produces m parity fragments. The storage overhead ratio becomes (k+m)/k instead of the replication factor N (e.g. 3x). A common production configuration like EC(10,4) yields 1.4x overhead while tolerating 4 concurrent fragment losses — the same loss tolerance as 5-way replication at well under half the cost. This is why storage systems (Azure Storage, Ceph with EC pools, HDFS with EC policies) commonly use EC for cold and warm tiers, reserving replication for hot, latency-sensitive paths.
The core tradeoff is read/write amplification versus CPU cost. A full write requires encoding across all k shards before any parity can be computed, which breaks the simple append-only write path replication enjoys — most systems buffer a full stripe before encoding, introducing a coordination point and increasing write latency variance. Reads are cheap in the steady state (fetch only the k data shards), but a degraded read — where one or more data shards are unavailable — forces reconstruction: read any k surviving shards (data + parity), invert the generator matrix over GF(2^w), and recompute the missing fragment. This is CPU-bound Galois Field multiplication, and at scale it becomes a real capacity planning line item, not a rounding error.
The operationally dangerous case is the rebuild storm. When a node or disk fails, every stripe that had a shard on that device must be reconstructed and re-striped elsewhere. Unlike replica repair (copy one full replica), EC rebuild requires reading k shards per stripe from potentially k different nodes to regenerate one lost fragment — multiplying network fan-in and disk IOPS by the stripe width. This is why EC clusters are far more sensitive to correlated failure domains: placing shards of the same stripe behind a shared rack switch or power zone can turn a single-fault into an unrecoverable stripe loss even though the code nominally tolerates m failures. Placement algorithms (CRUSH in Ceph, block placement policies in HDFS) must explicitly diversify shard placement across independent failure domains, not just independent disks.
Practically, EC and replication are not mutually exclusive strategies but tiers in a lifecycle. Hot, frequently-mutated, low-latency data stays replicated (cheap single-copy reads, fast small writes); once data cools and access becomes sequential/read-mostly, it’s EC-converted in the background, trading write/rebuild cost for steady-state storage efficiency. Systems exposing this as a first-class policy (Ceph erasure-code profiles, HDFS ErasureCodingPolicy) let operators tune (k, m) per namespace based on observed access patterns and blast-radius tolerance — but every increase in k for storage efficiency directly increases rebuild fan-in and stripe-loss correlation risk, so (k, m) selection is fundamentally a durability-vs-efficiency-vs-blast-radius optimisation, not a tunable with a universally ‘correct’ value.
Legacy Reference
https://docs.ceph.com/en/latest/rados/operations/erasure-code/About this page
Credited to
Dates
Published
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Recommended reading
More from KBY that goes with this term.
Education ITKeeping pupil data safe on your school laptop, and what to do the moment it goes missing
9 min read
Small business ITBackups a small business can actually restore from: three copies, one offline, and a test
5 min read

