Search code examples
azuresignalrazure-redis-cachesignalr-backplane

Scaling Out Signal R with Azure Redis cache service


I want to make use of the Azure Redis cache for scaling out Signal R. But I have few doubts regarding the scale out.

There is a possibility that 100's of clients might be connected with signal r hub at a given instance.

When we see the Azure Redis cache pricing

enter image description here

It says max connections 256, 1000 etc. Does these indicate the max number of clients that can be connected to the Signal R Hub using this Redis service as its back-plane ?

Or does it mean that at a given point of time there can be 256, 1000 etc. connections that can exchange data with the Redis service? Can some one elaborate on this.

Are the connections stated on the Redis service and the connections made with the Signal R hub inter-related ?


Solution

  • A SignalR Hub runs on your server, your clients run on the client machines and connect to the SignalR Hub running on the server. The clients most certainly do not connect to Redis directly; they connect to the SignalR Hub. The number of connections in your case is the number of server-side SignalR Hubs connecting to Redis (plus any process that's writing in Redis).

    In short as an example: two application instances with 200 client connections both, who both have their own SignalR Hubs connecting to Redis would mean 2 connections to Redis.