Skip to content

Draft: Implement a retry-after-delay mechanism for FallbackDirs

Nick Mathewson requested to merge nickm/arti:fallback_status into main

Similar to the behavior of guards, we now penalize FallbackDirs when they give us invalid information, and don't try them again for a while.

This approach still needs fine-tuning, and parts of the code are a bit unsightly. It marginally improves our behavior under some circumstances for #329 (closed), though, and enables further efficiency improvements.


edited to add:

I can confirm that this resolves #406 (closed). Previous behavior was:

TCP stats: TcpCount { n_connect_attempt: 2140, n_connect_ok: 2140, n_accept: 0, n_bytes_send: 2446020, n_bytes_recv: 7411362 }
Total events: Trace: 25698, Debug: 3680, Info: 4206, Warn: 26, Error: 0

With this branch:

TCP stats: TcpCount { n_connect_attempt: 10, n_connect_ok: 10, n_accept: 0, n_bytes_send: 11430, n_bytes_recv: 34754 }
Total events: Trace: 128, Debug: 38, Info: 33, Warn: 1, Error: 0

So: Closes #406 (closed).

Edited by Nick Mathewson

Merge request reports

Loading