Make peer evictions less aggressive (#14619)
* Make peer evictions less aggressive The original implementation of peer eviction prioritized aliveness over connection stability which made the peer count unstable for some users. As this may cause discomfort or infrastructure alerts if stability is tracked, adjust the eviction to be less aggressive by only evicting peers when the node has fully stalled. This causes the node to have some peers who are inactive and won't send any block announcements. These nodes are removed if the local node is able to receive at least one block announcement from one of its peers as the inactivity of the substream is detected when a notification is sent. If the node won't send or receive any block annoucements for 30 seconds, it's considered stalled and it will evict all peers, causing `ProtocolController` to accept and establish connections from new peers. * Update client/network/sync/src/engine.rs Co-authored-by: Dmitry Markin <[email protected]> * Track last send and received notification simultaneously --------- Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: parity-processbot <>
parent
9a4e66c8
Please register or sign in to comment