扩展 Azure Webjobs
Scaling up of Azure Webjobs
我有一个带有 2 个网络作业的 azure 网络应用程序。我只需要扩展一个网络作业。有什么方法可以独立于站点和其他网络作业来扩展它 up/out 吗?
假设您的 WebJobs 是连续的,
来自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,设置为单例。
其余部分将根据您的应用服务计划自动扩展。
在一个实例上仅 运行 触发了 WebJobs。
来源:同上URL。
Invoke a triggered job
Note: if the site has multiple instances, the job will run on one of them arbitrarily.
我有一个带有 2 个网络作业的 azure 网络应用程序。我只需要扩展一个网络作业。有什么方法可以独立于站点和其他网络作业来扩展它 up/out 吗?
假设您的 WebJobs 是连续的,
来自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,设置为单例。 其余部分将根据您的应用服务计划自动扩展。
在一个实例上仅 运行 触发了 WebJobs。
来源:同上URL。
Invoke a triggered job
Note: if the site has multiple instances, the job will run on one of them arbitrarily.