Express with "connect-redis" session store
And I tied it with Socket.IO through configuring “authorization”
So that I don’t have to actually use
To store and retrieve a client’s belonging variables.
But I’m not sure that If I broadcast a message to specific group of people, connected in different server, get message successfully.
So that it is truly scaled!
But It seems to be not truly scaled
but only use Redis as storing values individually.
Also I tried to use
which is given by Socket.IO
does not work.
It is saying
DEBUG: TypeError: Converting circular structure to JSON at Redis.stringify [as pack] (native) at Redis.publish (/var/www/node_modules/socket.io/lib/stores/redis.js:106:31) at Manager.handleClient (/var/www/node_modules/socket.io/lib/manager.js:646:18) at Manager.handleHTTPRequest (/var/www/node_modules/socket.io/lib/manager.js:595:8) at Manager.handleRequest (/var/www/node_modules/socket.io/lib/manager.js:557:12) at HTTPServer. (/var/www/node_modules/socket.io/lib/manager.js:112:10) at HTTPServer.emit (events.js:70:17) at HTTPParser.onIncoming (http.js:1507:12) at HTTPParser.onHeadersComplete (http.js:102:31) at Socket.ondata (http.js:1403:22)
How can I scale Socket.IO with broadcasting to all scaled clients available?
Edit:I followed the Express-Session-Socket.IO tutorial
and I have found that io.authorization actually makes problem but it is okay
. How is that?
Problem courtesy of: InspiredJW