Search code examples
azure-webjobsazure-webjobssdkwebjobazure-webjobs-continuous

Multiple web jobs on same App Service or single Web Job on multiple app services?


I need to deploy multiple web jobs for my current project. However, none of them will be too resource intensive, so I will be using the same App service plan. I am trying to decide between

  1. Create separate App Services per Web Job and deploy them all into the same App Service Plan OR
  2. Create a single App service, and deploy multiple instances of the Web Job into that same app service, with different web job names to make them unique

I know this answer may be based on different opinions, but I am hoping you could share some things to consider. For e.g., one advantage of #1 is that it is easier for me to deploy each web job separately in that option. Any other things that I should consider?

Thanks!


Solution

  • @Snooks, Web Apps are designed to run multiple Web Jobs and there is no platform limit (although there might be practical limits depending on what your web job is doing). My suggestion would be to go with route 1 from a management perspective. This will make life easier when navigating through the portal etc.

    A third option to consider as well would be Azure Functions (serverless). While many customers create app services that aren't hosting any web site just to use for the web job capability, the initial intention was for app services services to serve web sites and then also have automation capability via web jobs.

    Since web jobs became so popular, Azure Functions was born to provide a more focused product on task/job automation (and much more) while running on a serverless platform. This means you only pay for what you consume, whereas with a web app, you pay a flat rate each month, no matter how much or how little you consume.

    If your requirements state you must go the route of Web Jobs, I would certainly go with route 1 just to avoid having to manage multiple apps. If you are willing, I think it's worth looking into Azure Functions to see if it meets your needs.