Search code examples
azurescaleoutwebjob

Scale out azure continuous webjob


I am trying to scale out a continuous webjob. My service plan is set on standard so i am able to scale out 10 instances. The problem is that the webjob does not scale out and at any time, only one is running.

Number of instances: enter image description here

Functions: enter image description here

Function code: enter image description here


Solution

  • According to this article, we could find the reason, please refer to it.

    Behind the scenes, TimerTrigger uses the Singleton feature of the WebJobs SDK to ensure that only a single instance of your triggered function is running at any given time. When the JobHost starts up, for each of your TimerTrigger functions a blob lease (the Singleton Lock) is taken. This distrubuted lock ensures that only a single instance of your scheduled function is running at any time.