waku-org / js-waku

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

feat: maintain max open connection & prune unhealthy connections from peer store #2168

Open danisharora099 opened 1 week ago

danisharora099 commented 1 week ago

Problem

Currently, js-waku nodes manage to maintain 15-30 connections at the same time when run against TWN, which raises concerns about bandwidth consumption. There is no cap on the number of connections, and without proper connection management, this could result in excessive resource usage, especially as the network grows. Additionally, the PeerStore could grow with unhealthy peers, complicating future dials when connections are needed

Key concerns:

Proposed Solutions

Notes

weboko commented 1 week ago

Subtask of https://github.com/waku-org/js-waku/issues/1969