perf(companion): 5s discovery timeout — fresh-join route lookups fail fast — 0.5.14
Demo images / Build & push demo images (push) Successful in 2m54s
Demo images / Build & push demo images (push) Successful in 2m54s
First lookups fire before the phone's tree position settles and are doomed; at 10s completion timeout each one cost 10s before the 1s retry could fire (observed 19s to a route on a fresh 5G join, session 3ms after the route — discovery convergence was the whole cost). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,11 @@ pub fn build_config(secret: &str, peers: Vec<PeerConfig>, listen_port: u16) -> C
|
||||
cfg.node.discovery.backoff_max_secs = 30;
|
||||
cfg.node.discovery.retry_interval_secs = 2;
|
||||
cfg.node.discovery.max_attempts = 3;
|
||||
// Lookups launched before the tree position settles are doomed; a 10s
|
||||
// completion timeout made each one cost 10s before the 1s retry could
|
||||
// fire (observed: 19s to a route on a fresh join). Fail fast instead —
|
||||
// the resend-within-window above still gives each attempt two shots.
|
||||
cfg.node.discovery.timeout_secs = 5;
|
||||
cfg.peers = peers;
|
||||
cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user