socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

How to handle backpreassure?

Open matiaslopezd opened this issue 3 years ago • 2 comments

There is a lot of comments related about memory leaks, so I want to know how socketio allows to developers manage backpreassure.

I know using the volatile method allows to "fire and forget", but that not fix the problem when the socket is slow for receive the message.

matiaslopezd avatar Jul 29 '22 05:07 matiaslopezd

Hi! Managing backpressure can be done with client acknowledgements: the server sends a packet, and wait for the acknowledgement of the client before sending another packet.

This way, the client can control the number of incoming packets and not get overwhelmed.

darrachequesne avatar Jul 30 '22 00:07 darrachequesne