Posts

Showing posts with the label Azure Functions

Azure Functions Vs. Logic Apps

Answer : Azure Functions is code being triggered by an event. Logic Apps is a workflow triggered by an event. That means that they are also, in fact, complementary. You can, as of sometime yesterday, add a Function as part of a workflow inside a Logic App via the Logic Apps UX. TL;DR - It's Logic Apps + Functions, not Logic Apps OR Functions. "Here are few use cases where you can decide to choose between Azure Functions and Azure Logic Apps. Azure Functions: Azure Function is code being triggered by an event Azure Functions can be developed and debugged on local workstation, which is a big plus to increase developer productivity When dealing with synchronous request/response calls, that execute more complex logic, Azure function is preferred option Logic Apps: Logic Apps is a work flow triggered by an event Logic Apps run only in the cloud, as it has a dependency on Microsoft-managed connectors. It cannot be debug, test or run Logic Apps locally Logi...

Azure Functions Timeout For Consumption Plan

Answer : (Other answer is a bit confusing, so writing instead of editing a lot) Azure Functions can now run up to 10 minutes using the consumption plan by adding the functionTimeout setting to your host.json file: In a serverless Consumption plan, the valid range is from 1 second to 10 minutes, and the default value is 5 minutes. In the Premium plan, the valid range is from 1 second to 60 minutes, and the default value is 30 minutes. In a Dedicated (App Service) plan, there is no overall limit, and the default value is 30 minutes. A value of -1 indicates unbounded execution, but keeping a fixed upper bound is recommended Source: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout File: host.json // Value indicating the timeout duration for all functions. // Set functionTimeout to 10 minutes { "functionTimeout": "00:10:00" } Source: https://buildazure.com/2017/08/17/azure-functions-extend-execution-timeout-pa...

Azure Functions - Can't Be Invoked From Azure WebJobs SDK

Answer : for some reason, had to go with .NET Standard 2.0 instead of .NET 461, which I was previously using, along the tutorial suggestion. It seems that when you create azure function initial, your function is .NET 461 and for some reason, you change it to .NET Standard 2.0. However, when your function is .NET Standard 2.0, your runtime version should be set to beta . So add AzureFunctionsVersion in your .csproj, because the default .NET 461 runtime is 1 and when you change to .NET core, you need to change the runtime to " beta " manually. You could refer to the following code: <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <AzureFunctionsVersion>v2</AzureFunctionsVersion> </PropertyGroup>

Azure Webjobs Vs Azure Functions : How To Choose

Answer : There are a couple options here within App Service. I won't touch on Logic Apps or Azure Automation, which also touch this space. Azure WebJobs This article is honestly the best explanation, but I'll summarize here. On Demand WebJobs aka. Scheduled WebJobs aka. Triggered WebJobs Triggered WebJobs are WebJobs which are run once when a URL is called or when the schedule property is present in schedule.job. Scheduled WebJobs are just WebJobs which have had an Azure Scheduler Job created to call our URL on a schedule, but we also support the schedule property, as mentioned previously. Summary: + Executable/Script on demand + Scheduled executions - Have to trigger via .scm endpoint - Scaling is manual - VM is always required Continuous WebJobs (non SDK) These jobs run forever and we will wake them up when they crash. You need to enable Always On for these to work, which means running them in Basic tier and above. Summary: + Executable/Scr...