Erasure Coding

« Back to Glossary Index

Erasure coding is a data protection method that breaks data into fragments, expands and encodes it with redundant pieces, and stores the set across different disks, nodes, or geographic locations so that the original data can be reconstructed even if some fragments are lost.

It is the mathematical foundation behind most modern object storage and large-scale distributed storage systems, offering a way to survive multiple simultaneous hardware failures without the steep capacity cost of keeping full copies of every file. Unlike simple replication, which duplicates entire data sets, erasure coding uses algebraic redundancy — extra “parity” or “coding” fragments computed from the original data — to achieve similar or better durability at a fraction of the storage overhead. It has become the default resiliency mechanism for petabyte- and exabyte-scale storage platforms, including cloud object stores and enterprise storage arrays.

How Erasure Coding Works

At its core, erasure coding takes a piece of data, divides it into a fixed number of equal-sized data fragments, and then generates additional coding (parity) fragments that are mathematically derived from those data fragments. The result is described using “k of n” or “k+m” notation: k is the number of original data fragments, m (sometimes written as p) is the number of coding fragments, and n is the total number of fragments (n = k + m) written out to storage.

A commonly cited example is a 10+4 scheme: a file is split into 10 data fragments, and 4 additional coding fragments are computed from them, for 14 fragments total. Any 10 of those 14 fragments — in any combination of data and coding fragments — are sufficient to reconstruct the complete original file. This means the system can tolerate the loss of any 4 fragments simultaneously without losing data. Other common configurations include 6+3, 8+3, and 12+4, each trading off differently between storage efficiency and fault tolerance.

The coding fragments are typically generated using Reed-Solomon codes, a family of error-correcting codes originally developed for digital communications and later adapted for storage. Reed-Solomon codes treat the data as coefficients of a polynomial over a finite (Galois) field and use that structure to compute redundant values with predictable, provable recovery properties. Other erasure code families exist — including Local Reconstruction Codes (LRC) and Regenerating Codes — which optimize for faster, cheaper rebuilds at large scale, but Reed-Solomon remains the most widely deployed approach because of its mathematical simplicity and strong guarantees.

Once fragments are created, the storage system distributes them across independent failure domains: separate disks, separate storage nodes, separate racks, or in geographically distributed systems, separate data centers. Spreading fragments this way ensures that a single hardware failure, or even the loss of an entire node or site, only removes a subset of fragments — leaving enough remaining fragments to reconstruct the data.

It helps to think of the process in three stages. First, encoding: the original data is divided into equal-sized data fragments and run through the erasure code to produce coding fragments, a step usually performed once, at write time. Second, placement: the n fragments are written across distinct disks or nodes according to a placement policy designed to maximize independence between fragments, so that a single event — a failed drive, a rebooted server, a downed rack — cannot take out more fragments than the scheme is designed to tolerate. Third, decoding: when data is read back and all fragments are intact, the system can often reassemble it directly from the data fragments alone; if some fragments are missing, it instead solves the underlying equations using any k available fragments, decoding the original data even though the specific fragments it read may include a mix of data and coding pieces. This decoding step is what distinguishes erasure coding from simpler checksum or single-parity schemes — it can recover from the loss of any subset of fragments up to the design limit, not just a specific, predetermined one.

Key Benefits of Erasure Coding

Erasure coding is widely adopted because it addresses several practical problems in large-scale storage systems simultaneously. The following are its primary advantages.

1

Storage Efficiency

Because erasure coding uses algebraic parity instead of full copies, it achieves high durability with far less overhead than replication. A 10+4 scheme has a storage overhead of only 1.4x (14 fragments stored for 10 fragments of usable data), compared to 3x overhead for triple replication offering comparable fault tolerance.

2

High Durability

By tuning k and m, administrators can engineer very specific durability targets — tolerating two, three, four, or more simultaneous fragment losses — without a linear increase in storage cost, unlike replication where each additional 9 of durability roughly requires another full copy of the data.

3

Flexible Failure Domains

Fragments can be spread across drives, nodes, racks, or geographic sites, letting a single erasure-coded scheme protect against drive failures, server failures, and even site-level outages depending on how the fragments are placed.

4

Cost-Effective Scale

Because the overhead ratio stays roughly constant regardless of how large the underlying data set grows, erasure coding scales economically to the petabyte and exabyte range, which is a major reason it underpins most cloud object storage platforms.

Erasure Coding vs. RAID

RAID (Redundant Array of Independent Disks) is, in a narrow sense, an earlier and more limited application of the same basic idea: RAID 5 uses a single parity block to tolerate one disk failure, and RAID 6 uses dual parity to tolerate two. Erasure coding generalizes this concept to a much larger and more flexible set of schemes, and — critically — is typically applied across nodes in a distributed cluster rather than within a single disk array or controller.

AspectRAID (5/6)Erasure Coding (e.g., 10+4)Simple Replication (3x)
Storage efficiencyHigh (typically 1.2x–1.33x overhead)High (typically 1.2x–1.5x overhead, tunable)Low (3x overhead for triple copies)
Fault tolerance1 disk (RAID 5) or 2 disks (RAID 6)Configurable — any m fragments, often 3, 4, or moreConfigurable by copy count, but costly per additional copy
Rebuild complexityModerate; limited to disks in one array/controllerHigher CPU cost per rebuild, but distributed across many nodesLow computational cost; rebuild is a simple copy operation
Scope of protectionSingle array or storage controllerAcross disks, nodes, racks, or geographic sitesAcross disks, nodes, or sites, depending on placement policy
Typical use caseTraditional block storage arrays, small to mid-scale systemsObject storage, archival storage, large-scale distributed systemsDatabases, hot/transactional data, systems needing fast reads/writes

