AZ-305 Compute Design: Virtual Machines, Scale Sets, Containers, Functions and Azure Batch
Designing compute solutions in Azure means choosing where a workload's code runs — virtual machines, Virtual Machine Scale Sets, App Service, containers, Azure Functions or Azure Batch — and then shaping that choice with the right size, pricing, scaling, isolation and hosting plan for the stated requirements. This lesson covers every AZ-305 skill in the task: specifying compute components from workload requirements and recommending VM-based, container-based, serverless and batch processing solutions, including the current Microsoft guidance that favours Flex Consumption for new serverless function apps and Flexible orchestration for new scale sets.
On this page10 sections
- How to choose an Azure compute service from workload requirements
- Choosing VM sizes and isolation: families, Dedicated Host and confidential VMs
- VM pricing levers: reservations, savings plans, Hybrid Benefit, Dev/Test and Spot
- Virtual Machine Scale Sets: Flexible vs Uniform orchestration and autoscale
- Choosing a container platform and designing AKS node pools
- Azure Container Apps scaling, apps and jobs
- Azure Functions hosting plans
- Serverless workflows: Durable Functions vs Logic Apps
- App Service networking and isolation: Premium v3 vs App Service Environment v3
- Batch processing: Azure Batch pools, Spot nodes, MPI and Azure CycleCloud
- Choose between VMs, App Service, Container Apps, AKS, Container Instances, Functions and Batch from a workload's requirements, preferring the least administration that meets all of them
- Match VM families to workload shape and combine reservations, savings plans, Azure Hybrid Benefit, Spot and auto-shutdown to minimise cost
- Design Virtual Machine Scale Sets with the right orchestration mode and metric or schedule-based autoscale, and pick Dedicated Host or confidential VMs for isolation needs
- Recommend a container platform and design AKS node pools and Container Apps scale rules and jobs
- Select an Azure Functions hosting plan, a serverless workflow service, and an App Service isolation model
- Design Azure Batch pools with dedicated and Spot nodes, software delivery and MPI support, and know when Azure CycleCloud fits instead
How to choose an Azure compute service from workload requirements
Choose the compute service by asking what the workload needs control of, then picking the most managed option that still meets every stated requirement. The official skill is to specify the components of a compute solution from workload requirements, and Microsoft's compute decision tree follows the same logic: the more of the stack you must control, the further down you go towards virtual machines; the less you need, the more Azure can run for you.
| Requirement in the scenario | Service to consider first | What it gives up or adds |
|---|---|---|
| Install agents, Windows services or registry changes; legacy software the vendor won't repackage | Azure virtual machines (or a scale set) | You patch and configure the guest OS |
| Web app or API deployed as code, staging slots, custom domains with TLS | Azure App Service | No OS access; a plan bills at least one instance all the time |
| Containerised microservices without running Kubernetes, scale to zero | Azure Container Apps | Linux containers only; no Kubernetes API |
| Helm charts, operators, CRDs, full Kubernetes API | Azure Kubernetes Service (AKS) | You design and upgrade the cluster and its node pools |
| One container run on demand, nothing created in advance | Azure Container Instances | No autoscale, service discovery or managed ingress |
| Short event-driven code with per-execution billing | Azure Functions | Code only (no custom image on Flex Consumption) |
| Thousands of parallel tasks with a managed pool and scheduler | Azure Batch | Its own job and task model |
Two habits decide most design questions. First, read every requirement: a phrase such as "no container images to build", "no Kubernetes experience", "must scale to zero" or "Windows-only modules" usually rules out one plausible service each. Second, when several options work, "minimize administrative effort" points to the platform service and "minimize cost" points to the option that bills least for the stated usage pattern, not to the cheapest-sounding product. A requirement for Windows, for example, doesn't by itself mean a VM: App Service on a Windows plan hosts ASP.NET sites with no operating system to patch, while Container Apps (Linux only) can't, and Windows node pools or Windows scale sets bring a cluster or operating systems to manage.
High availability across zones and regions, backup and disaster recovery, deployment pipelines and migration tooling are separate AZ-305 tasks; this lesson covers choosing and shaping the compute itself.
Choosing VM sizes and isolation: families, Dedicated Host and confidential VMs
Pick the VM family that matches the workload's resource shape — memory per vCPU, CPU per GB, local storage, GPU or low-latency networking — and then the size within it. Azure names families by letter, and the letter tells you what the size is optimised for.
| Family | Optimised for | Typical workload |
|---|---|---|
| B-series (burstable) | Low average CPU with short bursts, funded by banked CPU credits | Jump boxes, small dev/test servers, low-traffic web servers |
| D-series (general purpose) | Balanced CPU-to-memory ratio | Most application servers and small databases |
| E-series and M-series (memory optimised) | High memory per vCPU (M-series for the very largest, such as SAP HANA) | In-memory databases, caches, large relational databases |
| F-series, e.g. Fsv2 (compute optimised) | High CPU-to-memory ratio | Batch processing, game servers, web front ends with heavy CPU |
| L-series, e.g. Lsv3 (storage optimised) | High throughput, low-latency local NVMe disks | NoSQL stores and data warehouses that use local disks |
| N-series, e.g. NC, ND, NV (GPU) | NVIDIA or AMD GPUs | Model training and inference, rendering, visualisation |
| H-series, e.g. HBv4, HBv5, HX (high performance compute) | Fast CPUs plus an RDMA InfiniBand back-end network | Tightly coupled MPI simulations (CFD, weather, crash analysis) |
The distinctions that matter most in design scenarios are near twins. A workload with little CPU but a dataset that must stay in RAM needs memory optimised sizes, not compute optimised ones. A mostly idle machine with short spikes is the burstable B-series case: the VM earns credits while it runs below its baseline and spends them when it bursts. A simulation split across many nodes that exchange messages constantly is limited by node-to-node latency, and only the HPC sizes with InfiniBand fix that; faster CPUs (F-series), GPUs (N-series) or local NVMe (L-series) improve a resource that isn't the bottleneck.
Turning machines off is also a sizing decision. Auto-shutdown on a schedule deallocates a VM outside working hours: compute billing stops while the managed disks are kept (and still billed for storage), and the VM can be started again when needed.
Isolation options: Azure Dedicated Host and confidential VMs
When a requirement is about who shares the hardware, use Azure Dedicated Host; when it is about protecting data in memory from the host, the hypervisor and operators, use confidential computing. They answer different questions and are often confused.
| Option | What it protects against | Code changes |
|---|---|---|
| Azure Dedicated Host | Other customers' workloads on the same physical server; you get a whole server for your subscription, placed in a host group, with visibility of the host | None |
| Confidential VMs (AMD SEV-SNP or Intel TDX sizes) | The host OS, hypervisor and cloud operators reading VM memory; the whole VM's memory is encrypted with hardware keys, and boot state can be verified by attestation | None — lift and shift |
| Application enclaves (Intel SGX, e.g. DCsv3-series) | Access to data in use, within an enclave inside the VM | Yes — code must be written or recompiled for the enclave |
| Encryption at host / disk encryption | Data at rest on disks and caches | None — but memory isn't covered |
Dedicated hosts also give you control of platform maintenance: assign a maintenance configuration with a recurring custom window to the hosts, and Azure applies platform updates during the hours you choose. Proximity placement groups (keep VMs physically close for low latency) and availability sets (spread VMs across fault domains) control placement, not tenancy, so neither meets a "no other customers on our servers" rule.
VM pricing levers: reservations, savings plans, Hybrid Benefit, Dev/Test and Spot
Azure has four main ways to lower VM cost, and they act on different parts of the price: reservations and savings plans discount compute in exchange for a commitment, Azure Hybrid Benefit removes the licence charge, and Dev/Test pricing applies only to non-production use.
| Lever | What you commit to or need | Best fit |
|---|---|---|
| Azure Reservations (one or three years) | A specific VM size family in a specific region (instance size flexibility applies within the group) | Steady, predictable 24x7 use where size and region won't change; the deepest compute discount |
| Azure savings plan for compute (one or three years) | A fixed hourly spend, applied automatically to eligible compute | Steady spend whose shape changes: across VM families and regions, and to selected PaaS compute such as App Service, Azure Container Apps and Functions Premium |
| Azure Hybrid Benefit | Existing Windows Server or SQL Server licences with active Software Assurance (or qualifying subscriptions) | Removes the Windows Server (or SQL Server) licence charge so the VM bills at the base compute rate |
| Dev/Test pricing | A Dev/Test subscription offer and Visual Studio subscribers using it | Non-production environments only |
Because Hybrid Benefit acts on the licence portion and a reservation (or savings plan) on the compute portion, they stack: a fixed fleet of Windows Server VMs running around the clock for years, owned by a customer with Software Assurance, gets the largest saving from a reservation plus Hybrid Benefit. Microsoft positions reservations for stable usage of a known size and region and savings plans for flexibility; a savings plan gives up some discount in exchange for following workloads as they move between families, regions and services, without exchanges.
Commitments bill every hour of the term whether or not you use them. A fleet that runs a few hours a week can't consume a reservation or savings plan; for interruptible work like that, Spot pricing (below) is the larger saving, and for steady work Spot is wrong because it can be evicted.
Azure Spot VMs and eviction policies
Azure Spot VMs run on Azure's surplus capacity at a deep discount, and Azure can evict them at any time when it needs the capacity back or when the price rises above your maximum, so they suit only interruptible work. Spot VMs have no SLA, and Spot isn't offered for every size (B-series burstable sizes, for example, aren't available as Spot).
Good Spot workloads are restartable and keep nothing important on the VM: render frames that a manager retries, load tests that a harness reruns, batch jobs that checkpoint to storage, dev/test environments. Production services that must stay up, or machines people need available during working hours, are not Spot workloads.
| Eviction policy | What happens on eviction | Use when |
|---|---|---|
| Deallocate | The VM moves to stopped-deallocated; its managed disks are kept (and billed for storage) and the VM still counts against quota | You want to start the same VM later and resume from data on its disks, such as checkpoints |
| Delete | The VM and its disks are deleted | The work is stateless and retried elsewhere, and nothing should keep billing after eviction |
The maximum price setting is separate from the policy. Setting the maximum price to -1 means the VM is never evicted for price reasons and you pay up to the standard pay-as-you-go rate, but Azure can still evict it for capacity. It therefore doesn't protect data; only the Deallocate policy keeps the disks. With the Azure CLI, the choice appears as az vm create --priority Spot --eviction-policy Deallocate (or Delete), optionally with --max-price.
Virtual Machine Scale Sets: Flexible vs Uniform orchestration and autoscale
A Virtual Machine Scale Set manages a group of load-balanced VMs that scale in and out together, and its orchestration mode — Flexible or Uniform — decides what the group can contain. Flexible orchestration is Microsoft's recommended mode for new scale sets.
| Capability | Flexible orchestration | Uniform orchestration |
|---|---|---|
| Instances | Standard Azure VMs, managed with the normal VM APIs | Identical instances created from one VM profile |
| VM sizes in one set | Several sizes can be mixed | One size |
| Spot and regular priority | Can be mixed in one set (for example a regular base plus Spot at peaks) | All Spot or all regular |
| Adding existing VMs to the set | Supported | Not supported; only VMs created from the model |
| Azure Backup and Azure Site Recovery for instances | Supported (they are standard VMs) | Not supported |
The orchestration mode is chosen when the scale set is created and can't be changed afterwards. If a Uniform set needs to mix sizes or priorities — for example because capacity shortages for its single size have blocked scale-out — the route is a new Flexible scale set placed in the same load balancer backend pool, then draining the old one. Mixing sizes is also a resilience tactic: if one size is short of capacity, the set can still grow with another. An availability set is not an alternative here; it has no autoscale.
Autoscale: metric rules and schedules
Scale set autoscale combines metric-based rules (for example, add instances when average CPU stays above a threshold) with schedule-based profiles (a recurring profile that changes the minimum, maximum and default instance counts at set times). A metric rule only reacts after load has arrived, so when a peak is known in advance and new instances take minutes to boot and warm up, a recurring profile that raises the minimum count before the peak is what gets warm capacity ready in time; keep a metric rule for unplanned spikes. Tuning the metric rule itself still leaves you reacting after the load has arrived.
Choosing a container platform and designing AKS node pools
Azure has four main places to run containers, and the choice depends on whether you need orchestration, the Kubernetes API, or simply a web host.
| Service | What it is | Choose it when |
|---|---|---|
| Azure Container Instances (ACI) | Runs a container group directly from an image; billed only while it runs; can be deployed into a virtual network | One container or a small group, run on demand or as a short task, with nothing created in advance and no orchestration, autoscale or service discovery needed |
| Azure Container Apps | Serverless container platform built on Kubernetes, KEDA, Dapr and Envoy, with the cluster run by Microsoft | Microservices that need service discovery, Dapr, revisions with traffic splitting, HTTPS ingress with custom domains and scale to zero, without Kubernetes skills; VNet integration at the environment level |
| Azure Kubernetes Service (AKS) | Managed Kubernetes control plane; you own node pools, upgrades and cluster design | Helm charts, kubectl, operators and custom resource definitions (CRDs) — anything that talks to the Kubernetes API |
| App Service (containers) | Web hosting that can run a container image on an App Service plan | A containerised web app that wants App Service features; note that a plan always bills at least one instance, so it never scales to zero |
The decisive line between Container Apps and AKS is the Kubernetes API. Container Apps runs on Kubernetes but deliberately doesn't expose the API, so Helm releases, operators and CRDs can't target it; AKS can run Dapr or KEDA too, but then the team designs, upgrades and operates the cluster. Container Apps runs Linux container images only, so Windows containers (for example a .NET Framework app) need AKS Windows node pools or App Service on Windows instead. Container Instances is a building block: when you need scaling rules, ingress or service discovery, move up to Container Apps or AKS.
AKS node pools: system and user pools, GPU and Spot capacity
An AKS cluster's compute is a set of node pools: system node pools host critical system pods and must keep at least one node, while user node pools host your workloads and can scale down to zero. Designing node pools is how you put special or cheaper capacity in a cluster without paying for it all the time.
- Separate pools for special hardware. Add a user node pool of GPU sizes for training or inference rather than resizing the system pool; every node in the system pool would then be a GPU node, and that pool can't drop to zero.
- Cluster autoscaler. Enabled per pool with a minimum and maximum count, it adds nodes when pods are pending and removes idle ones. A user pool with a minimum of 0 costs nothing until pods need it.
- Taints and tolerations keep pods off nodes. A taint on a node pool repels every pod without a matching toleration, so only the pods you choose land on expensive nodes. A node selector or node affinity only attracts pods to nodes; on its own it doesn't stop other pods being scheduled there. Reserving a pool usually takes both: a taint to repel, and a selector or affinity plus a toleration on the intended pods.
- Spot node pools are user pools only. They run on discounted surplus capacity, can be evicted, and carry the taint
kubernetes.azure.com/scalesetpriority=spot:NoSchedule, so workloads need the matching toleration. System components must stay on regular-priority nodes. Checkpointed, restartable batch pods are the intended Spot workload.
A separate cluster for one team's GPU work is rarely the answer: it adds a control plane and operations, and doesn't by itself remove idle GPU cost.
Azure Container Apps scaling, apps and jobs
Azure Container Apps scales with KEDA-based rules, and it offers two compute types: apps, which run continuously, and jobs, which start, run to completion and stop.
Scale rules
An app can scale on HTTP traffic, TCP connections or custom KEDA scalers such as an Azure Service Bus queue or Storage queue length. Setting the minimum replica count to 0 lets an app scale to zero when idle, so an empty queue costs nothing; a minimum of 1 keeps a billed replica running. CPU and memory rules can't scale an app to zero, and CPU usage doesn't measure a queue backlog, so a queue-driven app should scale on the queue. A cron scale rule exists, but it only changes the replica count of a long-running app on a schedule.
Jobs
| Job trigger | Starts when | Example |
|---|---|---|
| Manual | Started on demand through the API, CLI or portal | A one-off data fix or migration step |
| Schedule | On a cron expression | A weekly data export that runs once and stops |
| Event | A KEDA scaler sees events, such as queue messages; typically one execution per event | Processing each order file placed on a queue in a container of its own |
Each job execution is recorded with its status, and a replica retry limit retries failed runs, so jobs give per-run history and retries without VMs or clusters. Use a job when each unit of work needs its own container that ends with the work; use an app when replicas should share a continuous stream of events. Compared with alternatives: Container Instances runs an image but has no scheduler or event scaling of its own, and Functions on Flex Consumption has timer and queue triggers but can't run your own container image.
Azure Functions hosting plans
The Azure Functions hosting plan decides how a function app scales, whether it can reach a virtual network, whether it suffers cold starts, which operating systems it runs on and how it is billed. Microsoft now recommends Flex Consumption for new serverless function apps and treats the original Consumption plan as legacy.
| Plan | OS | Scale | VNet integration | Cold start | Deployment slots | Billing |
|---|---|---|---|---|---|---|
| Flex Consumption | Linux only | Event-driven, scales to zero | Yes | Optional always-ready instances | No (rolling updates instead) | Per execution and active memory |
| Premium (Elastic Premium) | Windows or Linux | Event-driven, at least one instance always running | Yes | None — prewarmed/always-ready instances | Yes | Per instance, always at least one |
| Dedicated (App Service plan) | Windows or Linux | Manual or autoscale rules you write | Yes (on supported tiers) | None with Always On | Yes | The App Service plan you already pay for |
| Container Apps hosting | Linux containers | Event-driven through KEDA | Yes (environment) | Depends on minimum replicas | No | Container Apps pricing |
| Consumption (legacy) | Windows (Linux being retired) | Event-driven, scales to zero | No | Yes | Windows only | Per execution |
Read the requirements as filters. An app that needs private network access and also scale to zero fits Flex Consumption. Windows-only modules rule out Flex Consumption. Private network access rules out Consumption. Staged releases through a slot swap rule out Flex Consumption and Container Apps hosting. Event-driven scale (for example on queue depth, with no rules to write) rules out Dedicated. When Windows or slots must combine with a VNet, no cold start and event scaling, the Premium plan is the one that meets all of them, at the price of always paying for at least one instance. The Dedicated plan is the right answer when existing App Service capacity is underused and predictable cost matters more than event scaling: functions share the plan already paid for, with Always On enabled so timer and queue triggers keep firing. Flex Consumption also doesn't run custom container images; a function that needs one goes to Premium, Dedicated or Container Apps hosting.
Serverless workflows: Durable Functions vs Logic Apps
For stateful serverless workflows, Durable Functions is the code-first choice and Azure Logic Apps is the designer-first choice with ready-made connectors; within Logic Apps, Consumption is multitenant and billed per action, while Standard is single-tenant with virtual network support.
Durable Functions patterns
Durable Functions extends Azure Functions with orchestrator functions whose progress is checkpointed, so a workflow resumes after a host restart. The patterns to recognise:
- Function chaining — activities run one after another, each using the previous output.
- Fan-out/fan-in — the orchestrator starts many activities in parallel, waits for all of them, then runs an aggregation step. Plain triggered functions can also run in parallel, but nothing tells you when the whole batch is finished.
- Human interaction — the orchestration waits for an external event (such as an approval) with a timeout.
- Also async HTTP APIs, monitors and aggregators (durable entities).
Logic Apps hosting models
| Capability | Logic Apps Consumption | Logic Apps Standard |
|---|---|---|
| Compute | Multitenant Azure Logic Apps | Single-tenant (built on the Functions runtime), on a Workflow Standard plan or an App Service Environment v3 |
| Workflows per logic app | One | Several, deployed together as a project through CI/CD |
| Virtual network integration and private endpoints | No VNet integration | Yes |
| Billing | Per action execution — cheapest for low volume | For the hosting plan, continuously |
Choose by who maintains the workflow and what it must reach. Developers who want the workflow in code and source control pick Durable Functions. Analysts working in a visual designer with connectors (Office 365 Outlook, SharePoint, SAP, Service Bus) pick Logic Apps: Consumption when volume is low and no private network is needed, Standard when the workflows must reach private endpoints, run on single-tenant compute or deploy as a project. Power Automate targets business-user automation inside Microsoft 365 rather than Azure-hosted, network-integrated workflows.
Batch processing: Azure Batch pools, Spot nodes, MPI and Azure CycleCloud
Azure Batch is the managed service for large-scale parallel and HPC batch jobs: it creates pools of compute nodes, queues tasks in jobs, schedules them across nodes, retries failures and scales the pool, so you don't build a scheduler. A scale set or AKS cluster gives you compute but leaves task queueing, scheduling and retries to you, and Functions isn't built for long, heavy tasks.
Dedicated and Spot nodes
A Batch pool has separate targets for dedicated nodes and Spot nodes. Spot nodes are discounted but have no availability guarantee: the pool may not reach its Spot target when surplus capacity is scarce, and allocated Spot nodes can be preempted, in which case Batch requeues the interrupted tasks automatically. Short, independent tasks suit Spot well. When results are due by a deadline, set a dedicated baseline that guarantees progress and a Spot target on top for savings; an autoscale formula can add dedicated nodes when variables such as $PreemptedNodeCount rise. Spot-only is cheapest but risks the deadline; dedicated-only meets it at full price.
Getting software onto nodes
| Method | How it works | Trade-off |
|---|---|---|
| Start task | Runs on each node as it joins the pool (can wait for success before tasks run) | Repeats the install on every new node |
| Application package | A zip that Batch downloads and extracts on each node | Good for binaries that just need copying; an installer still has to run |
| Job preparation task | Runs on each node before a job's tasks | Per-job setup, still repeated per node |
| Custom image (Azure Compute Gallery) | Nodes boot with the software preinstalled | Rebuild the image when the software changes |
When the install is long, the pool scales out often and jobs must start quickly, a custom image is the answer; when software changes constantly and installs are quick, start tasks or application packages are simpler.
Tightly coupled HPC: multi-instance tasks and Azure CycleCloud
Tightly coupled HPC jobs, such as MPI simulations whose processes exchange data across nodes, run on Azure either as Azure Batch multi-instance tasks or on a traditional scheduler cluster managed by Azure CycleCloud.
A Batch multi-instance task runs a primary task and subtasks across several nodes for MPI. The pool must have inter-node communication enabled and concurrent task execution disabled, which means task slots per node set to 1. If either condition is missing, the task is never scheduled and stays in the active state, even with enough idle nodes. Retry settings don't help, because retries apply only after a task fails. For performance, use RDMA-capable HPC sizes with InfiniBand; preemptible Spot nodes are a poor fit for long, tightly coupled jobs.
| Need | Azure Batch | Azure CycleCloud |
|---|---|---|
| Scheduler | Batch's own job and task model (API, SDKs, CLI) | Traditional schedulers such as Slurm, PBS Pro or IBM Spectrum LSF |
| Existing job scripts | Must be rewritten as Batch jobs and tasks | Keep working unchanged; users keep their commands |
| Scaling | Pool autoscale formulas | Autoscales nodes from the scheduler's queue, including bursting from on-premises |
| Best fit | New Azure-native batch and HPC workloads | Organisations with established HPC clusters and workflows |
Tip. Questions on this topic are design scenarios: an organisation describes a workload and two or three requirements, such as no operating system to patch, no container images to build, no Kubernetes skills, scale to zero, Windows-only dependencies, private network access, staged releases, a hard deadline, no shared hardware or the lowest cost, and asks what you should recommend. The options are real Azure compute services, VM families, pricing options, orchestration modes, eviction policies, hosting plans or Batch settings that each miss one requirement, so read every constraint before choosing. Expect near-twin comparisons (Container Apps versus AKS versus Container Instances, Flex Consumption versus Premium versus Dedicated, Flexible versus Uniform scale sets, Deallocate versus Delete, reservations versus savings plans, Dedicated Host versus confidential VMs, Logic Apps Consumption versus Standard, Batch versus CycleCloud) and select-TWO items where each correct option is part of the solution. Current Microsoft guidance matters: Flex Consumption for new serverless function apps, and Flexible orchestration for new scale sets.
- Pick the most managed compute that meets every requirement: VMs only when you need the OS, App Service for web code, Container Apps for containers without Kubernetes, AKS when you need the Kubernetes API.
- VM families follow resource shape: B burstable, D general purpose, E/M memory, F compute, L storage, N GPU, H-series HPC with InfiniBand for tightly coupled MPI.
- Reservations suit fixed size and region; savings plans follow changing families, regions and some PaaS compute; Hybrid Benefit removes the licence charge and stacks with either.
- Spot VMs can be evicted at any time: Deallocate keeps the disks (still billed) so you can resume, Delete removes everything; a max price of -1 stops only price evictions.
- Flexible orchestration mixes VM sizes and Spot with regular instances and supports Azure Backup; the mode is fixed at creation, so changing it means a new scale set.
- Known peaks need schedule-based autoscale ahead of time; keep a metric rule for unplanned spikes.
- Dedicated Host answers "no shared hardware"; confidential VMs answer "protect memory from the host" with no code changes; SGX enclaves need code changes.
- In AKS, put GPU or Spot capacity in its own tainted user pool with the cluster autoscaler; Spot pools can't be system pools.
- Flex Consumption is the default serverless Functions plan (Linux, VNet, scale to zero, no slots); Premium covers Windows, slots and no cold start; Dedicated reuses spare App Service capacity.
- Azure Batch manages pools and scheduling; use a dedicated baseline plus Spot for deadlines, custom images for long installs, and CycleCloud to keep existing Slurm or PBS workflows.
Frequently asked questions
When should I choose Azure Container Apps instead of AKS?
Choose Azure Container Apps when you want to run containerised microservices with service discovery, Dapr, revisions with traffic splitting and scale to zero, but don't need direct access to the Kubernetes API and don't want to operate a cluster. Choose Azure Kubernetes Service when you rely on Kubernetes-native tooling such as Helm charts, operators or custom resource definitions, or need control over node pools and cluster configuration, and accept that your team designs, upgrades and operates the cluster.
Which Azure Functions hosting plan should a new function app use?
Microsoft recommends the Flex Consumption plan for new serverless function apps: it runs on Linux, supports virtual network integration, scales to zero and bills on executions, with optional always-ready instances to reduce cold starts. Use the Premium plan instead when the app needs Windows, deployment slots or always-warm instances with event-driven scale, and the Dedicated plan when you already have underused App Service capacity and want predictable cost. The original Consumption plan is legacy and has no virtual network integration.
What is the difference between Azure Reservations and an Azure savings plan for compute?
An Azure Reservation commits to a specific VM size family in a specific region for one or three years and gives the deepest discount for steady, unchanging usage. An Azure savings plan for compute commits to a fixed hourly spend instead, and its discount applies automatically across VM families, regions and selected PaaS compute such as App Service and Container Apps. Pick a reservation when size and region won't change, and a savings plan when the workload's shape will.
What happens to an Azure Spot VM when it is evicted?
It depends on the eviction policy. With Deallocate, the VM is stopped and deallocated, its managed disks are kept and still billed for storage, and you can start the same VM later. With Delete, the VM and its disks are removed so nothing keeps billing. Azure can evict a Spot VM whenever it needs the capacity back; setting the maximum price to -1 only prevents evictions caused by price.
Can I change a Virtual Machine Scale Set from Uniform to Flexible orchestration?
No. The orchestration mode of a Virtual Machine Scale Set is set when the scale set is created and can't be changed later. To gain Flexible features such as mixed VM sizes, mixed Spot and regular instances or Azure Backup support, create a new scale set with Flexible orchestration, add it to the same load balancer backend pool and drain the old Uniform set.
When do I need an App Service Environment v3 instead of a Premium v3 plan with a private endpoint?
Use an App Service Environment v3 when policy requires a single-tenant App Service deployment, with front ends and workers dedicated to you, inside a subnet of your own virtual network, or when you need its scale. If private-only access and private outbound calls are enough and sharing the multitenant App Service platform is acceptable, a Premium v3 plan with a private endpoint for inbound traffic and virtual network integration for outbound traffic meets the need at lower cost.
Should I use Azure Batch or Azure CycleCloud for HPC workloads?
Use Azure Batch for new Azure-native batch and HPC workloads: it manages pools of nodes and schedules tasks with its own job and task model, including MPI through multi-instance tasks. Use Azure CycleCloud when an organisation already runs a traditional HPC scheduler such as Slurm, PBS Pro or LSF and wants to keep its job scripts and commands, with Azure nodes autoscaled from the scheduler's queue.
What is the difference between Azure Dedicated Host and confidential VMs?
Azure Dedicated Host gives your subscription whole physical servers, so no other customer's VMs share the hardware, and lets you control platform maintenance timing with maintenance configurations. Confidential VMs run on shared hardware but encrypt the entire VM's memory with hardware-based keys (AMD SEV-SNP or Intel TDX) and support attestation, protecting data in use from the host, the hypervisor and cloud operators without code changes.
Source
This lesson covers the "Design infrastructure solutions" domain of the official AZ-305 exam guide. Vendors revise their guides — check the source for the current version.
- Microsoft AZ-305 study guide — Microsoft Learn
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.