cluster
module to run workers per CPU core@socket.io/redis-adapter
(version 7+ compatible with Socket.IO 4.x). It binds two Redis clients (pub and sub) and sets up Pub/Sub channels so that broadcasts or room emissions propagate across nodes.
io.to('room1').emit(...)
:
createShardedAdapter()
to distribute channels across shards—useful in large-scale setups with many rooms, including private/direct messages.
@socket.io/redis-emitter
from a separate process (outside Socket.IO servers) to publish events directly to Redis, enabling loosely coupled services to push to clients.