redis-adapter socket.io CPU issue #4439
Unanswered
devashishg
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using "@socket.io/redis-adapter", I have got one namespaces created and it has multiple number of rooms, and every room there are 3-5 client connected.
Functioning wise It works well,
but with highly concurrent load environment, redis CPU goes very high.
from redis slow logs i have observed that for each requestId
"publish" "socket.io-request#/#" "{\"uid\":\"dGaEaaa\",\"requestId\":\"vsu1L\",\"type\":0,\"rooms\":[\"room1\"]}"
there are 44 response publish commands out of which 4-5 has valid socket Id,
"publish" "socket.io-response#/#" "{\"requestId\":\"vsu1L\",\"sockets\":['socketId']}"
but rest of them has no socketId.
"publish" "socket.io-response#/#" "{\"requestId\":\"vsu1L\",\"sockets\":[]}"
I did not understand much after reading through the documentations what could be the reason.
Socket server setup looks as follow,
Please let me know if someone has any idea what could be the reason here.
Beta Was this translation helpful? Give feedback.
All reactions