Microsoft Certified: Azure Developer Associate (AZ-204)Monitor, troubleshoot, and optimize Azure solutionsHard

A media company uses Azure Blob Storage to store large video files and Azure Functions to process them (e.g., transcoding, thumbnail generation). They notice that during peak upload times, the Azure Functions are sometimes delayed in processing new blobs, even when the Function App scale out is enabled. The company wants to optimize the processing speed and ensure that functions are triggered immediately upon blob creation, minimizing latency. Which type of Azure Functions trigger should be used to achieve the lowest possible latency for processing new blobs?

  1. AQueue trigger
  2. BTimer trigger
  3. CHTTP trigger
  4. DEvent Grid trigger
Show answer & explanation

Correct answer: D. Event Grid trigger

An Event Grid trigger for Azure Functions provides near real-time reaction to events like blob creation. Unlike the built-in Blob trigger, which polls the storage account, Event Grid pushes notifications immediately, resulting in the lowest latency for triggering functions.

Why the other options are wrong

  • A. Queue triggers (e.g., Azure Storage Queue) would require an intermediate step to add a message to the queue, which adds complexity and potential latency compared to direct Event Grid integration.
  • B. Timer triggers execute on a schedule, not in response to events, so they would introduce significant latency.
  • C. HTTP triggers require an explicit HTTP request and are not suitable for reacting to blob creation events directly.

Azure Functions Event Grid Trigger

An Azure Functions trigger that responds to events published to Azure Event Grid, providing near real-time, push-based event delivery for minimal latency.

  • Reacts to events from various Azure services (e.g., Blob Storage, IoT Hub).
  • Uses a push model, eliminating polling delays.
  • Offers low latency and high scalability for event-driven architectures.

Memory trick: Event Grid for instant, Blob trigger for polling, Function choice is key!

More Monitor, troubleshoot, and optimize Azure solutions questions