The correct answer is that the 'alwaysOn' property set to true in an Azure App Service ARM template keeps the app loaded in memory to avoid cold starts. This works by preventing the App Service from being unloaded after a period of inactivity, which would otherwise force the runtime and application code to reload from scratch on the next request—a process known as a cold start that introduces noticeable latency. On the Microsoft Azure Developer Associate AZ-204 exam, this setting often appears in scenarios about optimizing performance for production workloads, and a common trap is confusing it with scaling or availability features; remember, alwaysOn only affects the app’s in-memory state, not its instance count or load balancing. A useful memory tip: think of it as “always on, never off”—the app stays warm in memory, so your first request after idle time hits a hot, ready process.
AZ-204 Develop Azure compute solutions Practice Question
This AZ-204 practice question tests your understanding of develop azure compute solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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
Health check path is set by healthCheckPath, not alwaysOn.
✗
The app will scale out to multiple instances automatically.
Why it's wrong here
alwaysOn does not affect scaling.
✓
The app will stay loaded in memory to avoid cold starts.
Why this is correct
alwaysOn prevents the app from being unloaded.
Related concept
Read the scenario before looking for a memorised answer.
✗
The app will be redeployed whenever the code changes.
Why it's wrong here
Continuous deployment is configured separately.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may 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.
Detailed technical explanation
How to think about this question
Under the hood, 'alwaysOn' works by preventing the IIS application pool from being recycled due to idle timeouts, which is governed by the 'idleTimeout' setting in the application pool configuration. In Azure App Service, this is enforced at the platform level, ensuring the worker process remains active. A real-world scenario where this matters is for apps with long startup times, such as those loading large caches or connecting to databases, where a cold start could cause unacceptable latency for the first user request.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this AZ-204 question in full detail.
Develop Azure compute solutions — This question tests Develop Azure compute solutions — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this AZ-204 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.