Base solution for your next web application
Open Closed

Running Background Jobs in Scale Out #11037


User avatar
0
JeffMH created
  • What is your product version? Latest
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? Core

I am wondering if there is a good efficient way of running background jobs when auto scale out is turned on in Azure. Currently we run with 3 instances and we scale out as needed beyond that. Right now, I deploy the API project to 2 different App Services, one that has background processes turned off and the other that has them turned on. The one that is turned on is not the one that gets scaled out. It's a static app service that basically just runs background processes only (it is not exposed to angular app).

I'm wondering if there is more of a efficient way of doing this without deploying the whole API project twice. Deploying it and running the background jobs seperately does offload that work to another process which is nice. I don't really want to use HangFire. Maybe that would be easier to do what I want but I just don't want to throw something else in the mix. I would rather make something that queues the jobs and run a function that processes them instead of database driving them....but that's not a small amount of work.

Anyway, Just looking to see if anyone else has any good suggestions on how I might do this better.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @jeffmh

    With the default implementation, it will not be possible to achieve what you want. You need to use Hangfire (I know you don't want to :)) or something similar (Quartz) to achieve this.