Skip to content

Three copies cost too much. Will six data shards and three parity shards be safer?

The Object Exists. Is It Safe? · Part 4 of 6 · 6 min read

Read the worked explanation ↓

Interview question. A storage service holds 12 PB of cold customer objects and uses three full replicas for each object. Finance asks whether a Reed-Solomon 6+3 scheme could halve the raw storage bill without making durability worse. Compare space, failures, reconstruction, performance, and placement before approving the change.

At first glance this looks like arithmetic: three copies use three times the logical bytes, while six data fragments plus three coding fragments use nine-sixths, or 1.5 times. On 12 PB of logical objects, ignoring metadata and operational reserve, that is roughly 36 PB of raw copies versus 18 PB of encoded fragments. A projected 18 PB saving deserves serious investigation. It does not justify declaring equal durability from the capacity ratio alone.

The central question is which simultaneous failures the data layout can tolerate, and what happens while the system is repairing the first one. With three replicas on independent failure domains, losing two copies still leaves one usable copy. With a correctly implemented 6+3 maximum-distance-separable code, any six of the nine fragments can reconstruct the object, so any three missing fragments can be tolerated. Those counts sound close. Their correlated-failure exposure, reconstruction cost, and availability during repair are different.

Three complete replicas are compared with six Reed-Solomon data fragments and three parity fragments, including the repair fanout.
Three complete replicas are compared with six Reed-Solomon data fragments and three parity fragments, including the repair fanout.
Think first

Design storage durability for 30 PB of 4 MB media and 60 TB of 1 KB frequently updated metadata. Choose different redundancy schemes and defend repair network limits after two racks fail.

Take a few minutes to form an approach, then compare it with the worked explanation.

Check the exercise numbers

Using decimal units, 30 PB of media takes about 90 PB with three replicas or 45 PB with 6+3 coding before overhead. Replicating 60 TB of mutable metadata takes about 180 TB; the 90 TB coding alternative does not by itself justify its update and latency costs. A 4 MB media stripe has six data fragments of about 0.667 MB and nine fragments totaling 6 MB before padding. Two failed racks are tolerable only if the placement loses at most three fragments per stripe, with sufficient surviving read and repair capacity.

Reveal the worked explanation

Calculate storage overhead, then interrogate placement

A 60 MB object under three-way replication occupies approximately three 60 MB full copies, or 180 MB. With a 6+3 code, split the data into six 10 MB data fragments and create three additional 10 MB coding fragments. That totals 90 MB. The exact encoding includes stripe, padding, metadata, and implementation overhead, especially for small objects, so this is a clean large-object approximation.

Now suppose all nine fragments are accidentally placed across just two physical racks. A single rack failure could erase more than three fragments and make the object unavailable despite the attractive 'three failures tolerated' description. Coding durability only follows when fragment placement matches the promised failure model. Independent hosts, racks, power domains, zones, and regions have different economics and failure correlations. It may be impossible or very expensive to place all nine fragments in independent availability zones, so do not assume the code automatically survives three zone failures.

Replication can be placed across three zones with one whole copy in each. It offers a simple way to serve reads locally from one surviving complete replica. An erasure-coded stripe may be distributed across hosts or racks within a zone, with separate cross-zone replication or other safeguards. Those are architecture choices, not properties of Reed-Solomon mathematics.

Read and repair paths are not equivalent

For a healthy read, an erasure-coded store might serve the six data fragments and concatenate their contents, possibly using coding reconstruction or caches depending on placement and implementation. It may need coordinated access to multiple fragment servers. For a lost fragment, a basic 6+3 reconstruction commonly reads six surviving fragments to rebuild one missing fragment. In the 60 MB example that can mean transferring 60 MB of surviving fragments to reconstruct a 10 MB replacement fragment. By comparison, replacing a lost full replica usually transfers one 60 MB complete object from one surviving replica, but the source and network shape are simpler.

That arithmetic is not the whole performance story. Different codes offer different repair locality. Some systems can avoid unnecessary network traffic for local failures using special code layouts. Reads may also be served from caches or reconstructed in parallel. The honest comparison uses measured tail latency, fanout, CPU encoding cost, and network bottlenecks under normal and degraded conditions.

