Skip to content

Commit 4321090

Browse files
Merge pull request #232897 from cebundy/sigr-concepts-review
[SignalR] freshness review for concept articles
2 parents 5691172 + 2c029f9 commit 4321090

File tree

2 files changed

+92
-86
lines changed

2 files changed

+92
-86
lines changed

articles/azure-signalr/signalr-concept-messages-and-connections.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ description: An overview of key concepts about messages and connections in Azure
44
author: vicancy
55
ms.service: signalr
66
ms.topic: conceptual
7-
ms.date: 08/05/2020
7+
ms.date: 03/23/2023
88
ms.author: lianwei
99
---
1010
# Messages and connections in Azure SignalR Service
1111

12-
The billing model for Azure SignalR Service is based on the number of connections and the number of messages. This article explains how messages and connections are defined and counted for billing.
12+
The billing model for Azure SignalR Service is based on the number of connections and the number of outbound messages from the service. This article explains how messages and connections are defined and counted for billing.
1313

1414

1515
## Message formats
@@ -21,61 +21,60 @@ Azure SignalR Service supports the same formats as ASP.NET Core SignalR: [JSON](
2121
The following limits apply for Azure SignalR Service messages:
2222

2323
* Client messages:
24-
* For long polling or server side events, the client cannot send messages larger than 1MB.
25-
* There is no size limit for Websockets for service.
26-
* App server can set a limit for client message size. Default is 32KB. For more information, see [Security considerations in ASP.NET Core SignalR](/aspnet/core/signalr/security?#buffer-management).
27-
* For serverless, the message size is limited by upstream implementation, but under 1MB is recommended.
24+
* For long polling or server side events, the client can't send messages larger than 1 MB.
25+
* There's no size limit for WebSocket for service.
26+
* App server can set a limit for client message size. Default is 32 KB. For more information, see [Security considerations in ASP.NET Core SignalR](/aspnet/core/signalr/security?#buffer-management).
27+
* For serverless, the message size is limited by upstream implementation, but under 1 MB is recommended.
2828
* Server messages:
29-
* There is no limit to server message size, but under 16MB is recommended.
30-
* App server can set a limit for client message size. Default is 32KB. For more information, see [Security considerations in ASP.NET Core SignalR](/aspnet/core/signalr/security?#buffer-management).
29+
* There's no limit to server message size, but under 16 MB is recommended.
30+
* App server can set a limit for client message size. Default is 32 KB. For more information, see [Security considerations in ASP.NET Core SignalR](/aspnet/core/signalr/security?#buffer-management).
3131
* Serverless:
32-
* Rest API: 1MB for message body, 16KB for headers.
33-
* There is no limit for Websockets, [management SDK persistent mode](https://github.com/Azure/azure-signalr/blob/dev/docs/management-sdk-guide.md), but under 16MB is recommended.
32+
* Rest API: 1 MB for message body, 16 KB for headers.
33+
* There's no limit for WebSocket, [management SDK persistent mode](https://github.com/Azure/azure-signalr/blob/dev/docs/management-sdk-guide.md), but under 16 MB is recommended.
3434

35-
For Websockets clients, large messages are split into smaller messages that are no more than 2 KB each and transmitted separately. SDKs handle message splitting and assembling. No developer efforts are needed.
35+
For WebSocket clients, large messages are split into smaller messages that are no more than 2 KB each and transmitted separately. SDKs handle message splitting and assembling. No developer efforts are needed.
3636

3737
Large messages do negatively affect messaging performance. Use smaller messages whenever possible, and test to determine the optimal message size for each use-case scenario.
3838

3939
## How messages are counted for billing
4040

41-
For billing, only outbound messages from Azure SignalR Service are counted. Ping messages between clients and servers are ignored.
41+
Messages sent into the service are inbound messages and messages sent out of the service are outbound messages. Only outbound messages from Azure SignalR Service are counted for billing. Ping messages between clients and servers are ignored.
4242

4343
Messages larger than 2 KB are counted as multiple messages of 2 KB each. The message count chart in the Azure portal is updated every 100 messages per hub.
4444

4545
For example, imagine you have one application server, and three clients:
4646

47-
App server broadcasts a 1-KB message to all connected clients, the message from app server to the service is considered free inbound message. Only the three messages sending from service to each of the client are billed as outbound messages.
47+
* When the application server broadcasts a 1-KB message to all connected clients, the message from the application server to the service is considered a free inbound message.
4848

49-
Client A sends a 1-KB message to another client B, without going through app server. The message from client A to service is free inbound message. The message from service to client B is billed as outbound message.
49+
* When *client A* sends a 1 KB inbound message to *client B*, without going through app server, the message is a free inbound message. The message routed from service to *client B* is billed as an outbound message.
5050

51-
If you have three clients and one application server. One client sends a 4-KB message to let the server broadcast to all clients. The billed message count is eight: one message from the service to the application server and three messages from the service to the clients. Each message is counted as two 2-KB messages.
51+
* If you have three clients and one application server, when one client sends a 4-KB message for the server broadcast to all clients, the billed message count is eight:
5252

53-
## How connections are counted
53+
* One message from the service to the application server.
54+
* Three messages from the service to the clients. Each message is counted as two 2-KB messages.
5455

55-
There are server connections and client connections with Azure SignalR Service. By default, each application server starts with five initial connections per hub, and each client has one client connection.
56+
## How connections are counted
5657

57-
For example, assume that you have two application servers and you define five hubs in code. The server connection count will be 50: 2 app servers * 5 hubs * 5 connections per hub.
58+
The Azure SignalR Service creates application server and client connections. By default, each application server starts with five initial connections per hub, and each client has one client connection.
5859

59-
The connection count shown in the Azure portal includes server connections, client connections, diagnostic connections, and live trace connections. The connection types are defined in the following list:
60+
For example, assume that you have two application servers and you define five hubs in code. The server connection count is 50: (2 app servers * 5 hubs * 5 connections per hub).
6061

61-
- **Server connection**: Connects Azure SignalR Service and the app server.
62-
- **Client connection**: Connects Azure SignalR Service and the client app.
63-
- **Diagnostic connection**: A special kind of client connection that can produce a more detailed log, which might affect performance. This kind of client is designed for troubleshooting.
64-
- **Live trace connection**: Connects to the live trace endpoint and receives live traces of Azure SignalR Service.
65-
66-
Note that a live trace connection isn't counted as a client connection or as a server connection.
62+
The connection count shown in the Azure portal includes server, client, diagnostic, and live trace connections. The connection types are defined in the following list:
6763

68-
ASP.NET SignalR calculates server connections in a different way. It includes one default hub in addition to hubs that you define. By default, each application server needs five more initial server connections. The initial connection count for the default hub stays consistent with other hubs.
64+
* **Server connection**: Connects Azure SignalR Service and the app server.
65+
* **Client connection**: Connects Azure SignalR Service and the client app.
66+
* **Diagnostic connection**: A special type of client connection that can produce a more detailed log, which might affect performance. This kind of client is designed for troubleshooting.
67+
* **Live trace connection**: Connects to the live trace endpoint and receives live traces of Azure SignalR Service.
6968

70-
The service and the application server keep syncing connection status and making adjustment to server connections to get better performance and service stability. So you might see server connection number changes from time to time.
69+
A live trace connection isn't counted as a client connection or as a server connection.
7170

72-
## How inbound/outbound traffic is counted
71+
ASP.NET SignalR calculates server connections in a different way. It includes one default hub in addition to hubs that you define. By default, each application server needs five more initial server connections. The initial connection count for the default hub stays consistent with other hubs.
7372

74-
Message sent into the service is inbound message. Message sent out of the service is outbound message. Traffic is calculated in bytes.
73+
The service and the application server keep syncing connection status and making adjustments to server connections to get better performance and service stability. So you may see changes in the number of server connections in your running service.
7574

7675
## Related resources
7776

78-
- [Aggregation types in Azure Monitor](../azure-monitor/essentials/metrics-supported.md#microsoftsignalrservicesignalr )
79-
- [ASP.NET Core SignalR configuration](/aspnet/core/signalr/configuration)
80-
- [JSON](https://www.json.org/)
81-
- [MessagePack](/aspnet/core/signalr/messagepackhubprotocol)
77+
* [Aggregation types in Azure Monitor](../azure-monitor/essentials/metrics-supported.md#microsoftsignalrservicesignalr )
78+
* [ASP.NET Core SignalR configuration](/aspnet/core/signalr/configuration)
79+
* [JSON](https://www.json.org/)
80+
* [MessagePack](/aspnet/core/signalr/messagepackhubprotocol)

0 commit comments

Comments
 (0)