ASP.NET / ASP.NET Core SignalR Backplane
Real-time.NET/.NET Core SignalR applications usually have a high frequency of updates from the web server to clients. Examples of such apps include gaming, social networks, dashboard monitoring apps, and many others. For high traffic ASP.NET / ASP.NET Core applications, SignalR must scale to a multi-server environment. In such environments, SignalR needs to distribute messages across multiple web servers. And, for this, SignalR benefits from NCache Backplane.
NCache is an extremely fast and scalable in-memory distributed cache and has implemented an ASP.NET / ASP.NET Core SignalR Backplane for high traffic real-time web applications running in load-balanced multi-server web farms. Moreover, NCache has very powerful Pub/Sub messaging features through which SignalR can send messages from one web server to another.
Using NCache as SignalR Backplane
You can configure your ASP.NET/ ASP.NET Core application to use NCache as your SignalR Backplane that is extremely scalable. Using NCache as your SignalR Backplane is very straight forward. Here is what you do in your ASP.NET Core application.
- Specify the cache name and application ID in Appsettings.json of your .NET Core application.
- To the Startup.cs class of the application, you simply configure NCache as a SignalR backplane as follows:
public void ConfigureServices(IServiceCollection services)
ncacheOptions.CacheName = Configuration["NCacheConfiguration:CacheName"];
ncacheOptions.ApplicationID = Configuration["NCacheConfiguration:ApplicationID"];
Why Use NCache Backplane for SignalR?
If your ASP.NET / ASP.NET Core application is high traffic and running in a load-balanced multi-server web farm, then you need to use NCache as your SignalR Backplane. This is because NCache is the most powerful .NET Distributed Cache available that provides you the following benefits:
- .NET Pub/Sub Messaging: NCache is a very feature-rich distributed cache and includes powerful Pub/Sub Messaging capabilities. SignalR Backplane uses these messaging features in NCache to send messages to other servers in the web farm.
- Support for Groups and Users: Using NCache as a SignalR backplane facilitates sending messages to SignalR groups which are collections of associated connections. Moreover, using NCache as the message bus, you can also send messages to all connections associated with a particular SignalR user.
- 100% .NET / .NET Core Cache: NCache is the only truly native .NET Distributed Cache available in the market. All others are developed in C++ on Linux and later ported to Windows with limited compatibility to .NET. NCache fits nicely into your ASP.NET / ASP.NET Core application stack and simplifies your cost of development and maintenance.
- Extremely Fast & Scalable: NCache is extremely fast for being an in-memory distributed cache. And, it also provides linear scalability due to which it never becomes a bottleneck for your ASP.NET / ASP.NET Core application performance even under peak loads.
- High Availability: NCache provides a self-healing peer to peer clustering architecture that has no single point of failure. Additionally, NCache intelligently replicates cached data so there is no data loss in case a cache server goes down and at the same time minimum cost of replication.
What to Do Next?