Your team monitors Azure Functions with Application Insights. After a recent deployment, cold start latency increased. Which feature should you enable to mitigate this?
Migrating an Azure Function app from a Consumption plan to a Premium plan directly addresses cold start issues by provisioning pre-warmed instances. The Premium plan maintains a specified minimum number of active instances, ensuring that function apps are always ready to process requests without the initial latency associated with instance allocation, startup, and code loading. This significantly reduces the delay experienced during the first invocation after a period of inactivity.
Why this answer
Cold start latency occurs when a function app is idle and needs to be loaded from scratch. The Consumption plan can cause cold starts because it scales to zero when idle. Migrating to the Premium plan eliminates cold starts by keeping instances warm, as it provides pre-warmed workers and always-on instances, reducing latency after deployment.
Exam trap
The trap here is that candidates often confuse 'Always On' (an App Service setting for continuous web jobs) with Azure Functions cold start mitigation, but 'Always On' is not supported on Consumption or Premium plans, and the correct solution is to use the Premium plan's built-in warm instance support.
How to eliminate wrong answers
Option A is wrong because setting FUNCTIONS_WORKER_RUNTIME to 'dotnet-isolated' changes the process model but does not address cold start latency; it may even increase startup time due to the additional out-of-process overhead. Option C is wrong because enabling Azure Monitor alerts on function execution count only notifies you of execution patterns, it does not mitigate cold start latency. Option D is wrong because 'Always On' is a setting for App Service plans (e.g., Basic, Standard, Premium) and is not available or applicable to Azure Functions running on Consumption or Premium plans; it is a common misconception that it applies to Functions.