Azure Functions

What it is

Azure Functions is a serverless computing service: you run short-lived, event-driven functions in response to triggers without provisioning or managing infrastructure. Pay only for execution time — the platform scales automatically per event and you only run when something triggers you.

Why it exists

Many tasks are event-driven and bursty (an HTTP request, a queue message, a blob upload, a timer). Reserved VMs or even containers sit idle costing money. Functions give scale-to-zero — you run only when events fire, autoscale up automatically under load, and pay per execution.

Key ideas

  • Triggers kick off functions: HTTP trigger, Timer, Azure Storage Queue/Blob/Event Hub triggers, Azure Service Bus, Event Grid, Cosmos DB, and more.
  • Bindings: declarative input/output bindings connect to other services (e.g. read from blob, write to queue) with minimal code.
  • Hosting plans: Consumption (scale-to-zero, per-execution billing), Premium plan (warm instances, VNet), and Dedicated App Service plan — the plan choice affects scaling and cost.
  • Runs inside a Function App — the container grouped with app settings, identity, and runtime config.
  • Durable Functions orchestrate stateful, long-running workflows.
  • Runs on the Functions runtime; supports .NET, Java, Node, Python, PowerShell.

How it fits (diagram)

azure-functions.svg

Exam notes

  • Serverless ≠ no server: platform-managed servers, scale-to-zero, per-execution billing on Consumption plan.
  • Choose Premium plan when you need warm instances / VNet integration / no cold-start at large scale.
  • Triggers vs bindings: triggers start the function; bindings connect to input/output data.
  • AZ-104: recognize scope — Functions are the serverless compute in the compute spectrum, alongside ACI and AKS. Function Apps often run under an App Service plan (Dedicated) too.

Path MOC · app-service · aci · aks

📘 Source: Microsoft Learn — Azure Functions