1
votes

I currently use Azure webjobs for processing requests from the Azure queue. On a day, a single webjob can process upto 5,000 messages from the queue. Each message is processed for a maximum 20 seconds. The webjob keeps listening to the queue for a new message. On arrival, picks the message and processes it.

I have read about function apps and because they support automatic scaling and more friendly pricing, I want to opt for them but I am currently not able to make a sound decision on whether to go in for them.

My main concern is the work load effect. If the queue triggered function app is still processing a message in the 20 seconds and other 50 messages are dropped on the queue as it is still processing the first message. Will it wait for the first message to complete before proceding to the second message or does it create another node / instance of the same function app to handle the second message and third .... 50th message?

If it creates multiple instances of the function app, do these newly created instances have maximum resources they can utilize e.g maximum of 6 processors and 5GB RAM or do they scale up to the available resources in the cloud?

1

1 Answers

0
votes

Assuming "automatic scaling and more friendly pricing" means you're looking at a consumption plan, then the scaling is indeed up to the available resources in the cloud. You can configure how many messages a function will pick off the queue at a time, but functions aren't singletons so if the runtime detects the queue growing then it will fire up as many instances of the function as it deems necessary to process all the messages in a timely manner.