Skip to main content

PROBE_TIMEOUT

Constant PROBE_TIMEOUT 

Source
pub const PROBE_TIMEOUT: Duration;
Expand description

Per-candidate probe timeout. Because candidates are probed concurrently, this also bounds the whole probe-collection phase. The budget covers connection setup plus one unpaid probe request/response. probe_once dials a fresh connection every call, and the protocol has no 0-RTT path, so even a resumable session pays a handshake round trip before the request goes out — every probe costs two RTTs, not one. At the 250-300 ms inter-continental RTTs this budget is sized against, that puts the furthest candidates at or past this ceiling. Dropping them is the intended trade (a slow candidate must not burn the caller’s miss-latency budget), but this is the first term to revisit if distant-region selection looks too sparse. Both the figure and the trade are ADR 001 § Probe response collection.

What is left of the budget after the exchange goes to probe_once’s wait for hole punching to select a direct path. A candidate whose answer arrives in time is kept even when that wait runs out: it ranks on its exchange RTT, which can be the relay detour, and that RTT still feeds the ADR 030 region-latency penalty.

Lives here, beside the deadline arithmetic that has to budget for it, rather than in node_origin where it is used (#1145 review). Every term of outer_pull_deadline is then visible in one file, which is what stops the next one from being guessed.