SignalR Scalability with NCache Backplane

ASP.NET / ASP.NET Core are quickly becoming popular for developing not only regular high traffic web applications but also real-time web applications. Real-time ASP.NET / ASP.NET Core applications are those that have high frequency of updates from the web server to clients. Examples of such apps include gaming, social networks, dashboard monitoring apps, and many others.

Regular HTTP GET and POST based ASP.NET Core apps cannot handle such high frequency of updates since only support client-to-server communication. That is why ASP.NET / ASP.NET Core SignalR provides an API for creating server-to-client remote procedure calls (RPC) that can call client-side JavaScript functions from server-side ASP.NET / ASP.NET Core.

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 really benefits from NCache Backplane.

NCache has implemented ASP.NET / ASP.NET Core SignalR Backplance for high traffic real-time web applications running in load-balanced multi-server web farms. NCache is an extremely fast and scalable In-Memory Distributed Cache for .NET / .NET Core.

Using NCache as SignalR Backplane

You can configure your ASP.NET Core application to use NCache as your SignalR Backplane that is extremely scalable. NCache has very powerful Pub/Sub messaging features through which SignalR can send messages from one web server to another.

Using NCache as your SignalR Backplane is very straight forward. Here is what you do in your ASP.NET application.

  public class Startup
          public void Configuration(IAppBuilder app)
              string cacheName, eventKey;

              if (ConfigurationManager.AppSettings["cache"] != null)
                  cacheName = ConfigurationManager.AppSettings["cache"];
                  throw new Exception("Cache Name is required to start the application");
              if (ConfigurationManager.AppSettings["eventKey"] != null)
                  eventKey = ConfigurationManager.AppSettings["eventKey"]; 
                  throw new Exception("EventKey is required to start the application");
              GlobalHost.DependencyResolver.UseNCache(cacheName, eventKey);

The two lines above configure your ASP.NET application to start using NCache as the SignalR Backplane.

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:

  1. 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.
  2. NET Pub/Sub Messaging: NCache is very feature 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.
  3. 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.
  4. 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?

Signup for monthly email newsletter to get latest updates.

Contact Us


+1 (214) 764-6933 (US)

+44 20 7993 8327 (UK)

© Copyright Alachisoft 2002 - . All rights reserved.