I’ve an ASP.NET Core app which is hosted in docker and I need to running some scheduled jobs like Quartz.NET.


I can put it inside webapp or create separate .NET Core app. If I create separate app it’ll add some works with deployment and configuration.
Are there some advantages and disadvantages about it? Mb there can be some performance problems depends on thread pool exhausted? Is there best practices and why?
I’ve used HangFire, and I highly recommend it over Quartz.NET
The benefit to it being in a separate app is that you can scale it independently of your WebApp.
If you want multiple instances of a Job worker, you can run in multiple machines.
If you only expect to process a single queue, and cost is important, then hosting it in a WebApp is fine.
Additionally you might want to think about resources. If you are processing a heavy load that takes CPU and/or memory, it may need to be on a separate machine, to avoid bogging down your WebApp, it you expect high usage scenarios.
Thread pool starvation is probably only expected in really demanding scenarios, at which time you probably should be separating everything anyway.


As usual, it’s always striking a balance between cost of operation, maintenance and performance.
C# devs
null reference exceptions

source