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.
With DNS, since it's possible use UDP traffic, depending on the relative network location of the server under test, sometimes packets are dropped and the probe ends up timing out. It becomes hard to distinguish between this and an actual failure in the server.
Introduce an optional retry mechanism where requests are retried for a limited number of times. Each request gets its own timeout that still respects the timeout configured for the probe.
For example, if you configure 3 retries, each of them with a 3 second timeout, and the timeout for the probe is 5 seconds, the first attempt might consume 3 seconds, leaving 2 seconds until the deadline. The second request will still use a timeout of 3 seconds, but the probe itself will timeout and it will fail as usual.
Add a new metric that reports the number of attempts. Note that the probe_duration_seconds metric will now report the total time until an answer was obtained. In the above example, if the second attempt produces a response within 1 second, the reported duration will be ~ 4 seconds. The rtt will be ~ 1 second. Both these metrics allow the user to differentiate and track requests that require continous retries, indicating some kind of issue with the server or the network path.