libp2p / libp2p/go-libp2p

rcmgr: idea: warn mode

Open
#1,710 0 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

# Goals

Make upgrading to use the resource manager smoother by providing an intermediate mode where the resource manager is on, but doesn't fail connections / streams that go over resource limits and instead just generates a WARN log.

# Why

What I have seen with the resource manager is people turn it on, get frustrated by resource limits, then turn it off and run "pants down". Fundamentally, upgrading software that has been running without any limits for a while is not easy, as figuring out the right numbers for resource limits may take a lot of observation.

My suggestion is to make transitioning to use the resource manager a two step process:
1. Turn on the resource manager in "warn mode" -- in this mode, the resource manager is simply informational. It tracks resource usage, and when resources are expended, warns the program by generating WARN level log messages, but still allowing connections/streams to be initiated. This allow the program using the resource manger to do two things, all while knowing their program will continue to function as normal.
1. Tune resource limits until no warning messages appear
2. Identify problem resource usage when tuning demonstrates removing warning messages to require extremely high limits.
2. When sufficient tuning and bug fixing has occurred, switch the resource manager from "warn mode" to error mode, so connections fail and error level logs are generated. This allows the program to have guarantees about resource usage.

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 named. Start by locating the resource manager's limit enforcement and WARN/error logging paths, then trace how connection and stream initiation reacts to exhausted resources; done means a selectable warn mode tracks usage, logs warnings, and permits those operations without changing error mode.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.