Redis adapter

    Every packet that is sent to multiple clients (e.g. or socket.broadcast.emit()) is:

    • sent to all matching clients connected to the current server
    • published in a Redis channel, and received by the other Socket.IO servers of the cluster

    The source code of this adapter can be found here.

    Installation

    Or with :

    Options

    • Do I still need to enable sticky sessions when using the Redis adapter?

    Yes. Failing to do so will result in HTTP 400 responses (you are reaching a server that is not aware of the Socket.IO session).

    More information can be found .

    Emitter

    The Redis emitter allows sending packets to the connected clients from another Node.js process:

    Diagram of how the Redis emitter works

    This emitter is also available in several languages:

    Usage

    Caught a mistake? Edit this page on GitHub