The practical distinction matters most at scale: RAID protects against drive failures within one enclosure, while erasure coding, applied across a distributed cluster, can protect against the loss of entire nodes or sites — a level of resiliency RAID alone was never designed to provide.

Erasure Coding vs. Replication

Replication protects data by storing complete, identical copies — commonly two or three — on separate disks, nodes, or sites. If one copy is lost, the system simply reads from another. It is conceptually simple, fast to rebuild (a straight copy operation), and has low CPU overhead, which is why it’s still preferred for latency-sensitive workloads like databases and transactional systems.

Erasure coding trades some of that simplicity and rebuild speed for substantially better storage efficiency. Where triple replication requires 3x the raw capacity to tolerate two failures, an equivalent-durability erasure-coded scheme might need only 1.4x–1.6x the capacity. The tradeoff is that reconstructing lost data after a failure requires reading multiple surviving fragments and performing a computation, rather than copying a single intact replica — making erasure-coded rebuilds slower and more CPU-intensive than replication-based rebuilds. Many storage systems use both techniques together: replication for small, frequently accessed metadata or hot data, and erasure coding for the bulk of large, less frequently accessed object data.

Common Use Cases

Erasure coding is best suited to environments where storage efficiency and durability at scale matter more than the fastest possible rebuild time. Several categories of workloads consistently rely on it.

1

Object Storage

Cloud and on-premises object storage platforms — used for unstructured data such as documents, images, video, backups, and application data — are the most common home for erasure coding, since object stores are typically built from large clusters of commodity nodes where efficient, distributed redundancy is essential.

2

Cold and Archival Storage

Data that is written once and read rarely, such as long-term backups, compliance archives, and media libraries, is well suited to erasure coding because the storage savings compound over long retention periods and the lower likelihood of frequent rebuilds mitigates the rebuild-time tradeoff.

3

Large-Scale Distributed Systems

Distributed file systems and software-defined storage platforms that span many nodes — and sometimes many data centers — use erasure coding to survive node- or site-level failures without paying the multi-copy storage tax that replication would require at that scale.

4

Enterprise Storage Arrays

Modern enterprise storage arrays increasingly use erasure coding, rather than traditional RAID, to protect data across drives and nodes. Zadara, for example, uses erasure coding within its cloud storage architecture to distribute redundancy across drives and nodes, allowing customers to sustain multiple drive failures while keeping usable capacity high — illustrating how the technique has moved from a specialized technique into a standard enterprise storage practice.

Tradeoffs and Considerations

Erasure coding is not free of costs, and understanding its tradeoffs is important when deciding where and how to apply it.

1

CPU and Computational Overhead

Encoding and decoding data involves finite-field arithmetic, which consumes more CPU cycles than the simple copy operations replication requires. This overhead is generally manageable with modern processors and hardware acceleration, but it is a real cost, especially at very high write throughput.

2

Rebuild Time

Reconstructing a lost fragment requires reading at least k surviving fragments and recomputing the missing piece, rather than copying one intact replica. For very large values of k, this can mean pulling data from many disks or nodes across the network, which can extend rebuild windows compared to replication — a factor that matters for both performance and the risk of additional failures occurring during a long rebuild.

3

Latency

Because a read or rebuild may need to gather fragments from multiple, possibly geographically dispersed, locations, erasure-coded systems can introduce more latency than reading a single local replica, particularly for small or latency-sensitive I/O operations. This is a major reason erasure coding is favored for large, sequential, or infrequently accessed data rather than small, latency-critical transactions.

4

Scheme Selection

Choosing k and m involves balancing durability, storage overhead, and rebuild cost against the specific failure domains and scale of the deployment. A larger m tolerates more simultaneous failures but increases overhead and rebuild complexity; a larger k improves storage efficiency but means each stripe depends on gathering more fragments to read or rebuild.

These considerations are also why erasure coding is rarely a one-size-fits-all setting even within a single organization. A backup archive that is written once and almost never read can tolerate slower, less frequent rebuilds in exchange for maximum storage efficiency, so it might use a wide scheme such as 12+4. A primary object storage tier serving active application traffic might instead use a narrower scheme such as 6+3, sacrificing a little storage efficiency for faster rebuilds and lower per-read latency. Storage platforms increasingly let administrators, or the system itself, select different schemes for different storage tiers or data classes based on access patterns, rather than applying one fixed configuration everywhere.

Erasure Coding in Modern Storage Architecture

Erasure coding has become a foundational technique in how the storage industry protects data at scale. By replacing full-copy redundancy with algebraic, fragment-based redundancy, it allows storage systems to survive multiple simultaneous hardware failures while keeping usable capacity high — a combination that traditional RAID and simple replication cannot match once systems grow beyond a single array. As data volumes continue to expand and organizations spread storage across more nodes, racks, and geographic regions, erasure coding remains the mechanism that makes durable, cost-efficient storage at that scale possible, with the specific k+m scheme chosen to fit the durability, performance, and cost requirements of the workload it protects.

« Back to Glossary Index