The Socket.io API has the ability to send messages to all clients.
With one server and all sockets in memory, I understand how that server one can send a message to all its clients, that's pretty obvious. But what about with multiple servers using Redis to store the sockets?
If I have client a connected to server y and client b connected to server z (and a Redis box for the store) and I do socket.broadcast.emit
on one server, the client on the other server will receive this message. How?
How do the clients that are actually connected to the other server get that message?
- Is one server telling the other server to send a message to its connected client?
- Is the server establishing its own connection to the client to send that message?