Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a performance benefit of choosing the `azure function` vs the `http request` action?

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:

enter image description here

Alternatively, we can choose Azure function as the action:

enter image description here

Is there a performance benefit of choosing the azure function vs the http request action?

like image 737
Alex Gordon Avatar asked Mar 18 '19 17:03

Alex Gordon


People also ask

What is the difference between HTTP trigger and azure function 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.

What are Azure Functions?

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.

Should I use HTTP or HTTP calls in azure?

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.

What is the difference between azure function and azure webhook?

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.


1 Answers

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.

like image 176
Noremac Avatar answered Sep 28 '22 11:09

Noremac