Search code examples
asp.netwebsocketsignalrscale

How can I implement SignalR Redundancy using a load balancer?


My current solution is ,I have a load balancer and behind that I have implemented a backplane (SQL Server) in order to support scaling . Along with that, I want to have redundancy as well . Example if server 1 goes down all the connected connection in that server should connect to other servers .

Will the standard SignalR Backplane solve this problem ? Or else is there other good approaches ?


Solution

  • If you have a backplane and a loadBalancer it should work. If a node dies clients will try to reconnect and if the load balancer redirects them to a different node that is using the same backplane they will be able to reconnect fine. One important thing in distributed scenarios - all nodes have to have the same machineKey otherwise requests will be rejected because the node will not be able to decrypt the connection token.