libp2p / libp2p/go-libp2p

Connection Suspension

Open
#438 13 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, we keep a bunch of connections open because re-opening connections is expensive. However this costs us in terms of memory and background CPU usage.

It would be nice if we could "suspend" some connections. That is, close all streams and *act* like we're disconnected but leave the underlying connection open.

This will likely require an actual connection suspension protocol so both sides can agree that the connection should be "put on ice". Taking it *off* ice would be a simple matter of using it.

Note: this won't fix the issue of file descriptor use. For that, we'll still need a UDP based protocol like QUIC.

---

Note: Ideally, we'd keep fewer background streams open *anyways*. If we improved this situation, we may not need connection suspension. However, it's still useful to have a concept of connections that should only be used "if need be".

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

No files, tests, or entry points are identified. Start by tracing the existing connection and stream lifecycle, then determine the protocol and state changes needed; done means both sides can suspend a connection with streams closed and later resume using the underlying connection.

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.