Azure Web Jobs Architecture

I have a code that should run as a result of calling a service bus. This particular code has processor intensity, and it is possible that 100 of them will need to run at the same time. Does Azure Web Jobs use computing resources from a single machine, or does it use any available computing resources from multiple machines?

+5
source share
3 answers

Web Jobs uses the resources of your web application, why don’t you try Azure Functions , which can be scaled and their price is almost zero. They are in a technical preview, I tried to use it, Azure features are very cheap. If the service bus call may be inoperative, that is, it is not necessary that the results of your application from the instance do not satisfy you, you can try the azure function. Azure features are primarily used for night-time maintenance and operation. I used it to minimize my thumbnail images. It worked great

+1
source

Azure Webjobs is designed to run on as many servers as you expand your website to run. By default, it will run up to 16 tasks from the queue at a time, but this is configured as shown here .

public class Program { static void Main() { JobHostConfiguration config = new JobHostConfiguration(); config.Queues.BatchSize= 1; JobHost host = new JobHost(config); host.RunAndBlock(); } } 
+1
source

Web work deployed as part of Azure WebSite will share resources with the web application. You have the ability to scale your website to 10 (I think?) Instances if you need parallelism.

As I mentioned in a comment on a Matthew post, if you use the Azure WebJobs SDK to perform functions called by ServiceBus queue messages, we are not parallelizing as part of the same host. This means that messages will be processed sequentially as long as you have a single host.

0
source

Source: https://habr.com/ru/post/1202496/


All Articles