1.2.1. The Compute Spectrum: Choosing Where Code Runs
💡 First Principle: Compute options differ by unit of deployment and unit of scale. App Service deploys apps and scales instances; Container Apps deploys containers and scales replicas (down to zero, on events); AKS deploys Kubernetes objects and scales whatever you configure; Functions deploys individual functions and scales per event. Match the scenario's unit of work to the service's unit of scale and the answer falls out.
You'll assemble AI solutions from four compute services, and the exam expects you to pick between them fluently. The comparison below is the single most useful table in this guide — the decision keywords column is drawn directly from how exam scenarios are phrased.
| Service | You manage | Scales by | Scale to zero | Decision keywords in scenarios |
|---|---|---|---|---|
| Azure App Service | App code (or container) | Instances (plan-based) | No | "web app," "easiest path," "existing App Service plan" |
| Azure Container Apps | Containers only | Replicas via KEDA events | Yes | "microservices," "event-driven scaling," "scale to zero," "no Kubernetes management" |
| Azure Kubernetes Service | Cluster config + workloads | Pods/nodes as configured | No (cluster runs) | "kubectl," "manifest files," "full control," "custom controllers" |
| Azure Functions | Function code | Per-event instances | Yes (Consumption) | "run code on a trigger," "serverless API," "glue between services" |
When a scenario gives you a constraint, walk this decision path:
The nuance worth internalizing: Container Apps runs on Kubernetes but hides Kubernetes. You get KEDA scaling, Dapr, and revisions without touching a cluster — and in exchange you give up the Kubernetes API entirely. This single fact separates ACA answers from AKS answers on multiple exam questions, and we'll build on it heavily in Phase 3.
⚠️ Exam Trap: "Container Apps is built on Kubernetes" does not mean you can point kubectl at it or apply manifest files. No Kubernetes API is exposed. If the scenario requires manifests, operators, or kubectl — the answer is AKS, full stop.
Reflection Question: An AI inference worker processes messages from a queue, sits idle overnight, and must incur zero compute cost while idle. Which two services satisfy the idle requirement, and what tips the choice between them?