Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You need to deploy a microservice that runs a long-running background job (up to 30 minutes). The job should not be affected by App Service recycling. Which Azure technology should you use?

⚠ Common exam trap

Test-takers frequently choose Azure Functions (Consumption plan) because of its simplicity, forgetting that the Consumption plan has a hard 5-minute execution timeout, making it unsuitable for long-running jobs, while WebJobs with Always On is the correct choice for persistent background processing within App Service.

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

Azure WebJobs with Always On enabled

Azure WebJobs with Always On enabled ensures the WebJob runs continuously on a dedicated App Service instance, preventing it from being unloaded during idle periods or App Service recycling. This allows the long-running background job (up to 30 minutes) to complete without interruption, as the WebJob runs in the same process as the web app and is not subject to the 5-minute timeout of the Consumption plan.

Answer analysis

Option-by-option breakdown

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

  • Azure Automation Runbook

    Why it's wrong here

    Azure Automation Runbooks are primarily designed for automating operational tasks, managing Azure resources, and orchestrating administrative workflows, often with predefined start/stop times or event triggers. While they can execute scripts, they are not optimized for continuous, long-running application background processes that require persistent execution within an application's lifecycle. Their typical use cases involve administrative automation, not application-specific background microservices.

  • Azure WebJobs with Always On enabled

    Why this is correct

    Azure WebJobs are an integral feature of Azure App Service, allowing you to run scripts or executables as background processes within your web app instance. By enabling "Always On" for the App Service plan, the underlying host process for the WebJob is kept alive indefinitely, preventing the App Service from being unloaded due to inactivity and ensuring the continuous execution of the long-running microservice without interruption. This makes them ideal for persistent background tasks tightly coupled with an App Service.

  • Azure Functions (Consumption plan)

    Why it's wrong here

    Azure Functions on a Consumption plan are designed for event-driven, serverless execution and automatically scale based on demand, but they impose strict execution timeout limits. By default, a Consumption plan function times out after 5 minutes, with a configurable maximum of 10 minutes. This inherent architectural constraint makes them unsuitable for a microservice requiring a guaranteed execution duration significantly longer than these limits, as the process would be terminated prematurely.

  • Azure Kubernetes Service (AKS)

    Why it's wrong here

    Azure Kubernetes Service (AKS) is unsuitable because, while it hosts containerised workloads, it does not inherently guarantee a long-running job's completion if the pod running it is rescheduled or evicted during cluster operations or node maintenance. This would interrupt the 30-minute job. AKS is, however, excellent for orchestrating complex microservice architectures, managing container lifecycles, and providing scalable environments for distributed applications, making it a strong choice when fine-grained control over container deployment and scaling is paramount.

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.