Pub/Sub Backplane with Redis
Connect multiple WebSocket server instances using a Redis pub/sub backplane so messages reach clients regardless of which node they connected to.
The Multi-Instance Problem
When you scale horizontally, clients connect to different server instances. A message published on node A will not reach a client connected to node B unless the nodes share it.
What a Backplane Does
A backplane is a shared channel every instance subscribes to. When one node receives a message, it publishes to the backplane, and all nodes deliver it to their local clients.
All lessons in this course
- Horizontal Scaling Strategies
- Load Balancing WebSockets
- Distributed State Management
- Pub/Sub Backplane with Redis