Questions tagged [socket.io-redis]

Adapter to enable broadcasting of events to multiple separate socket.io server nodes.

By running socket.io with the socket.io-redis adapter you can run multiple socket.io instances in different processes or servers that can all broadcast and emit events to and from each other.

If you need to emit events to socket.io instances from a non-socket.io process, you should use socket.io-emitter.

See also

Installing:

$ npm install socket.io
112 questions
3
votes
0 answers

Attaching a Shared Object To Socket.io Room

I'm creating a multiplayer game that can have many game rooms and I want to associate a game object (or game state) per room; I am using NodeJS, Socket.io, socket.io-redis (not sure if this one is even needed). Just to be more clear, I am using…
3
votes
0 answers

Redis pub/sub scalling, Socket.io on Node Js

I have developed multiplayer turn-based application on Node Js using socket.io and redis pub/sub. Brief regarding my implementation are as follows: Multiplayer turn-based game scaled over ALB using socket.io-redis adapter for redis pub-sub. My…
Yadav Chetan
  • 1,874
  • 2
  • 23
  • 43
3
votes
1 answer

'laravel-echo-server' is not recognized as an internal or external command, operable program or batch file

laravel-echo-server init When i want to run this command in my project directory. Project directory is D:\xampp\htdocs\app> when i run this, it show that laravel-echo-server is not recognized as internal or external command operable program or…
3
votes
2 answers

Socket.io - using multiple nodes

So I was looking into running socket.io across multiple processes. The guide here: https://socket.io/docs/using-multiple-nodes/ left me with some questions. It mentions using configuring nginx to load balance between socket.io processes, but it also…
J Del
  • 831
  • 2
  • 15
  • 31
3
votes
1 answer

How to send private message (emit) from socket.io-redis

I am developing a real time application using Node.js, Socket,io, Redis. I try to send a private message to one client from worker, but it does not work. Array io.sockets.connected on worker is empty and i can't refer to the client. Code on…
3
votes
1 answer

NodeJS Socket.io Server<-->Server communication

I'm trying to establish server to server communication in NodeJS (cluster architecture, separate VMs) with socket.io. I try to use what is posted here http://socket.io/docs/using-multiple-nodes/ var io = require('socket.io')(3000); var redis =…
adaniluk
  • 321
  • 1
  • 5
  • 18
3
votes
0 answers

Socket.io with VVV - Messages not being received on client

I'm running VVV (Vagrant) with socket-io-redis. This seems to be working, the messages are sending to Redis. I test with SUBSCRIBE socket.io#/# which is logging a bunch of messages for testing. This is an example of the response I'm seeing in…
Elliott
  • 3,812
  • 24
  • 69
  • 93
3
votes
1 answer

socket.io-redis getting trailing bytes error in redis 3.0.6

I'm using phpredis to send data to node.js via pubsub method. After upgrading node.js to the stable version 4.2, I'm getting trailing byte error from socket.io-redis module. node.js var pub = redis.createClient(2222, '127.0.0.1',{no_ready_check:…
RedGiant
  • 4,444
  • 11
  • 59
  • 146
3
votes
2 answers

How do I send message to another socket.io server using socket.io-redis?

I need to have two different socket.io servers communicate with each other. I cannot use socket.io-client since it does not differentiate between browser to server connections and server to server connections. So I am trying to use…
Cyril
  • 167
  • 1
  • 4
  • 11
3
votes
1 answer

nodejs cluster - socket.io-emitter send data to specific client

I am building nodejs - socket.io application with nodejs cluster. socket.io-redis var ioredis = require('socket.io-redis'); io.adapter(ioredis({ host: config.redisIp, port: config.redisPort })); socket.io-emitter var io =…
2
votes
0 answers

socket.io-redis adapter timeout reached while waiting for clients response error

In my project, I'm using (socket.io - 2.3.0) & (socket.io-redis - 5.2.0) for data broadcasting between servers. In that scenario, I'm having the redis timeout issue from time to time, and I'm not sure why. In my server I just run a single node…
Annamalai
  • 109
  • 2
  • 12
2
votes
0 answers

Unable to catch ECONNRESET error and it is causing app to crash

I need help with socket.io-redis-adapter as their document on Client Error Handling seems to be gone. I do not know how this error with Redis occur, has it got to do with Redis pub/sub? My redis server is in working error through out. I've…
Someone Special
  • 12,479
  • 7
  • 45
  • 76
2
votes
2 answers

socket.io with socket.io-redis: get all socket object in a room

I want to retrieve server side all socket connected in a room. I have found the method clients that if chained after the method in return all the sockets connected in a room: import * as express from 'express'; import * as SocketIO from…
ar099968
  • 6,963
  • 12
  • 64
  • 127
2
votes
0 answers

Using socket.io with redis as a cluster

I am trying to implement a cluster for my socket.io app using redis due to the fact i would like to take advantage of all cores in the server and not only one but also be able to scale out with more servers in the future if necessary. If i have…
sparkey
  • 367
  • 1
  • 3
  • 9
2
votes
1 answer

Laravel Echo won't catch events with socket.io

I using Redis with Socket.io to setup real time updates but Laravel Echo isn't catching events. If I use an instance of io() it works just fine. Here is my code in my vue app to listen for events: Will NOT catch events window.Echo.channel('users') …
abetwothree
  • 575
  • 2
  • 8
  • 28