Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions - Shared code across Function Apps

Is there a way of sharing common code across two different Function Apps in Azure?

I understand it is possible to share code between two functions under the same Function App like so:

#load "../Shared/ServiceLogger.csx"

but I would like to share logging code between two different functions, each under it's own Function App. The reason for the functions being under two different Function Apps is that I need one to run on the Consumption plan and the other run on an App Service plan, unless there is another way of doing this?

like image 364
Chris B Avatar asked May 15 '17 15:05

Chris B


People also ask

Can a function app have multiple functions Azure?

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.

Is Azure functions and function app same?

Functions and Logic Apps are Azure services that enable serverless workloads. Azure Functions is a serverless compute service, whereas Azure Logic Apps is a serverless workflow integration platform. Both can create complex orchestrations.

Can Azure functions run in parallel?

Parallel execution Each instance of the function app, whether the app runs on the Consumption hosting plan or a regular App Service hosting plan, might process concurrent function invocations in parallel using multiple threads.

Can you have multiple Azure functions in one project?

Multiple Function App with Fewer Azure FunctionsAzure Function App is a container for one or more functions – each interacting with other Azure Services, APIs or applications. The function can be part of an overall serverless architecture, where components can still fail.


1 Answers

There is no straightforward way to share code across app boundary in Azure App Sercice, and this holds true both for Function Apps and Web Apps. You will need to deploy the relevant code into each app that needs it.

like image 109
David Ebbo Avatar answered Sep 28 '22 07:09

David Ebbo