waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
170 stars 42 forks source link

feat: connection manager should mark un-dialable peers #2188

Open weboko opened 1 month ago

weboko commented 1 month ago

Statement

Received from feedback: https://github.com/waku-org/support/issues/2

"Would be great if nodes can forget about peers they can't connect to."

Solution

Implement some marking for such peers and prevent them from being dialed for some time. We shouldn't block them forever as dialing can fail due to capacity of websocket connections nwaku can support (~300 now). Handle edge case when there are only un-dialable nodes present.

Additionally add telemetry to https://lab.waku.org/dogfooding to measure dial failures and root causes. Do additional dogfooding after that.