xmpp - benetfits of ejabberd versus socket.io+redis -
i in developing of web service expecting scale massively soon. service build using clusters of socket.io communicating through redis layer.
what wondering if there benefits of switching on ejabberd? xmpp-server handle more concurrent users node.js+socket.io server?
socket.io hard scale xmpp current solutions (especially ejabberd).
even if decided scale socket.io using redis store of articles mentioning store concept of socket.io build on idea of syncing connection data between every connected node within cluster. doesn’t matter kind of store using in socket.io using concept it’s build in socket.io store interface, not stores using.
in order understand why syncing bad socket.io stores first need know synced. can find information in initstore function of socket.io manager. is:
- handshake data, handshake data includes request headers, query strings, ip address, information, urls , possible custom data you’ve added during authorization.
- ids of connections open, connected , closed.
- room names , each id has joined room.
all data synced through pub/sub every connected socket.io server. if have 2 node processes , both use socket.io stores both have data of connections in own process memory. not in redis might assume. might not issue if have 500 connected users, once approach 5.000> connections can add quickly.
check following articles might helpful:
Comments
Post a Comment