Start Debugging
2020-11-18 Updated 2021-02-19 azureazure-functions

Azure Functions vs WebJobs – Which to choose

Compare Azure Functions and WebJobs: key differences in scaling, pricing, triggers, and when to choose one over the other.

Both are code-first technologies targeting developers (as opposed to design-first workflow services). They enable the orchestration and integration of different business applications into a single workflow and provide more control over the performance of your workflow plus the ability to write custom code as part of the business process.

Azure WebJobs

WebJobs are a part of the Azure App Service that you can use to run a program or script automatically. There are two kinds of WebJob:

For determining the actions of your WebJob, you can write code in several different languages. For example, you can script the WebJob by writing code in a Shell Script (Windows, PowerShell, Bash). Alternatively, you can write a program in PHP, Python, Node.js, JavaScript or .NET and any of the languages supported by the framework.

Azure Functions

An Azure Function is in many ways similar to a WebJob, the main difference between them being that you don’t need to worry about the infrastructure at all.

It is ideal for running small pieces of code in the cloud. Azure will automatically scale your function in response to demand, and with the consumption plan, you only pay for the time your code takes to run.

They can run on a series of different triggers like for example:

Differences

FeatureAzure WebJobsAzure Functions
Automatic scalingNoYes
Development and testing in a browserNoYes
Pay-per-use pricingNoYes
Integration with Logic AppsNoYes
Package managersNuGet if you are using the WebJobs SDKNuGet and NPM
Can be part of an App Service applicationYesNo
Provides close control of JobHostYesNo

Conclusions

Azure Functions are in general more flexible and easier to administrate. However, WebJobs are a better solution when:

< Back