3
votes

I noticed when creating Azure Functions, that one Function App can have multiple functions.

Can someone please explain to me the rationale behind this?

My guess - since the Function App dictates the hosting (app service plan, or consumption plan), you could have one Function App on the app service plan, then have multiple functions inside that one function app sharing the same app service plan.

But this doesn't make sense in consumption plan, since if you had a Function App with "Consumption" plan, and 2x functions inside it, this would be the same cost as splitting the two functions into 2x Function apps with Consumption plan?

Can someone shed some light on why you would/would not group functions in a function app?

Thanks!

1

1 Answers

2
votes

The primary reason to host multiple function in a Function App is to keep related functions together. Essentially, think of it as a convenient grouping mechanism.

It also makes things simpler if the multiple functions need to access the same resources (e.g. storage accounts, Event Hubs, ...), as you only need to have one set of App Settings for all the functions.