Backpressure event to end client connection and Pubsub backpressure #414
-
Hi. First of all I was checking the issue with NPM for a long time. It was a major concern and after we investigated a bit we decided to go with you!. For our API Clients we would like to use your awesome lib. Major questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hello, If you have an idleTimeout of say 60 seconds, and some slow receiver causes ton of backpressure it will eventually be closed since sends will be skipped and then it will be marked as idle and closed. If you receive data from the slow receiver you can check backpressure and close right away. So you can make things work with current version - but I want to add an option to make it close the connection instead of skipping sending. That's something that could be added but you could solve the issue like mentioned above already. 3 is complex. I have posts about this. In a nutshell the idea is to do as much as possible in native code and only expose very abstract interfaces for the (script) developer so that internal algorithms can be tweaked for the better without putting that on the (script) developer. I have reports of real world production users that experience better performance with the pub/sub than doing it in script with send. uNetworking AB is a Swedish corporation so we can set up anything, it really depends on what you want. We can continue this over mail. I do have tons in my pipeline right now though. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. 1, 2 - Got it.. Agree that i have some workarounds to get the required behavior. I will send you mail and wait patiently for my turn. |
Beta Was this translation helpful? Give feedback.
-
That's not a good idea. Use send if you only expect one single connection per that one topic. Use pub/sub if you expect more than 100. Every topic has significant overhead and is poorly optimized for only holding 1 single connection. You can mix send and publish. |
Beta Was this translation helpful? Give feedback.
-
Sure. Thanks for your time. It helps a lot to understand the implementation on my side. |
Beta Was this translation helpful? Give feedback.
-
Thanks. LMK if you have any interesting results with the performance
…On Sat, Dec 19, 2020 at 10:17 PM hst-m ***@***.***> wrote:
I guess I will go back to doing Maps and Sets for ws groups of less than
100, see example #378 (comment)
<#378 (comment)>
I will try a performance test doing Publish with single ws per topic vs
ws.send and see what difference is
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#414 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKQXZVPEAQPZMWFQVHXQKZTSVUC5LANCNFSM4VAJLZZA>
.
|
Beta Was this translation helpful? Give feedback.
That's not a good idea. Use send if you only expect one single connection per that one topic. Use pub/sub if you expect more than 100. Every topic has significant overhead and is poorly optimized for only holding 1 single connection. You can mix send and publish.