You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Kubernetes cluster with two nodes, and each node has one pod running. Each pod hosts a Node.js server that manages socket clients, and I'm using a Redis adapter for socket communication. The communication works properly when a client on pod1 sends a message to a client on pod2. However, I'm facing an issue with socket messaging when emitting to a room.
For example, if I have 10 socket users—5 connected to pod1 and 5 connected to pod2—and pod1 creates a socket room, adding 2 clients from pod1 and 5 clients from pod2, only the 2 clients connected to pod1 receive the messages when an event is emitted to the room from pod1. The clients on pod2 do not receive any messages.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a Kubernetes cluster with two nodes, and each node has one pod running. Each pod hosts a Node.js server that manages socket clients, and I'm using a Redis adapter for socket communication. The communication works properly when a client on pod1 sends a message to a client on pod2. However, I'm facing an issue with socket messaging when emitting to a room.
For example, if I have 10 socket users—5 connected to pod1 and 5 connected to pod2—and pod1 creates a socket room, adding 2 clients from pod1 and 5 clients from pod2, only the 2 clients connected to pod1 receive the messages when an event is emitted to the room from pod1. The clients on pod2 do not receive any messages.
Technologies Used:
Socket.IO
Redis
@socket.io/redis-adapter
Kubernetes
Docker
Node.js
Beta Was this translation helpful? Give feedback.
All reactions