node.js - client not handshaken client should reconnect, socket.io in cluster -


my node.js app express, redis, mongo , socket.io works prefectly. today when introduced cluster, found works, there lot of messages app,

'client not handshaken' 'client should reconnect' 

many times response time socket.io bad, several seconds.

then used http-proxy front ending requests browsers. chrome works intermittently without throwing such messages. if open same url again, starts throwing these messages , response delayed. firefox behaves same way. randomly, starts throwing these messages continuously.. looks problem websocket in clustered environment.

my node.js version 0.6.10, socket.io 0.9.0, express 2.5.9, http-proxy 0.8.0

this because socket.io keeps connections in memory, each server have it's own set of clients. share socket.io on multiple server instances, using redisstore. same applies express sessions, have connect-redis option.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -