5
votes

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.

1

1 Answers

10
votes

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.