Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I organize a solution with multiple Azure Functions?

Where can I find guidance on organizing a Visual Studio solution with multiple Azure Functions? Specifically, how should the project be organized?

A single Azure Function resides in a single class file. I suppose each function could be its own class file, all stored within a single project. But is this the optimal solution or do I risk future complications due to a poorly organized project / solution?

like image 629
DenaliHardtail Avatar asked Sep 01 '17 02:09

DenaliHardtail


People also ask

Can multiple Azure functions use the same storage account?

It's possible for multiple function apps to share the same storage account without any issues. For example, in Visual Studio you can develop multiple apps using the Azure Storage Emulator.

Can a function app have multiple functions Azure?

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.


1 Answers

The MS Azure team will probably have a better answer but this is what has worked for us so far.

  • We have several function apps, each are in their own project (and solution).
  • Of those function apps, some have only a single function, others have multiple functions each in their own class/file.
  • Where we have multiple functions, it is because those functions are all related to a particular feature area of our system. Hence they work together, and for us it makes sense to maintain and deploy them as a group.
  • Other function apps are independent, containing only a single function doing a job unrelated to any other function. E.g. we have one timer driven function that crunches some numbers and sends a push notification as required.
  • Grouping the functions in this way has (so far) made sense for us as it gives us a balance between keeping our deployment relatively simple and being able to scale the 'groups' independently.

Anyway this has proved good enough for our project thus far, but I'd be interested to see if there are better ways.

like image 113
Garth Mason Avatar answered Oct 11 '22 20:10

Garth Mason