Real-time communication for modern applications
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
Zero transport configuration, SignalR automatically negotiates the best protocol. You don't need to manage WebSocket manually.
Scalability with backplane, Redis, Azure SignalR Service or SQL Server as backplane to distribute messages across multiple servers.
Native integration with ASP.NET Core, Dependency injection, authentication, authorization: everything works out-of-the-box.
Multiple clients, Official SDKs for JavaScript, .NET, Java. Support for any compatible WebSocket client.
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
Related blog articles
Do you want to create real-time applications?
Master modern web development
With our ASP.NET course you'll learn SignalR, Web API, Blazor and all the technologies to create modern and high-performance web applications.
Frequently asked questions
SignalR è una libreria di ASP.NET Core per aggiungere comunicazione real-time alle applicazioni web. Permette al server di inviare aggiornamenti ai client in tempo reale per chat, notifiche e dashboard.
Sì, SignalR è incluso in ASP.NET Core ed è completamente open-source e gratuito. Azure SignalR Service offre un piano gratuito con limiti e piani a pagamento per alta scalabilità.
SignalR usa WebSocket come protocollo preferito, con fallback automatico a Server-Sent Events e Long Polling per garantire compatibilità con tutti i client.
Sì, SignalR si integra perfettamente con Blazor Server (lo usa internamente) e può essere usato anche in Blazor WebAssembly per comunicazione real-time bidirezionale.
Il modo migliore è seguire un percorso strutturato con progetti pratici. Il nostro corso ASP.NET include SignalR, Web API e tutte le tecnologie per applicazioni web moderne.