Skip to content

Commit 1ee4707

Browse files
authored
Merge pull request #270189 from bjqian/main
Update Web PubSub concept-performance.md to include unit >100
2 parents f85d158 + d1a554e commit 1ee4707

File tree

1 file changed

+60
-58
lines changed

1 file changed

+60
-58
lines changed

articles/azure-web-pubsub/concept-performance.md

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ author: bjqian
1010

1111
# Performance guide for Azure Web PubSub Service
1212

13-
One of the key benefits of using Azure Web PubSub Service is the ease of scaling Web PubSub upstream applications. In a large-scale scenario, performance is an important factor.
13+
One of the key benefits of using Azure Web PubSub Service is the ease of scaling. In a large-scale scenario, performance is an important factor.
1414

15-
In this guide, we'll introduce the factors that affect Web PubSub upstream application performance. We'll describe typical performance in different use-case scenarios.
15+
In this guide, we introduce the factors that affect Web PubSub service performance. We describe typical performance in different use-case scenarios.
1616

1717
## Quick evaluation using metrics
18-
Before going through the factors that impact the performance, let's first introduce an easy way to monitor the pressure of your service. There's a metrics called **Server Load** on the Portal.
18+
Before going through the factors that impact the performance, let's first introduce an easy way to monitor the pressure of your service. There's a metric called **Server Load** on the Portal.
1919

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

2222

23-
It shows the computing pressure of your Azure Web PubSub service. You could test on your own scenario and check this metrics to decide whether to scale up. The latency inside Azure Web PubSub service would remain low if the Server Load is below 70%.
23+
It shows the computing pressure of your Azure Web PubSub service. You could test on your own scenario and check this metric to decide whether to scale up. The latency inside Azure Web PubSub service would remain low if the Server Load is below 70%.
2424

