mantadt
mantadt

Reputation: 101

Scaling up of Azure Webjobs

I have an azure web app with 2 webjobs. I need to scale up just one webjob. Is there any way of scaling it up/out independent of the site and the other webjob?

Upvotes: 0

Views: 1268

Answers (1)

evilSnobu
evilSnobu

Reputation: 26314

Assuming your WebJobs are continuous,

From https://github.com/projectkudu/kudu/wiki/WebJobs-API

If a continuous job is set as singleton it'll run only on a single instance opposed to running on all instances. By default, it runs on all instances.

To set a continuous job as singleton during deployment (without the need for the REST API) you can simply create a file called settings.job with the content: { "is_singleton": true } and put it at the root of the (specific) WebJob directory.

WebJobs that you'd like to stay on one instance, set as singleton. The rest of them will scale automagically with your App Service Plan.

Triggered WebJobs only run on one instance.
Source: same URL as above.

Invoke a triggered job
Note: if the site has multiple instances, the job will run on one of them arbitrarily.

Upvotes: 2

Related Questions