You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/signalr/introduction.md
+21-10Lines changed: 21 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
1
---
2
2
title: Overview of ASP.NET Core SignalR
3
+
ai-usage: ai-assisted
3
4
author: wadepickett
4
-
description: Learn how the ASP.NET Core SignalR library simplifies adding real-time functionality to apps.
5
+
description: "ASP.NET Core SignalR introduction: Add real-time capabilities to your apps with automatic connection management and scalable messaging solutions."
5
6
monikerRange: '>= aspnetcore-2.1'
6
7
ms.author: wpickett
8
+
ms.reviewer: wpickett
7
9
ms.custom: mvc
8
-
ms.date: 12/02/2024
10
+
ms.date: 04/20/2026
9
11
uid: signalr/introduction
10
12
---
11
13
# Overview of ASP.NET Core SignalR
12
14
15
+
:::moniker range=">= aspnetcore-10.0"
16
+
13
17
## What is SignalR?
14
18
15
19
ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly.
@@ -28,7 +32,10 @@ Here are some features of SignalR for ASP.NET Core:
28
32
* Handles connection management automatically.
29
33
* Sends messages to all connected clients simultaneously. For example, a chat room.
30
34
* Sends messages to specific clients or groups of clients.
31
-
* Scales to handle increasing traffic.
35
+
* Scales to handle increasing traffic with options such as the [Azure SignalR Service](xref:signalr/scale) and [Redis backplane](xref:signalr/redis-backplane).
36
+
* Supports trimming and native ahead-of-time (AOT) compilation for supported scenarios.
37
+
* Supports polymorphic type handling in hub methods.
38
+
* Supports distributed tracing with `ActivitySource` for SignalR hub server and .NET client.
The source is hosted in a [SignalR repository on GitHub](https://github.com/dotnet/AspNetCore/tree/main/src/SignalR).
@@ -41,24 +48,28 @@ SignalR supports the following techniques for handling real-time communication (
41
48
* Server-Sent Events
42
49
* Long Polling
43
50
44
-
SignalR automatically chooses the best transport method that is within the capabilities of the server and client.
51
+
SignalR automatically chooses the best transport method that is within the capabilities of the server and client. WebSockets is the preferred transport because it generally provides the best performance.
45
52
46
53
## Hubs
47
54
48
55
SignalR uses *hubs* to communicate between clients and servers.
49
56
50
-
A hub is a high-level pipeline that allows a client and server to call methods on each other. SignalR handles the dispatching across machine boundaries automatically, allowing clients to call methods on the server and vice versa. You can pass strongly-typed parameters to methods, which enables model binding. SignalR provides two built-in hub protocols: a text protocol based on JSON and a binary protocol based on [MessagePack](https://msgpack.org/). MessagePack generally creates smaller messages compared to JSON. Older browsers must support [XHR level 2](https://caniuse.com/#feat=xhr2) to provide MessagePack protocol support.
51
-
52
-
Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. Objects sent as method parameters are deserialized using the configured protocol. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes to it the deserialized parameter data.
57
+
A hub is a high-level pipeline that a client and server use to call methods on each other. SignalR automatically handles the dispatching across machine boundaries, so clients can call methods on the server and vice versa. You can pass strongly typed parameters to methods, which enables model binding. SignalR supports two built-in hub protocols: a text protocol based on JSON (default) and a binary protocol based on MessagePack. MessagePack generally creates smaller messages compared to JSON. For more information, see <xref:signalr/messagepackhubprotocol>.
53
58
54
-
[!INCLUDE[](~/includes/SignalR/es6.md)]
59
+
Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. The configured protocol deserializes objects sent as method parameters. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes the deserialized parameter data.
55
60
56
61
## Additional resources
57
62
58
-
*[Introduction to ASP.NET Core SignalR](/training/modules/aspnet-core-signalr)
59
63
*[Get started with SignalR for ASP.NET Core](xref:tutorials/signalr)
ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly.
6
+
7
+
Good candidates for SignalR:
8
+
9
+
* Apps that require high frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps.
10
+
* Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts.
11
+
* Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps.
12
+
* Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications.
13
+
14
+
SignalR provides an API for creating server-to-client [remote procedure calls (RPC)](https://wikipedia.org/wiki/Remote_procedure_call). The RPCs invoke functions on clients from server-side .NET code. There are several [supported platforms](xref:signalr/supported-platforms), each with their respective client SDK. Because of this, the programming language being invoked by the RPC call varies.
15
+
16
+
Here are some features of SignalR for ASP.NET Core:
17
+
18
+
* Handles connection management automatically.
19
+
* Sends messages to all connected clients simultaneously. For example, a chat room.
20
+
* Sends messages to specific clients or groups of clients.
The source is hosted in a [SignalR repository on GitHub](https://github.com/dotnet/AspNetCore/tree/main/src/SignalR).
25
+
26
+
## Transports
27
+
28
+
SignalR supports the following techniques for handling real-time communication (in order of graceful fallback):
29
+
30
+
*[WebSockets](xref:fundamentals/websockets)
31
+
* Server-Sent Events
32
+
* Long Polling
33
+
34
+
SignalR automatically chooses the best transport method that is within the capabilities of the server and client.
35
+
36
+
## Hubs
37
+
38
+
SignalR uses *hubs* to communicate between clients and servers.
39
+
40
+
A hub is a high-level pipeline that allows a client and server to call methods on each other. SignalR handles the dispatching across machine boundaries automatically, allowing clients to call methods on the server and vice versa. You can pass strongly-typed parameters to methods, which enables model binding. SignalR provides two built-in hub protocols: a text protocol based on JSON and a binary protocol based on [MessagePack](https://msgpack.org/). MessagePack generally creates smaller messages compared to JSON. Older browsers must support [XHR level 2](https://caniuse.com/#feat=xhr2) to provide MessagePack protocol support.
41
+
42
+
Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. Objects sent as method parameters are deserialized using the configured protocol. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes to it the deserialized parameter data.
43
+
44
+
[!INCLUDE[](~/includes/SignalR/es6.md)]
45
+
46
+
## Additional resources
47
+
48
+
*[Introduction to ASP.NET Core SignalR](/training/modules/aspnet-core-signalr)
49
+
*[Get started with SignalR for ASP.NET Core](xref:tutorials/signalr)
ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly.
6
+
7
+
Good candidates for SignalR:
8
+
9
+
* Apps that require high frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps.
10
+
* Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts.
11
+
* Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps.
12
+
* Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications.
13
+
14
+
SignalR provides an API for creating server-to-client [remote procedure calls (RPC)](https://wikipedia.org/wiki/Remote_procedure_call). The RPCs invoke functions on clients from server-side .NET code. There are several [supported platforms](xref:signalr/supported-platforms), each with their respective client SDK. Because of this, the programming language being invoked by the RPC call varies.
15
+
16
+
Here are some features of SignalR for ASP.NET Core:
17
+
18
+
* Handles connection management automatically.
19
+
* Sends messages to all connected clients simultaneously. For example, a chat room.
20
+
* Sends messages to specific clients or groups of clients.
21
+
* Scales to handle increasing traffic with options such as the [Azure SignalR Service](xref:signalr/scale) and [Redis backplane](xref:signalr/redis-backplane).
22
+
* Supports trimming and native ahead-of-time (AOT) compilation for supported scenarios.
23
+
* Supports polymorphic type handling in hub methods.
24
+
* Supports distributed tracing with `ActivitySource` for SignalR hub server and .NET client.
The source is hosted in a [SignalR repository on GitHub](https://github.com/dotnet/AspNetCore/tree/main/src/SignalR).
28
+
29
+
## Transports
30
+
31
+
SignalR supports the following techniques for handling real-time communication (in order of graceful fallback):
32
+
33
+
*[WebSockets](xref:fundamentals/websockets)
34
+
* Server-Sent Events
35
+
* Long Polling
36
+
37
+
SignalR automatically chooses the best transport method that is within the capabilities of the server and client. WebSockets is the preferred transport because it generally provides the best performance.
38
+
39
+
## Hubs
40
+
41
+
SignalR uses *hubs* to communicate between clients and servers.
42
+
43
+
A hub is a high-level pipeline that allows a client and server to call methods on each other. SignalR handles the dispatching across machine boundaries automatically, allowing clients to call methods on the server and vice versa. You can pass strongly-typed parameters to methods, which enables model binding. SignalR supports two built-in hub protocols: a text protocol based on JSON (default) and a binary protocol based on MessagePack. MessagePack generally creates smaller messages compared to JSON. For more information, see <xref:signalr/messagepackhubprotocol>.
44
+
45
+
Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. Objects sent as method parameters are deserialized using the configured protocol. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes to it the deserialized parameter data.
46
+
47
+
## Additional resources
48
+
49
+
*[Get started with SignalR for ASP.NET Core](xref:tutorials/signalr)
0 commit comments