WebSocket Backplane
A shared publish/subscribe layer letting a message published on one server reach clients connected to a different server.
WebSocket connections are stateful and pinned to one server. A message that must reach a user connected to instance B cannot be delivered by instance A, so a horizontally-scaled realtime service needs a way across.
The backplane — typically Redis pub/sub, NATS, or a managed realtime service — carries messages between instances. Each server subscribes to the channels its connected clients care about and forwards matching messages down the socket.
Design points: the backplane becomes a critical dependency with its own availability requirements; fan-out cost grows with connections per channel, so a channel with a million subscribers needs different handling from one with ten; and presence (who is online) is genuinely hard because it is distributed state that must survive an instance dying without a clean disconnect.
The alternative worth considering first is a managed realtime service, which removes the whole category of work.