Skip to content

Commit 8053389

Browse files
committed
Acrolinix fixes
1 parent 7c074bc commit 8053389

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Target Based Scaling provides a fast and intuitive scaling model for customers a
1515
- Event Hubs
1616
- Cosmos DB
1717

18-
It replaces the previous incremental scaling model as the default for these extension types. Incremental scaling allowed a maximum of 1 worker to be added or removed at [each new instance rate](event-driven-scaling.md#understanding-scaling-behaviors) and used more complicated heuristics for deciding when to scale out and scale in, so scaling was much less reactive. In contrast, Target Based Scaling allows simultaneous scale out of up to 4 instances and the total number of instances the function app will try to scale to is the length of your event source divided by the target number of executions per instance:
18+
Target Based Scaling replaces the previous incremental scaling model as the default for these extension types. Incremental scaling added or removed a maximum of 1 worker at [each new instance rate](event-driven-scaling.md#understanding-scaling-behaviors), with complex decisions for when to scale out and scale in. In contrast, Target Based Scaling allows scale up of 4 instances at a time, and the scaling decision is based on a simple target based equation:
1919

2020
$$ desiredWorkers = \lceil \frac{eventsourceLength}{targetExecutionsPerInstance} \rceil $$
2121

@@ -30,7 +30,7 @@ The defaults are the same as set by the SDKs used by the Azure Functions extensi
3030

3131
This table summarizes the `host.json` values that are used for target based scaling and the default values for each extension type:
3232

33-
| Extension | host.json values | Default Value |
33+
| Extension | host.json values | Default Value |
3434
| -------------------------------------------------------------- | ----------------------------------------------------------------- | ------------- |
3535
| Service Bus (Extension v5.x+, Single Dispatch) | extensions.serviceBus.maxConcurrentCalls | 16 |
3636
| Service Bus (Extension v5.x+, Single Dispatch Sessions Based) | extensions.serviceBus.maxConcurrentSessions | 8 |
@@ -54,7 +54,7 @@ The following section explains how to configure the target for each of the suppo
5454
## Details per Extension
5555
### Service Bus Queues and Topics
5656

57-
The Service Bus extension support three execution models, which are determined by the `IsBatched` and `IsSessionsEnabled` attributes of your Service Bus trigger. The default value for `IsBatched` and `IsSessionsEnabled` is `false`, which means your Service Bus trigger is using Single Dispatch Processing if you haven't done any additional configuration.
57+
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`.
5858

5959
| | IsBatched | IsSessionsEnabled | Concurrency Setting Used for Target Based Scaling |
6060
| ------------------------------------------ | --------- | ----------------- | ------------------------------------------------- |
@@ -67,7 +67,7 @@ The Service Bus extension support three execution models, which are determined b
6767
6868

6969
#### Single Dispatch Processing
70-
In this model, each invocation of your function processes a single message. Concurrency is governed by the `maxConcurrentCalls` setting.
70+
In this model, each invocation of your function processes a single message. The `maxConcurrentCalls` setting governs concurrency.
7171

7272
For **v5.x+** of the Service Bus extension, modify the `host.json` setting `maxConcurrentCalls`:
7373
```json
@@ -149,7 +149,7 @@ For Functions host **v2.x+**, modify the `host.json` setting `maxMessageCount` i
149149
```
150150

151151
### Event Hubs
152-
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`. This will override the target value. If `targetUnprocessedEventThreshold` is set, the total unprocessed event count will be divided by this value to determine the number of instances, which will then be rounded up to a worker instance count that creates a balanced partition distribution.
152+
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 override 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.
153153

154154
> [!NOTE]
155155
> 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.
@@ -207,7 +207,7 @@ For **v2.x**+ of the Storage extension, modify the `host.json` setting `batchSiz
207207

208208
### Cosmos DB
209209

210-
Cosmos DB uses a function-level attribute, `MaxItemsPerInvocation`. You can modify this in the `function.json`, or directly in the trigger definition:
210+
Cosmos DB uses a function-level attribute, `MaxItemsPerInvocation`. Modify this in `function.json`, or directly in the trigger definition:
211211
```C#
212212
namespace CosmosDBSamplesV2
213213
{
@@ -256,14 +256,14 @@ Sample `bindings` section of a `function.json` with `MaxItemsPerInvocation` defi
256256
> Since Cosmos DB is a partitioned workload, the target instance count for Cosmos DB is capped by the number of physical partitions in your Cosmos DB. For further documentation on Cosmos DB scaling, please see notes on [physical partitions](../cosmos-db/nosql/change-feed-processor.md#dynamic-scaling) and [lease ownership](../cosmos-db/nosql/change-feed-processor.md#dynamic-scaling).
257257
258258
## Opting Out
259-
Target Based Scaling is an opt-out feature except for function apps on the the Premium plan with Runtime Scale Monitoring enabled. This means it is on by default for the Functions Consumption plan, and Premium plans without Runtime Scale Monitoring. If you wish to disable Target Based Scaling and revert to incremental scaling, add the following app setting to your function app:
259+
Target Based Scaling is an opt-out feature except for function apps on the the Premium plan with Runtime Scale Monitoring enabled. It is on by default for apps on the Consumption plan or Premium plans without Runtime Scale Monitoring. If you wish to disable Target Based Scaling and revert to incremental scaling, add the following app setting to your function app:
260260

261261
| App Setting | Value |
262262
| ----------------------------- | ----- |
263263
|`TARGET_BASED_SCALING_ENABLED` | 0 |
264264

265265
## Premium Plans with Runtime Scale Monitoring Enabled
266-
In [Runtime Scale Monitoring](functions-networking-options.md?tabs=azure-cli#premium-plan-with-virtual-network-triggers), Target Based Scaling is handled by the extensions. Hence, in addition to the function app runtime requirement above, your extension packages must meet the following requirements:
266+
In [Runtime Scale Monitoring](functions-networking-options.md?tabs=azure-cli#premium-plan-with-virtual-network-triggers), the extensions handle Target Based Scaling. Hence, in addition to the function app runtime version requirement, your extension packages must meet the following minimum versions:
267267

268268
| Extension Name | Minimum Version Needed |
269269
| -------------- | ---------------------- |
@@ -279,4 +279,4 @@ Additionally, Target Based Scaling is currently an **opt-in** feature for this c
279279
|`TARGET_BASED_SCALING_ENABLED` | 1 |
280280

281281
## Dynamic Concurrency Support
282-
Target Based Scaling introduces faster scale out and in, and uses defaults for the targets. When using Service Bus or Storage queues with Target Based Scaling, you have the option of enabling [Dynamic Concurrency](functions-concurrency.md#dynamic-concurrency). In this configuration, the target metric will be determined automatically by Dynamic Concurrency feature over time, instead of the `host.json` and function attributes defined above.
282+
Target Based Scaling introduces faster scale out and in, and uses defaults for the targets. When using Service Bus or Storage queues with Target Based Scaling, you have the option of enabling [Dynamic Concurrency](functions-concurrency.md#dynamic-concurrency). In this configuration, the target metric is determined automatically by Dynamic Concurrency feature over time, instead of the `host.json` and function attributes.

0 commit comments

Comments
 (0)