What is the current way of deciding which peers to disconnect when we hit the connection manager high watermark in go-libp2p
?
The way it works in go-libp2p connection manager v1 is as follows. We expect this to be obsolete with v2.
- we get all active connections.
- we discard those within their grace period.
- we stack rank them based on their tags (cumulative sum of all tag values).
- we prune as many as needed until the connection count equals “low watermark”.
I might be missing something; please shout if that’s the case!
Can you elaborate a bit about tags and tag values? How do the tags get applied in the first place?