libp2p / libp2p/go-libp2p

Multiple connection pruning

Open
#634 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
6.9k
Forks
1.3k
Avg merge
13d 21h
Merged PRs (30d)
1

Description

We have observed in the relay infrastructure that some peers open multiple connections to the relay, many of them simultaneously.
This creates a problem as we have lingering sockets that simply take away resources and can potentially linger for a long time.

We currently don't have any logic to deduplicate multiple connections: we just keep them all open and use an arbitrary one (usually the first one).
We need a component that selects a single connection and prunes the duplicate connections.
The component can live in the swarm itself, be part of the connection manager, or be a separate independent component.

cc @raulk @Stebalien

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the relay connection handling and the swarm or connection-manager boundaries mentioned in the issue. Determine how one connection should be selected and duplicate sockets pruned; done means duplicate peer connections no longer remain open while one usable connection is retained.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.