I am having a design conversation with my coworkers who are wanting to push into using Azure Functions. We have been discussing how to design the solution(s) for our functions and my opinion (based on what experience I have with Azure Functions) is that each function will sort of exist on its own in its own solution. Any methods needed to support the goal of the parent function can exist within the solution, but only if they are needed for the parent function to perform it’s task. This overall idea seems to be supported by the fact that in the Azure portal, if you create a new function, it creates the new function in a separate solution.
They seem to want to have all functions exist within a single solution, so that it acts like a repository of sorts, but that seems to be incorrect from what I have seen on documentation, Stack Overflow, etc. It also looks like that would potentially cause serious resource overhead, more effort to effectively manage said resources, and could cause outage issues for all functions should the repo have a failure. These functions would be associated with different areas of business logic throughout our company.
Ultimately, I am wanting to see what the best practice is for Azure Function solution design. I realize this may be a more abstract topic that has many different possible solutions, so it may not necessarily be a black and white answer. Any advice would be appreciated.
2
Answers
You can organize your functions any way you want but putting them into multiple projects means deploying them to multiple Function Apps, which means more money, more administrative overhead, more deployment overhead, and more points of failure.
I think there are some things to consider: