Understanding Azure Compute Options
This lesson explains the hosting spectrum and how workload requirements determine a compute choice.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the hosting spectrum.
- Identify requirements that determine a compute choice.
- Compare the commitment-based cost models.
The hosting spectrum
Compute services can be arranged by how much responsibility the customer retains. With infrastructure as a service (IaaS), such as Azure Virtual Machines, the customer manages the operating system and everything above it. With platform as a service (PaaS), such as Azure App Service, Microsoft manages the operating system and runtime, and the customer manages the application and data. Functions as a service (FaaS), such as Azure Functions, goes further: the customer supplies only code, and the platform handles scaling down to zero. Containers sit across this spectrum, from self-managed Kubernetes to fully managed Azure Container Apps.
The general principle is to choose the most managed service that meets the requirements, because each step away from IaaS removes operational work. A step back to IaaS should be justified by a specific need, such as a custom kernel driver or a licensing constraint.
Workload requirements
The skill to specify components of a compute solution means translating a workload into design choices. Several questions determine the result.
- Control: does the application need operating system access, custom software or specific drivers?
- Application type: a web application, an API, a background job, a batch workload or a packaged commercial product?
- Scaling pattern: steady, predictable peaks, sudden bursts, or idle periods?
- Execution duration: milliseconds, minutes, or days?
- State: can instances be replaced freely, or do they hold data?
- Portability: must the workload also run elsewhere, which would favour containers?
- Team skills: can the team operate Kubernetes, or would that be an unjustified burden?
The compute decision tree
Microsoft's Azure Architecture Center publishes a compute decision tree. A simplified version asks a few questions in sequence. If the workload is being migrated without change, Azure Virtual Machines may suit it, or Azure VMware Solution for VMware estates. If it is cloud-optimized and built as containers, the choice is usually between Azure Container Apps and Azure Kubernetes Service. For web applications and APIs, App Service is often the most productive choice. For short, event-driven tasks, Azure Functions fits. For parallel, scheduled jobs, Azure Batch is appropriate.
The following table recaps the main services with the requirement that typically selects each.
| Service | Management level | Typical selector |
|---|---|---|
| Azure Virtual Machines | Customer manages OS | Full control, or lift-and-shift |
| Azure App Service | Platform | Web applications and APIs |
| Azure Functions | Serverless | Short, event-driven code |
| Azure Container Apps | Serverless containers | Microservices without managing Kubernetes |
| Azure Kubernetes Service | Managed Kubernetes | Full Kubernetes control and ecosystem |
| Azure Container Instances | Simple containers | Single, short-lived containers |
| Azure Batch | Managed job scheduling | Large-scale parallel jobs |
The following diagram matches four workloads to the compute service that suits each.

Pick the compute service
Cost models
Commitment choices influence compute cost as much as the service does. Pay-as-you-go suits unpredictable or short-term use. Reservations offer significant discounts for a one-year or three-year commitment to specific virtual machine sizes. A savings plan for compute is more flexible, offering a discount on an hourly spend commitment, across sizes and regions. Spot capacity uses spare Azure capacity at deep discounts, but instances can be evicted. Azure Hybrid Benefit applies existing Windows Server or SQL Server licences.
Autoscaling and shutting down idle resources should be applied before making commitments, as there is little sense in reserving capacity that is not needed.
Compute cost models
Specifying compute
A company has four workloads: a commercial application that needs a kernel driver; a public REST API written in .NET, with a daily traffic pattern; an image thumbnail process triggered by file uploads; and a set of 20 containerized microservices, whose team has no Kubernetes experience and wants traffic splitting between versions. Which compute service suits each?
The kernel driver needs operating system control, so virtual machines are required. The REST API suits App Service with autoscale. Thumbnail generation is short and event-driven, so Azure Functions with a Blob or Event Grid trigger fits.
The microservices suit Azure Container Apps, which offers revisions with traffic splitting, and no cluster to manage. AKS would meet the technical needs but would add a burden the team is not equipped for, and placing all four in virtual machines would increase operational work with no benefit.
What is the difference between a reservation and a savings plan for compute?
Show answer
A reservation commits to specific sizes in a region, whereas a savings plan commits to an hourly spend across sizes and regions.
Exam Tips
Remember for the exam
- Choose the most managed service that meets the requirements.
- Containers can use Container Apps or AKS; team skills usually decide.
- Reservations commit to a size; savings plans commit to an hourly spend.
- Spot capacity is cheap, but evictable.