| title | Azure Functions KEDA scaling mappings on Container Apps |
|---|---|
| description | Learn how Azure Functions trigger parameters map to KEDA scaling parameters for autoscaling in Azure Container Apps. |
| services | container-apps |
| author | craigshoemaker |
| ms.service | azure-container-apps |
| ms.topic | reference |
| ms.date | 01/15/2026 |
| ms.author | cshoe |
When you deploy Azure Functions on Azure Container Apps, the platform automatically translates your Functions trigger parameters into KEDA scaling configurations. This translation ensures that your Functions scale appropriately based on the incoming workload from various event sources.
Azure Functions on Container Apps uses KEDA to monitor event sources and scale your function apps. The platform automatically:
-
Translates Functions parameters: Converts your Functions trigger configuration (from
host.jsonor trigger attributes) into KEDA scaler metadata. -
Applies scaling rules: Uses the translated parameters to create appropriate KEDA scaling rules.
-
Monitors events: KEDA continuously monitors your event sources based on these rules.
-
Scales instances: Automatically scales your container instances up or down based on workload.
The following sections detail the specific parameter mappings for each trigger type.
The following sections detail how Azure Functions trigger parameters map to their corresponding KEDA scaler configurations for each supported trigger type.
The following table shows how Azure Storage Queue trigger parameters map to the KEDA scaler configuration values.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | batchSize |
queueLength |
| Configuration path | extensions.queues.batchSize (host.json) |
metadata.queueLength |
| Default value | 16 | 5 |
| Functions trigger description | KEDA scaler description |
|---|---|
The number of queue messages that the Functions runtime retrieves and processes in parallel. When the number being processed reaches the newBatchThreshold, the runtime fetches another batch. The maximum number of concurrent messages per function is batchSize plus newBatchThreshold. Set batchSize to 1 to eliminate concurrency unless the app scales out to multiple VMs. The maximum batchSize is 32. |
Target value for queue length passed to the scaler. For example, if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to three pods. |
metadata.queueLength = extensions.queues.batchSize
The following table shows how Azure Service Bus trigger parameters map to the KEDA scaler configuration values.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | maxConcurrentCalls |
messageCount |
| Configuration path | extensions.serviceBus.maxConcurrentCalls (host.json) |
metadata.messageCount |
| Default value | 16 | 5 |
| Functions trigger description | KEDA scaler description |
|---|---|
Limits the maximum number of concurrent calls per scaled instance. For multicore instances, the maximum is multiplied by the number of cores. Use this setting only when isSessionsEnabled is false. |
Number of active messages in your Azure Service Bus queue or topic to scale on. |
metadata.messageCount = extensions.serviceBus.maxConcurrentCalls
The following table shows how Azure Service Bus trigger parameters map to the KEDA scaler configuration values when isSessionsEnabled is true.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | maxConcurrentSessions |
messageCount |
| Configuration path | extensions.serviceBus.maxConcurrentSessions (host.json) |
metadata.messageCount |
| Default value | 8 | 5 |
| Functions trigger description | KEDA scaler description |
|---|---|
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. |
metadata.messageCount = extensions.serviceBus.maxConcurrentSessions
The following table shows how Azure Service Bus trigger parameters map to the KEDA scaler configuration values for batch processing.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | maxMessageBatchSize |
messageCount |
| Configuration path | extensions.serviceBus.maxMessageBatchSize (host.json) |
metadata.messageCount |
| Default value | 1000 | 5 |
| Functions trigger description | KEDA scaler description |
|---|---|
| Maximum number of messages passed to each function call for batch processing. | Number of active messages in your Azure Service Bus queue or topic to scale on. |
metadata.messageCount = extensions.serviceBus.maxMessageBatchSize
The following table shows how Azure Event Hubs trigger parameters map to the KEDA scaler configuration values.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | targetUnprocessedEventThreshold |
unprocessedEventThreshold |
| Configuration path | extensions.eventHubs.targetUnprocessedEventThreshold (host.json) |
metadata.unprocessedEventThreshold |
| Default value | null | 64 |
| Functions trigger description | KEDA scaler description |
|---|---|
| Desired number of unprocessed events per function instance. Used for target-based scaling. | Average target value to trigger scaling actions. |
metadata.unprocessedEventThreshold = extensions.eventHubs.targetUnprocessedEventThreshold
The following table shows how Apache Kafka trigger parameters map to the KEDA scaler configuration values.
| Parameter | Functions Configuration | KEDA Configuration |
|---|---|---|
| Parameter name | LagThreshold |
lagThreshold |
| Configuration path | Function trigger attribute | metadata.lagThreshold |
| Default value | 1000 | 10 |
| Functions trigger description | KEDA scaler description |
|---|---|
Use this value as the target executions per instance for the Kafka trigger. The number of desired instances is calculated based on the total consumer lag divided by LagThreshold. |
|
| Use this value as the target for the total lag (sum of all partition lags) to trigger scaling actions. |
[KafkaTrigger(
"BrokerList",
"topic",
ConsumerGroup = "$Default",
LagThreshold = 100)]metadata.lagThreshold = LagThreshold
The HTTP trigger doesn't map to a KEDA scaler. Instead, use the Container Apps built-in HTTP scaling capabilities or external monitoring solutions.