AZ-200 Azure Functions & Serverless Computing 2 — Questions and Answers
Question 1: Which Azure Functions Premium Plan feature ensures at least one function instance is always warm to eliminate cold starts?
- Scale controller
- Pre-warmed instances (Correct answer)
- Elastic scale
- VNet integration
Correct answer: Pre-warmed instances
Pre-warmed instances on the Premium Plan keep at least one instance initialized so the first request does not incur a cold-start delay.
Question 2: When using the Timer trigger in Azure Functions, which expression format is used to define the schedule?
- ISO 8601 interval
- CRON expression (Correct answer)
- Quartz Scheduler format
- RFC 2822 date
Correct answer: CRON expression
Timer triggers use a CRON expression (with an optional sixth field for seconds) to define when the function should fire.
Question 3: In Azure Functions, what is the purpose of the host.json file?
- Define per-function bindings
- Store connection strings for local development
- Configure global settings for the function app host (Correct answer)
- List all functions in the app
Correct answer: Configure global settings for the function app host
host.json contains global configuration options that affect all functions in the app, such as logging levels, retry policies, and extension settings.
Question 4: Which Azure Functions trigger automatically scales based on the number of messages in a queue?
- HTTP trigger
- Blob trigger
- Queue Storage trigger (Correct answer)
- Timer trigger
Correct answer: Queue Storage trigger
The Azure Queue Storage trigger monitors queue depth and scales out function instances automatically when messages accumulate.
Question 5: What is the role of the Durable Functions 'Entity function'?
- Trigger the orchestration workflow
- Store and manage stateful objects identified by an entity ID (Correct answer)
- Send HTTP responses to clients
- Schedule timer-based callbacks
Correct answer: Store and manage stateful objects identified by an entity ID
Entity functions (Durable Entities) define operations that read and write small pieces of state, each identified by a unique entity ID.
Question 6: Which setting in local.settings.json is required to run Azure Functions locally?
- FUNCTIONS_WORKER_RUNTIME (Correct answer)
- WEBSITE_RUN_FROM_PACKAGE
- AzureWebJobsDashboard
- FUNCTIONS_EXTENSION_VERSION
Correct answer: FUNCTIONS_WORKER_RUNTIME
FUNCTIONS_WORKER_RUNTIME specifies the language worker (e.g., dotnet, node, python) and is required for the local runtime to load the correct worker process.
Question 7: Which Azure Functions output binding lets a function publish messages directly to an Azure Event Hub?
- Service Bus output binding
- Event Hub output binding (Correct answer)
- Event Grid output binding
- Notification Hub output binding
Correct answer: Event Hub output binding
The Event Hub output binding allows a function to send one or more events to an Event Hub without writing any Event Hubs SDK code.
Which Azure Functions Premium Plan feature ensures at least one function instance is always warm to eliminate cold starts?