Skip to content

Commit 1c0dfd6

Browse files
committed
Adding table header and updating _target executions per instance_
1 parent 382d824 commit 1c0dfd6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

articles/azure-functions/functions-target-based-scaling.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Target-based scaling introduces faster scaling, and uses defaults for _target ex
8686

8787
The Service Bus extension support three execution models, determined by the `IsBatched` and `IsSessionsEnabled` attributes of your Service Bus trigger. The default value for `IsBatched` and `IsSessionsEnabled` is `false`.
8888

89-
| | IsBatched | IsSessionsEnabled | Concurrency Setting Used for target-based scaling |
89+
| Execution Model | IsBatched | IsSessionsEnabled | Setting Used for _target executions per instance_ |
9090
| ------------------------------------------ | --------- | ----------------- | ------------------------------------------------- |
9191
| Single Dispatch Processing | false | false | maxConcurrentCalls |
9292
| Single Dispatch Processing (Session Based) | false | true | maxConcurrentSessions |
@@ -97,7 +97,7 @@ The Service Bus extension support three execution models, determined by the `IsB
9797
9898

9999
#### Single Dispatch Processing
100-
In this model, each invocation of your function processes a single message. The `maxConcurrentCalls` setting governs concurrency.
100+
In this model, each invocation of your function processes a single message. The `maxConcurrentCalls` setting governs _target executions per instance_.
101101

102102
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxConcurrentCalls`:
103103
```json
@@ -126,7 +126,8 @@ For Functions host **v2.x+**, modify the `host.json` setting `maxConcurrentCalls
126126
```
127127
#### Single Dispatch Processing (Session Based)
128128
In this model, each invocation of your function processes a single message. However, depending on the number of active sessions for your Service Bus topic or queue, each instance leases one or more sessions.
129-
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxConcurrentSessions`:
129+
130+
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxConcurrentSessions` to set _target executions per instance_:
130131
```json
131132
{
132133
"version": "2.0",
@@ -137,7 +138,7 @@ For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxC
137138
}
138139
}
139140
```
140-
For Functions host **v2.x+**, modify the `host.json` setting `maxConcurrentSessions` in `sessionHandlerOptions`:
141+
For Functions host **v2.x+**, modify the `host.json` setting `maxConcurrentSessions` in `sessionHandlerOptions` to set _target executions per instance_:
141142
```json
142143
{
143144
"version": "2.0",
@@ -153,7 +154,7 @@ For Functions host **v2.x+**, modify the `host.json` setting `maxConcurrentSessi
153154
#### Batch Processing
154155
In this model, each invocation of your function processes a batch of messages.
155156

156-
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxMessageBatchSize`:
157+
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxMessageBatchSize` to set _target executions per instance_:
157158
```json
158159
{
159160
"version": "2.0",
@@ -164,7 +165,7 @@ For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxM
164165
}
165166
}
166167
```
167-
For Functions host **v2.x+**, modify the `host.json` setting `maxMessageCount` in `batchOptions`:
168+
For Functions host **v2.x+**, modify the `host.json` setting `maxMessageCount` in `batchOptions` to set _target executions per instance_:
168169
```json
169170
{
170171
"version": "2.0",
@@ -179,12 +180,12 @@ For Functions host **v2.x+**, modify the `host.json` setting `maxMessageCount` i
179180
```
180181

181182
### Event Hubs
182-
For Event Hubs, Azure Functions scales based on the number of unprocessed events distributed across all the partitions in the hub. By default, the `host.json` attributes used are `maxEventBatchSize` and `maxBatchSize`. However, if you wish to fine-tune target-based scaling, you can define a separate parameter `targetUnprocessedEventThreshold` that overrides the target value without changing the batch settings. If `targetUnprocessedEventThreshold` is set, the total unprocessed event count is divided by this value to determine the number of instances, which is then be rounded up to a worker instance count that creates a balanced partition distribution.
183+
For Event Hubs, Azure Functions scales based on the number of unprocessed events distributed across all the partitions in the hub. By default, the `host.json` attributes used for _target executions per instance_ are `maxEventBatchSize` and `maxBatchSize`. However, if you wish to fine-tune target-based scaling, you can define a separate parameter `targetUnprocessedEventThreshold` that overrides to set _target executions per instance_ without changing the batch settings. If `targetUnprocessedEventThreshold` is set, the total unprocessed event count is divided by this value to determine the number of instances, which is then be rounded up to a worker instance count that creates a balanced partition distribution.
183184

184185
> [!NOTE]
185186
> Since Event Hubs is a partitioned workload, the target instance count for Event Hubs is capped by the number of partitions in your Event Hub.
186187
187-
For **v5.x+** of the Event Hubs extension, modify the `host.json` setting `maxEventBatchSize`:
188+
For **v5.x+** of the Event Hubs extension, modify the `host.json` setting `maxEventBatchSize` to set _target executions per instance_:
188189
```json
189190
{
190191
"version": "2.0",
@@ -196,7 +197,7 @@ For **v5.x+** of the Event Hubs extension, modify the `host.json` setting `maxEv
196197
}
197198
```
198199

199-
For **v3.x+** of the Event Hubs extension, modify the `host.json` setting `maxBatchSize` under `eventProcessorOptions`:
200+
For **v3.x+** of the Event Hubs extension, modify the `host.json` setting `maxBatchSize` under `eventProcessorOptions` to set _target executions per instance_:
200201
```json
201202
{
202203
"version": "2.0",
@@ -210,7 +211,7 @@ For **v3.x+** of the Event Hubs extension, modify the `host.json` setting `maxBa
210211
}
211212
```
212213

213-
If defined, `targetUnprocessedEventThreshold` in `host.json` will be used as the target value instead of `maxBatchSize` or `maxEventBatchSize`:
214+
If defined, `targetUnprocessedEventThreshold` in `host.json` will be used as _target executions per instance_ instead of `maxBatchSize` or `maxEventBatchSize`:
214215
```json
215216
{
216217
"version": "2.0",
@@ -223,7 +224,7 @@ If defined, `targetUnprocessedEventThreshold` in `host.json` will be used as the
223224
```
224225

225226
### Storage Queues
226-
For **v2.x**+ of the Storage extension, modify the `host.json` setting `batchSize`:
227+
For **v2.x**+ of the Storage extension, modify the `host.json` setting `batchSize` to set _target executions per instance_:
227228
```json
228229
{
229230
"version": "2.0",
@@ -237,7 +238,7 @@ For **v2.x**+ of the Storage extension, modify the `host.json` setting `batchSiz
237238

238239
### Cosmos DB
239240

240-
Cosmos DB uses a function-level attribute, `MaxItemsPerInvocation`. Modify this in `function.json`, or directly in the trigger definition:
241+
Cosmos DB uses a function-level attribute, `MaxItemsPerInvocation`. Modify this in `function.json` , or directly in the trigger definition, to set _target executions per instance_:
241242
```C#
242243
namespace CosmosDBSamplesV2
243244
{

0 commit comments

Comments
 (0)