Azure-docs: Blob trigger vs EventGrid trigger

Created on 2 Mar 2018  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

Hi! Great post!
However, I haven't understood what is the benefit to use of EventGrid trigger instead of Blob trigger? It seems that I could create a blob trigger in a function and implement the same.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: cad5909e-e1c6-aa8e-82f1-f2851c1caced
  • Version Independent ID: 42292330-aa69-9df0-5bd7-e07c9daed995
  • Content
  • Content Source
  • Service: event-grid
assigned-to-author event-grisvc product-question triaged

Most helpful comment

@bastyuchenko
The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs. Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.
Hope that helps.
Glenn.

All 7 comments

@bastyuchenko Thanks for the feedback. I assigned the case for further investigation.

@bastyuchenko
The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs. Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.
Hope that helps.
Glenn.

Hi @ggailey777

The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs.

Thank you! I got it and it was really useful information for me.

Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.

Sorry but I haven't understood this scenario. Why does a message will be written if I add blob to the container? Maybe I lost something. Could you please explain?

@bastyuchenko my only point was that if you want faster function processing of uploaded blobs without using Event Grid, you can have both queue and a blob container in Azure Storage. After you successfully upload to the blob container, you can write a message to the queue that contains the URL of the blob. Your function can trigger on the queue and use the URL in the message to access the uploaded blob in your function. This of course depends on the fact that you own the process that uploads the blob, otherwise your best bet is probably Event Grid (or live with the lag).

in-process

@ggailey777, thank you for explanation.

based on my understanding, the Event Grid take care of 'containers layer', which will detect the changes of blobs inside, namely the creation and deletion.
Blob trigger monitors the blocks of data inside

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpowell2017 picture ianpowell2017  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments