Quick revision
The short answer
Per-target health checks tuned for hard failures flap under packet loss, so we add a zone-level decision: when many targets in one zone degrade together, shift traffic away from the whole zone with a zonal shift, automatically or with one operator action. We add hysteresis so a zone must stay healthy much longer before it returns than it took to remove it, combine passive signals from real traffic with active probes, size the other two zones to absorb the load, and rehearse evacuations in game days.
What to remember
In this answer, we saw that per-target checks flap under packet loss because most probes still pass, while users suffer timeouts. The design adds a zone-level decision that compares zones and shifts traffic away from a clearly worse one, hysteresis so a zone returns slowly and gradually, enough headroom that two zones carry all the load, passive signals from real traffic alongside probes, and regular game days so evacuation is a practised action.
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.
Per-target health checks tuned for hard failures flap under packet loss, so we add a zone-level decision: when many targets in one zone degrade together, shift traffic away from the whole zone with a zonal shift, automatically or with one operator action. We add hysteresis so a zone must stay healthy much longer before it returns than it took to remove it, combine passive signals from real traffic with active probes, size the other two zones to absorb the load, and rehearse evacuations in game days.
Why this question is asked
Zones, separate data centres inside one cloud region, exist so that one can fail without taking the service down. But they rarely fail cleanly. Packet loss, a bad switch or a degraded network link makes a zone half work, and health checks designed for dead machines behave badly. Interviewers ask this to see whether we can design for partial failure. In this answer, we will see why the checks flapped, add a zone-level decision, add hysteresis, check capacity, combine signals, and finish with how we rehearse it.
1Why the Health Checks Flapped
Per-target health checks assume a target is either working or broken. With 20 percent packet loss, most probes still succeed, because a lost packet is retransmitted and the probe usually completes within its timeout. A few probes fail. With a threshold of 3 failures to remove and 2 successes to restore, a target is removed after an unlucky streak, then comes back after two lucky probes, then is removed again. That is flapping: targets cycle in and out every minute.
Meanwhile, real user requests suffer more than probes do. A request that needs ten round trips across a lossy link, or a large response that needs many packets, is very likely to hit a retransmission, and TCP retransmission timeouts start at about 200 milliseconds to 1 second and double. So users see intermittent timeouts, and the flapping keeps sending them to the bad zone half the time.
2Add a Zone-Level Decision
The key observation is that the failure is correlated. It is not one bad host; every host in zone B is affected at the same time. Per-target logic cannot see that, but a zone-level controller can. It aggregates signals per zone, and when the share of failing checks, the error rate or the timeout rate in one zone rises together while the other zones stay normal, it moves traffic away from the whole zone. AWS calls this a zonal shift, and its autoshift feature does it automatically; other platforms have similar controls, or we can build it with weights at our own proxies or DNS.
The decision should be made by comparing zones, not by absolute thresholds alone. If all three zones degrade together, the problem is probably downstream, and moving traffic will not help. If one zone stands out clearly, evacuate it.
- Aggregate per zone every 30 sprobe failures, 5xx, timeouts, retries
- One zone much worse than the others?YesCheck capacityNoPer-target checks only
- Other zones have headroom?YesShift traffic away from the zoneNoPage a human, shed low priority
- Zone held outwatch it while it receives no users
- Healthy for 15 min in a row?YesReturn 10 percent, then moreNoKeep it out
5 steps in order. Play them, or step through them one at a time.
A zone leaves quickly and returns slowly.
Notice the second decision. Evacuating a zone is safe only if the other two can carry the load, so the controller checks capacity before it acts, and a human can always trigger or cancel the shift with one action.
3Add Hysteresis So Recovery Is Not Premature
Hysteresis means using a different, stricter rule for coming back than for going away. A zone is removed after, say, 2 minutes of clear degradation, but it returns only after 15 minutes of clean signals, and then gradually: 10 percent of its normal share, then 50, then all of it, each step watched. The same idea applies to single targets: a longer healthy streak than unhealthy streak.
The reason is that a partly failed network often looks fine for a few minutes and then degrades again. Bringing the zone back on the first good minute just recreates the flapping at a bigger scale. Waiting costs little, because the other zones are carrying the load anyway.
4Make Sure the Remaining Zones Can Carry the Load
Evacuating a zone only helps if two zones can serve all the traffic. With three zones each carrying a third of the load, the arithmetic is simple. If each zone runs at 60 percent of its capacity, losing one leaves 180 percent of one zone's capacity worth of work to spread over two, which is 90 percent each. At 70 percent, it becomes 105 percent each, which means overload and a second outage.
| Normal use per zone | After evacuating one zone | Result |
|---|---|---|
| 50 percent | 75 percent | comfortable |
| 60 percent | 90 percent | tight but works |
| 65 percent | about 98 percent | on the edge |
| 70 percent | 105 percent | overload |
So each zone should normally run below about 60 to 65 percent, or autoscaling must add capacity faster than the shift happens. Also count the shared limits that a shift touches: database connection pools, per-zone quotas, and the NAT and load balancer capacity in the surviving zones.
5Combine Passive and Active Signals, and Rehearse
Active probes are a weak signal here because, as we saw, most of them pass. Real traffic gives a stronger one: timeouts per zone, retries per zone, TCP retransmission rates and latency percentiles. A zone whose p99 latency jumps from 200 milliseconds to 2 seconds while the others stay flat is clearly sick, even if its probes mostly pass. The controller should require agreement from at least two independent signals, for example probes and real-traffic timeouts, so that one noisy metric does not evacuate a zone.
Finally, an evacuation that has never been done is a guess. Run game days where we shift a zone away on purpose during normal traffic, measure how long the shift takes, check that capacity holds and that nothing in the zone was secretly required, such as a single cache node or a leader. Teams that rehearse this can evacuate in minutes; teams that do not discover the hidden dependencies during the real incident.
6Follow-up questions
Who should be allowed to trigger a zone evacuation, and how quickly?
Automation should do it for clear, correlated signals within a few minutes, because humans are slower and the action is reversible. On top of that, any on-call engineer for the service should be able to trigger or cancel it with one command, without approval, because an evacuation with spare capacity is low risk and waiting is expensive. The thing that needs more care is evacuating when capacity is short, which may need a senior incident commander's decision about shedding traffic.
Why not just lower the unhealthy threshold to react faster?
Because under packet loss the problem is not slowness of detection, it is ambiguity. A lower threshold would remove targets faster and also bring them back faster, which makes the flapping worse. The fix is a better signal and asymmetric thresholds, not a more sensitive version of the same signal.
7Conclusion
In this answer, we saw that per-target checks flap under packet loss because most probes still pass, while users suffer timeouts. The design adds a zone-level decision that compares zones and shifts traffic away from a clearly worse one, hysteresis so a zone returns slowly and gradually, enough headroom that two zones carry all the load, passive signals from real traffic alongside probes, and regular game days so evacuation is a practised action.
Open with
The checks flapped because they were tuned for hard failures. With 20 percent packet loss most probes still pass, so targets drop out after an unlucky streak and come back after a lucky one, while real requests that need many packets keep timing out.
Then, if they want more
I would add a decision at the zone level. A controller aggregates probe failures, error rates, timeouts and retries per zone, and when one zone is clearly worse than the other two at the same time, it shifts traffic away from the whole zone, what AWS calls a zonal shift, either automatically or with one operator command.
If all zones degrade together, the problem is downstream and moving traffic does not help. Then I add hysteresis: remove a zone after a couple of minutes of degradation, but return it only after about 15 minutes of clean signals, and gradually, 10 percent then 50 then all.
None of this works without capacity, so each zone normally runs below about 60 to 65 percent, which means two zones can absorb the third at around 90 percent.
I would require agreement from at least two independent signals before acting, and rehearse zone evacuations in game days so we know how long they take and find hidden zonal dependencies before an incident does.
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 "Design health checking and failover so a partially failing zone is removed quickly and...": https://scrivio-interview-library.netlify.app/architecture/load-balancing-networking/c39c52e072/