Back

Explore Courses Blog Tutorials Interview Questions
+3 votes
8 views
in Azure by (1.2k points)

If I have to create code to trigger a queue so should I use a webjob or a function.

I've recently learnt about Azure functions and created some Azure Webjobs

There is a pricing difference between the two like no additional cost for an existing app in webjob.

From what I've learnt it looks like features of functions overlap with the feature of webjob.

Please help me out in choosing the best from the two.

2 Answers

+11 votes
by (10.5k points)
edited by

         Azure web jobs

  • Azure functions are not web jobs
  • Web jobs allow sharing of the resources of an App service plan between a Web app and a Web job.
  • Background processes can be executed as a command line executable or script.
  • Web jobs can be configured manually
  • Web jobs can be short or long running


    Azure functions
     
  • Azure functions are built using the Azure web jobs foundation.
  • Azure functions offer the same features as web jobs. There are some more add-ons:
  • With the Azure functions consumption plan you've to pay for only the functions which are in execution
  • The app service plan of Azure functions is a costlier option but in this, you've to pay for the reserved resources
0 votes
by (5.8k points)

Being Azure Functions based on the WebJobs SDK, they provide most of the functionality already available in WebJobs, but with some new cool capabilities.

In terms of triggers, in addition to those already available for WebJobs (e.g. Service Bus, Storage Queues, Storage Blobs, CRON schedules, WebHooks, EventHub, and File Cloud Storage providers), Azure Functions can be triggered as APIs. And HTTP calls don't require kudu credentials but can be authenticated via Azure AD and third-party identity providers.

Are you interested in learning Azure from scratch! Here's the right video for you on Azure provided by Intellipaat:

In regard to outputs, the only difference is that Functions can return a response when called via HTTP.

Both support a wide variety of languages, including: bash (.sh), batch (.bat / .cmd), C#, F#, Node.Js, PHP, PowerShell, and Python.

Being Functions currently in Preview, tooling is still not ideal. But Microsoft is working on it. Hopefully, we get the same flexibility of developing and testing Functions locally as we currently do for WebJobs with Visual Studio.

The most significant and cool advantages brought by Functions is the alternative of having a Dynamic Service Plan with a "Serverless" model, in which we don't need to manage VM instances or scaling; it's all managed for us. Additionally, by not having dedicated instances, we only pay for the resources we actually use.

A more detailed comparison between the two here: https://blog.kloud.com.au/2016/09/14/azure-functions-or-webjobs/

Browse Categories

...