What's changed: Deepened AZ-204 Chapter 1 to Associate depth (tables, scenarios, FAQ, traps; localized figures)
1.2Azure Functions (Serverless)
Understand serverless development with Azure Functions: triggers and bindings, the Consumption plan, Durable Functions for workflows, and hosting-plan choices.
Azure Functions runs code on events without managing servers. A trigger starts it; bindings connect inputs/outputs concisely.
1.2.1Triggers and bindings
- Trigger: the event that starts a function—HTTP, timer (cron), queue, Blob, etc.; one per function.
- Bindings: declaratively connect inputs/outputs, removing boilerplate I/O (Blob/Queue/DB, etc.).
- Consumption plan: pay per use and scale to zero; Premium adds pre-warmed instances/VNet.
- Durable Functions: an extension to build stateful workflows (orchestrations) with functions.
Common on AZ-204: event-driven, pay-per-use = Functions Consumption plan, concise I/O = bindings, stateful long workflows = Durable Functions, avoid cold start / need VNet = Premium plan.
Azure Functions is event-driven serverless FaaS. Each function has one trigger (HTTP/timer (cron)/queue/Blob/Event Grid/Service Bus, etc.) and uses bindings (input/output) to connect I/O to Blob, Queue, Cosmos DB, etc. without boilerplate. Choose hosting from the Consumption plan (pay-per-use, scale to zero, cold starts), the Premium plan (pre-warmed = no cold start, VNet integration, long runs), or the Dedicated (App Service) plan (always-on on an existing plan). For stateful long-running work, Durable Functions uses orchestrator/activity/entity functions to express function chaining, fan-out/fan-in, monitor, and human-approval patterns. A Scale Controller auto-scales by trigger signals (e.g., queue length). Operate with Application Insights; a storage account is required for state. The axes: "event-driven/pay-per-use = Consumption," "avoid cold start/VNet = Premium," "stateful long-running = Durable Functions," "concise I/O = bindings."
| Requirement | Choose |
|---|---|
| Event-driven, pay-per-use, scale to zero | Consumption plan |
| Avoid cold start, VNet integration | Premium plan |
| Stateful long workflows | Durable Functions |
| Connect I/O without boilerplate | Bindings |
Scenario: on an order, check inventory → pay → notify in sequence, with an approval wait. Entry is an HTTP trigger; sequence the steps with Durable Functions chaining (human approval via an external-event wait). Connect inventory/queue I/O concisely with bindings. To avoid cold starts under a low-latency SLA, use the Premium plan, with Application Insights for monitoring. For sporadic light tasks, use the Consumption plan to minimize cost.
Q. Event-driven/pay-per-use? Consumption plan. Q. Avoid cold start/VNet? Premium plan. Q. Stateful long-running? Durable Functions. Q. Concise I/O? Bindings. Q. Triggers per function? One. Q. Monitoring? Application Insights.
Watch the mix-ups: (1) One trigger per function; bindings can be multiple (in/out). (2) The Consumption plan has cold starts and an execution time limit—use Premium/Dedicated for steady low latency or long runs. (3) Durable orchestrators must be deterministic (no direct random/time calls—use the API). (4) Functions uses a storage account for state.
Durable Functions patterns (function chaining, fan-out/fan-in, human approval waits) help express complex processing with functions.
1.2.2Section summary
- Functions = trigger starts it, bindings handle I/O
- Pay-per-use = Consumption plan, stateful = Durable Functions
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. Which Azure service runs event-driven code without managing servers, billed per use?
Q2. What connects a function’s inputs/outputs (Blob, queue, etc.) without boilerplate code?
Q3. You want stateful long workflows (chaining, fan-out, etc.) implemented with functions. What do you use?

