1. Compute Decision Tree

Start every compute decision with workload characteristics, not brand loyalty:

What are your workload characteristics?
Need full OS control or specific drivers?
Yes → VM / VMSS
No ↓
Event-driven / short-lived executions?
Yes → Azure Functions
No ↓
Containerized workload?
No → App Service
Yes ↓
Need orchestration / service mesh / custom networking?
Yes → AKS
No ↓
Long-running or needs scale-to-zero?
Scale-to-zero / HTTP → Container Apps
Batch / burst → ACI

2. Decision Axes

Six dimensions that influence every compute choice:

AxisKey QuestionImpact
Team SkillsKubernetes expertise?No → avoid AKS overhead
ScalingPredictable or spiky?Spiky → Functions / Container Apps
StateStateful or stateless?Stateful → VM / StatefulSets in AKS
LatencySub-ms or tolerant?Ultra-low → dedicated VMs / proximity groups
NetworkingVNet integration, private endpoints?Complex → AKS / App Service Premium
CostBudget-constrained?Pay-per-use → Functions Consumption

3. Service Comparison Matrix

ServiceScalingMin MgmtContainersCost ModelBest For
VMs / VMSSManual / autoscale rulesHighManualPer-hourLegacy, full control
App ServiceBuilt-in autoscaleLowYes (Linux)Per-planWeb apps, APIs
FunctionsEvent-driven autoVery lowOptionalPer-executionEvent processing, glue
ACINone (per-group)Very lowRequiredPer-secondBatch, sidecar, burst
Container AppsKEDA-based, scale-to-zeroLowRequiredPer-second + requestsMicroservices, APIs
AKSCluster + pod autoscalerMedium-HighRequiredPer-nodeComplex microservices

4. Workload Archetypes

  • Simple Web App / APIApp Service — managed TLS, deployment slots, autoscale included
  • Event-Driven ProcessingAzure Functions — queue triggers, timer jobs, pay-per-execution
  • Microservices (small team)Container Apps — Dapr, KEDA, zero Kubernetes YAML
  • Microservices (large team / complex)AKS — full control, service mesh, custom CNI
  • Batch / Burst ProcessingACI + Spot VMs — spin up, process, tear down
  • Legacy / Vendor SoftwareVMs / VMSS — no code changes, lift-and-shift

5. Progressive Modernization Path

Most organizations evolve through compute tiers incrementally:

VM (Lift & Shift)
→ Containerize app
App Service (PaaS)
→ Add Dapr, split services
Container Apps (Serverless containers)
→ Need advanced networking / control
AKS (Full orchestration)
Key Insight: You don't have to reach Phase 4. Stop at the phase that matches your complexity. Over-engineering costs more than under-engineering.

6. Real-World: Contoso's Five Workloads

Scenario: Contoso Ltd migrates five workloads to Azure. Each has different characteristics:

WorkloadCharacteristicsChosen ServiceRationale
Customer Portal.NET web app, predictable trafficApp Service P1v3Managed, deployment slots, easy CI/CD
Order ProcessorQueue-triggered, burstyFunctions (Consumption)Pay-per-message, auto-scales to zero
Recommendation EnginePython ML, GPU neededVMSS (NC-series)GPU drivers, full OS control
Shipping Microservices4 services, small teamContainer AppsDapr service invocation, no K8s ops needed
Nightly Report Gen2-hour batch, runs at midnightACI + SpotPer-second billing, no idle cost

Result: 40% cost reduction vs. putting everything on VMs; each team uses the right abstraction level.

7. Exam Tip

⚠️ AZ-305 Exam: The compute decision tree appears in nearly every exam sitting. The exam tests whether you can match workload requirements (not preferences) to the least complex service that meets all constraints. Key traps:
  • Don't pick AKS when Container Apps satisfies the requirement
  • Don't pick VMs when App Service works — unless OS-level access is explicitly needed
  • Functions Consumption has a 5-min default timeout (10 max) — long-running = Premium or Dedicated
  • "Scale to zero" + containers = Container Apps, not AKS

8. Knowledge Check

Q1: A startup has a containerized API with unpredictable traffic and no Kubernetes expertise. Which service?

Q2: A legacy Windows application requires specific registry edits and a custom device driver. Which compute?

Q3: An event-driven workload processes Service Bus messages in under 30 seconds per message with highly variable volume. Minimize cost.

Q4: A team of 50 engineers operates 30 microservices needing custom CNI, service mesh, and pod-level network policies. Which compute?

Q5: What is the recommended modernization step AFTER lifting a monolithic app to a VM?