libp2p / libp2p/go-libp2p

rcmgr: Connections and Streams should also reserve memory

Open
#2,010 6 comments 2 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

What

Reserving a connection/stream should reserve a roughly accurate amount of memory.

Why

This lets connections/streams still be limited by the memory limits. This enables a use case where a user may only want to think in terms of FDs and memory. They can set connections/streams to unlimited and only limit FDs and memory.

Why in go-libp2p

... as opposed to folks wrapping the resource manager.

go-libp2p has the most context to give a good approximation for the resource cost of a connection for each transport. e.g. a QUIC connection won't consume a FD but a TCP connection will.

Kubo folks (especially @ajnavarro) brought this up as helpful simplification of the knobs in the resource manager.

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 reviewing go-libp2p's resource manager handling for connection and stream reservations, then examine how each transport accounts for resource costs. Done means reservations include a roughly accurate memory amount, with transport differences such as QUIC versus TCP considered, while memory and file-descriptor limits still work as intended.

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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.