Azure Compute Options Compared
Virtual Machines, Scale Sets, App Service, Functions, Container Apps, AKS, Container Instances and Batch compared for exam decisions.
By tools4free.dev · Last reviewed 4 December 2026
tools4free.dev is not affiliated with, endorsed by or sponsored by Microsoft. Facts below come from Microsoft Learn pages checked on 4 December 2026, linked in Sources. Confirm details on Learn before you rely on them.
The short answer
Work from control to convenience. If you must control the operating system, use Virtual Machines (add Virtual Machine Scale Sets when you need many identical, autoscaled VMs). If you are hosting a web app or API and want the platform to run it, use App Service. If code runs in response to an event and you want no servers to think about, use Azure Functions. If the workload is containers, choose Container Apps for serverless containers without Kubernetes, AKS when you need the Kubernetes API and control plane, and Container Instances for a single container or group with no orchestration. If the job is large parallel or high-performance computing, use Azure Batch. Microsoft's own decision guide starts with a different split: migrating an existing workload versus building a new one.
The services side by side
| Service | Model | What you manage | Scaling | Best fit from Learn |
|---|---|---|---|---|
| Virtual Machines | IaaS | The VM, OS, patching and networking (high overhead) | Scale sets add autoscaling | Traditional IT operations teams; lift and shift; N-tier and big compute |
| Virtual Machine Scale Sets | IaaS | The VM image and configuration, shared by all instances | Instance count rises or falls with demand or a schedule | Many identical load-balanced VMs |
| App Service | PaaS | Your application; platform handles infrastructure (low overhead) | Built-in autoscale | Web apps, mobile back ends, REST APIs |
| Azure Functions | FaaS, serverless | Your functions (very low overhead) | Built in; varies by hosting plan | Event-driven code with triggers and bindings |
| Container Apps | PaaS, serverless containers | Containers; Kubernetes is abstracted away (low overhead) | Scaling rules; most apps can scale to zero | Microservices, APIs, background jobs, event-driven processing |
| AKS | Managed Kubernetes | Kubernetes administration, node pools and upgrades in Standard mode (high overhead) | Pod and cluster autoscaling | DevOps teams with Kubernetes expertise who need the Kubernetes API |
| Container Instances | Serverless containers, no orchestration | Almost nothing (very low overhead) | Autoscaling not supported | Simple container execution, task automation, batch jobs |
| Batch | Scheduling as a service over a pool of VMs | Jobs and pools (medium overhead) | Pools; can scale down to zero after the job | Large-scale parallel and HPC work |
Learn's decision guide also covers Azure Red Hat OpenShift (managed OpenShift clusters) and Azure VMware Solution (VMware workloads). Both appear as the answer only when a question names OpenShift or VMware.
Choose Virtual Machines and Scale Sets when
You need full control or you are lifting and shifting software that cannot change. Learn describes VMs as the model closest to a traditional on-premises environment: Microsoft manages the infrastructure and you manage the VMs. The guide lists a minimum of one node, with a higher SLA when you run two or more instances. A scale set creates and manages a group of load-balanced VMs from the same base image and configuration, and the number of instances can change automatically with demand or a defined schedule. Flexible orchestration offers high availability guarantees up to 1,000 VMs by spreading them across fault domains. The orchestration mode is chosen at creation and cannot be changed later. A scale set alone does not protect against a data centre failure; spread instances across availability zones for that.
Choose App Service when
You are hosting a web app, mobile back end or REST API and want the platform to deal with infrastructure. App Service supports .NET, Java, Node.js, Python and PHP on Windows and Linux, and runs custom containers. The decision guide notes that several apps can share one App Service plan, that deployment slots handle application updates, and that autoscaling is built in. Virtual network integration needs Basic tier or higher, or an App Service Environment. The guide's team-skills table calls the operational overhead low and the fit "application developers focused on code".
Choose Azure Functions when
The code is triggered by something: a file landing in Blob Storage, a timer, an HTTP call, a queue message or a database change. Learn describes Functions as a serverless solution built on event-driven triggers and bindings. The Consumption and Flex Consumption plans are serverless; on an App Service plan, functions run on the VMs allocated to that plan. Durable Functions provide stateful workflows. The decision guide marks web hosting as "not applicable" for Functions, so do not pick it when the requirement is a classic website.
Choose Container Apps, AKS or Container Instances when
The workload is containerised. The three answers differ by how much of Kubernetes you want to see.
- Container Apps: serverless containers built on Kubernetes, without direct access to the Kubernetes APIs. It scales on HTTP traffic, events, CPU or memory, or any KEDA-supported scaler, supports Dapr for microservices, runs jobs, and uses revisions for updates. Most applications can scale to zero.
- AKS: a managed Kubernetes service that gives direct access to the Kubernetes API and control plane. Azure manages the control plane at no cost. AKS Automatic hands node management and upgrades to Azure. AKS Standard keeps node pools in your hands and suits custom networking, Windows node pools or existing automation.
- Container Instances: the fastest, simplest way to run Linux or Windows containers without managing VMs or adopting a higher-level service. It starts containers in seconds and bills by the second. Learn says it does not provide full container orchestration, and the decision guide lists autoscaling as not supported.
Choose Batch when
The work is many tasks that can run in parallel, such as risk simulations, rendering, image analysis or media transcoding. Batch creates and manages a pool of compute nodes, installs your application and schedules the jobs. There is no extra charge for Batch itself; you pay for the underlying VMs, storage and networking. Learn warns against choosing Batch only to avoid managing VMs. When an organisation already has scheduler-specific scripts or needs Slurm, it points to Azure CycleCloud or CycleCloud Workspace for Slurm instead.
Worked scenarios
Requirement: A small team of developers must host an ASP.NET web app and a REST API. They want staged releases with a swap, autoscaling and no OS patching.
Answer: App Service with deployment slots.
Why the others fail: Virtual Machines leave patching and OS management with the team. AKS demands Kubernetes expertise and carries high operational overhead. Functions is marked "not applicable" for web hosting in Learn's comparison.
Requirement: Each time a document is uploaded to Blob Storage, a small piece of code must extract metadata. Uploads are irregular, and the team does not want to pay for idle servers.
Answer: Azure Functions with a Blob trigger on a serverless hosting plan.
Why the others fail: App Service runs on instances of a plan with a minimum of one node, so something is always allocated. Virtual Machines need patching and sit idle between uploads. Batch is for large scheduled parallel jobs, not per-event handlers.
Requirement: A company has a dozen containerised microservices. They need scaling on HTTP load and on queue length, scale to zero overnight and minimal cluster administration. Nobody on the team knows Kubernetes. No requirement mentions the Kubernetes API.
Answer: Azure Container Apps.
Why the others fail: AKS is the choice only when the Kubernetes API and control plane are required, and its overhead is high. Container Instances does not support autoscaling. App Service is an app-hosting platform; Learn lists Container Apps scaling rules and scale to zero as its container-focused features.
Requirement: A nightly job splits a large dataset into thousands of independent tasks. The compute must exist only while the job runs, and the team does not want to install a scheduler.
Answer: Azure Batch.
Why the others fail: Scale sets give you identical VMs but no job scheduler. Container Instances offers no autoscaling. Functions targets event-driven code, not large pools of parallel compute.
Common traps
- Treating every compute service as multiregion. Learn states that all these platforms are regional. Active-active or active-passive across regions needs an external router and a deployment in each region. See the load balancing comparison.
- Picking AKS by habit. Container Apps does not expose the Kubernetes API. Choose AKS only when the question needs it, or lists Kubernetes skills and control as a requirement.
- Expecting Container Instances to scale. Autoscaling is "not supported" in Learn's scalability table.
- Using Functions for a website. Web hosting is "not applicable" for Functions in the comparison table.
- Forgetting VNet requirements. App Service and Functions virtual network integration need specific tiers or plans.
- Choosing Batch to dodge VM management. Learn says not to; scheduler compatibility pushes you to CycleCloud instead.
- Assuming a scale set is zone resilient by default. You must spread instances across availability zones.
Quick reference for the exam
- Full OS control, lift and shift: Virtual Machines; many identical autoscaled VMs: scale sets
- Web app or API, low overhead, deployment slots: App Service
- Event-driven code, triggers and bindings, serverless: Functions
- Containers without Kubernetes, scale to zero, KEDA, Dapr: Container Apps
- Kubernetes API, control plane, existing Kubernetes skills: AKS
- Single container or group, no orchestration, billed by the second: Container Instances
- Large parallel or HPC jobs: Batch
- All of them are regional: add a router for multiregion
FAQ
Can App Service run containers?
Yes. Learn says that if your app is containerised, you can deploy it as a custom container. The decision comes down to whether you want an app-hosting platform (App Service) or container-centric scaling and microservice features (Container Apps).
Do Container Apps and Functions overlap?
Container Apps can run Azure Functions for event-driven scenarios. Pick Functions when the unit of work is a function with triggers and bindings, and Container Apps when you are packaging containers.
What is the difference between AKS Automatic and Standard?
In Automatic, Azure provisions, scales and upgrades nodes for you. In Standard you create and manage node pools yourself and opt in to most features. Learn recommends Standard for specific infrastructure requirements or existing automation.
Does a scale set give me high availability on its own?
No. Learn says a scale set alone cannot protect against data centre failures. Spread VM instances across availability zones within the scale set.
Related study pages
- AZ-900: Compute and networking services
- AZ-104: Virtual machines
- AZ-104: Availability and scale sets
- AZ-104: App Service plans
- AZ-104: Containers
- AZ-305: Virtual machines design
- AZ-305: App Service and Functions
- AZ-305: Containers
- AZ-305: Batch