Let's have a quick glance at the major similarities and differences, with an overview of Azure Functions, WebJobs and related concepts.
We can discuss Azure Functions and Azure App Service WebJobs together because they are both code-first integration services and designed for developers. They enable you to run a script or a piece of code in response to various events, such as new Storage Blobs or a WebHook request.
Here are their similarities for a quick glance,
- Both are built on Azure App Service and enjoy features such as source control, authentication, and monitoring.
- Both are developer-focused services.
- Both support standard scripting and programming languages.
- Both have NuGet and NPM support.
- Functions is the natural evolution of WebJobs in that it takes the best things about WebJobs and improves upon them. The improvements include:
- Serverless app model.
- Streamlined dev, test, and run of code, directly in the browser.
- Built-in integration with more Azure services and 3rd-party services like GitHub WebHooks.
- Pay-per-use, no need to pay for an App Service plan.
- Automatic, dynamic scaling.
- For existing customers of App Service, running on App Service plan is still possible (to take advantage of underutilized
- resources).
- Integration with Logic Apps.
The following table summarizes the differences between Functions and WebJobs,
Features |
Azure Functions |
Azure WebJobs |
Scaling |
Configurationless scaling |
Scale with App Service plan |
Pricing |
Pay-per-use or part of App Service plan |
Part of App Service plan |
Run-type |
Triggered, scheduled (by timer trigger) |
Triggered, continuous, scheduled |
Trigger events |
Timer, Azure Cosmos DB, Azure Event
Hubs, HTTP/WebHook (GitHub, Slack),
Azure App Service Mobile Apps, Azure
Event Hubs, Azure Storage queues and
blobs, Azure Service Bus queues and
topics |
Azure Storage queues and blobs, Azure
Service Bus queues and topics |
In-browser development |
Supported |
Not Supported |
C# |
Supported |
Supported |
F# |
Supported |
Not Supported |
JavaScript |
Supported |
Supported |
Java |
Preview |
Not supported |
Bash |
Experimental |
Supported |
Windows scripting (.cmd, .bat) |
Experimental |
Supported |
PowerShell |
Experimental |
Supported |
PHP |
Experimental |
Supported |
Python |
Experimental |
Supported |
TypeScript |
Experimental |
Not Supported |
Whether to use Functions or WebJobs ultimately depends on what you're already doing with App Service.
If you have an App Service app for which you want to run code snippets, and you want to manage them together in the same DevOps environment, use WebJobs.
In the following scenarios, use Functions.
- You want to run code snippets for other Azure services or 3rd-party apps.
- You want to manage your integration code separately from your App Service apps.
- You want to call your code snippets from a Logic app.
Cheers!