Skip to content

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

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?

  1. AAzure Kubernetes Service with the cluster autoscaler
  2. BAzure Container Apps
  3. CAzure Container Instances, one container group per service
  4. 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.

Question 2 · choose 1

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?

  1. AThe Consumption plan
  2. BThe Flex Consumption plan
  3. CThe Premium plan
  4. 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.

Question 3 · choose 1

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?

  1. AAzure Functions on the Flex Consumption plan, one execution per frame
  2. BOne large memory-optimized VM running all frames in sequence
  3. CAn Azure Batch pool that autoscales and uses Spot nodes
  4. 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.

Question 4 · choose 1

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?

  1. ACompute optimized
  2. BMemory optimized
  3. CGPU
  4. 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.

Question 5 · choose 1

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?

  1. AA three-year savings plan for compute, with pay-as-you-go Windows licensing
  2. BSpot VMs for all forty machines, plus Azure Hybrid Benefit
  3. CThree-year reservations for the VM size, plus Azure Hybrid Benefit
  4. 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.

Question 6 · choose 1

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?

  1. AAn App Service Environment v3 with an internal load balancer
  2. BPremium v3 plans in the multitenant service with private endpoints
  3. CAzure Container Instances in the virtual network
  4. 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.

Question 7 · choose 1

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?

  1. AConfidential VMs on shared hosts
  2. BAzure Dedicated Host
  3. CA proximity placement group for the VMs
  4. 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.

Question 8 · choose 1

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?

  1. AEncryption at host on standard VMs
  2. BAzure Dedicated Host for the VMs
  3. CAlways Encrypted on the database the app reads from
  4. 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.

Question 9 · choose 1

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?

  1. ASeparate functions chained through storage queues with a status table
  2. BDurable Functions with an orchestrator using fan-out/fan-in
  3. COne function that processes all chunks in a loop
  4. 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.

Practise domain 4 →Practise all domains →