skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. I think there are some things to consider:

    • Having all functions in one solution means having them all in the same code repository. That means if you have different teams they all need access to that same repo. This is not always an ideal scenario in terms of ownership and access permissions
    • Having all functions in one solution means you can only deploy them all together. To me that does not look like an ideal scenario. You only want to deploy the ones that have changed. By deploying them together you create a strong connection between them when it comes to deployment.
    • By having them in one solution you create a risk of having developers share code between them and make it less easy to change one function if doing so means that all functions are affected when a piece of shared code is modified.
    • By using bicep and bicep modules you can easily deploy the different functions and reduce deployment overhead.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search