Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconcile Conn manager's hi/lo watermarks and the resource manager's limits #1640

Open
MarcoPolo opened this issue Jul 5, 2022 · 1 comment
Labels
exp/wizard Extensive knowledge (implications, ramifications) required

Comments

@MarcoPolo
Copy link
Collaborator

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.

@MarcoPolo MarcoPolo added help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful labels Jul 6, 2022
@MarcoPolo MarcoPolo added exp/wizard Extensive knowledge (implications, ramifications) required and removed exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue labels Jun 19, 2023
@MarcoPolo
Copy link
Collaborator Author

Removing help wanted here because this is kind of hard, and because it would be very bad if this went wrong because nodes would not be able to connect to the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/wizard Extensive knowledge (implications, ramifications) required
Projects
None yet
Development

No branches or pull requests

1 participant