Cookie Consent by Free Privacy Policy Generator SignalR Backplane for ASP.NET Core - NCache

SignalR Backplane for ASP.NET Core

Real-time ASP.NET Core SignalR applications rely on the distribution of messages across servers for high-frequency updates. Examples of such applications include online games or social media networks, as well as live dashboards and other similar platforms where real-time interaction is key. To ensure seamless scalability in a multi-server environment, Signalr relies on a backplane mechanism to distribute messages effectively. NCache offers a powerful and scalable SignalR Backplane for this purpose.

NCache is a distributed caching solution that works seamlessly with ASP.NET Core Signalr to support real-time web applications, running in load-balanced multi-server environments for effective scalability and performance boosts. NCache also provides advanced Pub/Sub messaging features to help Signalr distribute messages efficiently across multiple servers.

SignalR Backplane
 

Using NCache as SignalR Backplane

You can configure your ASP.NET Core application to utilize NCache as a SignalR Backplane for high scalability and smooth message distribution. The process of integrating NCache as a Signalr Backplane is simple. Involves a few configuration steps;

  1. Define the cache name and application ID in the appsettings.json file of your ASP.NET Core application.
  2. Modify Program.cs in .NET 6 and later to configure NCache as the SignalR backplane:
var builder = WebApplication.CreateBuilder(args);

builder.Services.Configure<NCacheConfiguration>
(builder.Configuration.GetSection("NCacheConfiguration"));
builder.Services.AddSignalR().AddNCache(ncacheOptions =>
{
    ncacheOptions.CacheName = builder.Configuration["NCacheConfiguration:CacheName"];
    ncacheOptions.ApplicationID = builder.Configuration["NCacheConfiguration:ApplicationID"];
});

var app = builder.Build();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
    endpoints.MapHub<YourSignalRHub>("/your-hub");
});

app.Run();
 

Why Use NCache as SignalR Backplane?

If your ASP.NET Core application experiences high-traffic and operates in a load-balanced multi-server web farm, then you should consider integrating NCache as your Signalr Backplane solution. NCache stands out as the powerful .NET Distributed Cache available and offers the following benefits:

  1. .NET Pub/Sub Messaging: NCache offers publish/subscribe (Pub/Sub) messaging capabilities, which are used by SignalR Backplane to distribute messages effectively across multiple web servers in a multi-node environment.
  2. Support for Groups and Users: NCache allows sending messages to SignalR groups, which are collections of related connections. It also gives you the ability to send targeted messages to all connections linked with a specific SignalR user.
  3. 100% .NET Native Cache: Unlike other caching solutions that were originally developed in C++ and later adapted for Windows, NCache is natively built for NET. This ensures smooth compatibility and a fully integrated experience with ASP.NET Core applications.
  4. Extremely Fast & Scalable: Since NCache is an in-memory distributed cache, it significantly lowers latency and ensures linear scalability. This allows applications to handle a high volume of message throughput without any performance bottlenecks.
  5. High Availability and Data Reliability: NCache offers a self-healing peer-to-peer clustering architecture with no single point of failure. It also includes smart data replication to prevent data loss if a cache server goes down while keeping replication costs low.

What to Do Next?

Explore more about NCache and its benefits for ASP.NET Core SignalR applications:

By using NCache, your ASP.NET Core SignalR applications can scale effortlessly while maintaining real-time performance across multiple servers.

© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.