Courseiva
Develop Azure compute solutionshardMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

Exhibit

Refer to the exhibit.

```json
{
  "type": "Microsoft.Web/sites/config",
  "apiVersion": "2022-03-01",
  "name": "[concat(parameters('siteName'), '/config')]",
  "properties": {
    "alwaysOn": true,
    "http20Enabled": true,
    "minTlsVersion": "1.2",
    "ftpsState": "FtpsOnly",
    "healthCheckPath": "/health"
  }
}
```

You are reviewing the ARM template for an App Service. What is the effect of the 'alwaysOn' property set to true?

⚠ Common exam trap

Many exam-takers confuse 'alwaysOn' with health checks or scaling features, as the name suggests constant availability, but it specifically addresses process idle behavior, not load balancing or monitoring.

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

The app will stay loaded in memory to avoid cold starts.

Setting 'alwaysOn' to true in an Azure App Service ARM template ensures that the app is kept loaded in memory even when there is no incoming traffic. This prevents the app from being unloaded after a period of inactivity, which eliminates cold starts on subsequent requests. Cold starts occur when the app process is recycled or unloaded, causing a delay as the runtime and application code are reloaded.

Answer analysis

Option-by-option breakdown

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

  • The app will enable health checks at /health.

    Why it's wrong here

    The `alwaysOn` setting ensures the App Service worker process remains active, preventing it from being unloaded due to idleness. However, it does not configure or enable health checks for the application. Health checks are a distinct feature, typically configured via the `healthCheckPath` property within the App Service's `siteConfig`, which specifies a specific endpoint for the platform to probe to determine the application's operational status and health.

  • The app will scale out to multiple instances automatically.

    Why it's wrong here

    The `alwaysOn` setting is designed to prevent an idle web app from being unloaded by the Azure App Service platform after a period of inactivity, ensuring it remains responsive. It has no direct impact on the application's ability to scale out to multiple instances automatically. Automatic scaling, or auto-scaling, is a separate feature configured through App Service Plan settings or auto-scale rules, which dynamically adjust the number of instances based on demand or predefined metrics.

  • The app will stay loaded in memory to avoid cold starts.

    Why this is correct

    When `alwaysOn` is enabled for an Azure App Service, the platform sends periodic internal requests to the application to ensure it remains active and loaded in memory. This crucial setting prevents the application from being idled out and unloaded, which is particularly beneficial for applications that experience infrequent traffic or require immediate responsiveness. By keeping the app loaded, it effectively eliminates "cold starts," where the application would otherwise incur significant latency while restarting and initializing resources upon the first request after a period of inactivity.

  • The app will be redeployed whenever the code changes.

    Why it's wrong here

    The `alwaysOn` setting exclusively controls whether an App Service remains active and loaded in memory, preventing it from being unloaded due to idleness. It is entirely unrelated to the deployment process or how code changes are handled. Continuous deployment, which automatically redeploys an application when its source code changes, is configured through separate settings that integrate with source control repositories like GitHub or Azure DevOps, establishing a deployment pipeline.

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.