Compute Solutions Design
AZ-305 AZ-305 · Design infrastructure solutions
Compute is where the application runs, and Azure offers more ways to run code than any architect can hold in their head at once. AZ-305 tests the decision, not the catalogue: given a workload's characteristics — stateful or stateless, steady or bursty, long-running or event-driven, containerised or not — which compute service fits, and what are the trade-offs?
Virtual machines and scale sets
Azure Virtual Machines provide full control over the OS, which is necessary for legacy applications, custom software requiring specific OS configurations, or workloads needing specialised hardware (GPU, high-memory, HPC). Choose VM series by workload: B-series for burstable low-cost workloads, D-series for general purpose, E-series for memory-optimised, F-series for compute-optimised, and N-series for GPU. Availability comes from zones or scale sets (covered in the HA guide). Cost controls: Azure Reserved Virtual Machine Instances (1- or 3-year commitments saving up to 72 percent), Azure Hybrid Benefit (reuse on-premises Windows/SQL licences), Spot VMs (deep discounts for interruptible workloads), and autoscale via VMSS. The exam's recurring theme: VMs are the answer when control is required, but they carry the most management overhead — patching, availability, scaling are all yours. If a PaaS option fits, it usually wins.
App Service: PaaS for web apps and APIs
Azure App Service hosts web applications, APIs, and mobile backends without managing VMs: built-in autoscale, deployment slots for blue-green deployments, custom domains and TLS, and integration with VNet and private endpoints. Choose the pricing tier by need: Free/Shared for dev/test, Basic for small production apps, Standard for autoscale and slots, Premium for higher performance and VNet integration, and Isolated (App Service Environment) for single-tenant isolation with a dedicated network boundary. Deployment slots are the exam favourite: deploy to a staging slot, warm it up, test it, then swap with production — zero-downtime deployments with instant rollback. For Windows containers or Linux containers, App Service also runs containerised apps, but for serious container workloads, AKS or Container Apps fit better.
Containers: AKS, Container Apps, Container Instances
The container decision tree is a core AZ-305 topic. Azure Kubernetes Service (AKS) is the managed Kubernetes platform: full orchestration, scaling, service mesh integration, and control — choose it for complex microservices architectures, especially when the team already knows Kubernetes or needs its ecosystem. Azure Container Apps is the serverless container platform: build microservices without managing Kubernetes, with built-in autoscaling (including scale-to-zero), ingress, and Dapr integration — choose it for containerised microservices where the team wants Kubernetes benefits without Kubernetes operations. Azure Container Instances (ACI) runs individual containers on demand with per-second billing and fast startup — choose it for one-off jobs, burst capacity, or simple single-container workloads. The exam tests the distinctions: "microservices without managing Kubernetes" is Container Apps; "full Kubernetes control" is AKS; "run one container quickly" is ACI.
Serverless: Azure Functions
Azure Functions runs event-driven code without provisioning servers: triggers include HTTP, timers, queues, blobs, and Event Grid. The Consumption plan scales automatically and bills per execution (with scale-to-zero); the Premium plan adds VNet connectivity, pre-warmed instances (avoiding cold starts), and longer execution times; the Dedicated (App Service) plan runs Functions on App Service infrastructure for predictable billing. Choose Functions for event-driven, short-lived work — image processing on upload, queue-driven processing, scheduled jobs. Cold starts are the classic trade-off: the Consumption plan can delay the first invocation after idle, so latency-sensitive workloads need the Premium plan. Durable Functions extends Functions with stateful workflows — fan-out/fan-in, human interaction, long-running orchestrations.
Batch and HPC
Azure Batch runs large-scale parallel and HPC workloads: it provisions pools of VMs, schedules jobs, and scales the pool to zero when done. Choose it for rendering, simulations, Monte Carlo analysis, or any embarrassingly parallel workload. Azure HPC adds specialised VM series (HB, HC) with InfiniBand networking for tightly coupled parallel workloads like CFD or weather modelling. For big-data batch processing, Spark on Synapse or Databricks is usually the better fit. The exam distinction: Batch for parallel compute jobs, Functions for event-driven work, VMSS for steady-state scalable services.
Choosing compute: the decision framework
Work through the questions: Is the workload stateful or stateless? Is it always-on or event-driven? Is it containerised? How much operational control does the team want? How spiky is the load? The answers point to the service: steady-state with full control — VMs or VMSS; web app or API without infrastructure management — App Service; microservices with Kubernetes expertise — AKS; microservices without Kubernetes operations — Container Apps; event-driven short tasks — Functions; parallel jobs — Batch. And always consider cost: serverless and consumption plans win for spiky or intermittent loads; reserved capacity wins for steady loads.
Cost optimisation for compute
Compute is usually the largest Azure bill, so cost design matters as much as performance design. The levers, in order of impact: right-size first — Azure Advisor identifies underused VMs, and most estates have VMs running at 10 percent CPU that can drop a size or two. Reserve the steady-state baseline with Reserved Instances or savings plans (up to 72 percent off) and leave variable load on pay-as-you-go. Use Hybrid Benefit if the organisation has Windows Server or SQL Server licences with Software Assurance. Stop what is not needed: auto-shutdown for dev/test VMs, scale-to-zero for Container Apps and Functions, and auto-pause for serverless databases. Use Spot VMs for fault-tolerant, interruptible workloads such as batch processing, rendering, or test workloads — discounts reach 90 percent, but instances can be evicted with 30 seconds' notice, so the workload must handle interruption. Choose the cheapest adequate tier: B-series burstable VMs for low-utilisation workloads, and the Consumption plan for sporadic Functions. In exam scenarios, the cost-optimal answer is usually the one that matches the billing model to the usage pattern — steady load to reservations, spiky load to consumption, interruptible load to Spot.
Hybrid and edge compute
Not every workload lives in Azure regions. Azure Arc extends Azure management to servers, Kubernetes clusters, and data services running on-premises or in other clouds, letting you govern them with Azure Policy, Defender for Cloud, and Monitor as if they were native resources. Azure Stack HCI brings Azure services to on-premises hyperconverged infrastructure for workloads that must stay local — latency-sensitive manufacturing systems, or data that cannot leave the country. Azure Local (the evolution of Azure Stack HCI) continues this hybrid story. In exam scenarios, "manage on-premises servers with Azure Policy" points to Arc, and "run Azure services on-premises for latency or sovereignty" points to Stack HCI. These are niche topics for AZ-305, but the hybrid identity and networking guides connect directly: Arc-enabled servers authenticate with managed identities and connect through the same hybrid network as everything else.
Exam traps to watch for
- Recommending AKS when the scenario says the team has no Kubernetes expertise — Container Apps delivers microservices without Kubernetes operations.
- Choosing the Functions Consumption plan for a latency-sensitive workload — cold starts matter; Premium plan with pre-warmed instances is the answer.
- Recommending VMs by default — PaaS (App Service, Container Apps, Functions) is the default unless a control requirement forces IaaS.
- Forgetting deployment slots — zero-downtime deployments with instant rollback are the App Service answer to deployment-risk scenarios.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A team is building a microservices application in containers. They want automatic scaling, including scale-to-zero, but have no Kubernetes expertise and do not want to manage clusters. Which service should the architect recommend?
Explanation: Container Apps is the serverless container platform: microservices with autoscaling and scale-to-zero, built-in ingress and Dapr, without managing Kubernetes. Option D is wrong because AKS requires Kubernetes expertise and cluster management. Option B is wrong because Container Instances runs individual containers on demand; it is not a microservices platform. Option A is wrong because VMSS runs VMs, not containers, with far more management overhead.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q2.A company runs a legacy application that requires a specific version of Windows Server, a custom kernel driver, and direct access to the operating system. Which compute option should the architect recommend?
Explanation: Only VMs provide full OS control, including specific OS versions and kernel drivers — the requirement rules out every PaaS option. Option D is wrong because App Service manages the OS and does not allow kernel drivers. Option B is wrong because Functions runs event-driven code on managed infrastructure with no OS access. Option C is wrong because Container Apps abstracts the OS away entirely.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q3.An e-commerce site must deploy new versions with zero downtime and instant rollback if a deployment fails. The application runs on Azure App Service. What should the architect recommend?
Explanation: Deployment slots enable blue-green deployment: the new version is deployed and warmed in staging, swapped into production instantly, and can be swapped back just as fast — zero downtime with instant rollback. Option A is wrong because direct deployment causes downtime and has no instant rollback. Option B is wrong because manual DNS switching is slow and error-prone. Option D is wrong because Traffic Manager routes between endpoints; it is not a deployment mechanism.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q4.A company needs to process images uploaded to Blob Storage. Processing takes 30 seconds per image, uploads are sporadic, and the solution must scale automatically with no idle cost. Which compute option should the architect recommend?
Explanation: Functions on the Consumption plan is event-driven, scales automatically, and bills only per execution with scale-to-zero — no idle cost for sporadic work. Option A is wrong because a minimum of two instances bills continuously even when idle. Option C is wrong because a fixed AKS node pool bills continuously and is overkill for sporadic image processing. Option B is wrong because Batch is designed for large parallel HPC jobs, not sporadic event-driven tasks.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q5.A financial firm runs Monte Carlo risk simulations that need 10,000 CPU cores for two hours each night and nothing the rest of the day. Which service should the architect recommend?
Explanation: Azure Batch provisions large VM pools on demand, schedules parallel jobs across them, and scales to zero when done — built for exactly this HPC pattern. Option B is wrong because Functions has execution time limits and is not designed for 10,000-core parallel compute. Option D is wrong because App Service hosts web apps, not HPC workloads. Option C is wrong because orchestrating 10,000 containers manually is impractical and ACI is not a job scheduler.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q6.A latency-sensitive API runs on Azure Functions. Users report slow responses on the first request after idle periods. What should the architect recommend?
Explanation: The slow first request is a cold start: the Consumption plan deallocates instances when idle. The Premium plan keeps pre-warmed instances ready, eliminating cold starts. Option A is wrong because timeout affects maximum execution time, not startup latency. Option B is wrong because Consumption plan scaling does not pre-warm instances. Option C is wrong because the trigger type is unrelated to cold starts.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q7.A company runs steady-state production VMs 24/7 and wants to reduce compute costs by committing to a three-year term. It also has on-premises Windows Server licences with Software Assurance. Which combination gives the greatest saving?
Explanation: Reserved Instances give up to 72 percent off for a 1- or 3-year commitment on steady workloads, and Azure Hybrid Benefit lets the company reuse its Windows Server licences — the two discounts combine. Option B is wrong because Spot VMs can be evicted and are unsuitable for steady production workloads. Option D is wrong because pay-as-you-go with larger VMs increases cost. Option A is wrong because Functions is a different compute model, not a discount on VMs.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q8.A microservices team needs full Kubernetes features — custom operators, a service mesh, and fine-grained control over networking — and has experienced Kubernetes engineers. Which service should the architect recommend?
Explanation: AKS provides the full managed Kubernetes platform with control over operators, service mesh integration, and networking — the right choice for a team with Kubernetes expertise and advanced requirements. Option A is wrong because Container Apps abstracts Kubernetes away and does not expose its full feature set. Option C is wrong because Container Instances runs individual containers without orchestration. Option B is wrong because App Service for Containers is a web hosting platform, not a Kubernetes environment.
Exam objective: AZ-305 Domain 4: Design compute solutions
Q9.A company needs to run a one-off data conversion container for about 20 minutes, once, with no ongoing infrastructure. Which is the simplest and cheapest option?
Explanation: Container Instances runs a single container on demand with per-second billing and no cluster or VM to manage — the simplest option for a one-off 20-minute job. Option B is wrong because provisioning an AKS cluster for one short job is slow and expensive. Option A is wrong because a VM requires provisioning, configuration, and management for a 20-minute task. Option C is wrong because App Service is a web hosting platform with always-on billing, not a one-off container runner.
Exam objective: AZ-305 Domain 4: Design compute solutions