Quick revision
The short answer
This is a gray or fail-slow failure: the node answers small health checks quickly but serves real requests slowly, because a single tiny probe rarely hits the retransmission path. With a fan-out to all 40 nodes and a wait for every answer, every query includes the bad node, so the fleet's latency follows that one node's tail. We detect it by comparing each node with its peers as seen by callers, plus TCP retransmit and network card error counters, and we contain it with outlier ejection, hedged requests and partial results, while capping how many nodes can be ejected at once.
What to remember
In this answer, we saw that a NIC dropping 3 percent of packets creates a gray failure: small health checks pass while large real responses wait for TCP retransmission. Because every query fans out to all 40 nodes and waits for all of them, one slow node sets the latency of every query. We detect it by comparing per-node, caller-side latency against peers and checking retransmit and NIC error counters, contain it with outlier ejection, hedged requests and partial results, and cap ejection so a fleet-wide problem cannot remove every node.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
This is a gray or fail-slow failure: the node answers small health checks quickly but serves real requests slowly, because a single tiny probe rarely hits the retransmission path. With a fan-out to all 40 nodes and a wait for every answer, every query includes the bad node, so the fleet's latency follows that one node's tail. We detect it by comparing each node with its peers as seen by callers, plus TCP retransmit and network card error counters, and we contain it with outlier ejection, hedged requests and partial results, while capping how many nodes can be ejected at once.
Why this question is asked
Most monitoring is built for clean failures: a node is up or down, and a health check tells us which. Real fleets fail in grey: a disk that is slow, a NIC that drops a few percent of packets, a noisy neighbour. Interviewers ask this scenario because it combines two lessons, why health checks lie about partial failures and why fan-out amplifies one bad node into a fleet-wide problem. In this answer, we will see why the health checks pass, do the arithmetic of fan-out, find the node by comparing peers, and contain it without creating a new outage.
1Why Health Checks Miss a Gray Failure
A health check usually sends one small request, such as GET /health, every 10 seconds and expects a 200 within a second. On the faulty node, 3 percent of packets are dropped. A health check is a handful of packets, so most checks get through unharmed, and when one does lose a packet, TCP retransmits after a few hundred milliseconds, still well inside the check's timeout. The check stays green.
Real search responses are different. A response may span dozens of packets, so the chance that at least one is lost is high; with 30 packets and a 3 percent loss rate, it is about 60 percent. Each loss waits for TCP retransmission, and on Linux the minimum retransmission timeout is 200 ms, more if several losses happen in a row. So the node is healthy by the check's definition and slow by the user's. That gap is what makes it a gray failure: different observers see different health.
2Why One Node Sets the Fleet's Latency
The search service sends every query to all 40 index nodes and waits for all of them. A query is therefore as slow as its slowest shard. If 39 nodes answer in 20 ms and the bad node takes 400 ms, the query takes 400 ms.
Because every query touches every node, every query includes the bad node. Its slow responses are no longer a rare tail event for 1 in 40 queries; they are present in most queries. That is why the fleet p99 jumped from 120 ms to 900 ms even though 39 of 40 nodes are perfectly fine. The same arithmetic warns us about large fan-outs in general: if each node independently has a 1 percent chance of a slow answer, a query to 40 nodes hits at least one slow answer about 33 percent of the time.
6 messages in order. Play them, or step through them one at a time.
3Detecting It by Comparing Peers
The best signal comes from the callers, not from the node. The front end already measures how long each index node takes to answer real queries. If we record per-node latency and error histograms from the caller's side, the faulty node stands out immediately: its p99 is 400 ms while all its peers are near 25 ms.
Comparing peers is more robust than fixed thresholds. A fixed rule such as 'p99 above 300 ms' fires falsely during a fleet-wide traffic spike and misses a node whose p99 has doubled to a still-acceptable value. Outlier detection asks a better question: is this node much worse than nodes doing the same work right now, for example more than three times the median of its peers' p99.
Then we confirm the cause from the host. TCP retransmit counters (from netstat -s or the node exporter's TCP metrics) and network card error and drop counters (ethtool -S) on the bad node will be far above the others, pointing to the hardware.
4Containing the Damage
Outlier ejection removes the misbehaving node from rotation automatically. Proxies such as Envoy support it directly: when a host's error rate or latency is far above its peers, it is ejected for a period and then retried. For a sharded index, ejection means sending that shard's queries to a replica of the same shard on another node.
Hedged requests handle the tail without waiting for detection. If a shard has not answered by about the p95 latency, say 40 ms, the front end sends the same request to another replica and uses whichever answer comes first. Because the hedge is only sent for the slowest 5 percent of shard calls, it adds only a few percent of load while cutting the tail sharply.
Partial results give us a deadline. If one shard misses a 150 ms budget, we return results from the other 39 with a flag, rather than making the user wait for the 40th. For search, slightly incomplete results are much better than slow ones.
- Send the query to all shards
- Shard answered by p95 (about 40 ms)?YesUse its answerNoSend a hedge to a replica
- Answer by the 150 ms deadline?YesMerge all resultsNoReturn partial results, flag the shard
- Node an outlier vs peers?YesEject it, within the ejection capNoKeep it in rotation
4 steps in order. Play them, or step through them one at a time.
5Guarding Against Ejecting Everything
Automatic ejection is powerful, and dangerous in a fleet-wide problem. If a bad deployment or a shared dependency makes every node slow, a naive ejector could remove node after node until nothing serves traffic. So we cap it: eject at most 10 to 20 percent of nodes at a time, and when more look bad, stop ejecting and alert a person, because the problem is probably not the nodes.
Envoy expresses this with a maximum ejection percentage, and we should set it consciously rather than leave a default. The same principle applies to any automatic remediation: it should fix individual outliers and refuse to act when everything looks wrong at once.
6Follow-up questions
How would you choose the hedging delay without doubling load?
Set it from measured latency, around the p95 of a single shard call, and recompute it continuously. Then by definition only about 5 percent of calls are hedged, so load rises by about 5 percent. Add a hedging budget, such as at most 10 percent extra requests, so a general slowdown does not turn hedges into a load spike, and cancel the slower request once one answers.
Could a deeper health check have caught this?
A check that sends a realistic query and measures latency would catch it more often, but checks still sample far less traffic than real users. Caller-side, per-node statistics on real requests remain the most reliable signal.
Why not just lower the TCP retransmission timeout?
It would shave some milliseconds but would not fix a NIC that drops 3 percent of packets, and it affects every connection on the host. The right fix is to remove the node, replace the card and contain such faults generically.
7Conclusion
In this answer, we saw that a NIC dropping 3 percent of packets creates a gray failure: small health checks pass while large real responses wait for TCP retransmission. Because every query fans out to all 40 nodes and waits for all of them, one slow node sets the latency of every query. We detect it by comparing per-node, caller-side latency against peers and checking retransmit and NIC error counters, contain it with outlier ejection, hedged requests and partial results, and cap ejection so a fleet-wide problem cannot remove every node.
Open with
This is a gray failure, also called fail-slow. The node is alive and answers its health check, because the check is a tiny request of a few packets that usually avoids the loss, and even when a packet is lost the retransmit fits inside the check's timeout.
Then, if they want more
Real responses are many packets, so most of them hit at least one loss and wait for TCP retransmission, 200 milliseconds or more. The reason one node ruins the fleet is fan-out: each query goes to all 40 nodes and waits for all of them, so every query includes the bad node and its latency becomes the query's latency.
Even with independent problems, a one percent slow chance per node turns into about a third of queries being slow at a fan-out of 40. To detect it, I'd look at per-node latency and errors measured from the callers and use outlier detection against peers rather than fixed thresholds, then confirm with TCP retransmit counters and NIC error stats.
To contain it, I'd use outlier ejection in the client or proxy, hedged requests to a replica after about the p95 time, and partial results when a shard misses its deadline. And I'd cap ejection to a small share of nodes, so if everything looks slow, we alert a human instead of ejecting the whole fleet.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Why do health checks miss this kind of failure, why does one degraded node set the...": https://scrivio-interview-library.netlify.app/architecture/distributed-systems/fbb3826fb4/