Implementing a queue between Socket.io on Node.JS -
i've wrote chat using node.js , socket.io. chat simple: it's room 2 persons, employee , client.
now our volumetry growing , facing problemas message "disappearing" on network issues , implement queue between our company , our clients.
something like:
for each nodejs proccess on picture, have 6 vms behind load balance. know best approach work queues.
should create topic inside queue each room? e.g.: interaction between user c , d, it'll using messages/c:d; interaction between user , b, it'll using messages/a:b.
or it's better use single queue without topic, publish/subscribe messages inside messages , broadcast every subscriber? if subscriber has room, process message.
in first approach, i'm not sure how should work mq clients because initialize them once , let running. when imagine create cache store mqclient, each client responsible single topic, sounds strange in head - if have 10k rooms, i'll had 10k mqclients.
Comments
Post a Comment