Search code examples
azureazure-webjobsazure-webjobs-triggered

Many triggers in single webjob


  1. Does having many triggers (blob, servicebus,timer) in a single webjob will reduce the performance of webjob?

  2. Is there any way to improve performance of webjob with many triggers?

  3. Can a heavy weight webjob be divided into smaller weight webjob?


Solution

  • 1. Does having many triggers (blob, servicebus,timer) in a single webjob will reduce the performance of webjob? Provided that your webjob is not singleton. You can have multiple functions in your webjob with multiple triggers and the performance will not reduce. (provided your webapp plan is beefy enough to handle all the load.)

    2.Is there any way to improve performance of webjob with many triggers? - the best way would be to divide the webjob into smaller webjobs and each webjob having a single trigger. And scale your webjobs out (add more instances) based on load. Also in case your webjob executes within 5 mins you can also choose to use Azure Function App. Which gives a much better option. Alternatively, assuming the webjob execution takes more than 5 mins you can have your webjob exe as a docker image and provision them using logic app on demand using ACI. In this scenario you will be configuring the triggers in logic app.

    1. Can a heavy weight webjob be divided into smaller weight webjob? - yes, see my previous answers.