Yes. On an App Service plan, Azure Functions uses Dedicated (App Service) plan scaling, which does not use automatic event-driven scale-out for Event Hubs. In that plan, instances must be manually configured or controlled with an App Service autoscale rule. That is the main reason backlog can grow during heavy traffic.
For Event Hubs-triggered functions, the practical scale-out limit is also tied to the number of Event Hub partitions. The number of concurrent function instances can equal the number of partitions, and that partition count is effectively the maximum target instance count for this workload.
Recommended changes:
- Check the hosting plan
- If the app is on a Dedicated/App Service plan, configure more instances manually or set up autoscale.
- If event-driven scaling is required, use a plan that supports it. The documentation recommends Flex Consumption for serverless Event Hubs workloads. In Flex Consumption, Event Hubs-triggered functions scale per function by using target-based scaling.
- Verify Event Hub partition count
- Maximum parallelism is achieved when there is roughly a one-to-one relationship between partitions and function instances.
- If the event hub has too few partitions, scale-out cannot go beyond that parallelism target.
- Partition count is fixed after creation except in Premium and Dedicated Event Hubs tiers.
- Tune Event Hubs trigger settings in
host.json- For Event Hubs extension v5.x+,
maxEventBatchSizeaffects target executions per instance. -
targetUnprocessedEventThresholdcan be set separately to control target-based scaling without changing batch settings. - If using target-based scaling, avoid setting
batchCheckpointFrequencyabove 1 because it can cause incorrect scaling behavior and prevent proper scale-in.
- For Event Hubs extension v5.x+,
- Increase per-instance throughput
- Enable batch processing where possible. Event Hubs performs better when messages are received in batches.
- Adjust batch size in
host.json. - Increase
FUNCTIONS_WORKER_PROCESS_COUNTto raise the number of worker processes per host, up to 10. This helps especially for single-threaded runtimes.
- Reduce contention inside the function app
- Host the Event Hubs-triggered function in its own function app if other functions are CPU- or memory-intensive.
- Give each function app its own storage account.
- Use a dedicated consumer group for each function app.
- If throughput still exceeds current Event Hubs capacity
- If the workload exceeds the maximum allowed throughput units, move to Event Hubs Premium or Dedicated tier.
In short: if the function is on an App Service plan, there is no Event Hubs-driven automatic scale-out to increase by a Functions setting alone. Increase App Service instances or autoscale, and validate that the Event Hub has enough partitions. For the best automatic scaling behavior with Event Hubs, move the workload to Flex Consumption and tune batching and worker-process settings.
- Performance and scale guidance for Event Hubs and Azure Functions
- Improve the performance and reliability of Azure Functions
- Performance and scale guidance for Event Hubs and Azure Functions
- Target-based scaling
- Concurrency in Azure Functions
- Event-driven scaling in Azure Functions (flex-consumption-plan)