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: articles/azure-signalr/signalr-concept-messages-and-connections.md
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,47 +38,43 @@ Large messages do negatively affect messaging performance. Use smaller messages
38
38
39
39
## How messages are counted for billing
40
40
41
-
Only outbound messages from Azure SignalR Service are counted for billing. 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.
42
42
43
43
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.
44
44
45
45
For example, imagine you have one application server, and three clients:
46
46
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 free inbound message. Only the three messages sent from service to each of the clients 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 msages.
48
48
49
-
- When *client A* sends a 1 KB an inbound message to *client B*, without going through app server, the message is a free. The message routed from service to *client B* is billed as an 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.
50
50
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:
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:
52
52
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.
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.
55
55
56
56
## How connections are counted
57
57
58
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.
59
59
60
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).
61
61
62
-
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:
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:
63
+
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.
63
68
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.
68
-
69
69
A live trace connection isn't counted as a client connection or as a server connection.
70
70
71
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.
72
72
73
-
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.
74
-
75
-
## How inbound/outbound traffic is counted
76
-
77
-
Messages sent into the service are inbound messages. Messages sent out of the service are outbound messages. 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.
78
74
79
75
## Related resources
80
76
81
-
-[Aggregation types in Azure Monitor](../azure-monitor/essentials/metrics-supported.md#microsoftsignalrservicesignalr)
Copy file name to clipboardExpand all lines: articles/azure-signalr/signalr-concept-performance.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,15 @@ ms.author: lianwei
11
11
12
12
One of the key benefits of using Azure SignalR Service is the ease of scaling SignalR applications. In a large-scale scenario, performance is an important factor.
13
13
14
-
Article describes:
14
+
This article describes:
15
15
16
16
* The factors that affect SignalR application performance.
17
17
* The typical performance in different use-case scenarios.
18
18
* The environment and tools that you can use to generate a performance report.
19
19
20
20
## Quick evaluation using metrics
21
21
22
-
You can easily monitor your service in the Azure portal. From the **Metrics** page of your SignalR instance, you can select the **Server Load** metrics you can see the "pressure" of your service.
22
+
You can easily monitor your service in the Azure portal. From the **Metrics** page of your SignalR instance, you can select the **Server Load** metrics to see the "pressure" of your service.
23
23
24
24
<kbd></kbd>
25
25
@@ -57,8 +57,8 @@ To answer these questions, this guide first gives a high-level explanation of th
57
57
58
58
This guide can't cover all scenarios (and different use cases, message sizes, message sending patterns, and so on). But it provides some methods to help you:
59
59
60
-
- Evaluate your approximate requirement for the inbound or outbound messages.
61
-
- Find the proper tiers by checking the performance table.
60
+
* Evaluate your approximate requirement for the inbound or outbound messages.
61
+
* Find the proper tiers by checking the performance table.
62
62
63
63
## Performance insight
64
64
@@ -95,7 +95,7 @@ Theoretically, Azure SignalR Service capacity is limited by compute resources: C
95
95
The transport type is another factor that affects performance. The three types are:
96
96
97
97
*[WebSocket](https://en.wikipedia.org/wiki/WebSocket): WebSocket is a bidirectional and full-duplex communication protocol over a single TCP connection.
98
-
*[Server-Sent-Event](https://en.wikipedia.org/wiki/Server-sent_events): erver-Sent-Event is a unidirectional protocol to push messages from server to client.
98
+
*[Server-Sent-Event](https://en.wikipedia.org/wiki/Server-sent_events): Server-Sent-Event is a unidirectional protocol to push messages from server to client.
99
99
*[Long-Polling](https://en.wikipedia.org/wiki/Push_technology): Long-Polling requires the clients to periodically poll information from the server through an HTTP request.
100
100
101
101
For the same API under the same conditions, WebSocket has the best performance, Server-Sent-Event is slower, and Long-Polling is the slowest. Azure SignalR Service recommends WebSocket by default.
@@ -124,10 +124,10 @@ Assume that the app server is powerful enough and isn't the performance bottlene
124
124
125
125
For a quick evaluation, assume the following default settings:
126
126
127
-
- The transport type is WebSocket.
128
-
- The message size is 2,048 bytes.
129
-
- A message is sent every 1 second.
130
-
- Azure SignalR Service is in the default mode.
127
+
* The transport type is WebSocket.
128
+
* The message size is 2,048 bytes.
129
+
* A message is sent every 1 second.
130
+
* Azure SignalR Service is in the default mode.
131
131
132
132
Every tier has its own maximum inbound bandwidth and outbound bandwidth. A smooth user experience isn't guaranteed after the inbound or outbound connection exceeds the limit.
133
133
@@ -154,15 +154,15 @@ Do *not* exceed the highlighted values in the following two tables.
-*inboundConnections*: The number of connections sending the message.
157
+
**inboundConnections*: The number of connections sending the message.
158
158
159
-
-*outboundConnections*: The number of connections receiving the message.
159
+
**outboundConnections*: The number of connections receiving the message.
160
160
161
-
-*messageSize*: The size of a single message (average value). A small message that's less than 1,024 bytes has a performance impact that's similar to a 1,024-byte message.
161
+
**messageSize*: The size of a single message (average value). A small message that's less than 1,024 bytes has a performance impact that's similar to a 1,024-byte message.
162
162
163
-
-*sendInterval*: The time of sending one message. Typically it's 1 second per message, which means sending one message every second. A smaller interval means sending more message in a time period. For example, 0.5 second per message means sending two messages every second.
163
+
**sendInterval*: The time of sending one message. Typically it's 1 second per message, which means sending one message every second. A smaller interval means sending more message in a time period. For example, 0.5 second per message means sending two messages every second.
164
164
165
-
-*Connections*: The committed maximum threshold for Azure SignalR Service for every tier. If the connection number is increased further, it suffers from connection throttling.
165
+
**Connections*: The committed maximum threshold for Azure SignalR Service for every tier. If the connection number is increased further, it suffers from connection throttling.
166
166
167
167
#### Evaluation for complex use cases
168
168
@@ -292,10 +292,10 @@ The **send to group** use case has a similar traffic pattern to **broadcast**. T
292
292
Group member and group count are two factors that affect performance. To
293
293
simplify the analysis, we define two kinds of groups:
294
294
295
-
-**Small group**: Every group has 10 connections. The group number is equal to (max
295
+
***Small group**: Every group has 10 connections. The group number is equal to (max
296
296
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then we have 1000 / 10 = 100 groups.
297
297
298
-
-**Big group**: The group number is always 10. The group member count is equal to (max
298
+
***Big group**: The group number is always 10. The group member count is equal to (max
299
299
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then every group has 1000 / 10 = 100 members.
300
300
301
301
**Send to group** brings a routing cost to Azure SignalR Service because it has to find the target connections through a distributed data structure. As the sending connections increase, the cost increases.
0 commit comments