Is there a performance benefit of choosing the azure function
vs the http request
action?
There seems to be two ways to add an azure function to your logic app.
The first way is to simply trigger an Http Request
:
Alternatively, we can choose Azure function
as the action:
Is there a performance benefit of choosing the azure function
vs the http request
action?
The http trigger is more generic as it can handle any kind of http request. I would say if you have an azure function, use the azure function action as the function key won't be visible (security). There is no control over how quickly azure functions are invoked and their performance is tied to the plan selected.
Azure Functions take the concepts from WebJobs and expand on them in some interesting ways. First, Functions enable a whole raft of new trigger types. It is now possible to trigger on such things as Cosmos DB’s change feed, Event Hubs and WebHooks. As a web developer, the HTTP trigger is one of the most interesting.
An http request only has a drawback of making an HTTP call. This action is preferable when calling an API and the response does not need to be heavily processed. Calling an azure function through an API using an http request should be avoided because it incurs the cost of two operations.
Conclusion: Azure Functions' performance depends on a variety of factors. Hope this helps. You can just consider azure function as Webhook to be a more specific version of an HTTP request. The major difference being that WebHooks are generally configured to only respond to POST requests where as HTTP Requests can be used with all REST Verbs.
There is no control over how quickly azure functions
are invoked and their performance is tied to the plan selected. MSDN's Understanding Serverless Cold Start and this blog post explain there is a 2 - 10 second overhead when calling an azure function that have not been called recently. The start up time depends on the language it is written it and its dependencies. Running your azure functions using a dedicated plan avoids the problem.
An http request
only has a drawback of making an HTTP call. This action is preferable when calling an API and the response does not need to be heavily processed.
Calling an azure function
through an API using an http request
should be avoided because it incurs the cost of two operations. Presumably an azure function is not invoked via a simple HTTP when chosen directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With