La soluzione trasversale per uno sviluppo software moderno

What is SignalR and how it adds real-time communication to your apps

Everything you need to know about SignalR: the Microsoft library for push notifications, chat and live dashboards in .NET applications.

SignalR is the ASP.NET library that adds real-time bidirectional communication to your .NET applications.

Instead of the client asking the server every few seconds for updates (polling), with SignalR the server pushes data to clients the instant something changes.

Chat, live dashboards, real-time notifications, multiplayer gaming: SignalR handles all of this with elegant code and automatic management of the best available transport.

How SignalR works: Hubs, connections and groups

SignalR is based on the concept of Hub: a C# object on the server that exposes methods invocable by the client and vice versa.

SignalR architecture

Concept Description
Hub C# class that defines the methods that client and server can invoke each other.
Connection Each client has a unique ConnectionId. SignalR automatically manages connection/reconnection.
Groups Allows sending messages to subsets of clients (e.g., chat rooms, thematic channels).
Transports WebSocket → Server-Sent Events → Long Polling. Automatic negotiation.
Protocols JSON (default) or MessagePack (binary, faster) for message serialization.
// SignalR Hub example
public class ChatHub : Hub
{
    public async Task SendMessage(string user, string message)
        => await Clients.All.SendAsync("ReceiveMessage", user, message);
}

On the client side, JavaScript, .NET or Java can connect to the Hub and receive real-time updates.

What you can create with SignalR

Scenario Description
Chat and messaging Chat rooms, direct messages and live support systems with instant feedback.
Real-time dashboards Monitoring of KPIs, system metrics and financial data updated by the second.
Push notifications Instant alerts for orders, system alerts, status updates.
Live collaboration Collaborative editing, shared whiteboards, real-time updates.
Multiplayer gaming State synchronization between players with minimal latency.
IoT monitoring Receiving and displaying data from sensors and devices in real time.

Advantages of SignalR over alternatives

  1. Zero transport configuration, SignalR automatically negotiates the best protocol. You don't need to manage WebSocket manually.

  2. Scalability with backplane, Redis, Azure SignalR Service or SQL Server as backplane to distribute messages across multiple servers.

  3. Native integration with ASP.NET Core, Dependency injection, authentication, authorization: everything works out-of-the-box.

  4. Multiple clients, Official SDKs for JavaScript, .NET, Java. Support for any compatible WebSocket client.

  5. Azure SignalR Service, Managed service that handles millions of connections without infrastructure to maintain.

SignalR vs real-time alternatives

Feature SignalR Socket.IO Pusher Firebase Realtime
Server language C# / .NET Node.js Hosted Hosted
Transports WebSocket + fallback WebSocket + polling WebSocket WebSocket
.NET integration Native Requires adapter Generic SDK Generic SDK
Scalability Redis / Azure Service Redis Managed Managed
Cost Open-source Open-source Paid Limited free tier

Get started with SignalR: resources and tools

Vuoi approfondire What is SignalR and how it adds real-time communication to your apps? Richiedi informazioni

Vuoi approfondire questa tecnologia con un percorso personalizzato? Compila il modulo e ricevi tutte le informazioni.

Analisi gratuita Risposta diretta dall’architetto Zero impegno
La soluzione trasversale per uno sviluppo software modernoAnalisi gratuita, zero impegno
Versione 0.1.0Note di rilascio