The interview question. A 12-node replicated key-value cluster loses one storage node. Automatic repair begins copying missing replicas onto surviving machines. Within minutes, read latency rises, nodes fail health checks, and the cluster starts another round of rebalancing. One failed server has become a fleet-wide outage.
Diagnose the feedback loop. Decide which recovery work to prioritize, how to bound it, and how to meet a one-hour repair requirement if the system cannot tolerate another replica loss. Distinguish restoring redundancy from optional load balancing.
Think first
A 12-node cluster loses one node with 6 TB of replica data. The other 11 nodes must restore required redundancy within one hour while still serving requests. Recovery streams make two additional nodes fail health checks. Draw the feedback loop, calculate a lower bound on data transfer rate, and propose a safe priority and admission policy.
Take a few minutes to form an approach, then compare it with the worked explanation.
Reveal the worked explanation
The repair process competes with the customers
Losing a node does two things at once. It removes serving capacity and reduces redundancy for some partitions. The remaining machines take a larger share of live traffic while also becoming sources and destinations for data repair.
A replica copy uses network bandwidth, source disk reads, target disk writes, checksums, and perhaps compaction. Those resources are shared with foreground requests. On a busy cluster, repair can cause more latency than the missing node.
After a node failure, repair traffic consumes capacity on remaining nodes, causing health-check failures and a repeated rebalancing cascade unless admission and recovery budgets control the loop
Then the feedback starts. Slower disks increase request latency. Request queues grow. Health checks time out and mark another server unavailable. Traffic concentrates on fewer survivors. The membership controller interprets this as more lost capacity and starts moving more data. Every sensible-looking local recovery action increases pressure on the cluster as a whole.
Google's SRE guidance describes this class of cascading overload and warns that recovery automation, health checks, and rebalancing reactions can amplify the failure instead of restoring service. Addressing cascading failures
Calculate the recovery work before choosing a throttle
Suppose each node stores 6 TB of replica data and losing one node requires restoring 6 TB elsewhere. This is an illustrative repair-size assumption, not a claim that all replication layouts produce exactly this amount.
To restore 6 TB in one hour, the system must transfer an average of about 1.67 GB per second of payload. That is roughly 13.3 Gbit per second of aggregate payload traffic, before protocol overhead, uneven placement, retries, additional reads, and disk amplification. The bottleneck may be one source link or destination disk, not total network capacity.
Now look at foreground headroom. Imagine the cluster was using the equivalent of 7.2 full node capacities before failure, or 60 percent of its 12-node fleet. If the workload is evenly redistributable, the remaining 11 nodes carry about 65 percent of their combined rated serving capacity before any repair cost. But averages hide hot partitions and unequal disks.
For the one-hour objective, measure how much repair work can fit into the residual per-resource capacity while preserving latency and useful throughput. “Copy at full network speed” is not a recovery policy.
Protect minimum redundancy before optimizing balance
I would separate two controller goals. Repair restores the required number and placement of durable replicas for affected partitions. Rebalancing tries to make ordinary load or storage utilization more even. During a real failure, those jobs should not automatically compete as equal priorities.
First prevent the failed node from repeatedly entering and leaving placement decisions during a short network flap. Use deliberate failure detection and a bounded stability interval where appropriate. Do not immediately destroy potentially recoverable copies merely because a heartbeat was missed. But do not wait indefinitely if the cluster has lost the only remaining safe replica for some data.
Next prioritize missing redundancy by risk. A partition with one surviving copy in a fragile failure domain deserves earlier attention than a partition that still meets its intended durable replica count but happens to be unevenly placed. Use admission or token budgets for per-node streaming bandwidth, disk IO, and concurrent transfers. Reserve serving headroom for foreground requests. Spread repair sources and destinations.
As load rises, reduce optional rebalancing first. Keep recovery controllers from issuing another wave of moves simply because a temporarily overloaded repair target misses a shallow health check. Distinguish failed storage from temporary repair-induced slowness without leaving clients waiting indefinitely.
An urgent one-hour deadline changes the decision
A fixed repair throttle that misses the deadline is not acceptable when another failure could cause permanent loss. The choice is not to disable throttling. Confirm the actual remaining failure tolerance, the likelihood and consequence of a second loss, and the capacity available for the required 6 TB transfer.
If the fleet cannot meet the target alongside every foreground SLO, shed low-priority analytics, bulk scans, and other deferrable work. Protect essential requests and tighten admission instead of allowing unbounded backlogs. Reserve recovery headroom to make the promise realistic.
Do not defer compaction or integrity checking blindly. Some storage engines need them to keep accepting writes or to validate repaired files. Set priorities from actual device pressure, replication health, and the nature of the affected dataset.
Google's guidance favors load tests that reach and pass the failure point, controlled rejection, and explicit degraded modes. It also warns that sudden load shifts can keep a recovering cluster in a crash loop after the original trigger is gone. Google SRE
Prove recovery, not merely quiet dashboards
The finish line is not “all nodes report green.” Verify that the intended replica count and failure-domain placement have been restored, repair checksums or state comparisons are complete, and client error rates, latency, and oldest pending repair age have returned to acceptable bounds. A cancelled repair job must be resumable without accepting stale or corrupt replicas as current.
Test node loss under realistic utilization. Record useful throughput, hottest disk, repair completion time, and whether the controller starts extra moves.
The key interview judgment is that repair traffic has a resource budget and a correctness deadline. The right controller protects both, instead of assuming that making every replacement as fast as possible is the safest response.
Go deeper
Go deeper: when a second failure is more dangerous than slow queries
Replica counts alone can mislead. Three replicas all placed in one availability zone do not survive that zone's loss. Repair scheduling should track the effective failure domains and the quorum or read/write requirements of each range. A placement that restores three copies on paper may still leave the same correlated failure risk.
Some systems can reconstruct data from erasure-coded fragments rather than replicas. Reconstruction can place heavy network and CPU load on many healthy nodes. The exact repair traffic model changes, but the resource-budget problem remains.
Distinguish temporary overload from genuine disk failure in health policy. Masking all slow disks will hide corruption and prolonged unavailability. Evicting every slow node while repair saturates the fleet creates a positive feedback loop. Use observed failure symptoms, moving averages, and human escalation thresholds where risk justifies them.
For the one-hour example, 6 TB is decimal. With binary TiB or when wire encoding adds overhead, redo the calculation using the correct units and measured transfer efficiency. Quoted link speed is not achievable application payload throughput when other traffic shares the network.
Check your reasoning
Identify serving-capacity loss and repair traffic competing for disk and network.
Show how latency and health-check-driven eviction create a positive feedback cycle.
Compute 6 TB / hour about 1.67 GB/s or 13.3 Gbit/s payload before overhead.
Prioritize missing durable replicas over optional balancing, with per-node repair budgets and explicit risk review.
Require tests under representative load and verify placement, integrity, and useful throughput after recovery.
Common mistake: Launching unbounded replica transfers because repairing faster is always safer, without checking the resource envelope or durability risk.
Read the answer explanation
Required redundancy repair versus optional balance redistribution. — Restoring durable replica coverage has a correctness deadline, while balancing can often be postponed to preserve serving capacity.
Apply it elsewhere
A regional object-storage service reconstructs lost erasure-coded fragments after an availability-zone loss. Where does the repair-cascade reasoning still apply?
Compare your approach
Identify shared network, disk, and CPU reconstruction costs, placement constraints, and the durability risk of delayed repair.
One more constraint
Repair throughput is adequate in aggregate, but one destination disk is saturated. How should scheduling change?
Quick revision
Node loss reduces serving capacity and creates replica-repair work. Sources read data, targets write it, and the network carries copies, often sharing the same resources needed by users. If repair overloads healthy nodes, health checks and automatic rebalancing can turn one failure into a cascade. Separate essential redundancy repair from optional balancing, prioritize by durability risk, bound streaming by per-node capacity, and shed nonessential foreground load when a hard recovery deadline demands it. Verify replica placement and data integrity, not just green node health.