Reconcile Conn manager's hi/lo watermarks and the resource manager's limits
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
Right now the connection manager has a notion of trimming excess connections when they pass the high watermark. The resource manager also blocks any connection once limits have been hit. If users aren't careful these two can conflict (e.g. the resource manager's limits are lower then the low water mark then the connection manager does nothing).
go-ipfs and lotus currently work around this by manually changing the resource manager config if they notice this conflict: https://github.com/filecoin-project/lotus/pull/8318/files#diff-35cf91183413be0bba4bf8770ad60d113f95b79d680e9a9b8bb3fe6e1d99668dR45
I think this should be flipped. The resource manager should be the source of truth for the number of max connections, and the connection manager's lo/hi watermarks should be based on those.
We should do the right thing by default here too in go-libp2p. And log an error if a user passes in conflicting values manually.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the connection manager's high/low watermark handling alongside the resource manager's connection limits. Confirm how conflicting values are currently handled, then define the default relationship and the error behavior for manually conflicting configurations; the issue is done when the resource manager is the source of truth and both cases are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100