@Vighnesh Nayak S , Apologies for the delayed response from over the weekend.
To provide more clarify on how it works on Azure WebApp - w/ WebJobs, Scale instances, Slots and Singleton.
-By default, WebJobs scale with their associated Azure Web Apps instance.
If a continuous job is set as singleton
(set to =true), it'll run only on a single instance opposed to running on all instances.
“WebJobs content” is swapped.
“WebJobs schedulers” aren’t swapped across swap slots.
Checkout the doc: Which settings are swapped?
-Also, each slot is in itself a regular Azure Web App, it will have its own app settings, connection string, WebJob and any other configuration.
If you have multiple deployment slots for an app, all deployment slots also run on the same VM instances. Example- If you enable diagnostic logs, perform backups, or run WebJobs, they also use CPU cycles and memory on these VM instances.
- Furthermore, to prevent WebJobs from running on the staging slot you may add an app setting called
WEBJOBS_STOPPED
and set it to 1.
Ensure that the app setting is sticky to the slot otherwise it'll propagate to the production slot.