App Service & Functions
PaaS web hosting and serverless code.
Not everything needs a VM. Azure App Service and Azure Functions are managed platform (PaaS) and serverless options that let you run web apps and code without administering servers — often the better choice for developer-facing workloads.
App Service: managed web hosting
Azure App Service is a fully-managed platform for hosting web apps, REST APIs, and backends: you deploy code (or a container) and Azure runs, patches, and scales the underlying platform. Apps run on an App Service Plan, which defines the compute tier, size, and instance count — the tier sets available features (custom domains, TLS, scaling, deployment slots). App Service supports autoscale rules to add and remove instances by metric, deployment slots for zero-downtime releases and easy rollback, and built-in integration with Entra ID authentication and Key Vault references for secrets. It removes the operational burden of managing VMs for standard web workloads.
# Apps run on a plan; the plan’s tier sets features and how it scales.az appservice plan create -g app-rg -n app-plan --sku P1v3 --is-linuxaz webapp create -g app-rg -p app-plan -n contoso-web --runtime "NODE:20-lts"# Autoscale by CPU (scale out under load, in when idle):az monitor autoscale create -g app-rg --resource app-plan \--resource-type Microsoft.Web/serverfarms --min-count 2 --max-count 10 --count 2# Deployment slots enable zero-downtime swap + instant rollback.
Functions and choosing a compute model
Azure Functions is the serverless option: event-driven code that runs on demand — triggered by an HTTP request, a queue message, a timer, or a blob event — and scales automatically, with you paying only for execution. It is ideal for glue, automation, and bursty event processing, and wrong for always-on, long-running work. The administrator’s skill is matching the model to the workload across the spectrum: Functions and App Service (PaaS/serverless) for the least operational overhead, containers on Azure Container Instances or AKS when you need portability or orchestration, and VMs (IaaS) when you need full OS control or are lifting-and-shifting. Prefer the least-operational option that meets the requirements — every layer Azure manages is one you do not.