Scaling



  • Azure Webjobs run on an Azure App Service. If we scale our App Service horizontally (add new instances), each instance will have its own JobHost.
  • Note that this only applies to WebJobs running in Continuous mode. On-demand and scheduled WebJobs are not affected by horizontal scaling, they always run a single instance.
  • If you have a continuous WebJob processing queue messages, and you scale the App Service Plan to 3 instances, you will have 3 instances of the WebJob running.
  • There might be WebJobs that you want to run in a single instance, because you might need to ensure that exactly one processing pipeline exists. For those WebJobs, you can add the Singleton attribute.
[Singleton]
public static void SingletonQueueProcessing([QueueTrigger("my_queue")] MyPOCOClass aMessage)
{
    //...
}
click below button to copy the code. By azure tutorial team

Related Searches to Scaling