diff options
author | David Goulet <dgoulet@torproject.org> | 2021-12-13 10:22:29 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-12-13 10:47:46 -0500 |
commit | cda7acb35d40c505dc4d2c3b55d611faab189477 (patch) | |
tree | d7abd9ddbb3fc2ab8fc418dd6a20a6eda4f54cc3 /src/feature/stats | |
parent | a78dafbf7ce5d6fc6d4b6e7ddc7e0714bd377c2e (diff) | |
download | tor-cda7acb35d40c505dc4d2c3b55d611faab189477.tar.gz tor-cda7acb35d40c505dc4d2c3b55d611faab189477.zip |
relay: Don't make DNS timeout trigger an overload
Tor has configure libevent to attempt up to 3 times a DNS query for a
maximum of 5 seconds each. Once that 5 seconds has elapsed, it consider
the query "Timed Out" but tor only gets a timeout if all 3 attempts have
failed.
For example, using Unbound, it has a much higher threshold of timeout.
It is well defined in
https://www.nlnetlabs.nl/documentation/unbound/info-timeout/ and has
some complexity to it. But the gist is that if it times out, it will be
much more than 5 seconds.
And so the Tor DNS timeouts are more of a "UX issue" rather than a
"network issue". For this reason, we are removing this metric from the
overload general signal.
See https://gitlab.torproject.org/tpo/network-health/team/-/issues/139
for more information.
Fixes #40527
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats')
-rw-r--r-- | src/feature/stats/rephist.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c index c3a281a8c2..2bfa14d326 100644 --- a/src/feature/stats/rephist.c +++ b/src/feature/stats/rephist.c @@ -283,18 +283,6 @@ overload_general_dns_assessment(void) return; } - /* Lets see if we can signal a general overload. */ - double fraction = (double) overload_dns_stats.stats_n_error_timeout / - (double) overload_dns_stats.stats_n_request; - if (fraction >= overload_dns_timeout_fraction) { - log_notice(LD_HIST, "General overload -> DNS timeouts (%" PRIu64 ") " - "fraction %.4f%% is above threshold of %.4f%%", - overload_dns_stats.stats_n_error_timeout, - fraction * 100.0, - overload_dns_timeout_fraction * 100.0); - rep_hist_note_overload(OVERLOAD_GENERAL); - } - reset: /* Reset counters for the next period. */ overload_dns_stats.stats_n_error_timeout = 0; |