Replies: 2 comments 19 replies
-
Effectively, what you are asking for is back-pressure, ideally on newly opened streams all the way to the other the peer. See #3078. There are a lot of moving parts here but I'll try to summarize:
|
Beta Was this translation helpful? Give feedback.
19 replies
-
Sorry for only commenting here now. Difficult topic. Thanks for the elaborate discussion. A couple of thoughts. I will discuss this more synchronously with @thomaseizinger tomorrow.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a challenge with provider announcements in Kademlia. When requests come in, we basically have to process them right away, there doesn't seem to be any way to tell library that request needs more time to be processed.
Specifically, we need to manage enormous number of announcements and we use disk-based storage, which means no guarantee on how much time it takes to write to disk, so we need to do that in a separate thread. Moreover, we do other time consuming things in addition to that. What this means is that when we get a storm of announcements there is no way for us to tell announcer to wait a little while we're processing previous announcements.
As the result we have a bounded queue that fills up quickly and after that we just ignore majority of announcements simply to avoid running out of memory, which is not ideal because we can't discover the content later due to announcements not being stored.
#3035 is kind of sort of related. While it talks about errors, it was already mentioned by @mxinden that we would likely also want to make those async. I'm wondering if the issue described here is covered by the same task or more tickets need to be created.
This is the next major issue for Subspace and I'm willing to dedicate time implementing/fixing it given some guidance on how to approach it.
Beta Was this translation helpful? Give feedback.
All reactions