2525
> [!NOTE]
26-
> If you are using unit 50 or unit 100 **and** your scenario is mainly sending to small groups (group size <20), you need to check [sending to small group](#small-group) for reference. In those scenarios there is large routing cost which is not included in the Server Load.
26+
> If you are using unit 50 or larger **and** your scenario is mainly sending to small groups (group size <20), you need to check [sending to small group](#small-group) for reference. In those scenarios there is large routing cost which is not included in the Server Load.
2727
2828
Below are detailed concepts for evaluating performance.
2929
## Term definitions
@@ -36,16 +36,15 @@ In this guide, we'll introduce the factors that affect Web PubSub upstream appli
3636

3737
## Overview
3838

39-
Azure Web PubSub Service defines seven Standard tiers for different performance capacities. This
40-
guide answers the following questions:
39+
This guide answers the following questions:
4140

42-
- What is the typical Azure Web PubSub Service performance for each tier?
41+
- What is the typical Azure Web PubSub Service performance for each unit size?
4342

4443
- Does Azure Web PubSub Service meet my requirements for message throughput (for example, sending 100,000 messages per second)?
4544

46-
- For my specific scenario, which tier is suitable for me? Or how can I select the proper tier?
45+
- For my specific scenario, how can I select the proper unit size?
4746

48-
To answer these questions, this guide first gives a high-level explanation of the factors that affect performance. It then illustrates the maximum inbound and outbound messages for every tier for typical use cases: **Send to groups through Web PubSub subprotocol**, **upstream**, and **rest api** .
47+
To answer these questions, this guide first gives a high-level explanation of the factors that affect performance. It then illustrates the maximum inbound and outbound messages for typical use cases: **Send to groups through Web PubSub subprotocol**, **upstream**, and **rest api** .
4948

5049
This guide can't cover all scenarios (and different use cases, message sizes, message sending patterns, and so on). But it provides some basic information to understand the performance limitation.
5150

@@ -55,7 +54,7 @@ This section describes the performance evaluation methodologies, and then lists
5554

5655
### Methodology
5756

58-
*Throughput* and *latency* are two typical aspects of performance checking. For Azure Web PubSub Service, each SKU tier has its own throughput throttling policy. The policy defines *the maximum allowed throughput (inbound and outbound bandwidth)* as the maximum achieved throughput when 99 percent of messages have latency that's less than 1 second.
57+
*Throughput* and *latency* are two typical aspects of performance checking. The *maximum throughput (inbound and outbound bandwidth)* is defined as the maximum achieved throughput when 99 percent of messages have latency that's less than 1 second. It's **not** a hard limit.
5958

6059
### Performance factors
6160

@@ -67,7 +66,7 @@ For **echo**, the client sends a message to the upstream, and upstream echoes th
6766

6867
In summary, the following factors affect the inbound and outbound capacity:
6968

70-
- SKU tier (CPU/memory)
69+
- Unit size (CPU/memory)
7170

7271
- Number of connections
7372

@@ -78,11 +77,11 @@ In summary, the following factors affect the inbound and outbound capacity:
7877
- Use-case scenario (routing cost)
7978

8079

81-
### Finding a proper SKU
80+
### Finding a proper unit size
8281

83-
How can you evaluate the inbound/outbound capacity or find which tier is suitable for a specific use case?
82+
How can you evaluate the inbound/outbound capacity or find which unit size is suitable for a specific use case?
8483

85-
Every tier has its own maximum inbound bandwidth and outbound bandwidth. A smooth user experience isn't guaranteed after the inbound or outbound traffic exceeds the limit.
84+
Each unit size has its own maximum inbound bandwidth and outbound bandwidth. A smooth user experience isn't guaranteed after the inbound or outbound traffic exceeds the threshold.
8685

8786
```
8887
inboundBandwidth = inboundConnections * messageSize / sendInterval
@@ -93,9 +92,9 @@ Every tier has its own maximum inbound bandwidth and outbound bandwidth. A smoot
9392
- *outboundConnections*: The number of connections receiving the message.
9493
- *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.
9594
- *sendInterval*: The interval for sending messages. For example, 1 second means sending one message every second. A smaller interval means sending more messages in a time period. For example, 0.5 second means sending two messages every second.
96-
- *Connections*: The committed maximum threshold for Azure Web PubSub Service for every tier. Connections that exceed the threshold get throttled.
95+
- *Connections*: The committed maximum threshold for Azure Web PubSub Service for each unit size. Connections that exceed the threshold get throttled.
9796

98-
Assume that the upstream is powerful enough and isn't the performance bottleneck. Then, check the maximum inbound and outbound bandwidth for every tier.
97+
Assume that the upstream is powerful enough and isn't the performance bottleneck. Then, check the maximum inbound and outbound bandwidth for each unit size.
9998

10099
## Case study
101100

@@ -111,39 +110,40 @@ The service supports a specific subprotocol called `json.webpubsub.azure.v1`, wh
111110
Group member and group count are two factors that affect performance. To simplify the analysis, we define two kinds of groups:
112111

113112
- **Big group**: The group number is always 10. The group member count is equal to (max
114-
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then every group has 1000 / 10 = 100 members.
113+
connection count) / 10. For example, for Unit 1, if there are 1,000 connection counts, then every group has 1000 / 10 = 100 members.
115114
- **Small group**: Every group has 10 connections. The group number is equal to (max
116-
connection count) / 10. For example, for Unit1, if there are 1,000 connection counts, then we have 1000 / 10 = 100 groups.
115+
connection count) / 10. For example, for Unit 1, if there are 1,000 connection counts, then we have 1000 / 10 = 100 groups.
117116

118117
**Send to group** brings a routing cost to Azure Web PubSub Service because it has to find the target connections through a distributed data structure. As the sending connections increase, the cost increases.
119118

120119
##### Big group
121120

122121
For **send to big group**, the outbound bandwidth becomes the bottleneck before hitting the routing cost limit. The following table lists the maximum outbound bandwidth.
123122

124-
| Send to big group | Unit1 | Unit2 | Unit5 | Unit10 | Unit20 | Unit50 | Unit100 |
125-
|---------------------------|-------|-------|--------|--------|------- |--------|---------|
126-
| Connections | 1,000 | 2,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000|
127-
| Group member count | 100 | 200 | 500 | 1,000 | 2,000 | 5,000 | 10,000 |
128-
| Group count | 10 | 10 | 10 | 10 | 10 | 10 | 10|
129-
| Inbound messages per second | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
130-
| Inbound bandwidth | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps |
131-
| Outbound messages per second | 3,000 | 6,000 | 15,000 | 30,000 | 60,000 | 150,000 | 300,000 |
132-
| Outbound bandwidth | **6 MBps** | **12 MBps** | **30 MBps** | **60 MBps** | **120 MBps** | **300 MBps** | **600 MBps** |
123+
| Send to big group | Unit 1 | Unit 2 | Unit 10 | Unit 50 | Unit 100 | Unit 200 | Unit 500 | Unit 1000 |
124+
|-------------------|-------|-------|--------|--------|---------|----------|----------|-----------|
125+
| Connections | 1,000 | 2,000 | 10,000 | 50,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
126+
| Group member count | 100 | 200 | 1,000 | 5,000 | 10,000 | 5,000 | 10,000 | 20,000 |
127+
| Group count | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
128+
| Inbound messages per second | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 |
129+
| Inbound bandwidth | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps | 60 KBps |
130+
| Outbound messages per second | 3,000 | 6,000 | 30,000 | 150,000| 300,000 | 600,000 | 1,500,000| 3,000,000 |
131+
| Outbound bandwidth | **6 MBps** | **12 MBps** | **60 MBps** | **300 MBps** | **600 MBps** | **1,200 MBps** | **3,000 MBps** | **6,000 MBps** |
132+
133133

134134
##### Small group
135135

136-
The routing cost is significant for sending message to many small groups. Currently, the Azure Web PubSub Service implementation hits the routing cost limit at Unit 50. Adding more CPU and memory doesn't help, so Unit100 can't improve further by design. If you need more inbound bandwidth, contact customer support.
136+
The routing cost is significant for sending message to many small groups. Currently, the Azure Web PubSub Service implementation hits the routing cost limit at Unit 50. Adding more CPU and memory doesn't help, so Unit 100 can't improve further by design. If you need more inbound bandwidth, need to scale up to use **Premium_P2**(unit >100).
137137

138-
| Send to small group | Unit1 | Unit2 | Unit5 | Unit10 | Unit20 | Unit50 | Unit100 |
139-
|---------------------------|-------|-------|--------|--------|--------|--------|---------|
140-
| Connections | 1,000 | 2,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000 |
141-
| Group member count | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
142-
| Group count | 100 | 200 | 500 | 1,000 | 2,000 | 5,000 | 10,000 |
143-
| Inbound messages per second | 400 | 800 | 2,000 | 4,000 | 8,000 | 15,000 | 15,000 |
144-
| Inbound bandwidth | 800 KBps | 1.6 MBps | 4 MBps | 8 MBps | 16 MBps | 30 MBps | 30 MBps |
145-
| Outbound messages per second | 4,000 | 8,000 | 20,000 | 40,000 | 80,000 | 150,000 | 150,000 |
146-
| Outbound bandwidth | **8 MBps** | **16 MBps** | **40 MBps** | **80 MBps** | **160 MBps** | **300 MBps** | **300 MBps** |
138+
| Send to small group | Unit 1 | Unit 2 | Unit 10 | Unit 50 | Unit 100 | Unit 200 | Unit 500 | Unit 1000 |
139+
|---------------------------|-------|-------|--------|--------|---------|--------|---------|---------|
140+
| Connections | 1,000 | 2,000 | 10,000 | 50,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
141+
| Group member count | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
142+
| Group count | 100 | 200 | 1,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000 |
143+
| Inbound messages per second | 200 | 400 | 2,000 | 10,000 | 10,000 | 20,000 | 50,000 | 100,000 |
144+
| Inbound bandwidth | 400 KBps | 800 KBps | 4 MBps | 20 MBps | 20 MBps | 40 MBps | 100 MBps | 200 MBps |
145+
| Outbound messages per second |2,000 | 4,000 | 20,000 | 100,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
146+
| Outbound bandwidth | **4 MBps** | **8 MBps** | **40 MBps** | **200 MBp**s | **200 MBps** | **400 MBps** | **1,000 MBps** | **2,000 MBps** |
147147

148148
> [!NOTE]
149149
> The group count, group member count listed in the table are **not hard limits**. These parameter values are selected to establish a stable benchmark scenario.
@@ -162,11 +162,12 @@ For every event, it formulates an HTTP POST request to the registered upstream a
162162

163163
In this case, the app server writes back the original message back in the http response. The behavior of **echo** determines that the maximum inbound bandwidth is equal to the maximum outbound bandwidth. For details, see the following table.
164164

165-
| Echo | Unit1 | Unit2 | Unit5 | Unit10 | Unit20 | Unit50 | Unit100 |
166-
|-----------------------------------|-------|-------|-------|--------|--------|--------|---------|
167-
| Connections | 1,000 | 2,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000 |
168-
| Inbound/outbound messages per second | 500 | 1,000 | 2,500 | 5,000 | 10,000 | 25,000 | 50,000 |
169-
| Inbound/outbound bandwidth | **1 MBps** | **2 MBps** | **5 MBps** | **10 MBps** | **20 MBps** | **50 MBps** | **100 MBps** |
165+
| Echo | Unit 1 | Unit 2 | Unit 10 | Unit 50 | Unit 100 | Unit 200 | Unit 500 | Unit 1000 |
166+
|------|-------|-------|--------|--------|---------|----------|----------|-----------|
167+
| Connections | 1,000 | 2,000 | 10,000 | 50,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
168+
| Inbound/outbound messages per second | 500 | 1,000 | 5,000 | 25,000 | 50,000 | 100,000 | 250,000 | 500,000 |
169+
| Inbound/outbound bandwidth | **1 MBps** | **2 MBps** | **10 MBps** | **50 MBps** | **100 MBps** | **200 MBps** | **500 MBps** | **1,000 MBps** |
170+
170171

171172

172173

@@ -179,22 +180,23 @@ Azure Web PubSub provides powerful [APIs](/rest/api/webpubsub/) to manage client
179180
#### Send to user through REST API
180181
The benchmark assigns usernames to all of the clients before they start connecting to Azure Web PubSub Service.
181182

182-
| Send to user through REST API | Unit1 | Unit2 | Unit5 | Unit10 | Unit20 | Unit50 | Unit100 |
183-
|---------------------------|-------|-------|--------|--------|--------|---------|---------|
184-
| Connections | 1,000 | 2,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000 |
185-
| Inbound/outbound messages per second | 180 | 360 | 900 | 1,800 | 3,600 | 9,000 | 18,000 |
186-
| Inbound/outbound bandwidth | **360 KBps** | **720 KBps** | **1.8 MBps** | **3.6 MBps** | **7.2 MBps** | **18 MBps** | **36 MBps** |
183+
| Send to user through REST API | Unit 1 | Unit 2 | Unit 10 | Unit 50 | Unit 100 | Unit 200 | Unit 500 | Unit 1000 |
184+
|-------------------------------|-------|-------|--------|--------|---------|----------|----------|-----------|
185+
| Connections | 1,000 | 2,000 | 10,000 | 50,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
186+
| Inbound/outbound messages per second | 180 | 360 | 1,800 | 9,000 | 18,000 | 36,000 | 90,000 | 180,000 |
187+
| Inbound/outbound bandwidth | **360 KBps** | **720 KBps** | **3.6 MBps** | **18 MBps** | **36 MBps** | **72 MBps** | **180 MBps** | **360 MBps** |
188+
187189

188190
#### Broadcast through REST API
189-
The bandwidth limit is the same as that for **send to big group**.
190-
191-
| Broadcast through REST API | Unit1 | Unit2 | Unit5 | Unit10 | Unit20 | Unit50 | Unit100 |
192-
|---------------------------|-------|-------|--------|--------|--------|---------|---------|
193-
| Connections | 1,000 | 2,000 | 5,000 | 10,000 | 20,000 | 50,000 | 100,000 |
194-
| Inbound messages per second | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
195-
| Outbound messages per second | 3,000 | 6,000 | 15,000 | 30,000 | 60,000 | 150,000 | 300,000 |
196-
| Inbound bandwidth | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps |
197-
| Outbound bandwidth | **6 MBps** | **12 MBps** | **30 MBps** | **60 MBps** | **120 MBps** | **300 MBps** | **600 MBps** |
191+
The bandwidth is the same as that for **send to big group**.
192+
193+
| Broadcast through REST API | Unit 1 | Unit 2 | Unit 10 | Unit 50 | Unit 100 | Unit 200 | Unit 500 | Unit 1000 |
194+
|----------------------------|-------|-------|--------|--------|---------|----------|----------|-----------|
195+
| Connections | 1,000 | 2,000 | 10,000 | 50,000 | 100,000 | 200,000 | 500,000 | 1,000,000 |
196+
| Inbound messages per second| 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
197+
| Outbound messages per second | 3,000 | 6,000 | 30,000 | 150,000| 300,000 | 600,000 | 1,500,000 | 3,000,000 |
198+
| Inbound bandwidth | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps | 6 KBps |
199+
| Outbound bandwidth | **6 MBps** | **12 MBps** | **60 MBps** | **300 MBps** | **600 MBps** | **1,200 MBps** | **3,000 MB** | **6,000MB**|
198200

199201
## Next steps
200202

0 commit comments

Comments
 (0)