skip to Main Content

I am designing a solution that includes an Azure Function App function that will be triggered when a blob is created in an Azure Blob Storage container. The Function App will automatically scale out when needed (more than one instance will be available, pre-warmed). If there are two or more nodes active at a specific moment, and a new blob is created, will the function be triggered:

a. For each of the nodes

or

b. For only one of the available free instances (and just one)

2

Answers


  1. Chosen as BEST ANSWER

    This article and this one explain how Azure uses an internal queueing for events and process each of them using an instance if available, or creating a new one if needed. So answer is, Function is triggered only once per triggering event.

    Since Azure will not process the same file using multiple instances, for that kind of requirement the fan in fan out pattern must be used.


  2. Only one function instance will process the blob if that is what you really want to know

    yes, let’s say I have three instances active, I want to make sure the function will not be triggered three times, alas, I don’t want the same file to be processed three times. If it is as you explained, do you have any link to where this is mentioned?

    Well, see the docs:

    The Azure Functions runtime ensures that no blob trigger function gets called more than once for the same new or updated blob. To determine if a given blob version has been processed, it maintains blob receipts.

    If you are using the Event Grid to handle blob events things are different as the Event Grid service is responsible for sending events to a Event Grid triggered Azure Function. The function will always react to each event grid event once, but do mind that the Event Grid is designed using a at-least-once delivery mechanism:

    Event Grid provides durable delivery. It tries to deliver each message at least once for each matching subscription immediately.

    (source)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search