Azure Function App for Image Processing: Configuration Guide

Configure Azure Function App for Image Processing

Question

You are developing an Azure Function App that processes images that are uploaded to an Azure Blob container.

Images must be processed as quickly as possible after they are uploaded, and the solution must minimize latency.

You create code to process images when the Function App is triggered.

You need to configure the Function App.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

B.

The Blob storage trigger starts a function when a new or updated blob is detected.

The blob contents are provided as input to the function.

The Consumption plan limits a function app on one virtual machine (VM) to 1.5 GB of memory.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger

To develop an Azure Function App that processes images uploaded to an Azure Blob container, we need to choose the appropriate hosting plan and trigger type to ensure quick processing and minimal latency. Let's evaluate each of the options provided in the question.

A. Use an App Service plan. Configure the Function App to use an Azure Blob Storage input trigger.

Using an App Service plan means we have a dedicated server and resources allocated for our Function App. This can provide higher performance and more consistent latency compared to a Consumption plan. However, since we want to minimize latency, using an input trigger may not be the best choice. Input triggers require the Function App to wait for a new event to occur, which can result in increased latency.

B. Use a Consumption plan. Configure the Function App to use an Azure Blob Storage trigger.

A Consumption plan is a serverless hosting plan that can scale automatically based on the number of incoming events. This can provide high scalability and cost savings. Using an Azure Blob Storage trigger ensures that the Function App is triggered immediately when a new blob is uploaded, minimizing latency.

C. Use a Consumption plan. Configure the Function App to use a Timer trigger.

A Timer trigger is not suitable for our scenario since we need to process images as quickly as possible after they are uploaded, and we cannot predict when the images will be uploaded.

D. Use an App Service plan. Configure the Function App to use an Azure Blob Storage trigger.

Using an App Service plan with an Azure Blob Storage trigger can provide high performance and consistent latency, but it can be more expensive compared to a Consumption plan.

E. Use a Consumption plan. Configure the Function App to use an Azure Blob Storage input trigger.

As mentioned earlier, using an input trigger may not be the best choice since it can result in increased latency.

Based on the above evaluation, the best option for our scenario is option B: Use a Consumption plan. Configure the Function App to use an Azure Blob Storage trigger. This ensures that the Function App is triggered immediately when a new blob is uploaded, minimizing latency, and also provides scalability and cost savings.