Skip to content

Document Guidance for Scaling out with Redis as a Backplane #5360

@jgaver

Description

@jgaver

I am currently exploring the proper way to deploy redis as the backplane for several asp.net core based SignalR applications. High Availability is a requirement, but it is unclear what is supported from the redis side.

Things I have tried:

  1. Use a Redis cluster, configure SignalR connection string to be aware of all nodes
    1.1. When monitoring pub/sub for each node, messages are spread around nodes within the cluster (it was asymmetric, that is, every 8th message would consistently go to one node while many more would go to another)
    1.1. When killing a node in the cluster using DEBUG SEGFAULT, traffic did seem to route to the remaining nodes
  2. Use Redis in a Master-Slave Configuration with 3 sentinels for HA
    2.1. When monitoring pub/sub for each node, messages seem to be sent to all nodes whether they are the master or a slave
    2.2. When killing a node with DEBUG SEGFAULT, some messages are missed but eventually things seem to stabilize after sentinel elects a new master
    2.3. When simulating bad responsiveness with DEBUG SLEEP 60, sentinel will elect a new master but the connected SignalR applications will just hang until the sleep period finishes

Because we are only interested in redis for pub/sub, a full-blown cluster seems like overkill so I'd prefer to go with a Master/Slave approach. The Asp.Net version of SignalR did not support clustering at all, but I cannot find documentation on whether the Core version does.

To sum up, what is the guidance to achieve High Availability while using redis as the backplane? Is Redis clustering supported? What are the pros-cons of clustering vs. Master-Slave with Sentinel for high availability?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions