0

I have HAProxy which serve multiple servers with nodejs on expressjs. I have added to that express socket.io and to make them work i tried to connect them with socket.io-redis and socket.io-ioredis. All looks to be connected without any error but when an user get his socket connected with different server from other user, their emits don't read don't send to other servers. Nodejs setup

var app = express();
var server = require('http').Server(app);
var io = require('socket.io').listen(server);
var redis = require('socket.io-ioredis');
io.adapter(redis({ host: 'serverIP', port: 6565 }));
server.listen(6565);

How do i do the emit: io.to(roomID).emit(event, object);

Honchar Denys
  • 1,408
  • 4
  • 29
  • 54

1 Answers1

0

The actual problem was that port on which redis was connecting in server was blocked by the firewall.

Honchar Denys
  • 1,408
  • 4
  • 29
  • 54