简体   繁体   中英

Scaling out MULTIPLE Redis backplanes with SignalR in a .NET framework environment

Environment: .NET framework 4.8 backend. SignalR is used for some of the messaging.

Problem: The application is running on a single server and needs to be scaled out. Having a single point of failure is also extremely bad for the availability. Higher performance and availability are required.

Possible solution: Use Redis backplane. This allows multiple servers to sub/pub to the Redis backplane allowing horizontal scaling at least in this way.

Problem with the solution: Correct me if I'm wrong: If all the servers are reliable on the single Redis backplane, the problem of single point of failure still exists. Also, the single backplane's performance might run out in the future.

Questions: How does the Redis backplane scale out then? How can I work with multiple backplanes and ensure that their data stays synchronized?

https://learn.microsoft.com/en-us/as.net/core/signalr/redis-backplane " Redis Clustering is a method for achieving high availability by using multiple Redis servers. Clustering isn't officially supported, but it might work ."

https://learn.microsoft.com/en-us/as.net/signalr/overview/performance/scaleout-with-redis " SignalR scaleout with Redis does not support Redis clusters. "

Are there some hard problems with the usage of SignalR together with multiple Redis backplanes? If this is a poor idea, what other options are available to replace either Redis or SignalR?

SignalR for .NET Framework is now depreciated. If you want to "futureproof" you solution, I suggest switching to SignalR for .NET Core. Core also support Azure backplane but no longer support SQL backplane.

One way to do what you want would be for each server to monitor if the Redis backplane is us and to switch to another if it is not. In my implementation, each SignalR server sends messages to other servers over the backplane so they know how many servers are on the backplane and that the backplane is working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM