SignalR Scaleout using Sql Server (.net6)

1.3k Views Asked by At

I am trying to figure out how to use SignalR scaleout wit SqlServer backplane. Otherwise we are not able to use multiple instances in Kubernetes. I looked up a Nuget Microsoft.AspNetSignalR.SqlServer but it is not there for NET6. I also tried to find in docs, but this one talks about Redis backplane https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-6.0 Is it possible to use SQL Server and if so, how?

Thanks

2

There are 2 best solutions below

1
Jimbo On

It is possible if you are using ASP.NET Core SignalR.

It is listed at the very bottom of the MS documentation as a third party SignalR backplane provider: https://learn.microsoft.com/en-us/aspnet/core/signalr/scale?view=aspnetcore-6.0

On Nuget look for: IntelliTect.AspNetCore.SignalR.SqlServer.

Even though it shows compatibility with 3.1 and 5.0, it is working for me using 6.0.

According to the link below, 'This project is largely based off of a fork of the SignalR Core Redis provider, reworked to use the underlying concepts of the classic ASP.NET SignalR SQL Server backplane.'

https://github.com/IntelliTect/IntelliTect.AspNetCore.SignalR.SqlServer

0
Anand On

We solved this by separating SignalR in its own container. The service has a REST endpoint. Services running from other container(s) use this endpoint that results a message broadcast on the hub. So this way, no backplane was necessary.