Setting up Redis Backplane

By the end of this chapter, we'll have learned how to use Redis to build a distributed SignalR Hub that can support as many client connections as needed.

First, let's look at how we can set up Redis backplane.

There are two primary ways of scaling out the SignalR Hub:

  • Azure SignalR Service

  • Redis backplane

Azure SignalR Service is a fully managed service that makes it easy to add real-time communication functionality to your application.. It’s not suitable for all scenarios, as we will require an Azure subscription and our hub will be hosted in Microsoft Cloud. Redis backplane, on the other hand, is what allows us to host our SignalR Hub anywhere, even on-premises.

Redis backplane allows the hubs to exchange information between the instances of SignalR Hubs connected to it. So, when we have our client connected to one instance of the hub and another client that we want to send a message to is connected to another hub instance, Redis backplane will transfer the message to the right instance of the application, so it can then be sent to the right client.

Get hands-on with 1200+ tech skills courses.