Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are developing an Azure Function that runs on a Consumption plan. The function needs to process a large file uploaded to Azure Blob Storage. The processing is CPU-intensive and may take up to 30 minutes. What should you use to implement the function?

⚠ Common exam trap

Watch out — candidates often assume they can simply increase the functionTimeout in host.json on a Consumption plan, not realizing that the Consumption plan enforces a hard cap of 10 minutes regardless of the setting.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Configure the function app to use a Premium plan to allow longer execution times.

Azure Functions on a Consumption plan have a maximum execution timeout of 10 minutes (or 5 minutes by default). For CPU-intensive processing that may take up to 30 minutes, you must use a Premium plan, which supports unlimited execution duration (subject to the functionTimeout setting, which can be set up to 60 minutes by default and up to unlimited if configured). The Premium plan also provides dedicated instances and pre-warmed workers, which are suitable for long-running, resource-intensive workloads.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a blob trigger and set the batchSize to 1 to avoid timeouts.

    Why it's wrong here

    Setting the `batchSize` to 1 for a blob trigger ensures that only one blob is processed per function invocation, preventing multiple items from being processed concurrently in a single trigger. However, this configuration does not influence the maximum execution duration of that *single* function invocation. The timeout limit, determined by the hosting plan, applies to the entire execution of the function, regardless of how many items it processes in a batch, making this ineffective for avoiding individual function timeouts.

  • Configure the function app to use a Premium plan to allow longer execution times.

    Why this is correct

    The Azure Functions Premium plan is specifically designed to support longer execution durations, allowing functions to run for up to 60 minutes. This plan provides pre-warmed instances to eliminate cold starts and offers dedicated compute resources, making it ideal for workloads requiring extended processing times beyond the Consumption plan's inherent limits. Migrating to a Premium plan directly addresses the need for increased execution time by providing a higher platform-level timeout.

  • Set the functionTimeout in host.json to 30 minutes on the Consumption plan.

    Why it's wrong here

    While `functionTimeout` in `host.json` allows you to configure the maximum execution time for a function, this setting is ultimately constrained by the underlying hosting plan's hard limits. On the Consumption plan, the absolute maximum execution time for a single function invocation is 10 minutes, even if `host.json` specifies a longer duration. Therefore, attempting to set it to 30 minutes on a Consumption plan will not override the platform's enforced 10-minute ceiling, and the function will still time out after 10 minutes.

  • Create an orchestrator function using Durable Functions to manage the processing.

    Why it's wrong here

    Durable Functions are excellent for orchestrating complex, long-running *workflows* by chaining together multiple activity functions and managing state. However, each individual activity function within a Durable orchestration is still subject to the standard execution timeout of the hosting plan it runs on. An orchestrator function itself does not extend the maximum execution time for a single, long-running activity function, which would still time out if it exceeds the plan's limit, necessitating a plan upgrade for long individual activities.

Quick reference

Azure Blob Storage Tier Comparison

TierStorage CostRetrieval CostLatencyUse Case
HotHighestLowestImmediateActive data, frequent reads
CoolLowerHigherImmediateData accessed < once / month
ColdLower stillHigherImmediateData accessed < once / quarter
ArchiveLowestHighest + rehydration delayHoursLong-term compliance retention

Go deeper

Related to this question

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.