Skip to content

Commit 7082e76

Browse files
authored
Merge pull request #312894 from deepganguly/keda_rules
update KEDA rules for ACA
2 parents 300dc11 + 24c553b commit 7082e76

1 file changed

Lines changed: 20 additions & 70 deletions

File tree

articles/container-apps/functions-keda-mappings.md

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,27 @@ The following table shows how [Azure Service Bus trigger parameters](/azure/azur
6767

6868
`metadata.messageCount` = `extensions.serviceBus.maxConcurrentCalls`
6969

70-
### Azure Service Bus (sessions-based)
70+
### Azure Service Bus (single dispatch, sessions-based)
7171

72-
The following table shows how [Azure Event Hubs trigger parameters](/azure/azure-functions/functions-bindings-service-bus) map to the [KEDA scaler configuration values](https://keda.sh/docs/scalers/azure-service-bus/).
72+
The following table shows how [Azure Service Bus trigger parameters](/azure/azure-functions/functions-bindings-service-bus) map to the [KEDA scaler configuration values](https://keda.sh/docs/scalers/azure-service-bus/) when `isSessionsEnabled` is true.
73+
74+
| Parameter | Functions Configuration | KEDA Configuration |
75+
|--|--|--|
76+
| **Parameter name** | `maxConcurrentSessions` | `messageCount` |
77+
| **Configuration path** | `extensions.serviceBus.maxConcurrentSessions` (host.json) | `metadata.messageCount` |
78+
| **Default value** | 8 | 5 |
79+
80+
| Functions trigger description | KEDA scaler description |
81+
|---|---|
82+
| Maximum number of sessions handled concurrently per scaled instance. Use this setting only when `isSessionsEnabled` is true. | Number of active messages in your Azure Service Bus queue or topic to scale on. |
83+
84+
#### Translation logic
85+
86+
`metadata.messageCount` = `extensions.serviceBus.maxConcurrentSessions`
87+
88+
### Azure Service Bus (batch processing)
89+
90+
The following table shows how [Azure Service Bus trigger parameters](/azure/azure-functions/functions-bindings-service-bus) map to the [KEDA scaler configuration values](https://keda.sh/docs/scalers/azure-service-bus/) for batch processing.
7391

7492
| Parameter | Functions Configuration | KEDA Configuration |
7593
|--|--|--|
@@ -132,79 +150,11 @@ Use this value as the target for the total lag (sum of all partition lags) to tr
132150

133151
`metadata.lagThreshold` = `LagThreshold`
134152

135-
### Azure Cosmos DB
136-
137-
The [Azure Cosmos DB trigger](/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger) doesn't map to a KEDA scaler. Use custom scaling instead.
138-
139-
The Functions trigger sets the maximum number of items received per function call. Transaction scope is preserved for stored procedures.
140-
141-
| Parameter | Functions Configuration | KEDA Configuration |
142-
|--|--|--|
143-
| **Parameter name** | `MaxItemsPerInvocation` | N/A |
144-
| **Configuration path** | Function trigger attribute | N/A |
145-
| **Default value** | 100 | N/A |
146-
147-
#### Example
148-
149-
```csharp
150-
[CosmosDBTrigger(
151-
databaseName: "ToDoItems",
152-
containerName: "Items",
153-
Connection = "CosmosDBConnection",
154-
MaxItemsPerInvocation = 100)]
155-
```
156153

157154
### HTTP trigger
158155

159156
The [HTTP trigger](/azure/azure-functions/functions-bindings-http-webhook) doesn't map to a KEDA scaler. Instead, use the Container Apps built-in HTTP scaling capabilities or external monitoring solutions.
160157

161-
| Parameter | Functions Configuration | KEDA Configuration |
162-
|--|--|--|
163-
| **Parameter name** | `maxConcurrentRequests` | N/A |
164-
| **Configuration path** | `extensions.http.maxConcurrentRequests` (host.json) | N/A |
165-
| **Default value** | 100 (Consumption), -1 (Premium/Dedicated) | N/A |
166-
167-
### Blob storage trigger
168-
169-
The following table shows how [Azure Blob Storage trigger parameters](/azure/azure-functions/functions-bindings-storage-blob) map to the [KEDA scaler configuration values](https://keda.sh/docs/scalers/azure-storage-blob/).
170-
171-
| Parameter | Functions Configuration | KEDA Configuration |
172-
|--|--|--|
173-
| **Parameter name** | `maxDegreeOfParallelism` | `blobCount` |
174-
| **Configuration path** | `extensions.blobs.maxDegreeOfParallelism` (host.json) | `metadata.blobCount` |
175-
| **Default value** | 8 × number of available cores | 5 |
176-
177-
| Functions trigger description | KEDA scaler description |
178-
|---|---|
179-
| Sets the number of concurrent invocations allowed for all blob-triggered functions in a function app. Minimum value: 1. | Average target value to trigger scaling actions. (Default: 5, Optional) |
180-
181-
#### Translation logic
182-
183-
`metadata.blobCount` = `extensions.blobs.maxDegreeOfParallelism`
184-
185-
### Event Grid
186-
187-
The [Azure Event Grid trigger parameters](/azure/azure-functions/functions-bindings-event-grid) don't map to a KEDA scaler.
188-
189-
The Event Grid trigger uses a webhook HTTP request. You configure this request by using the same `host.json` settings as the HTTP trigger. These settings control parallel execution for resource management.
190-
191-
### RabbitMQ trigger
192-
193-
The following table shows how [RabbitMQ trigger parameters](/azure/azure-functions/functions-bindings-rabbitmq) map to the [KEDA scaler configuration values](https://keda.sh/docs/scalers/rabbitmq-queue/).
194-
195-
| Parameter | Functions Configuration | KEDA Configuration |
196-
|--|--|--|
197-
| **Parameter name** | `prefetchCount` | `value` |
198-
| **Configuration path** | `extensions.rabbitMQ.prefetchCount` (host.json) | `metadata.value` |
199-
| **Default value** | 30 | 100.50 |
200-
201-
| Functions trigger description | KEDA scaler description |
202-
|---|---|
203-
| Number of messages the receiver can simultaneously request and cache. | Message backlog or publish/sec rate to trigger scaling. In QueueLength mode, the value represents the target queue length for scaling. |
204-
205-
#### Translation logic
206-
207-
`metadata.value` = `extensions.rabbitMQ.prefetchCount`
208158

209159
## Related content
210160

0 commit comments

Comments
 (0)