Features | Azure Functions | Azure Logic App |
What is | Azure Functions is a code being triggered by an event. | Logic Apps is a workflow triggered by an event. |
Way to develop | Code first approach, you can select from supported languages and start the development. | Designer first approach, where you add actions and configure them using visual designer/editor. |
How to develop | Development can be done using Azure Portal, Visual Studio, Visual code or any supporting IDE | Development can be done using Azure Portal and Visual Studio, Visual code |
What Languages supported | C#, F#, Java, JavaScript, Python, TypeScript, PowerShell etc. | Only JSON that too in code view |
Defining Workflow | Workflow in Azure Function can be defined using Durable function. One Orchestrator function that has the workflow defined with several activity functions. | Workflow in Azure Logic App is designed by adding steps(actions) and with help of connectors. |
| - Visual Studio Code publish
- Visual Studio publish
- Core Tools publish
- Deployment Center (CI/CD)
- Container deployments
- Azure Pipelines
- GitHub Actions
- Deployment slots
| After creating an Azure Resource Manager template of logic app, you can deploy your template in following ways: - Azure portal
- Visual Studio
- Azure PowerShell
- Azure CLI
- Azure Resource Manager REST API
- Azure DevOps
|
Deployment Models(Hosting Plans) |
- Consumption
- Premium
- Dedicated
|
- Standard (Single Tenant)
- Consumption (MultiTenant)
- Consumption(ISE)
|
How to Secure | Using following Azure Functions can be secured
- Function Keys
- Active Directory Authentication
- APIM
- Deploying in ASE(App service Environment)
| Using following Azure Logic apps can be secured
- RBAC
- Active Directory Authentication
- APIM
- Deploying in ISE(Integrated service Environment)
- IP Address restrictions
|
Networking options | There is no provision yet to connect Azure function in consumption plan to connect on premise resources. When using Azure Functions within an App Service Plan,it offers support for many networking options like Hybrid Connections, VNET Integration and can be part of App Service Environment. | With the help of On Premise data gateway, logic App in consumption can connect with on premise resources. In the case of a logic app in ISE, as ISE is part of a virtual network, it does allow on premise resource access. |
Cost of use | The Cost of Azure Functions in consumption plan is based on resource consumption and executions per second.
Whereas when opted for App service plan costing is not based on execution rather on resource consumption. | The Cost of Azure logic apps in consumption plan is based on number of times trigger, action or connector is executed and 0.12 gb/month for data retention.
Also there is a cost associated with the Integration account, if it is used.
If opted for ISE, it is fixed and also includes one Integration Account. |
Trigger | Supports only one trigger.
It can be triggered with configured triggers like HTTPTrigger, TimerTrigger, QueueTrigger etc. | Supports more than one trigger but not through designer instead through code view. It can be triggered with API as connectors, manually, time based etc. |
Can be used Interchangeably | Can be used in place of Logic App in most of the cases. | In Limited scenario logic apps can be used in place of Azure Function. |
Ease of use | Bit complex, as coding is involved. | Easy, as no/low code involved and majorly configuration. |
Monitoring Options | You can use the Azure Monitor tab to see the execution history, also Application Insights can be used. | With the help of Azure portal where the Run history, Trigger history is captured along with details on each action's input and output.
Also Log Analytics can be leveraged. |
Connectivity options | No connectors and connectivity is limited through input and output bindings. | It is the strength of Logic app, more than 200+ out of box connectors available and more in the pipeline. |
State | Azure functions are stateless in nature.
However Azure Durable functions are stateful. | Azure logic Apps are stateful in nature however with Logic App standard you have the option to create a stateful or stateless workflow. |
Exception Handling | Try-catch implementation can be done wherever required. | Can be implemented with the use of features like Retry policy, Run After Property and Scopes (Try/Catch). |
Management | Can be managed through Azure Portal, REST API and Visual Studio | Can be managed through Azure portal, REST API, PowerShell and also through Visual Studio. |
Predefined Templates | Around 21 templates are available to choose from. | Lot of templates are made available based on most used scenarios. |
APIM integration | Can be imported as an api in APIM | Can be imported as an api in APIM |
Nesting option | A function can be called from another function. | A logic app can be called from another logic app. |
Proxy option | Out of box Proxy feature is available | No such feature |
When to use | Use cases can be anything which can executed as separate processes, examples
- File processing
- Sending emails
- For creating backup
- Report generation on schedule
- Order processing
- Sending scheduled Notifications
- Sending scheduled messages
- For scheduled database cleanup
- IoT data processing
and many more.
| Use cases can be anything where automation of process is required, examples
- Integrating various applications in an Enterprise
- Enabling B2B communication (EDI,AS2)
- Call Azure Automation run books
- Analyzing Twitter sentiments using Logic Apps
- Automating business Process
and many more. |
Where can it be executed | Primarily on Azure and also locally, in containers or any self managed servers. | Primarily in Azure, however with Logic app standard- offering it can be executed locally, in containers using Azure Arc enable Logic Apps and also in App Service environment. |