Repository navigation
fix(ping): confirm a host is down before turning its dot red - #646
Merged
Merged
Conversation
A single failed TCP probe flipped the reachability dot to red and kept it there until the next idle probe, 60-75 s later. Healthy hosts failed one probe routinely: right after waking from sleep every target is probed at once before the network and DNS are back, and on Windows a single lost SYN is only retransmitted after 3 s, past the 1.5 s probe budget. A failed probe now keeps the current status and retries after 7.5 s; the host turns red only once failures span 15 s. Retries stay under ufw limit's 6 connections per 30 s. One success turns it green immediately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The reachability dot sometimes turns red on healthy hosts and goes back to green a minute later. A single failed TCP probe set the status to
down, and it stayed that way until the next idle probe, 60–75 s later.Healthy hosts fail one probe regularly:
setIntervalfreezes during sleep, so on resume every target is overdue and probed at the same moment, often before the network and DNS are back.Reported on Windows, after sleep, with hosts declared by name.
Fix
DOWN_RETRY_MS).DOWN_CONFIRM_MS), which is about 3 failed probes. After that, probing returns to the normal interval.ufw limit(6 new connections per 30 s).Trade-off
A host that is really down turns red about 15 s later than before.
Testing
confirmDownunit tests insrc/services/ping/schedule.test.ts. The ping suite passes (37/37) andtsc --noEmitis clean.