AZ-204 practice question 3 of 35

You develop a software as a service (SaaS) offering to manage photographs. Users upload photos to a web service which then stores the photos in Azure…

Full set: 489 questions

Domain Develop Azure compute solutions

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You develop a software as a service (SaaS) offering to manage photographs. Users upload photos to a web service which then stores the photos in Azure Storage Blob storage. The storage account type is General-purpose V2. When photos are uploaded, they must be processed to produce and save a mobile-friendly version of the image. The process to produce a mobile-friendly version of the image must start in less than one minute. You need to design the process that starts the photo processing. Solution: Move photo processing to an Azure Function triggered from the blob upload. Does the solution meet the goal?
Answer options
A: Yes
B: No Correct answer
Correct Answer:
B. No
Explanation

The proposed solution does not reliably meet the goal. The standard Azure Blob storage trigger for Azure Functions uses a polling mechanism to detect new blobs. When an Azure Function app runs on the Consumption plan, it can go idle. If a new blob is uploaded while the app is idle, there can be a latency of up to 10 minutes before the function is triggered due to a "cold start." This potential delay exceeds the "less than one minute" requirement. For low-latency scenarios like this, an event-driven approach using an Azure Event Grid trigger is the recommended and more reliable solution, as it provides near-real-time, push-based notifications.

Why Incorrect

A. Yes: This is incorrect because the Blob storage trigger on the default Consumption plan is not guaranteed to start within one minute due to its polling nature and potential cold-start latency.

References

1. Microsoft Documentation, "Azure Blob storage trigger for Azure Functions": Under the "Usage" section, it explicitly states: "When you use a Blob storage trigger on a Consumption plan, there can be up to a 10-minute delay in processing new blobs if a function app has gone idle. To avoid this latency, you can switch to an App Service plan with the Always On feature enabled, or you can use an Event Grid trigger."

2. Microsoft Documentation, "Tutorial: Automate resizing uploaded images using Event Grid": This tutorial presents the exact scenario from the question as a primary use case for Event Grid, stating, "This tutorial shows you how to use Event Grid and Azure Functions to resize images that are uploaded to a storage account." This highlights Event Grid as the best practice for this requirement.

3. Microsoft Documentation, "Choose between Blob trigger and Event Grid trigger for blob processing (Azure Functions)": This document compares the two triggers, noting that the Blob trigger is "Simple to set up" but has "Higher latency for blob processing compared to the Event Grid trigger (minutes vs. seconds)." It recommends Event Grid for "Functions that need to process blobs in a timely or 'real-time' manner."

Scroll to Top