0

There are 10 VMs in Isolated tier and there are 10 deployment slots. I've 10 continuous webjobs one per each slot running in singleton mode. Can I expect webjobs to be distributed across VMs in 1:1 ratio i.e, 1 webjob per VM? Or is the distribution of webjobs done randomly?

1 Answers1

0

As you might be aware of that Isolated tiers run dedicated Azure VMs on dedicated Azure Virtual Networks and It provides network isolation on top of compute isolation to your apps. With the dedicated app plans means each web app is running on it’s own hardware.

Further WebJobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app

And for continuous type web job it runs on all instances that the web app runs on. but you can optionally restrict the WebJob to a single instance.

SnehaAgrawal-MSFT
  • 217
  • 1
  • 5
  • 9
  • Thanks SnehaAgrawal-MSFT. My follow up question is: How does App Service decides the VM for a singleton webjob? If I have 10 different singleton continuous webjobs, will the webjobs be distributed uniformly across all VMs? Or does it randomly pick a VM? – Vighnesh Nayak Nov 29 '22 at 10:34
  • So, the Singleton attribute ensures that only one instance of a function runs, even when there are multiple instances of the host web app. The Singleton attribute uses distributed locking to ensure that one instance runs. See below links might help: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#multiple-instances https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#singleton-attribute – SnehaAgrawal-MSFT Nov 29 '22 at 11:18