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

Close short-lived connections first #1509

Closed
achingbrain opened this issue Dec 4, 2022 · 0 comments · Fixed by #1517
Closed

Close short-lived connections first #1509

achingbrain opened this issue Dec 4, 2022 · 0 comments · Fixed by #1517
Labels
exp/intermediate Prior experience is likely helpful good first issue Good issue for new contributors help wanted Seeking public contribution on this issue

Comments

@achingbrain
Copy link
Member

When breaching connection limits or the max allowable event loop delay the connection manager can close some connections. It chooses the connections to close by sorting them by the sum of all tags for the remote peers. It should also sort by connection lifespan (e.g. the connection.timeline.open property) to favour long-lived connections.

@achingbrain achingbrain added the need/triage Needs initial labeling and prioritization label Dec 4, 2022
@achingbrain achingbrain added help wanted Seeking public contribution on this issue good first issue Good issue for new contributors exp/intermediate Prior experience is likely helpful and removed need/triage Needs initial labeling and prioritization labels Dec 6, 2022
maschad added a commit to maschad/js-libp2p that referenced this issue Dec 13, 2022
maschad added a commit to maschad/js-libp2p that referenced this issue Dec 16, 2022
achingbrain pushed a commit that referenced this issue Jan 4, 2023
…1517)

When choosing connections to close, choose shorter lived connections over longer lived ones.

Closes #1509
ckousik pushed a commit to ckousik/js-libp2p that referenced this issue Jan 24, 2023
…ibp2p#1517)

When choosing connections to close, choose shorter lived connections over longer lived ones.

Closes libp2p#1509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful good first issue Good issue for new contributors help wanted Seeking public contribution on this issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant