libp2p / libp2p/go-libp2p-pubsub
Option to use variable length queue to avoid dropping message on burst
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 364
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
There is in this package a bunch of pressure release mechanisms to avoid breaking or using too much memory when things get clogged under load. The downside is that pubsub can drop some messages under load, even if the message did find its way across the network. This makes sense most of the time.
There is at least 3 spots where that can happen:
- validation queue (tunnable with
pubsub.WithValidateQueueSize) - outbound queue (tunnable with
pubsub.WithPeerOutboundQueueSize) - topic subscribe output queue (soon to be tunnable as well)
I believe some applications (like mine) would benefit from being able to tell pubsub to use as much memory as necessary and not drop messages in a heavy load scenario. Of course that mean that the application expose itself to being OOMed, but that can be easier to predict and handle than message semi-randomly disappearing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the validation queue, outbound queue, and topic subscribe output queue, including the WithValidateQueueSize and WithPeerOutboundQueueSize options. Define how an option for retaining messages under burst load should apply across these pressure points, and verify that the configured behavior no longer drops messages while documenting the memory tradeoff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100