Hello @Cairn Azure Functions uses a component called the scale controller to monitor the rate of events and determine whether to scale out or scale in.
The scale controller uses heuristics for each trigger type. For example, when you're using an Azure Queue storage trigger, it scales based on the queue length and the age of the oldest queue message.
When there are multiple queue messages waiting, the queue trigger retrieves a batch of messages and invokes function instances concurrently to process them.
By default, the batch size is 16. When the number being processed gets down to 8, the runtime gets another batch and starts processing those messages. So the maximum number of concurrent messages being processed per function on one virtual machine (VM) is 24.
This limit applies separately to each queue-triggered function on each VM. If your function app scales out to multiple VMs, each VM will wait for triggers and attempt to run functions. In your case, if you have a single queue, the queue trigger will retrieve a batch of messages and invoke function instances concurrently to process them.
This will help you to manage the queues and functions more efficiently. However, the time taken to respond to all the messages will depend on the number of messages in the queue and the processing time of each message.
You can adjust the batch size and the threshold for getting a new batch in the host.json file to optimize the performance of your function app.
I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.