Skip to content

Commit 8155e52

Browse files
committed
more edits
1 parent f67999c commit 8155e52

File tree

2 files changed

+33
-37
lines changed

2 files changed

+33
-37
lines changed

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

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,43 @@ Large messages do negatively affect messaging performance. Use smaller messages
3838

3939
## How messages are counted for billing
4040

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.
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-
- 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.
4848

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.
5050

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:
5252

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.
5555

5656
## How connections are counted
5757

5858
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.
5959

6060
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).
6161

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.
6368

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-
6969
A live trace connection isn't counted as a client connection or as a server connection.
7070

7171
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.
7272

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.
7874

7975
## Related resources
8076

81-
- [Aggregation types in Azure Monitor](../azure-monitor/essentials/metrics-supported.md#microsoftsignalrservicesignalr )
82-
- [ASP.NET Core SignalR configuration](/aspnet/core/signalr/configuration)
83-
- [JSON](https://www.json.org/)
84-
- [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)

articles/azure-signalr/signalr-concept-performance.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ ms.author: lianwei
1111

1212
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.
1313

14-
Article describes:
14+
This article describes:
1515

1616
* The factors that affect SignalR application performance.
1717
* The typical performance in different use-case scenarios.
1818
* The environment and tools that you can use to generate a performance report.
1919

2020
## Quick evaluation using metrics
2121

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.
2323

2424
<kbd>![Screenshot of the Server Load metric of Azure SignalR on Portal. The metrics shows Server Load is at about 8 percent usage. ](./media/signalr-concept-performance/server-load.png "Server Load")</kbd>
2525

@@ -57,8 +57,8 @@ To answer these questions, this guide first gives a high-level explanation of th
5757

5858
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:
5959

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.
6262

6363
## Performance insight
6464

@@ -95,7 +95,7 @@ Theoretically, Azure SignalR Service capacity is limited by compute resources: C
9595
The transport type is another factor that affects performance. The three types are:
9696

9797
* [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.
9999
* [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.
100100

101101
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
124124

125125
For a quick evaluation, assume the following default settings:
126126

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.
131131

132132
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.
133133

@@ -154,15 +154,15 @@ Do *not* exceed the highlighted values in the following two tables.
154154
outboundBandwidth = outboundConnections * messageSize / sendInterval
155155
```
156156

157-
- *inboundConnections*: The number of connections sending the message.
157+
* *inboundConnections*: The number of connections sending the message.
158158

159-
- *outboundConnections*: The number of connections receiving the message.
159+
* *outboundConnections*: The number of connections receiving the message.
160160

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.
162162

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.
164164

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.
166166

167167
#### Evaluation for complex use cases
168168

@@ -292,10 +292,10 @@ The **send to group** use case has a similar traffic pattern to **broadcast**. T
292292
Group member and group count are two factors that affect performance. To
293293
simplify the analysis, we define two kinds of groups:
294294

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
296296
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then we have 1000 / 10 = 100 groups.
297297

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
299299
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then every group has 1000 / 10 = 100 members.
300300

301301
**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

Comments
 (0)