AZ-305 · Domain 4: Design infrastructure solutions · 33% of the exam
Task 4.1: Design compute solutions
Picking VMs, AKS, Container Apps, Container Instances, App Service or Azure Functions for a workload; VM families, Spot and reservations; and Azure Batch or container jobs for batch work.
Study it
Choosing compute: VMs, AKS, Container Apps, Container Instances, App Service and Functions
VM families, Spot and reservations, and Batch for batch processing
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.
Question 1 · choose 1
A team is containerizing eight microservices. Some serve HTTP and others process queue messages; all should scale on HTTP traffic or queue length, scale to zero when idle, and support traffic splitting between revisions. The team has no Kubernetes skills and doesn't want to manage clusters. Which service should you recommend?
AAzure Kubernetes Service with the cluster autoscaler
BAzure Container Apps
CAzure Container Instances, one container group per service
DAzure App Service Web App for Containers on a Premium plan
Show the answer and why
AAzure Kubernetes Service with the cluster autoscaler
Incorrect
AKS can do this, but the team would run and upgrade a Kubernetes cluster, which it wants to avoid.
BAzure Container Apps
Correct
Container Apps runs containers on a serverless platform with KEDA-based scaling, scale to zero and revision traffic splitting, without cluster management.
CAzure Container Instances, one container group per service
Incorrect
Container Instances runs single container groups without built-in autoscaling on queue length or revisions.
DAzure App Service Web App for Containers on a Premium plan
Incorrect
App Service doesn't scale on queue length the way KEDA scalers do, and its plan instances don't scale to zero.
Azure Container Apps is a serverless container platform built on Kubernetes, with KEDA scale rules for HTTP and event sources, scale to zero, Dapr integration and revisions that split traffic, all without access to or management of the Kubernetes APIs.
You're designing a new event-driven function app that calls a database reachable only through a virtual network. Traffic is idle for long periods and then bursts. The app must scale to zero to keep cost low and must integrate with the virtual network. Which hosting plan should you recommend?
AThe Consumption plan
BThe Flex Consumption plan
CThe Premium plan
DA Dedicated App Service plan
Show the answer and why
AThe Consumption plan
Incorrect
The Consumption plan is now a legacy plan without virtual network integration; new serverless apps should use Flex Consumption.
BThe Flex Consumption plan
Correct
Flex Consumption is the serverless plan for new apps: it scales to zero, bills on use and supports virtual network integration.
CThe Premium plan
Incorrect
Premium supports virtual networks but keeps at least one instance warm and billed, so it doesn't scale to zero.
DA Dedicated App Service plan
Incorrect
A Dedicated plan bills its instances all the time, even when idle.
The Flex Consumption plan is Microsoft's recommended serverless hosting for new function apps. It adds virtual network integration and optional always-ready instances to event-driven scaling that goes to zero. The older Consumption plan is legacy; its Linux hosting retires on September 30, 2028, and Windows apps on it aren't affected.
Each night a studio renders 20,000 independent frames, each taking 5 to 40 minutes on 8 vCPUs. Jobs must be queued and retried automatically, compute should exist only while jobs run, and interrupted tasks can simply be rerun to cut cost. What should you recommend?
AAzure Functions on the Flex Consumption plan, one execution per frame
BOne large memory-optimized VM running all frames in sequence
CAn Azure Batch pool that autoscales and uses Spot nodes
DReserved VM instances for a fixed fleet of 200 render VMs
Show the answer and why
AAzure Functions on the Flex Consumption plan, one execution per frame
Incorrect
Functions suits short event-driven code, not 40-minute CPU-heavy renders with job queues and node pools.
BOne large memory-optimized VM running all frames in sequence
Incorrect
One VM can't finish 20,000 frames overnight and pays for memory the renders don't need.
CAn Azure Batch pool that autoscales and uses Spot nodes
Correct
Batch schedules and retries tasks across a pool that scales with the queue, and Spot nodes lower cost for interruptible work.
DReserved VM instances for a fixed fleet of 200 render VMs
Incorrect
A fixed fleet sits idle outside the nightly run.
Azure Batch runs large-scale parallel and HPC jobs: it manages a pool of VMs, scales it, schedules tasks and retries them. Spot VMs in Batch pools are much cheaper and fit work that tolerates interruption.
You're sizing VMs for a relational database server with a large in-memory cache. Its profile shows a high memory-to-vCPU ratio and moderate CPU use. Which VM size type should you recommend?
ACompute optimized
BMemory optimized
CGPU
DStorage optimized
Show the answer and why
ACompute optimized
Incorrect
Compute-optimized sizes have a high CPU-to-memory ratio, the opposite of this profile.
BMemory optimized
Correct
Memory-optimized sizes offer a high memory-to-CPU ratio for relational database servers and in-memory analytics.
CGPU
Incorrect
GPU sizes target graphics, rendering and AI training, not a memory heavy database.
DStorage optimized
Incorrect
Storage-optimized sizes focus on high disk throughput and local storage, not memory.
Azure groups VM sizes by type. Memory-optimized sizes provide a high memory-to-CPU ratio and suit relational database servers, medium to large caches and in-memory analytics.
Forty Windows Server VMs will run 24 hours a day for the next three years with the same size in the same region. The company owns Windows Server licenses with Software Assurance. Which combination gives the lowest compute cost?
AA three-year savings plan for compute, with pay-as-you-go Windows licensing
BSpot VMs for all forty machines, plus Azure Hybrid Benefit
CThree-year reservations for the VM size, plus Azure Hybrid Benefit
DPay-as-you-go VMs that are deallocated outside business hours
Show the answer and why
AA three-year savings plan for compute, with pay-as-you-go Windows licensing
Incorrect
A savings plan suits changing workloads with smaller discounts, and paying for Windows again wastes the owned licenses.
BSpot VMs for all forty machines, plus Azure Hybrid Benefit
Incorrect
Spot VMs can be evicted at any time, which doesn't fit servers that must run around the clock.
CThree-year reservations for the VM size, plus Azure Hybrid Benefit
Correct
Reservations give the deepest discount for stable size and region, and Hybrid Benefit removes the Windows license charge.
DPay-as-you-go VMs that are deallocated outside business hours
Incorrect
The VMs must run 24 hours a day, so deallocating them isn't an option.
Reservations lock in a discount for a specific size and region and give the deepest savings when usage is stable; savings plans trade some discount for flexibility. Azure Hybrid Benefit lets Windows Server licenses with Software Assurance cover the VMs' OS cost.
A government agency will host 80 internal web apps on App Service. The apps must run on dedicated, single-tenant compute inside the agency's virtual network, be reachable only on private IPs, and scale to a large number of instances. What should you recommend?
AAn App Service Environment v3 with an internal load balancer
BPremium v3 plans in the multitenant service with private endpoints
CAzure Container Instances in the virtual network
DStandard App Service plans with access restrictions
Show the answer and why
AAn App Service Environment v3 with an internal load balancer
Correct
An App Service Environment is a single-tenant deployment of App Service injected into your virtual network, with private-only access and high scale.
BPremium v3 plans in the multitenant service with private endpoints
Incorrect
Private endpoints make apps private, but the compute stays on the shared multitenant platform rather than single-tenant.
CAzure Container Instances in the virtual network
Incorrect
Container Instances runs containers without App Service features or the scale this many apps need.
DStandard App Service plans with access restrictions
Incorrect
Access restrictions filter callers, but the apps stay multitenant and publicly addressable.
App Service Environment v3 is a fully isolated, single-tenant App Service deployment in a subnet of your virtual network. With an internal load balancer it's reachable only from the network, and it supports high instance counts.
A compliance rule says that a payment workload's VMs must run on physical servers that no other Azure customer uses, and the team wants to control the timing of host maintenance. Which option meets the requirement?
AConfidential VMs on shared hosts
BAzure Dedicated Host
CA proximity placement group for the VMs
DReserved VM instances for the VM sizes
Show the answer and why
AConfidential VMs on shared hosts
Incorrect
Confidential VMs still run on hosts shared with other customers.
BAzure Dedicated Host
Correct
A dedicated host is a physical server reserved for one subscription, with control over maintenance events.
CA proximity placement group for the VMs
Incorrect
Proximity placement keeps VMs physically close for latency; it doesn't reserve the servers.
DReserved VM instances for the VM sizes
Incorrect
Reservations are a billing discount and don't change where the VMs run.
Azure Dedicated Host provides physical servers that host VMs for one subscription only, giving hardware isolation at the server level and control over maintenance events.
A healthcare analytics app processes patient records in memory. Its security policy requires that data in use is protected by hardware from the hypervisor, the host operating system and cloud operators, without rewriting the app. What should you recommend?
AEncryption at host on standard VMs
BAzure Dedicated Host for the VMs
CAlways Encrypted on the database the app reads from
DAzure confidential VMs
Show the answer and why
AEncryption at host on standard VMs
Incorrect
It doesn't protect data while the app processes it in memory.
BAzure Dedicated Host for the VMs
Incorrect
A dedicated host doesn't protect memory from the host itself.
CAlways Encrypted on the database the app reads from
Incorrect
Always Encrypted protects columns from the database server, not the app's memory on the VM.
DAzure confidential VMs
Correct
Confidential VMs create a hardware-enforced boundary between the app and the virtualization stack, with no code changes.
Azure confidential VMs use hardware-based trusted execution to isolate a VM's memory and state from the hypervisor and host, so lift-and-shift workloads get data-in-use protection without code changes.
A serverless app must split an uploaded file into 500 chunks, process them in parallel, wait for all of them, then combine the results, with retries and state kept between steps. The team writes code in C#. What should you recommend?
ASeparate functions chained through storage queues with a status table
BDurable Functions with an orchestrator using fan-out/fan-in
COne function that processes all chunks in a loop
DAn Azure Batch pool with one task per chunk
Show the answer and why
ASeparate functions chained through storage queues with a status table
Incorrect
Hand-built chaining and a status table re-create the state and fan-in logic that Durable Functions provides.
BDurable Functions with an orchestrator using fan-out/fan-in
Correct
Durable Functions orchestrations keep state, run activities in parallel, wait for all of them and retry failed ones.
COne function that processes all chunks in a loop
Incorrect
A single long execution loses the parallelism and runs into execution time limits.
DAn Azure Batch pool with one task per chunk
Incorrect
A Batch pool is VM-based compute outside the serverless app, and it doesn't coordinate the split, wait and combine steps as functions.
Durable Functions, an extension of Azure Functions, lets you write stateful orchestrations in code. Fan-out/fan-in runs many activity functions in parallel and waits for all results, with built-in checkpoints and retries.