I initially reported this issue on ws repo, however there might be a possibility that it is a node issue after testing it on both the official windows Nodejs and Chakra builds. Somehow it seems that the issue can be reproduced more quickly on Linux/MacOS than on Windows.
Observations
- Slow clients (clients receiving data slower than server sends it) causes socket to increase their bufferSize
- This typically increases the RSS of the node process
- Upon disconnections of clients, we expect RSS to fall
- This is true for TCP test case but not for WS (Websockets)
- Slower RSS recovery for TCP test can be triggered by disconnecting most but not all of the connected clients
- Recovery of RSS can be sometimes triggered by connecting new clients and disconnecting them quickly
Reproduction Steps
I initially reported this issue on ws repo, however there might be a possibility that it is a node issue after testing it on both the official windows Nodejs and Chakra builds. Somehow it seems that the issue can be reproduced more quickly on Linux/MacOS than on Windows.
Observations
Reproduction Steps