Skip to content

Number of open connections is configurable#170

Merged
Maelkum merged 2 commits into
mainfrom
configurable-connection-limit
Oct 10, 2024
Merged

Number of open connections is configurable#170
Maelkum merged 2 commits into
mainfrom
configurable-connection-limit

Conversation

@Maelkum
Copy link
Copy Markdown
Contributor

@Maelkum Maelkum commented Oct 1, 2024

By default, libp2p connection manager has low and high thresholds.

With the changes in this PR, we use the specified limit as the low threshold but allow up to 20% more connections. When we reach the upper bound (checked each 10 seconds), we trim open connections back to the specified value.

Also, we protect boot nodes against pruning, as those are typically higher priority connections like the head node.

Revamp of #162

Sidenote - updated some dependencies to resolve a security issue reported by dependabot.

@Maelkum Maelkum self-assigned this Oct 1, 2024
@Maelkum Maelkum merged commit ed70d0a into main Oct 10, 2024
@Maelkum Maelkum deleted the configurable-connection-limit branch October 10, 2024 10:22
@dmikey dmikey restored the configurable-connection-limit branch November 13, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants