Designing compute solutions
Match workloads to VMs, containers, serverless or batch, and specify the components each option needs.
In this lesson you'll learn
- A decision path from control to convenience
- When to choose VMs, scale sets or Azure Batch
- Choosing between AKS, Container Apps and Container Instances
- Serverless with Azure Functions and Logic Apps
1. From control to convenience
Refresher: the compute services
VMs give full control of the operating system. Containers package an app with its dependencies. Serverless runs code or workflows on demand, with no servers to manage and billing only while they run.
2. VM-based and batch solutions
| Requirement | Recommend |
|---|---|
| Legacy app needing OS access or specific software | Virtual machines |
| Many identical VMs that scale with load | Virtual Machine Scale Sets |
| Large parallel or HPC jobs across many nodes, scheduled and managed | Azure Batch |
| Interruptible jobs at the lowest cost | Spot VMs (or Spot nodes in Batch and scale sets) |
| Remote desktops for many users | Azure Virtual Desktop |
When specifying a VM solution, cover: size family, disks, availability option, scaling, image management (Azure Compute Gallery), patching (Update Manager) and backup.
3. Container-based solutions
| Service | Recommend when |
|---|---|
| Azure Container Instances | A single container or small group, short-lived tasks, no orchestration |
| Azure Container Apps | Microservices and APIs that scale on HTTP or events (including to zero), without managing Kubernetes |
| Azure Kubernetes Service | Full Kubernetes control: custom operators, service mesh, node pools, existing Kubernetes skills |
| App Service (containers) | A containerised web app that wants slots, custom domains and simple scaling |
4. Serverless solutions
- Azure Functions: event-driven code. The Flex Consumption plan scales to zero and supports VNet integration. Premium keeps instances warm, so there are no cold starts. A Dedicated (App Service) plan suits predictable load.
- Logic Apps: low-code workflows that connect hundreds of services, such as "when an email with an attachment arrives, save it to SharePoint and post in Teams".
- Durable Functions: long-running, stateful orchestrations written in code.
Example
A media company transcodes thousands of videos overnight, an API resizes images on upload, and a nightly job emails sales reports. The architect recommends Azure Batch with Spot nodes for transcoding, an Azure Function triggered by Event Grid for image resizing, and a Logic App for the scheduled report.
Exam traps to remember
- "Without managing Kubernetes" plus "scale to zero" points to Container Apps, not AKS.
- Azure Batch, not scale sets, is the answer for scheduling large parallel compute jobs.
- Logic Apps for connecting services with little code, and Functions for custom code.
Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-305 Azure Solutions Architect app.
Practise in the app