is it a good idea to have a separate channel for each user? #1042
-
I am working on a project where, I want to send a message to user based on some analytical events processing. so I wanted to know, is websocket the correct way to handle this? we only want to push data from server to client, and we will have APIs for ingesting the events data. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Yes it's the ideal case. The pub/sub feature is very lightweight. But if you plan to send huge messages, that would be (more of) a problem. Small messages like, a text message or some notification or anything less than 1 KB is ideal use. Anything above 16 KB is probably going to jam up the server unless you scale it very well. For 1 KB any shitty consumer grade computer can handle a million connections. |
Beta Was this translation helpful? Give feedback.
Yes it's the ideal case. The pub/sub feature is very lightweight. But if you plan to send huge messages, that would be (more of) a problem. Small messages like, a text message or some notification or anything less than 1 KB is ideal use. Anything above 16 KB is probably going to jam up the server unless you scale it very well.
For 1 KB any shitty consumer grade computer can handle a million connections.