nim-libp2p/libp2p/protocols/pubsub
Jacek Sieka 17e00e642a
limit write queue length (#376)
To break a potential read/write deadlock, gossipsub uses an unbounded
queue for writes - when peers are too slow to process this queue, it may
end up growing without bounds causing high memory usage.

Here, we introduce a maximum write queue length after which the peer is
disconnected - the queue is generous enough that any "normal" usage
should be fine - writes that are `await`:ed are not affected, only
writes that are launched in an `asyncSpawn` task or similar.

* avoid unnecessary copy of message when there are no send observers
* release message memory earlier in gossipsub
* simplify pubsubpeer logging
2020-09-24 18:43:20 +02:00
..
rpc limit write queue length (#376) 2020-09-24 18:43:20 +02:00
floodsub.nim allow to omit peerId and seqno (#372) 2020-09-23 17:56:33 +02:00
gossipsub.nim limit write queue length (#376) 2020-09-24 18:43:20 +02:00
gossipsub10.nim allow to omit peerId and seqno (#372) 2020-09-23 17:56:33 +02:00
mcache.nim gossipsub / floodsub fixes (#348) 2020-09-04 08:10:32 +02:00
peertable.nim small cleanups & docs (#347) 2020-09-04 18:31:43 +02:00
pubsub.nim small fixes (#374) 2020-09-24 07:30:19 +02:00
pubsubpeer.nim limit write queue length (#376) 2020-09-24 18:43:20 +02:00
timedcache.nim fix poor performance in LRU cache (#360) 2020-09-09 18:28:46 +02:00