Design infrastructure solutions · Topic 1 of 10
Virtual Machine and Container Compute Solutions
AZ-305 compute design: choose VM sizes, scale sets, Spot and reservations, and decide between App Service, Container Apps, AKS and Container Instances.
- 5 min
- VM families: B burstable, D general, E memory, F compute, L storage, N GPU, H HPC. Use Premium SSD for production.
- Reservations and savings plans cut steady costs, Spot suits interruptible work, and Hybrid Benefit reuses licenses.
- Container Apps is the default container choice. AKS is for Kubernetes API control. ACI is for single short lived containers.
What it is
Azure offers a spectrum of compute, from virtual machines (most control, most management) to containers and platform services (less control, less management). The architect specifies the components of a solution from the workload's needs: CPU, memory, storage, GPU, OS, scaling, state and how much operational effort the team will accept. Then chooses between VM based and container based designs.
How it works
Specifying VM components
| Component | Choice |
|---|---|
| Size family | B burstable (low average CPU), D general purpose, E memory optimised, F compute optimised, L storage optimised, M very large memory, N GPU, H HPC |
| Disks | Premium SSD for production, Premium SSD v2 for tunable IOPS, Ultra for the highest performance, Standard for dev and test and backups. Choose zone redundant (ZRS) disks for resilience |
| Availability | Availability zones or sets, or a scale set |
| Image | Marketplace, custom image, Azure Compute Gallery for sharing and versions |
| Security | Trusted Launch, confidential VMs for data in use, Azure Disk Encryption or server side encryption with customer managed keys, Bastion instead of public RDP |
| Placement | Proximity placement groups for low latency, dedicated hosts for licensing or isolation |
Pricing and cost options
| Option | Use |
|---|---|
| Pay as you go | Unpredictable, short term |
| Reservations (1 or 3 years) and savings plans | Steady, predictable workloads, large discounts |
| Spot VMs | Interruptible work such as batch and dev and test, at a deep discount, with possible eviction |
| Azure Hybrid Benefit | Reuse Windows Server and SQL Server licenses |
| Autoscale and auto shutdown | Avoid paying for idle capacity |
Scale sets
Virtual Machine Scale Sets scale out and in automatically. Use Flexible orchestration for new designs. Pair with a load balancer and autoscale rules on metrics or schedules. Use instance mix to combine sizes or Spot and regular instances.
When to use VMs
Choose VMs when you need OS level access, legacy or lift and shift workloads, unsupported software, specialised drivers or GPUs, or licensing control. Accept that you own patching, scaling and availability. Use Azure Update Manager for patching and Azure Arc for hybrid.
Container based solutions
| Service | Fits |
|---|---|
| Azure Container Apps | The default for most containerised apps and microservices. Built on Kubernetes but hides the cluster. Scale to zero, KEDA event scaling, Dapr, revisions and traffic splitting. No access to the Kubernetes API |
| Azure Kubernetes Service (AKS) | You need Kubernetes API access, custom controllers, a service mesh, node level control, GPUs or specific scheduling. Most configurable and most to operate |
| Azure Container Instances (ACI) | A single container or small group for short lived or burst jobs. No orchestration, no autoscale |
| App Service for Containers | A web app packaged as a container. HTTP and HTTPS only |
| Azure Container Registry (ACR) | Stores images, with geo replication, vulnerability scanning and private access |
| Azure Red Hat OpenShift | Managed OpenShift for existing OpenShift skills |
Compared with each other: App Service is the simplest for web apps and APIs. Container Apps adds microservice and event driven features. AKS gives complete control. Use managed identities for pulls from ACR, private clusters for restricted APIs, and node pools across zones for availability. A third party container that cannot be modified can use sidecar and ambassador containers in the same Container App to add logging and proxy behaviour.
Choosing quickly
| Requirement | Answer |
|---|---|
| Lift and shift a legacy app that needs the OS | Virtual machines in a scale set or availability zones |
| Microservices without managing Kubernetes, scale to zero | Azure Container Apps |
| A custom operator and service mesh | AKS |
| One short lived container job | Azure Container Instances (or a Container Apps job) |
| Interruptible batch compute at lowest price | Spot VMs |
| Predictable VMs for 3 years | Reserved instances or a savings plan |
| A simple web API with minimal management | App Service |
A worked scenario
A team has a legacy Windows service, a new set of five microservices, and an overnight image processing job. The architect keeps the legacy service on VMs in an availability zone scale set with reserved instances, puts the microservices on Container Apps with scale to zero and Dapr, and runs the overnight job on Spot VMs in a scale set that tolerates eviction. A private ACR with managed identity pulls images.
What to remember for the exam
- VM families: B burstable, D general, E memory, F compute, L storage, N GPU, H HPC. Use Premium SSD for production.
- Reservations and savings plans cut steady costs, Spot suits interruptible work, and Hybrid Benefit reuses licenses.
- Container Apps is the default container choice. AKS is for Kubernetes API control. ACI is for single short lived containers.
- App Service Web App for Containers supports only HTTP and HTTPS.
- Sidecar and ambassador containers can extend a container you cannot modify.
"No cluster management" and "scale to zero" mean Container Apps. "Kubernetes API access" means AKS.
How the exam asks about this
- "Run microservices with event driven scaling and no cluster management." Azure Container Apps.
- "Custom Kubernetes controllers and a service mesh." AKS.
- "Run interruptible batch jobs as cheaply as possible." Spot VMs.
- "Reduce cost of a steady workload for three years." Reserved instances or a savings plan.
Common mistakes
Choosing AKS by default. Container Apps is simpler.
Using Spot for databases or stateful services.
ACI for production microservices. It lacks orchestration.
Public RDP instead of Bastion.
Check yourself
Which container service hides the Kubernetes cluster and scales to zero?
Azure Container Apps.
Which VM option gives deep discounts but can be evicted?
Spot VMs.
Which service gives access to the Kubernetes API?
Azure Kubernetes Service.
Topic 1 of 10 in Design infrastructure solutions
Test yourself on Design infrastructure solutions
The full Microsoft AZ-305 question bank has 755 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.