What is Erasure Coding?
Erasure coding is a data protection method that splits data into fragments (shards) and adds parity, allowing reconstruction from a subset of fragments; it is commonly used in cloud object storage to tolerate failures efficiently.
Erasure coding (EC) is a method of data storage in which a data object is broken into multiple fragments called shards and expanded with additional parity fragments. The original data can be recovered from any subset of the fragments that meets a minimum size requirement. EC offers a trade-off between storage overhead and fault tolerance compared to simple replication, making it attractive for large-scale storage systems.
In a typical erasure coding scheme, a data object is divided into k data shards. Then m parity shards are computed using a mathematical algorithm, for example Reed-Solomon codes. The total number of shards is n = k + m. The system can tolerate up to m shard failures: if any m shards are lost, the original data can be reconstructed using any k surviving shards. The reconstruction process involves solving a system of linear equations. Common configurations include k=10 with m=2 (20 percent overhead) or k=6 with m=3 (50 percent overhead). Each shard is typically stored on a different storage node or failure domain.
Erasure coding is widely deployed in cloud object storage systems. Azure Blob Storage, Google Cloud Storage, and Amazon S3 use erasure coding (or similar techniques) to achieve high durability with lower storage overhead than replication. EC is also used in distributed storage systems like Ceph and in archival storage for cold data. However, the computational cost of encoding and reconstructing data is higher than replication, so cloud providers often use replication for hot data and erasure coding for data that is accessed less frequently. EC is a foundational technology for cost-effective reliable storage at scale.
Key facts
- Erasure coding provides better storage efficiency than replication, typically using 1.2x to 1.5x overhead versus 3x for replication.
- The two main parameters are k (data shards) and m (parity shards); any k out of n = k+m shards can reconstruct the object.
- Common implementations use Reed-Solomon codes or other linear codes over finite fields.
- EC introduces a trade-off: lower storage cost but higher computational cost for encoding and reconstruction.
How it works in practice
Related terms
References
More in Storage
Block Storage
Block storage is a storage architecture that presents raw fixed-size chunks (blocks) to a computer, which the operating system partitions and formats before use, commonly used for virtual machine disks and database volumes.
Cold Storage
Cold storage is a low-cost, slow-retrieval data tier for infrequently accessed information, such as backups, archives, or compliance records, with retrieval times ranging from minutes to hours.
Fibre Channel
Fibre Channel is a high-speed networking standard primarily used to connect storage devices in storage area networks, operating as a dedicated protocol stack separate from Ethernet.
File Storage
File storage exposes data as a hierarchical filesystem over network protocols like NFS and SMB, commonly delivered via network-attached storage (NAS) appliances for shared access.
Hot Storage
Hot storage is the default high-performance tier in object storage systems, optimized for low-latency access to frequently retrieved data.
iSCSI
iSCSI is a storage protocol that encapsulates SCSI block-level commands over TCP/IP, enabling servers to access remote disks as if they were locally attached.
NFS
NFS (Network File System) is a distributed file system protocol originally developed by Sun Microsystems that allows a client to access files over a network as if they were local. It is widely used in Unix and Linux environments and runs over IP networks.
Object Storage
Object storage is a flat data storage architecture that manages data as immutable objects, each with a unique identifier, metadata, and API access over HTTP. It is the model behind Amazon S3 and similar cloud storage services.
RAID
RAID (Redundant Array of Independent Disks) combines multiple physical disk drives into a single logical unit to improve performance, fault tolerance, or both, using techniques like striping, mirroring, and parity.
RAID 0
A data storage method that splits data across two or more disks in stripes to improve read and write performance, but provides no fault tolerance.