Do the settings in host.json apply to each function individually, or apply to all of the functions as a whole?
For example, I've two functions in the same Project that both get messages from Azure ServiceBus Queues.
If I set maxConcurrentCalls to 10 in host.json, does that mean that as a whole only 10 concurrent calls to ServiceBus will be made, or that it is 10 per function, so there will be 20 concurrent calls?
Thanks in advance.
The host. json metadata file contains configuration options that affect all functions in a function app instance. This article lists the settings that are available starting with version 2. x of the Azure Functions runtime. Note.
Organize your functions As part of your solution, you likely develop and publish multiple functions. These functions are often combined into a single function app, but they can also run in separate function apps.
There are three basic hosting plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan.
host.json
file is shared for all functions of a FunctionApp. That's to say that maxConcurrentCalls
value will apply to all functions of the app, as any other setting will.
The effect of maxConcurrentCalls
will be independent for each function. In your example, each function will have up to 10 messages processed concurrently. If you set it to 1, there will be 1 thread working per function.
Note that maxConcurrentCalls
applies per instance. If you have multiple instances running, the max concurrency increases proportionally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With