Consider the failure rate of disks and the time required to repair each object. A design that saves half the raw bytes but causes a tenfold surge in cross-rack traffic during repair could make the cluster less safe during large incidents. Repair has to coexist with foreground reads and writes. The storage system needs bandwidth budgets, capacity headroom, and degraded-state admission rules. Otherwise a failed node can trigger repair traffic that saturates the next group of nodes, creating a correlated outage that the code theoretic tolerance did not predict.

Workload matters as much as durability

For large, mostly immutable backups and media, coding is attractive because it amortizes encoding, large stripes, and remote-fragment fetch costs. For tiny frequently updated metadata records, updates may require read-modify-write of stripes and parity, depending on implementation. Replicated storage can be more economical in latency and operational simplicity even when its raw-capacity cost is higher. A practical design often uses replication for small mutable metadata and erasure coding for large immutable data.

A second complication is the difference between availability and durability. An object may remain recoverable from six remaining fragments but have unacceptable read latency when several fragment servers are slow. The system may choose to serve degraded reads or declare the object temporarily unavailable. This is a user-visible service-level decision rather than a coding-theory footnote.

Before rolling out the change, I'd model failure domains, expected correlated incidents, latent corruption, repair-time distributions, and storage growth. Then I'd run controlled experiments: one disk out, one rack unavailable, an additional slow fragment, concurrent rebuilds, and large customer reads during repair. Measure usable capacity, p99 reads, time spent below redundancy target, and operator effort. Keep a migration and rollback strategy because transitioning 12 PB of live data is itself a risk.

My recommendation would be to pilot 6+3 for a carefully chosen immutable object tier, not rewrite the entire service overnight. The space saving is credible. The safety claim requires demonstrating that placement, repair, and degraded-read behavior satisfy the actual failure and latency objectives. The most experienced interview answer knows which part is algebra and which part still needs an experiment.

Go deeper

Reed-Solomon MDS reconstruction can tolerate up to M missing fragments out of K+M, provided the missing chunks and available fragment metadata remain consistent and placement does not concentrate correlated failures. Encoding overhead is (K+M)/K, so 6+3 is 1.5x, whereas three-way replication is 3x. Small objects may be packed to avoid per-object stripe inefficiency. Locally repairable codes add repair locality or extra parity at different overhead. Field durability is affected by bit-rot detection, rebuilding incomplete stripes, operator errors, correlated rack failures, and the duration of under-protection, not merely the nominal number of missing fragments tolerated.

Check your reasoning

  • Calculate 3x and (6+3)/6 = 1.5x capacity overhead.
  • Distinguish lost copies from missing erasure-coded fragments.
  • Map chunks to real independent failure domains.
  • Quantify reconstructive repair traffic and degraded-read fanout.
  • Match coding versus replication to object sizes, mutation rate and SLA.

Common mistake: 6+3 automatically survives the loss of three availability zones without a placement proof.

Which recommendation justifies a move from replication to erasure coding?

Read the answer explanation

Pilot 6+3 on immutable bulk data after checking failure domains and repair economics — The coding limit is about fragments, and placement plus repair load determine correlated incident behavior.

Apply it elsewhere

A distributed AI checkpoint service writes multi-GB immutable tensors every ten minutes. Compare three-way replication with erasure coding for recent hot checkpoints and historical cold checkpoints.

Compare your approach

Derive 3x versus 1.5x overhead, identify K/M reconstruction thresholds, respect correlated placement failure domains, evaluate healthy and degraded reads, quantify repair traffic, and distinguish cold immutable objects from mutable metadata.

One more constraint

With a 6+3 MDS code, is a single surviving fragment enough to reconstruct a lost object because three parity fragments exist?

Quick revision

Three replicas use roughly 3x space and can tolerate two missing copies if placed in independent failure domains. Reed-Solomon 6+3 stores six data plus three parity fragments for 1.5x raw overhead and can reconstruct from any six valid fragments. On 12 PB logical data, that is approximately 36 PB versus 18 PB before extra overhead. But encoding, repair fanout, correlated placement, small writes, and degraded-read latency determine real safety. I'd pilot coding for large immutable objects and keep low-latency mutable metadata replicated where justified.

References