Chapter 4
Design Infrastructure Solutions
Domain weight: 30–35% of the AZ-305 exam — the largest domain. This chapter covers all 21 objectives in Domain 4: compute solutions, application architecture, migrations, and network solutions. AZ-305 is a design exam: 46 of its 49 objectives begin with the word "Recommend".
The exam rarely asks how to click through a portal blade. It asks which solution you would recommend for a set of business and technical requirements, and why the alternatives are wrong. Every section below is written in that voice: requirements first, options compared, recommendation justified, traps called out.
A fictional company is used in every scenario in this chapter and throughout this book. The company runs a learning platform, a content store, and a set of internal tools. When a scenario says "the company needs…", treat the stated requirements as the whole truth and the unstated wishes as traps.
How to use this chapter. Read a section, then do its CHECK YOURSELF box before moving on. The boxes are the exam in miniature: they test the decision, not the definition. At the end of the chapter, the check questions and answer key let you prove the whole domain before you touch the practice questions.
4.1 Specify components of a compute solution based on workload requirements
Every compute decision in Azure starts from the workload, never from the service. A workload is described by a small set of facts:
- How long it runs.
- How often it runs.
- How spiky it is.
- Whether it keeps state.
- Whether it needs a specific operating system or kernel feature.
- How much CPU and memory it needs per unit of work.
- What it talks to.
- What happens if it stops. The architect's job is to translate those facts into components: the compute host, the scaling model, the storage it needs, the network it sits in, and the way it is deployed and observed.
Workload requirements are the measurable facts about a piece of work that decide its compute shape: duration, frequency, concurrency, statefulness, operating-system and kernel dependencies, CPU/memory profile, latency sensitivity, availability target, and cost constraints. Two workloads that look identical in a diagram can need completely different compute if one runs for 40 seconds a month and the other runs for 40 minutes every hour.
The Azure compute decision tree, in the order an architect should walk it, is:
- Is the work event-driven and short-lived? If each unit of work finishes in seconds or a few minutes and nothing needs to stay running between events, serverless (Azure Functions or Logic Apps) is the first candidate.
- Is the work packaged as containers? If the team already ships container images, or the workload is a set of microservices, the choice is between Azure Container Apps, Azure Container Instances, and Azure Kubernetes Service — decided by how much orchestration the workload needs.
- Does the work need a full operating system, a custom kernel module, a specific Windows or Linux version, or software that cannot run in a container? Then virtual machines (or Virtual Machine Scale Sets) are the answer.
- Is the work a large parallel job — thousands of independent tasks, or a tightly coupled HPC job? Then Azure Batch (or Azure CycleCloud when the team must keep its own scheduler) is the answer.
- Is the work a web application or API that simply needs hosting? Then Azure App Service is the first candidate, before VMs.
The exam tests the decision, not the catalogue. A question will give you a workload with three or four telling facts. For example: "runs for 45 minutes", "must keep its own scheduler", "team has no Kubernetes skills", "spikes to 40 times normal load for two hours a month". The correct answer is the service those facts point to. Learn the disqualifier for each service: the one fact that rules it out. Functions (Consumption) is disqualified by long runtimes. ACI is disqualified by a need for orchestration. AKS is disqualified by a team with no Kubernetes skills and a simple workload. VMs are disqualified when the requirement is "no server management".
| Workload fact | Points toward | Points away from |
|---|---|---|
| Runs seconds, event-triggered, idle most of the time | Azure Functions (Flex Consumption) | Dedicated VMs, AKS |
| Runs minutes to hours, thousands of parallel tasks | Azure Batch | Azure Functions Consumption |
| Needs a specific OS, kernel driver, or legacy installer | Virtual machines | App Service, Functions, containers |
| Microservices, no Kubernetes team Workload fact | Azure Container Apps Points toward | AKS Points away from |
| Microservices, full Kubernetes control needed | AKS | Container Apps, ACI |
| Single container, short-lived task, no orchestration | Azure Container Instances | AKS |
| Web app or API, managed hosting wanted | Azure App Service | VMs |
| Must keep an existing HPC scheduler (Slurm, PBS) | Azure CycleCloud | Azure Batch |
When a scenario mentions a runtime limit, it is usually the whole question. The legacy Azure Functions Consumption plan caps a single execution at 10 minutes (5 minutes by default); the Flex Consumption and Premium plans have no enforced maximum. A workload that runs for 20 minutes therefore cannot stay on Consumption — and the exam will offer "increase the timeout" as a distractor, because on Consumption the timeout cannot be raised past 10 minutes.
The company has a nightly job that renders 4,000 course videos. Each render takes 25 minutes, runs independently of the others, and the team wants no cluster or scheduler software to operate. Which compute component fits, and which two services are ruled out by the facts? Answer: Azure Batch fits — it schedules thousands of independent tasks across a managed pool of VMs with no scheduler software for the team to run. Azure Functions on the Consumption plan is ruled out by the 25-minute runtime (10-minute maximum). Azure Container Instances is ruled out because it has no job scheduling or pool management for 4,000 parallel tasks.
4.2 Recommend a virtual machine-based solution
Virtual machines are the right recommendation when the workload needs something only a full operating system provides:
- A specific OS version.
- A kernel module.
- A GPU driver.
- A legacy installer.
- Software that writes to the local disk in ways PaaS forbids.
- Full control over the network stack. The architect's decisions are then: VM size family, availability design, scaling design, storage design, and image/patching design.
VM size families
| Family | Profile | Typical fit |
|---|---|---|
| B-series (burstable) | Low baseline CPU with credits to burst | Dev/test, small web servers, low-traffic apps |
| D-series (general purpose) | Balanced CPU-to-memory | Most business apps, web servers, small databases |
| E-series (memory-optimised) | High memory-to-CPU ratio | Large databases, in-memory caches, analytics |
| F-series (compute-optimised) | High CPU-to-memory ratio | Batch processing, web servers under load, analytics |
| H / HB / HC-series (HPC) | Fast CPUs, InfiniBand/RDMA options | HPC, tightly coupled simulations |
| N-series (GPU) | NVIDIA GPUs | Machine learning, rendering, visualisation |
| M-series | Very large memory | SAP HANA, very large in-memory databases |
Virtual Machine Scale Sets (VMSS) are a group of identical, load-balanced VMs that scale out and in automatically against demand, using a shared VM image. A scale set is the VM answer to elasticity: it gives you VM control with cloud-style scaling, and it is the right recommendation whenever the workload needs VMs and must grow and shrink with demand. Spot VMs (formerly low-priority VMs) use spare Azure capacity at a deep discount but can be evicted at any time with 30 seconds' notice; they fit interruptible work such as batch rendering, never a workload that must stay up.
Availability design for VMs
Availability is designed in layers, and the exam tests whether you know which layer gives which guarantee:
- • Availability sets spread VMs across fault domains (racks sharing a power/network failure domain) and update domains (groups rebooted together during maintenance). They protect against rack failure and planned maintenance inside one datacentre.
- • Availability zones spread VMs across physically separate datacentres in the same region, each with independent power, cooling, and networking. Zone-redundant deployment is the stronger design and the one to recommend when the requirement says "survive a datacentre failure".
- • Azure Site Recovery replicates VMs to another region for disaster recovery; it is a recovery solution, not an availability design, and it belongs in the business-continuity domain.
The classic trap: a scenario says "the application must survive the loss of a whole datacentre" and offers an availability set as an option. An availability set lives inside one datacentre, so it cannot meet that requirement — only availability zones (or a multi-region design) can. Read the failure scope in the requirement before you pick the mechanism.
Availability is a property of the design, not of the VM size. A bigger VM does not survive a datacentre failure, and a cheaper VM in three zones is more available than an expensive VM in one zone. When the exam gives you an availability requirement, answer with the placement design (zones, sets, scale sets) first and the VM size second.
VM storage, images, and patching
- • Managed disks: Premium SSD for production I/O, Standard SSD for steady general use, Standard HDD for cheap infrequent access, Ultra Disk when a single disk needs very high IOPS/throughput or the size and performance must change independently. Ephemeral OS disks (stored on the VM's local temporary disk) give lower latency and cost nothing extra, but the OS disk contents do not survive a move to another host — they fit stateless workloads only.
- • Images: Azure Compute Gallery (formerly Shared Image Gallery) stores versioned VM images and replicates them to the regions where scale sets deploy. Golden images plus VMSS are the standard pattern for a repeatable VM fleet.
- • Patching and configuration: Azure Update Manager for patch orchestration, Azure Automanage for a bundled best-practice configuration, and VM extensions / Desired State Configuration for software installed after deployment. The design point is that a fleet of VMs is managed as a fleet — by image and policy — not by logging into each machine.

The company runs a legacy exam-proctoring service that requires a Windows kernel driver and writes temporary files to a local disk. It must survive a datacentre failure and scale from 4 to 40 instances during exam weeks. Recommend the components. Answer: Virtual machines in a Virtual Machine Scale Set, using a golden image from Azure Compute Gallery, deployed zone-redundantly across three availability zones, with a Standard Load Balancer in front. The kernel driver rules out App Service, Functions, and containers; the datacentre-survival requirement rules out an availability set; the scaling requirement rules out a fixed set of standalone VMs.
Symptom–cause–fix playbook: VM-based solutions
| Symptom | Likely cause | Fix |
|---|---|---|
| VMs are slow at peak but idle at night Symptom | Fixed VM count sized for peak Likely cause | Move to VMSS with autoscale rules on CPU or queue length Fix |
| One rack failure takes the whole app down | All VMs in one fault domain | Spread across availability zones, not just an availability set |
| New VMs take an hour to become useful | Software installed by hand after boot | Bake software into a golden image in Azure Compute Gallery |
| Batch jobs are evicted mid-run | Spot VMs used for non-interruptible work | Use Spot only for interruptible work; use regular VMs or reservations for the rest |
| Disk latency spikes under load | Standard HDD/SSD under an I/O-heavy workload | Move to Premium SSD or Ultra Disk; check IOPS and throughput limits per disk size |
4.3 Recommend a container-based solution
Containers package an application and its dependencies into a portable image. Azure offers four container hosts, and the exam tests the choice between them more than any other compute comparison in this domain.
Azure Kubernetes Service (AKS) is a managed Kubernetes service: Azure operates the control plane, and you operate node pools, networking, upgrades, and the workloads running on the cluster. Azure Container Apps is a fully managed serverless container platform built on Kubernetes: you deploy container images and revisions, and Azure handles scaling (including to zero), ingress, and traffic splitting — you never touch the Kubernetes API. Azure Container Instances (ACI) runs a single container or container group on demand with no orchestrator at all: you give it an image and it runs. Azure App Service for Containers runs a containerised web app or API on the App Service platform, with its deployment slots, authentication, and scaling.
| ACI | Container Apps | AKS | App Service for Containers |
|---|---|---|---|
| Orchestration None | Managed (Kubernetes underneath, hidden) | Full Kubernetes, you operate it | App Service platform |
| Scaling Manual start/stop | Automatic, including to zero (KEDA-based) | Cluster Autoscaler, HPA, KEDA | Autoscale rules on the plan |
| Best fit One-off tasks, burst jobs, CI build agents | Microservices, APIs, event-driven containers, no K8s team | Complex microservices, operators, CRDs, service mesh | Containerised web app/API, PaaS features wanted |
| Networking Basic VNet integration | Built-in ingress, VNet integration | Full CNI control, ingress controllers | VNet integration, private endpoints |
| Deployment Single image run | Revisions with traffic splitting | Helm, GitOps, rolling updates | Deployment slots, blue-green |
The container decision is a control-versus-effort decision, not a size decision. A small microservice estate with no Kubernetes skills belongs on Container Apps; a large estate that needs custom operators, a service mesh, or direct Kubernetes API access belongs on AKS. "We have 40 microservices" alone does not justify AKS — the exam will give you a team-skill or control fact (a custom operator, a specific ingress controller, a need to run a particular CNI plug-in) to tip the answer. Conversely, "we want containers" with no orchestration need at all points to ACI.
Container supporting components
- • Azure Container Registry (ACR) stores private container images, with geo-replication to the regions that run them, image scanning hooks, and Tasks for building images in Azure. A design that runs containers in production without a private registry is incomplete.
- • Revisions and traffic splitting (Container Apps): each deployment creates a revision; traffic can be split between revisions for blue-green or canary releases, and a revision can be deactivated without deleting it.
- • AKS networking choices: kubenet (simple, Azure-assigned pod IPs behind NAT) versus Azure CNI (each pod gets a VNet IP, needed when pods must be addressed directly or reached by on-premises networks). Azure CNI Overlay assigns pod IPs from a separate overlay CIDR instead of the VNet, so it consumes no VNet address per pod — but pods are then not directly reachable by VNet IP. The exam fact to hold: if on-premises systems must reach pods by IP, or network policies must apply per pod, flat Azure CNI is the design.
- • AKS node pools: system node pools host the cluster's own services; user node pools host workloads. Separate pools let you put GPU or burstable workloads on different VM sizes without disturbing the system pool.
Container Apps and ACI are the two most commonly swapped answers. Remember: ACI runs a container once — there is no revision, no traffic splitting, no autoscaling, no ingress. If the scenario asks for scaling to zero and revisions and an HTTP endpoint, that is Container Apps, not ACI. If it asks for a single container to run a nightly conversion and stop, that is ACI, not Container Apps.
The company is rebuilding its course catalogue as six microservices. The team has no Kubernetes experience, wants each service to scale to zero overnight, and wants canary releases that send 10% of traffic to a new version. Which host, and why not AKS? Answer: Azure Container Apps — it gives managed scaling to zero, revisions, and built-in traffic splitting without Kubernetes expertise. AKS would give the same features but forces the team to operate node pools, upgrades, and the Kubernetes API, which the scenario says they cannot staff.
4.4 Recommend a serverless-based solution
Serverless means the platform owns the servers: you deploy code or a workflow, the platform runs it when an event arrives, scales it, and you pay for what runs. Azure's serverless compute is Azure Functions; its serverless workflow engine is Azure Logic Apps; its serverless API and workflow companions are API Management (consumption tier) and Event Grid. The architect chooses between them by asking what the unit of work is: code, or a workflow of connectors?
Azure Functions runs small pieces of code in response to triggers (HTTP, timer, queue, blob, Event Grid, Service Bus) and bindings (declarative connections to storage, queues, databases). Durable Functions is an extension that adds stateful orchestrations — function chaining, fan-out/fan-in, async HTTP APIs, and human-interaction patterns — so long-running, multi-step processes can be built from short-lived functions. Azure Logic Apps is a low-code workflow service built from connectors (hundreds of SaaS and Azure connectors) for orchestrating steps across systems, approvals, and scheduled integrations, with almost no code.
Functions hosting plans
| Plan | Scaling | Max execution | VNet | When to choose |
|---|---|---|---|---|
| Flex Consumption | Event-driven, scales to zero | No enforced maximum (30 min default) | Yes | New serverless workloads; the recommended default |
| Consumption (legacy) | Event-driven, scales to zero | 10 minutes maximum (5 min default) | No | Existing small workloads; Linux Consumption retires 30 Sept 2028 |
| Premium (Elastic Premium) | Pre-warmed instances, scales out | No enforced maximum (30 min default) | Yes | No cold starts, longer runs, more CPU/memory |
| Dedicated (App Service plan) | Runs on the plan's VMs | No enforced maximum (needs Always On) | Yes | Functions share an existing App Service plan |
HTTP triggers: 230 seconds maximum (load-balancer limit) on all plans. The table above is the function-execution limit; an HTTP-triggered function is additionally cut off at 230 seconds by the load balancer, whatever the plan. A long-running HTTP API must return early (for example, with a Durable Functions async pattern) rather than holding the request open.
Cold start is the delay when a function app that has scaled to zero must load its runtime and code before it can answer its first request — typically seconds, and worst for large.NET or Java apps on Consumption. The design answers, in order of strength, are: Premium plan with pre-warmed instances, Flex Consumption with always-ready instances, or keeping the app warm another way. If a scenario says "first request after idle must answer in under a second" and offers Consumption as an option, Consumption is the trap.
Functions versus Logic Apps — the exam's favourite serverless fork
| Question | Functions | Logic Apps |
|---|---|---|
| Is the work custom code (transform, calculate, call an SDK)? | Yes — write code | No — use connectors |
| Is the work a workflow across SaaS systems with approvals? | No | Yes |
| Does it need long-running stateful orchestration with code? | Yes — Durable Functions | Yes, for connector-based workflows |
| Who builds it? | Developers | Developers or integration specialists, low-code |
A scenario that says "when a new order file lands in Blob storage, transform it, call a pricing API, and write the result to SQL — and the process can take 25 minutes" is testing two facts at once. The blob trigger points to Functions. And 25 minutes rules out the Consumption plan. The right answer is Functions on Flex Consumption or Premium, not Logic Apps (which is for connector workflows) and not Consumption.
The company needs an approval workflow: when a tutor submits a new course, the course lead approves it in email, the course is published, and the finance system is notified. Almost no custom code is needed. Functions or Logic Apps? Answer: Logic Apps — it is a connector-based workflow with a human approval step across email, the course system, and finance. Functions would force the team to write and maintain code that connectors already provide.
4.5 Recommend a compute solution for batch processing
Batch processing is work that arrives in bulk, runs without a user waiting for it, and is judged on throughput and cost per job rather than on response time. The design questions are: how many tasks, how long does each take, do tasks depend on each other, and must the team keep its own scheduler?
Azure Batch is a managed job-scheduling service: it creates and manages a pool of compute nodes (VMs), installs the application, schedules jobs made of tasks, and scales the pool. There is no extra charge for Batch itself — you pay for the underlying VMs, storage, and networking. Azure CycleCloud is a tool for creating, managing, and optimising HPC clusters: it provisions the infrastructure and lets the team run its own scheduler (Slurm, PBS, LSF) and cluster topology on top. Azure HPC Cache and high-performance VM families (HB/HC with InfiniBand) support tightly coupled jobs that need low-latency communication between nodes.
| Workload shape | Recommend |
|---|---|
| Thousands of independent tasks (rendering, transcoding, Monte Carlo, image processing) | Azure Batch with auto-scaling pools |
| Tightly coupled MPI job needing InfiniBand between nodes | Azure Batch on HB/HC-series VMs, or CycleCloud HPC cluster |
| Team must keep its existing Slurm/PBS scheduler and job scripts | Azure CycleCloud |
| Short tasks triggered by events, seconds to minutes each | Azure Functions or Container Apps Jobs |
| Nightly ETL / data processing at scale | Azure Batch, Azure Data Factory, or Azure Databricks depending on the data platform (see Chapter 2 for the data side) |
| One-off container task, no scheduling needed | Azure Container Instances |
Batch versus CycleCloud is a scheduler question. If the workload can be expressed as Batch pools, jobs, and tasks, Batch is simpler and cheaper to operate because Azure runs the scheduler. If the team already has scheduler-specific job scripts, queues, policies, and integrations that must remain in place, moving to Batch means rewriting them — so CycleCloud, which preserves the scheduler, is the right recommendation. The exam will always give you the scheduler fact; look for it.

"No additional charge for Azure Batch" is a real exam fact — but it does not mean batch is free. Candidates pick Batch thinking it is free, then miss that the VMs, disks, and data transfer still cost money. The correct reading: Batch the service is free; the compute is not.
The company's research team runs fluid-dynamics simulations with its own Slurm scripts, on tightly coupled MPI jobs that need InfiniBand. They want to move the cluster to Azure without rewriting the scripts. Batch or CycleCloud? Answer: CycleCloud — it provisions the HPC cluster and lets the team keep Slurm and its existing scripts, on HB-series VMs with InfiniBand. Batch would require translating the Slurm workflows into Batch jobs and tasks.
Symptom–cause–fix playbook: compute selection
| Symptom | Likely cause | Fix |
|---|---|---|
| Functions time out at 10 minutes | Consumption plan limit | Move to Flex Consumption or Premium, or split the work with Durable Functions |
| First request after idle takes seconds | Cold start on a scaled-to-zero plan | Premium pre-warmed instances or Flex always-ready instances |
| AKS cluster consumes the whole platform team | Full Kubernetes operations for a simple workload | Move suitable services to Container Apps |
| Batch pool sits idle and still costs money | Pool not configured to auto-scale to zero | Enable auto-scaling with a formula that scales the pool to zero when the queue is empty |
| Container image pulls are slow or fail in a second region | Images stored in a single-region registry | Geo-replicate Azure Container Registry to each deployment region |
4.6 Recommend a messaging architecture
A messaging architecture decouples the parts of a system so that a producer never waits for a consumer, a slow consumer never blocks a producer, and work survives a crash. The first design decision is the most important one in this section: is this an event or a message?
- An event is a fact about something that already happened ("a course video was uploaded"). The publisher does not care who reacts, or whether anyone reacts. Events are lightweight, fire-and-forget, and often fanned out to many subscribers.
- A message is a unit of work that must be handled ("process this enrolment payment"). The sender expects a specific consumer to handle it, exactly once, in order, with a record of failure if it cannot be processed.
- A stream is a continuous, high-volume flow of data (telemetry, logs, sensor readings) that many consumers read at their own pace and can replay.
Azure Service Bus is a fully managed enterprise message broker with queues (point-to-point: each message is processed by one consumer) and topics with subscriptions (publish/subscribe: each subscription receives its own copy, optionally filtered). It offers FIFO ordering within sessions, duplicate detection, scheduled delivery, transactions, and dead-letter queues. Azure Event Grid is a publish/subscribe eventing service. It routes discrete state-change events from Azure services or custom applications to handlers such as Functions, Logic Apps, or webhooks. It pushes events and retries on failure. But it is not a queue — an event with no subscriber is gone. Azure Event Hubs is a big-data streaming platform that ingests millions of events per second into partitioned logs that consumers read at their own pace and can replay; it also exposes a Kafka-compatible endpoint. Azure Storage Queues is the simple, cheap queue for a plain backlog with no ordering, session, or dead-letter needs. Azure Queue Storage versus Service Bus is a cost-versus-features decision: Storage Queues is cheaper and simpler; Service Bus is the choice when ordering, sessions, transactions, or dead-lettering matter.
| Service Bus | Event Grid | Event Hubs | Storage Queues |
|---|---|---|---|
| Pattern Message broker (queue / pub-sub) | Event routing (push) | Event streaming (pull, replayable) | Simple queue |
| Delivery At-least-once, peek-lock, dead-letter | Push with retry and expiry | Replayable partitioned log | At-least-once, visibility timeout |
| Ordering FIFO within a session | Not guaranteed | Ordered within a partition | Not guaranteed |
| Retention Until consumed or TTL expires | No storage — transient | 1 day default; 1–7 days Standard, up to 90 days Premium/Dedicated | Until consumed or TTL expires |
| Scale Thousands of messages/sec | Millions of events/sec | Millions of events/sec | Thousands of messages/sec |
| Reach for it when A payment or order must be processed reliably, in order | "Something happened — react" | Telemetry, logs, streaming analytics | A simple backlog between two components |
The dead-letter queue is the exam's tell for Service Bus. Whenever a scenario says "messages that fail processing must not be lost, they must be set aside for inspection", the answer is Service Bus. Only a broker gives you a first-class dead-letter queue. Event Grid retries and then drops; Event Hubs replays but never quarantines a poison event for you; Storage Queues needs you to build the poison-message handling yourself.
Messaging patterns the exam expects you to know
- • Competing consumers: multiple consumers read from one queue; each message is handled by exactly one of them. The pattern for scaling out a worker tier.
- • Publish/subscribe: one event or message is delivered to every interested subscriber (Service Bus topics, Event Grid).
- • Request/reply: a sender waits for a response, usually over Service Bus with a reply queue, or synchronously over HTTP. Use it only when the caller genuinely needs the answer before proceeding.
- • Claim check: a large payload is stored in Blob storage and only a reference (the "claim") travels in the message — the fix when messages approach size limits (Service Bus messages are limited in size; the standard tier caps a single message at 256 KB).
- • Idempotent consumer: the consumer is written so that processing the same message twice has the same effect as processing it once — essential because messaging is at-least-once, not exactly-once.
"Millions of events per second" is the Event Hubs tell. "Must not lose a single order" is the Service Bus tell. "A blob was created — start processing" is the Event Grid tell. If a question gives you all three facts at once, match the strongest requirement (loss, ordering, or replay) rather than the volume.
The company's enrolment system must process payments in order per student, never lose a payment, and set aside any payment that fails five times for a human to inspect. A second, separate feed carries 200,000 clickstream events per minute for analytics. Which two services, and why not one? Answer: Service Bus (sessions for per-student ordering, dead-letter queue for failed payments) for enrolments, and Event Hubs (partitioned, replayable streaming at high volume) for the clickstream. One service cannot do both: Service Bus cannot ingest the clickstream volume economically, and Event Hubs has no dead-letter queue or per-student ordering guarantee for payments.
4.7 Recommend an event-driven architecture
An event-driven architecture is a system whose components react to events instead of calling each other directly. It is the architecture behind "when X happens, do Y" — and the exam tests whether you can pick the right event source, the right router, and the right handler, and whether you know what event-driven design does not give you.
An event-driven architecture is a design in which producers emit events when state changes, an event router (Event Grid, Event Hubs, or a message broker) delivers them, and consumers react independently — producers and consumers never call each other directly. The benefits are loose coupling, independent scaling, and easy addition of new consumers. The costs are eventual consistency (consumers see a change after a delay), harder end-to-end debugging, and no built-in ordering across unrelated events.
The Azure event-driven toolkit
| Piece | Role | Services |
|---|---|---|
| Event source | Something that emits events | Blob storage, IoT Hub, custom apps, Azure services |
| Event router | Delivers events to subscribers | Event Grid (discrete events), Event Hubs (streams), Service Bus (messages) |
| Event handler | Reacts to the event | Azure Functions, Logic Apps, Container Apps, webhooks, AKS services |
| Event store / replay | Keeps events for reprocessing | Event Hubs retention, Blob storage, Cosmos DB change feed |
| Choreography vs orchestration | Who decides the sequence | Choreography: each service reacts on its own. Orchestration: a Durable Functions orchestrator or Logic Apps workflow drives the sequence |
The Cosmos DB change feed deserves a special mention: it is a persistent, ordered record of inserts and updates in a Cosmos DB container, and it is the standard way to trigger downstream processing (via Functions or a change-feed processor) whenever data changes. If a scenario says "every time a document is created or updated in Cosmos DB, do X", the change feed is the answer — not polling the container.
Event Grid's delivery model: Event Grid pushes events to subscribers and retries delivery with exponential back-off; undelivered events can be sent to a dead-letter Blob storage location after the retry policy and time-to-live expire. Event Grid supports Azure system topics (events from Azure services), custom topics (your application's own events), and partner topics. Event Grid also supports MQTT for IoT scenarios (in preview) — a fact the exam occasionally probes.
Choreography versus orchestration is a design trade-off, not a right answer. Choreography (each service subscribes and reacts) is simpler to extend. But the overall flow is invisible. Nobody owns the sequence, so a failure in step three of five is hard to trace. Orchestration (a Durable Functions orchestrator or Logic Apps workflow drives the steps) makes the flow visible, retryable, and compensable, at the cost of a central component. When a scenario says "the process has five steps, must be auditable end-to-end, and a failure in step three must roll back steps one and two", that is orchestration. When it says "new consumers will be added later without changing the publisher", that is choreography.
Event-driven questions love the word "immediately" — but "immediately" does not mean synchronously. An event-driven design is eventually consistent by nature. If a scenario requires the caller to get an answer in the same request (for example, a user waiting for a payment confirmation on screen), an event-driven design is the wrong recommendation; a synchronous API call is right.
The company wants: when a tutor uploads a video to Blob storage, a thumbnail is generated, the video is transcoded, the search index is updated, and the tutor is emailed. The steps must run in order and a failure must be visible in one place. Choreography or orchestration, and with what? Answer: Orchestration — a Durable Functions orchestrator (or Logic Apps workflow) triggered by an Event Grid blob-created event, driving the four steps in sequence with retries and a single view of progress. Pure choreography would scatter the sequence across four independent subscribers with no single owner of the flow.
4.8 Recommend a solution for API integration
API integration is about exposing, consuming, protecting, and composing APIs. The centre of the Azure answer is Azure API Management (APIM): a managed gateway that sits in front of your APIs and provides a single entry point, routing, versioning, authentication, rate limiting, caching, transformation, observability, and a developer portal.
Azure API Management is a fully managed service for publishing, securing, managing, and analysing APIs. It has a gateway (the runtime that receives calls and enforces policies), a management plane (where APIs and policies are configured), and a developer portal (where consumers discover APIs and obtain keys). Policies are XML rules applied at global, product, API, or operation scope: they can validate a token, throttle a caller, transform a request or response, cache a response, or retry a backend call. Products group APIs for a set of consumers with shared access rules and quotas. Azure API Management tiers: Consumption (serverless, pay-per-call, limited features), Developer (non-production), Basic, Standard, and Premium (multi-region deployment, VNet injection, availability zones). Standard v2 also supports VNet integration. Private endpoints are available in Developer, Basic, Standard and Premium (classic tiers) and in Standard v2 / Premium v2. They are not in the Consumption tier or Basic v2.
API integration patterns
| Need | Recommend |
|---|---|
| One front door for many backend APIs, with throttling, keys, and a developer portal | Azure API Management |
| Backend APIs must not be reachable directly from the internet | APIM in a VNet with internal mode, backends behind private endpoints |
| Combine several backend calls into one API response | APIM policies (send-request, aggregation) or a Functions-based backend-for-frontend |
| Expose an API to partners with usage quotas per partner | APIM products + subscriptions + quotas |
| Legacy SOAP service must be offered as a modern REST API | APIM SOAP-to-REST transformation |
| APIs are serverless and tiny in volume | APIM Consumption tier (pay per call) |
| Workflow-style integration with SaaS connectors, no custom code | Logic Apps (with its built-in API connections) |
| Event-driven integration between systems | Event Grid / Service Bus (see 4.6–4.7) |
The gateway is the enforcement point, but the backend must still validate. Putting authentication only in the gateway leaves the backend exposed to anyone who finds its direct address; putting it only in the backend wastes the gateway's throttling, key management, and analytics. The exam's correct designs do both: the gateway enforces policy for consumers, and the backend trusts only traffic that arrives through the gateway.
API versioning: APIM supports versioning by path, header, or query string, and version sets let old and new versions run side by side. The design point is that breaking changes never land on existing consumers without a version boundary.
Authentication at the gateway: APIM can validate OAuth 2.0 / Microsoft Entra ID tokens, require subscription keys, validate client certificates, and forward identity to backends. The common exam trap is to put authentication only in the backend API and leave the gateway open — the gateway is the enforcement point, and the backend should also validate (defence in depth), but the gateway is where throttling and key management live.
If a scenario says "partners will call our APIs and we need per-partner rate limits, usage reports, and a self-service portal", the answer is API Management — even if the backend is a simple Function app. The exam uses "developer portal" and "subscription keys" as APIM tells. If instead the scenario says "two internal systems must exchange data on a schedule with no code", that is Logic Apps, not APIM.
The company exposes its course catalogue API to three partner companies. Each partner must have its own call quota, the API must be versioned so v1 keeps working when v2 ships, and the backend Function app must not be callable directly from the internet. Recommend the design. Answer: Azure API Management in front of the Function app, with one product and subscription per partner (each with its own quota policy), version sets for v1/v2, and the Function app restricted so it only accepts traffic from APIM (network restriction / private endpoint).
4.9 Recommend a caching solution for applications
Caching trades freshness for speed: it stores a copy of expensive data close to the consumer so the next request does not hit the database. The design questions are: what is being cached (data, sessions, rendered pages, API responses), how stale may it be, and who invalidates it?
Azure Managed Redis is the current fully managed, in-memory data store (based on Redis Enterprise software) used as a cache, session store, message broker, or leaderboard store. It comes in four tiers, sized by memory: Balanced (Memory + Compute), Memory Optimised, Compute Optimised, and Flash Optimised. For example, Balanced B1 (1 GB) costs $25.55 a month pay-as-you-go for a single node. High availability (a second node) doubles the price to $51.10 a month (Azure Managed Redis pricing page, November 2026). The older Azure Cache for Redis (Basic, Standard, Premium, Enterprise) is the retiring predecessor. Its Basic, Standard, and Premium tiers retire on 30 September 2028. Creation for new customers has been blocked since 1 April 2026. No new design should be built on it. Existing Cache for Redis tiers are described only for migration context, never as the design answer. Azure Front Door caches static and semi-static HTTP content at the edge, close to users, and also accelerates dynamic traffic. Azure CDN (classic) is retiring — it retires on 30 September 2027 and has accepted no new profiles since 15 August 2025 — so new designs use Front Door for edge caching, not CDN. API Management can cache API responses at the gateway. App Service has an in-memory output cache for web pages. Azure Cosmos DB's integrated cache caches reads for a dedicated gateway.
Cache patterns
| Pattern | How it works | When to use |
|---|---|---|
| Cache-aside (lazy loading) | App checks cache; on a miss it reads the database, then writes the result to the cache | Most common; the app owns the cache and tolerates a cold cache |
| Write-through | App writes to the cache and the database together | Data must be in the cache as soon as it is written |
| Write-behind (write-back) | App writes to the cache; the cache writes to the database asynchronously | High write throughput, brief data-loss risk acceptable |
| Refresh-ahead | Cache refreshes popular items before they expire | Hot items must never cause a database hit on expiry |
| Read-through | Cache itself loads from the database on a miss | The cache is the data-access layer |
Cache invalidation is the hard part, and the exam knows it. There are only three honest answers. Time-based expiry (TTL — accept that data can be stale for up to the TTL). Explicit invalidation (the writer deletes or updates the cached entry when the source changes). Event-driven invalidation (a change event triggers a cache update). A scenario that says "prices change several times a day and a stale price must never be shown" rules out a long TTL and points to explicit or event-driven invalidation. A scenario that says "course descriptions change weekly and a few minutes of staleness is fine" points to a TTL.
Where the cache lives
| Cache location | What it caches | Example |
|---|---|---|
| Azure Managed Redis | Database query results, sessions, computed values | Course catalogue lookups, user sessions |
| Azure Front Door (edge caching) | Static files, images, video, cacheable API responses | Course videos, marketing pages, thumbnails |
| APIM cache | API responses at the gateway | Catalogue API responses shared by all callers |
| Browser / client cache | Static assets on the user's device | JavaScript, stylesheets, logos |
| Cosmos DB integrated cache | Frequent point reads and queries | Product catalogue reads |
Session state is a classic Redis question. If a web app runs on multiple instances behind a load balancer, a user must stay logged in whichever instance answers. So the session must live outside any single instance. Azure Managed Redis (Balanced tier with high availability for replication) is the answer. Not in-memory session state, and not a database table. (Older material that names Azure Cache for Redis Standard or Premium for this is naming the retiring service — see the definition above.)
The company's catalogue page is read 100 times for every write, the data may be up to 5 minutes stale, and the catalogue is also served through the API gateway. Where do you cache, and which pattern? Answer: Cache-aside in Azure Managed Redis for the application, plus response caching in API Management so repeated identical API calls never reach the app at all; a 5-minute TTL matches the staleness budget, so no explicit invalidation is needed.
4.10 Recommend an application configuration management solution
Configuration is everything an application needs that is not its code: connection strings, feature flags, endpoint URLs, thresholds, secrets references, and environment-specific settings. The design goal is to change configuration without redeploying code, to keep secrets out of source control, and to make every environment's configuration visible and auditable.
Azure App Configuration is a managed service for centralising application settings and feature flags. Applications fetch settings at startup (and refresh them at runtime), and settings can be labelled per environment (dev, test, prod). Feature flags in App Configuration let you turn a feature on or off — for a percentage of users, a group, or a time window — without redeploying. Azure Key Vault stores secrets, keys, and certificates; App Configuration stores references to Key Vault secrets rather than the secrets themselves. Azure App Service configuration settings and Azure Functions application settings are the per-app place for settings that belong to one app only.
| Need | Recommend |
|---|---|
| Settings shared by many apps and environments, changed without redeploy | Azure App Configuration |
| Turn a feature on/off for 10% of users without redeploying Need | Feature flags in App Configuration Recommend |
| Store a database password, API key, or certificate | Azure Key Vault (never App Configuration, never source control) |
| A setting used by one app only | App Service / Functions application settings |
| Configuration as code in a pipeline | Bicep / ARM templates, Azure DevOps variable groups, GitHub Actions secrets |
| Kubernetes workload configuration | ConfigMaps and Secrets (or App Configuration via the provider) |
The App Configuration / Key Vault split is a separation-of-duties fact. App Configuration holds non-secret settings and feature flags; Key Vault holds secrets. When an application needs a secret, App Configuration stores a Key Vault reference, the application's managed identity reads the secret from Key Vault, and the secret never appears in App Configuration, in code, or in a pipeline log. Any design that puts a password directly into App Configuration (or into a Git repository) is wrong on the exam.
"Change a setting without redeploying" is the App Configuration tell. "Store a secret" is the Key Vault tell. Exam questions deliberately combine them — "the team must change the discount threshold without a deployment, and the payment API key must be rotated" — and the correct answer is both services together, with a Key Vault reference inside App Configuration.
The company wants to roll out a new checkout page to 10% of users, change the free-trial length without redeploying, and keep the payment gateway key out of source control. Name the two services and how they connect. Answer: Azure App Configuration for the feature flag (10% rollout) and the trial-length setting, and Azure Key Vault for the payment gateway key; App Configuration holds a Key Vault reference to the key, and the app's managed identity reads it from Key Vault at runtime.
4.11 Recommend an automated deployment solution for applications
Automated deployment is the path code takes from a commit to production: build, test, package, release, verify, and (if needed) roll back — with no human logging into a server. The Azure answers are Azure DevOps (Pipelines, Repos, Boards, Artifacts) and GitHub Actions (with Azure deployment actions), plus platform-native deployment features: App Service deployment slots, Container Apps revisions, AKS GitOps (Flux), and Azure Functions deployment slots.
Azure Deployment Environments is not a current recommendation: it retires on 22 February 2027 (announced 8 October 2026) — after that date environments can no longer be created, deployed, or redeployed. For repeatable developer environments, use Bicep or ARM templates (Azure Verified Modules) deployed through a CI/CD pipeline instead.
Continuous integration (CI) builds and tests code on every commit. Continuous delivery/deployment (CD) releases the built artefact to environments automatically (deployment) or on approval (delivery). A deployment slot (App Service, Functions Premium/Dedicated) is a separate live instance of the app — staging, for example — with its own host name. You deploy to the slot, warm it up, and test it. Then you swap it into production, and swap back if it fails. Blue-green deployment runs the new version (green) alongside the old (blue) and switches traffic; canary deployment sends a small percentage of traffic to the new version first. Infrastructure as Code (IaC) — Bicep or ARM templates, Terraform — defines the infrastructure in versioned files so environments are reproducible.
| Need | Recommend |
|---|---|
| Build, test, and release pipeline for Azure workloads | Azure DevOps Pipelines or GitHub Actions |
| Zero-downtime web app release with instant rollback | App Service deployment slots + swap |
| Canary release of a containerised service | Container Apps revisions with traffic splitting |
| Kubernetes releases driven by Git | AKS with GitOps (Flux) |
| Repeatable environments for every developer | Bicep / ARM templates (Azure Verified Modules) deployed by a CI/CD pipeline — not Azure Deployment Environments, which retires 22 February 2027 |
| Database schema changes as part of a release | Pipeline step with schema migration tooling (for example, DACPAC / Flyway) with rollback plan |
| Approvals and audit trail before production | Pipeline environments with approval gates |
A slot swap is not a deployment — it is a routing change. The code is already running and warm in the staging slot before the swap, which is why a swap is fast and why swapping back is an instant rollback. The trap is the slot's settings: slot-specific settings (such as a staging database connection string) stay with the slot, while production settings move with the swap. If a scenario says "after the swap, the production app connected to the staging database", the cause is a connection string that was not marked slot-specific.

When the exam asks for "automated deployment with no downtime and the ability to roll back in seconds", the answer is almost always slots or revisions — not "deploy directly to production and redeploy the old version if it breaks". And when it asks for "the same environment in dev, test, and prod", the answer is Infrastructure as Code, not a checklist of manual steps.
The company deploys its web app by copying files to a VM by hand, and a bad release last month took two hours to undo. Recommend the deployment design. Answer: A CI/CD pipeline (Azure DevOps or GitHub Actions) that builds and tests on every commit, deploys to an App Service staging slot, and swaps into production after tests pass; a bad release is undone by swapping back, in seconds. Infrastructure is defined in Bicep so staging and production match.
Walkthrough: Build a CI/CD pipeline with a staging slot and a canary release
The company deploys by copying files to a VM by hand (see the CHECK YOURSELF box above). This walkthrough builds the pipeline the CI/CD diagram above shows — build, stage, test, approve, canary, then full release.
- In Azure DevOps (or GitHub Actions), create a pipeline from the repository. Add a build stage that compiles the code, runs the tests, and produces a container image, then pushes the image to Azure Container Registry.
- Add a deployment stage that deploys the Bicep template to the staging environment and deploys the image to the App Service staging slot.
- Add an automated test stage against the staging slot, then an approval gate that waits for a named approver before production.
- Add the production stage with a canary step: route 10% of traffic to the new version for 30 minutes, check health, then route 100%.
- Confirm the rollback path: if health checks fail, traffic returns to the old version automatically, and a slot swap back restores the previous release in seconds.
Table 4.1 — Pipeline run view
| Stage | What it shows |
|---|---|
| Build stage | produces the container image |
| Staging deployment | — |
| Approval gate | waiting for a named approver |
| Canary step | 10% of traffic on the new version; automatic rollback on failed health checks |

Azure CLI — the same steps:
The pipeline itself is defined in YAML (Azure DevOps or GitHub Actions) and the approval gate is configured in the pipeline, not in az — but the build, the staging slot, the canary traffic split, and the rollback are all CLI steps. The az pipelines commands need the azure-devops extension. Set the default organisation and project first, or az pipelines run has nowhere to run — it errors unless the org and project are configured as defaults or picked up from git config.
az devops configure --defaults organization=https://dev.azure.com/<org> project=<project> az acr create --resource-group rg-prod --name <registry-name> --sku Basic az acr build --registry <registry-name> --image web-prod:v1. az pipelines run --name <pipeline-name> az webapp deployment slot create --name <app-name> --resource-group rg-prod --slot staging az webapp traffic-routing set --name <app-name> --resource-group rg-prod --distribution staging=10 az webapp deployment slot swap --name <app-name> --resource-group rg-prod --slot staging
Run the swap only after the canary has been healthy for 30 minutes; to roll back, swap again — the previous version is still in the staging slot.
Expected output:
{
"name": "<app-name>",
"resourceGroup": "rg-prod",
"state": "Running"
}
Why this, not that:
| Option | Cost | Scale | Security | Operations | Pick it when |
|---|---|---|---|---|---|
| Staging slot + swap | Plan bills 24/7; the slot shares the plan | Swap is a routing change — instant rollback | Slot-specific settings stay with the slot | Warm up and test before swapping | Zero-downtime release with instant rollback |
| Canary via traffic routing (recommended) | Same plan cost; 10% of traffic on the new version | 10% for 30 minutes, then 100% | A bad release affects 10% of users, not all | Health checks gate the rollout | Production release where a bad version must be caught early |
| Blue-green via Front Door | Front Door plus two full deployments | Global traffic switch at the edge | Full isolation between blue and green | Two environments to keep in sync | Multi-region web app, or blue-green across regions |
Worked cost example: Price it in the Azure pricing calculator under Container Registry and App Service, region Canada Central. Azure Container Registry Basic is $0.167 a day (about $5.00 a month, 10 GB of storage included), at time of writing (November 2026).
Deployment slots need an App Service plan on Standard tier or above. The plan bills per instance per hour, 24 hours a day, whether or not the staging slot is in use. Check the current Standard S1 price in the calculator, because the plan, not the registry, is the cost driver.
Pipeline minutes fit the free allowances (1,800 minutes a month on Azure DevOps, 2,000 on GitHub Actions for private repositories), so the pipeline itself is $0 inside those allowances. Total for this walkthrough's resources: about $5.00 a month for the registry, plus the Standard plan. Delete the registry and the plan when you are done, as the walkthrough says.
Free tier: Azure DevOps gives 1,800 free minutes a month of Microsoft-hosted pipeline time, and GitHub Actions gives 2,000 free minutes a month for private repositories. The pipeline minutes fit those allowances.
But the pipeline is not free end to end. The image is pushed to Azure Container Registry, which has no free tier: Basic bills about $0.17 per day from creation.
And the staging slot needs an App Service plan on Standard tier or above. Free, Shared and Basic have no deployment slots. Delete the registry and the App Service plan when you are done, or study the table instead of creating them.
Symptom–cause–fix playbook: application architecture
| Symptom | Likely cause | Fix |
|---|---|---|
| Orders are lost when a consumer crashes | Events used where durable messages were needed | Move the workload to Service Bus with a dead-letter queue |
| A new consumer cannot replay last week's events | Event Grid used as a store | Use Event Hubs (retention) or persist events to storage |
| Partners hammer the API and one partner starves the others | No per-consumer throttling | APIM products, subscriptions, and quota/rate-limit policies |
| Catalogue page hammers the database on every request | No cache, or a cache with a TTL of zero | Cache-aside in Azure Managed Redis with a TTL that matches the staleness budget |
| A secret is found in a Git repository Symptom | Secrets stored as plain settings Likely cause | Move secrets to Key Vault; store only a Key Vault reference in App Configuration Fix |
| Production and staging behave differently | Manual environment setup | Define both in Bicep and deploy through the same pipeline |
4.12 Evaluate a migration solution that leverages the Microsoft Cloud Adoption Framework for Azure
The Cloud Adoption Framework (CAF) is Microsoft's guidance for adopting cloud at organisational scale. It is not a product and not a migration tool — it is a methodology, and the exam tests whether you know its phases, its landing-zone concept, and the "5 Rs" of rationalisation. Two of the 49 AZ-305 objectives begin with "Evaluate", and both are in this migrations group: you are expected to judge whether a proposed migration approach is sound, not merely to name a tool.
The Microsoft Cloud Adoption Framework for Azure (CAF) organises cloud adoption into phases. Define strategy (business outcomes, motivations). Plan (digital estate, skills, cloud adoption plan). Ready (Azure landing zones — the prepared environment). Adopt (migrate, modernise, innovate). Govern (cost, security, compliance guardrails). Manage (operations, monitoring, reliability). An Azure landing zone is a pre-provisioned environment, ready to receive workloads. It is built from a subscription, management-group hierarchy, networking, identity, policy, and logging. It is the platform the migration lands on. Azure Migrate is the hub that performs discovery, assessment, and migration of servers, databases, and web apps; Azure landing-zone accelerators are the reference implementations (portal, Bicep, Terraform) that build the landing zone.
The 5 Rs of rationalisation
Before anything is migrated, each application in the digital estate is rationalised — given one of five dispositions:
| Disposition | Meaning | When it fits |
|---|---|---|
| Rehost ("lift and shift") | Move as-is to Azure VMs | Fastest; the app cannot change; the goal is datacentre exit |
| Refactor | Replatform to a PaaS service with minimal code change | The app fits App Service / Azure SQL with small changes |
| Rearchitect | Redesign the application for the cloud | The app needs cloud-native scale, resilience, or new capabilities |
| Rebuild | Replace with a new cloud-native application or SaaS | The existing app is unmaintainable |
| Replace | Retire the app and use SaaS instead | A SaaS product already does the job |
| (Retire is sometimes listed as a sixth R: decommission the app entirely.) |
CAF is a sequence, and the sequence is the exam point. A migration plan that starts moving servers before the landing zone is ready, or before the digital estate is inventoried, is wrong — even if the tools named are correct. The right order is: strategy and business case → inventory and rationalise the estate → build (or verify) the landing zone → migrate in waves → govern and manage. A question that asks you to "evaluate" a migration solution is usually asking you to spot the missing phase: no landing zone, no business case, no wave plan, no rollback plan, or no governance.
Migration waves
Workloads migrate in waves, ordered by dependency and risk: low-risk, low-dependency workloads first (to prove the landing zone and the process), then dependent workloads in dependency order, with the most critical workloads last, when the team is practised.
The dependency rule, stated once: a database migrates before — or together in one wave with — the application that uses it when that application is the database's only consumer. That way the pair is never split across a migration boundary. A shared database that many applications depend on migrates last, after its consumers are ready, so it stays available until cutover.
Either order is right for its own dependency shape. The error is splitting a dependent pair, or moving a shared database first with no rollback plan. Each wave has an entry criterion (assessment complete, landing zone ready), a migration window, a validation step, and a rollback plan.
If a proposed migration plan says "migrate the 200 most critical servers first, in one weekend, with no assessment", it fails on three CAF counts: no discovery/assessment, no wave plan, and the riskiest workloads first. The correct evaluation is to reject it and propose: assess with Azure Migrate, rationalise, build the landing zone, then migrate in waves starting with low-risk workloads.
The company's board wants its datacentre closed in six months. A consultant proposes moving all 300 servers to Azure VMs next month, with no inventory, no landing zone, and no wave plan. Evaluate the proposal against CAF. Answer: Reject it. CAF requires: inventory and rationalise the estate (some apps should be refactored, replaced, or retired, not rehosted), a landing zone ready before any workload lands, a business case, and migration in waves starting with low-risk workloads — with a rollback plan for each wave. Moving everything at once, unassessed, is the highest-risk path.
4.13 Evaluate on-premises servers, data, and applications for migration
Evaluation means discovery and assessment: finding everything that exists, understanding what it depends on, and deciding whether it can run in Azure, what size it needs, and what it will cost. The hub is Azure Migrate.
Azure Migrate is a central hub for discovery, assessment, and migration. Its discovery appliance inventories VMware, Hyper-V, and physical servers (and, with agents, their installed software and dependencies). Its assessments report Azure readiness, right-sized VM recommendations, and estimated monthly cost. Its dependency mapping (dependency analysis) shows which servers talk to each other, so a migration wave does not split a chatty pair across the migration boundary. Azure Migrate application and code assessment (including the AppCAT tooling) scans application code for compatibility with App Service or AKS. Azure Data Box and Azure Migrate's business-case tooling support the cost argument.
What an assessment must cover
| Assessment area | What to find | Why it decides the design |
|---|---|---|
| Inventory | Every server, OS version, CPU, memory, disk, installed software | Unknown servers cannot be sized or costed |
| Utilisation | Real CPU/memory/disk use over time (not provisioned size) | Right-sizing; a server provisioned at 32 GB that uses 4 GB wastes money in Azure |
| Dependencies | Which servers and services talk to each other | Wave planning; splitting a dependency pair causes latency or failure |
| Readiness | OS and software support in Azure, driver and compatibility issues | Some workloads cannot be rehosted and must be refactored or replaced |
| Data | Databases, file shares, volumes, growth rates | Data migration method and time (see 4.15–4.16) |
| Licensing | Windows Server / SQL Server licences, Software Assurance | Azure Hybrid Benefit can cut VM and SQL costs significantly |
| Performance | IOPS, throughput, latency sensitivity | Disk tier (Premium SSD vs Ultra Disk), VM family, ExpressRoute need |
| Security & compliance | Data classification, regulatory constraints | Region choice, private connectivity, encryption requirements |
Assess utilisation, not allocation. The most common and most expensive migration mistake is sizing Azure VMs from what a server was provisioned with instead of what it uses. Azure Migrate's performance-based sizing uses observed utilisation; a design that copies on-premises sizes into Azure is a design that overpays from day one. The exam will give you a server "provisioned with 16 vCPUs, averaging 12% CPU" and expect you to right-size it down.
Azure Hybrid Benefit is a licensing fact the exam returns to: customers with Windows Server or SQL Server licences with Software Assurance can use them in Azure and pay only the base compute rate. A migration business case that ignores Hybrid Benefit overstates the cost of the Azure target — and a question may ask which licensing option reduces cost for a customer who already owns the licences.
Dependency mapping is the difference between an assessment and an inventory. An inventory lists servers; dependency analysis shows that the web server talks to the database every 50 ms and they must migrate in the same wave, in the same region, or the application will break. If a scenario mentions "the application failed after migration because the database stayed on-premises", the missing step was dependency mapping.
The company's assessment finds 40 servers. One database server is provisioned with 64 GB of memory but has averaged 9 GB of use for six months, and the web tier calls it 200 times a second. What two assessment conclusions follow? Answer: Right-size the Azure target well below 64 GB (performance-based sizing from observed use, not provisioned size), and migrate the web tier and the database in the same wave into the same region — splitting them would put 200 calls a second across a high-latency link.
Walkthrough: Discover and assess servers with Azure Migrate
The company's assessment finds 40 servers (see the CHECK YOURSELF box above). This walkthrough runs the discovery and assessment that produces those findings.
- In the Azure portal, open Azure Migrate, select Servers, databases and web apps, and select Discover.
- Deploy the discovery appliance: download the appliance file, import it into the VMware or Hyper-V environment, and configure it with the Azure Migrate project details.
- Let the appliance inventory the servers, then start dependency analysis so the assessment shows which servers talk to each other and must migrate in the same wave.
- Select Assess, then Create assessment. Select the discovered servers, the target region, and the assessment properties (performance-based sizing, so the Azure target is sized from observed use, not provisioned size).
- Open the completed assessment and read it the way the exam expects: Azure readiness (which servers can be rehosted), right-sized VM recommendations, and the estimated monthly cost. A server provisioned at 64 GB that uses 9 GB is right-sized down; a web tier that calls its database 200 times a second must migrate in the same wave and region.
Table 4.2 — Azure Migrate assessment
| Section | What to look at |
|---|---|
| Discovered-servers list | Discovered servers |
| Assessment summary | Azure readiness; right-sized VM recommendations; estimated monthly cost |
| Dependency map | Web tier and database server linked as a pair; that must migrate together |
Step by step — discover and assess (no screenshot): Follow these clicks in the portal — they produce the assessment the table above shows.
- In the Azure portal, open Azure Migrate, select Servers, databases and web apps, and select Discover.
- Select the source environment (VMware), then download the appliance file and import it into the VMware environment.
- Open the appliance configuration manager, complete the prerequisite checks, and register the appliance with the project key.
- In Manage credentials and discovery sources, select Add credentials for the discovery source, then select Add discovery source and enter the vCenter Server IP address or FQDN. Select Start discovery.
- Wait for discovery to finish. The appliance inventories the servers and collects performance data, and agentless dependency analysis builds the dependency map showing which servers talk to each other. For a performance-based assessment, wait at least a day after starting discovery, so there is enough
performance data.
- In Azure Migrate: Discovery and assessment, select Assess and select Azure VM. In Assess servers, select the discovered servers and set Assessment type to Azure VM.
- In Assessment properties, set Target location to the Azure region, set Storage type to Automatic, and set the savings options.
- In VM Size, set Sizing criterion to Performance-based, then set Performance history, Percentile utilization, VM Series (Azure Migrate suggests a value), and Comfort factor.
- In Select or create a group, select Create New and type a group name for the servers you want to assess.
- In Review + create assessment, review the details and select Create Assessment. Open the completed assessment and read Azure readiness, the right-sized VM recommendations, and the estimated monthly cost.
Azure CLI: az migrate exists as a Preview extension (get-discovered-server, local replication and runbook commands), but it has no project-create command — Microsoft's project-creation documentation gives only the portal and the REST API for creating a project. (Portal or REST API — not portal only.) Deploying the discovery appliance, starting dependency analysis, and creating the assessment are portal steps, as above.
Why this, not that:
| Option | Cost | Scale | Security | Operations | Pick it when |
|---|---|---|---|---|---|
| Azure Migrate discovery + assessment (recommended) | Discovery and assessment are free | 40 servers or 4,000 — same appliance pattern | Dependency map shows what talks to what | Appliance to deploy on-premises | Any estate being assessed for migration |
| Manual inventory (spreadsheets, CMDB) | Staff time; no tooling charge | Breaks down past dozens of servers | No dependency data | Manual, quickly stale | Tiny estate with no dependencies |
| No assessment — migrate directly | Cheapest on paper | — | Unknown readiness; split dependencies | — | Never a design; the exam's wrong answer |
Free tier: Azure Migrate discovery and assessment are free — the assessment itself has no charge. The appliance runs on-premises and the walkthrough costs nothing.
4.14 Recommend a solution for migrating workloads to IaaS and PaaS
Once the estate is assessed, each workload is moved by one of two paths. Rehost to IaaS: the workload runs on Azure VMs much as it did on-premises. Replatform/refactor to PaaS: the workload runs on a managed service such as App Service or Azure SQL.
Rehosting (lift and shift) to IaaS moves a server to an Azure VM with minimal change, using Azure Migrate Server Migration (agentless replication for VMware, agent-based for Hyper-V and physical servers) or Azure Site Recovery for replication-based migration. The pattern is: replicate, test-migrate, cut over, decommission. Replatforming to PaaS moves the workload onto a managed service. A web app goes to Azure App Service (assessed and moved with the App Service Migration Assistant). A containerised app goes to Container Apps or AKS. A database goes to Azure SQL Database or Azure SQL Managed Instance (see 4.15). PaaS removes the operating system from the team's responsibilities, but it requires the application to fit the platform's constraints.
| Path | Tooling | When to choose |
|---|---|---|
| Rehost VMs (VMware) | Azure Migrate Server Migration, agentless replication | Fast datacentre exit; app cannot change |
| Rehost VMs (Hyper-V / physical) | Azure Migrate Server Migration, agent-based replication | Same, where agentless is unavailable |
| Rehost with minimal downtime | Replication, then test migration, then cutover | Production workloads that cannot be offline for long |
| Web app to App Service | App Service Migration Assistant (assess + migrate) | .NET / PHP web apps that fit App Service |
| Containerised app to Azure | Azure Migrate app containerisation, ACR, AKS / Container Apps | App is already containerised or can be |
| Application modernisation | Refactor / rearchitect (see 4.12) | The app needs PaaS scale or features the VM cannot give |
Replication-based migration is what makes a low-downtime cutover possible. The source server is replicated continuously to Azure while it keeps running. A test migration proves the replica boots and the application works. The cutover is a short, planned switch of traffic to the replica. Any plan that proposes "shut the server down, copy the disk, start it in Azure" for a production workload has accepted hours of downtime it did not need to. The exam's migration questions almost always reward the replication + test + cutover sequence.
The App Service Migration Assistant is the exam's tell for "move a web app to App Service" — and it supports only ASP.NET and PHP. Java and Python applications run on App Service, but the Migration Assistant cannot migrate them; they must be moved by another route (republish/redeploy the code to App Service directly, or containerise the app). If the scenario instead says "move 200 VMs", the answer is Azure Migrate Server Migration — the assistant assesses one web application, not a fleet of servers. Match the tool's scope to the workload's scope.
The company must move 120 VMware VMs to Azure with less than an hour of downtime per server, and move its.NET web application to a managed platform so the team stops patching Windows. Which two migration paths? Answer: Azure Migrate Server Migration with agentless replication, test migration, and cutover for the VMs; and the App Service Migration Assistant to assess and move the.NET web app to Azure App Service.
4.15 Recommend a solution for migrating databases
Database migration is a separate discipline from server migration because a database is stateful, usually cannot be offline for long, and must arrive consistent. The tool is Azure Database Migration Service (DMS) (and the Azure SQL migration extension), with Azure Migrate for assessment and the Migration component in SQL Server Management Studio (SSMS) / SQL Server Migration Assistant (SSMA) for compatibility assessment. The older Data Migration Assistant (DMA) was retired on 16 July 2025 — its assessment capability now lives in the SSMS Migration component and in Azure Migrate: Database Assessment — so do not recommend DMA for a new migration.
Azure Database Migration Service (DMS) migrates databases to Azure with minimal downtime. An offline migration copies the schema and data once and then cuts over — simple, but the source is unavailable during the copy. An online migration copies the data, then continuously synchronises changes from the source until cutover — the source stays available, and the cutover is a short switch. Azure SQL Managed Instance link replicates an on-premises SQL Server to a Managed Instance continuously and supports failover, which is also a migration path. Azure Data Factory can move data with transformation, but it is a data-integration tool, not a database migration tool — it does not preserve the database's transactional consistency for you.
| Source | → | target | Recommended approach |
|---|---|---|---|
| SQL Server | → Azure SQL Database | Assess with the SSMS Migration component (or Azure Migrate: Database Assessment); DMS online migration (or offline for small, tolerant workloads); remediate incompatible features first | |
| SQL Server | → Azure SQL Managed Instance | DMS online migration, or Managed Instance link for near-zero downtime and a failback path | |
| SQL Server | → SQL Server on an Azure VM | Backup/restore, or Azure Migrate replication of the VM (rehost) | |
| Oracle / MySQL / PostgreSQL | → Azure | Assess with SSMA; DMS (or the database-specific migration tooling) with schema conversion | |
| MongoDB | → Azure Cosmos DB | Azure Cosmos DB Data Migration tool / DMS (MongoDB API) | |
| Large database, poor network | Seed with Azure Data Box, then synchronise deltas online |
Online versus offline is a downtime decision, not a size decision. A small database can still need an online migration if it cannot be offline at all, and a large database can use an offline migration if the business accepts a weekend window. The exam gives you the downtime budget first — read it before you look at the database size.
The migration sequence
- Assess compatibility (SSMS Migration component / SSMA) and remediate: features that do not exist in the target (for example, cross-database queries in Azure SQL Database, or SQL Agent jobs) must be redesigned before the move, not discovered during it.
- Choose the target for the right reasons: Azure SQL Database for a single-database PaaS fit; Managed Instance when the application needs near-full SQL Server compatibility (SQL Agent, cross-database queries, CLR); SQL Server on a VM when the application needs full control of the OS
and SQL Server.
- Migrate schema, then data, then synchronise (online) or copy once (offline).
- Validate: row counts, checksums, application smoke tests, performance baselines.
- Cut over: switch connection strings (ideally through App Configuration or Key Vault so no redeploy is needed), monitor, and keep the source as a rollback target until the new system is proven.
The target-choice question is a favourite: "the application uses SQL Server Agent jobs and cross-database queries" points to Managed Instance, not Azure SQL Database, because Azure SQL Database does not support SQL Agent. "The application is a single database with no server-level features" points to Azure SQL Database. Read the feature list in the scenario — it is the question.
The company's enrolment database is SQL Server, uses SQL Agent jobs nightly, and cannot be offline for more than 15 minutes. Recommend the target and the migration mode. Answer: Azure SQL Managed Instance (SQL Agent is supported there) with an online DMS migration, so changes keep synchronising until a short cutover. Azure SQL Database is wrong (no SQL Agent); an offline migration is wrong (the copy would exceed the 15-minute window).
4.16 Recommend a solution for migrating unstructured data
Unstructured data is files, images, videos, logs, and backups — data without a fixed schema, usually stored as files on a file server, NAS, or in an object store. The target is usually Azure Blob Storage (hot, cool, or archive tiers), Azure Files (SMB/NFS file shares), or Azure Data Lake Storage Gen2 (Blob with a hierarchical namespace for analytics). The choice of how to move it is a bandwidth-and-volume calculation.
AzCopy is a command-line tool for high-performance, scriptable copying of files and blobs to and from Azure Storage; it supports incremental and synchronised copies. Azure Storage Mover is a fully managed migration service for file and object data, with a central view of migration jobs, support for initial copy plus catch-up transfers, and support for SMB/NFS sources to Blob or Azure Files targets. Azure Data Box is a physical appliance (Data Box, Data Box Disk, Data Box Heavy) shipped to the customer, filled on-premises, and shipped back to an Azure datacentre — the offline path for very large data or very slow networks. Azure File Sync keeps an on-premises Windows file server synchronised with an Azure Files share (a hybrid file solution, not a one-off migration). Azure Import/Export uses the customer's own drives for smaller offline transfers.
| Situation | Recommend |
|---|---|
| Scriptable, repeatable copy over a good network | AzCopy |
| Managed migration with a central view, initial + catch-up copies | Azure Storage Mover |
| Terabytes to petabytes, or a network too slow for the volume | Azure Data Box (offline) |
| File server must stay on-premises but be backed by Azure | Azure File Sync (hybrid, not a migration) |
| A few terabytes on removable drives Situation | Azure Import/Export Recommend |
| Data must keep being written during the move | Online copy with a final delta/catch-up transfer before cutover — never a single copy and hope |
The bandwidth calculation the exam expects
Time to move = data volume ÷ effective throughput. At an effective 200 Mbps, 20 TB takes roughly 9–10 days before overhead — and that is why Data Box exists.
If a scenario gives you a volume, a link speed, and a deadline, do the arithmetic: if the network cannot move the data in the window, the answer is the offline appliance, not a faster tool. A tool cannot beat physics.
A migration is not finished when the bytes arrive. The final steps are the delta (catch-up) transfer, validation (file counts, sizes, checksums, a sample open), permission and metadata preservation, and the cutover of the applications that read the data. NTFS ACLs do not survive a plain blob copy. Storage Mover and File Sync handle metadata explicitly, and the exam will test whether you noticed. "Copying bytes does not prove permissions were preserved" is worth memorising.
Data Box is the answer when the scenario mentions a slow link, a huge volume, or a deadline the network cannot meet. It is the wrong answer when the data is small and the network is fast. AzCopy or Storage Mover is cheaper and faster then. The exam also likes the combination: Data Box to seed a large dataset, then Storage Mover or AzCopy for the final online catch-up before cutover.
The company has 60 TB of course videos on a NAS and a 100 Mbps link, and the migration window is two weeks. AzCopy alone, or Data Box? Answer: Data Box — at 100 Mbps, 60 TB would take roughly two months, far outside the window; ship a Data Box appliance to seed the data, then use an online tool for the final delta before cutover.
Symptom–cause–fix playbook: migrations
| Symptom | Likely cause | Fix |
|---|---|---|
| Migration stalls halfway with no plan | No landing zone, no wave plan | Stop, build the landing zone, re-plan in waves |
| Application breaks after its database moves | Dependency split across the migration boundary | Dependency mapping first; migrate dependent tiers in the same wave |
| Azure bill is double the estimate | VMs sized from provisioned, not observed, utilisation | Right-size from Azure Migrate performance-based sizing |
| Database cutover takes hours | Offline migration used for a large database | Use an online migration with continuous synchronisation |
| Files arrive but users cannot open them | Permissions/metadata not preserved in the copy | Use Storage Mover or File Sync and validate ACLs; re-apply where the tool cannot carry them |
| Target SQL database rejects the application | Incompatible features not remediated | Assess with the SSMS Migration component / SSMA first; choose Managed Instance if server-level features are required |
4.17 Recommend a connectivity solution that connects Azure resources to the internet
"Connecting Azure to the internet" has two directions, and the exam tests both: inbound (the world reaches your Azure resources) and outbound (your Azure resources reach the world). Each direction has a different set of services, and mixing them up is the most common error in this group.
Inbound: the world reaches Azure
| Need | Recommend |
|---|---|
| A public web application or API | Public IP + Azure Load Balancer (L4) or Application Gateway (L7), or Front Door globally (see 4.21) |
| A single VM reachable from the internet | Public IP address on the VM or its load balancer (and Azure Bastion instead of RDP/SSH where possible) |
| A PaaS service reachable from the internet with controls | Public endpoint with service firewall rules and private-endpoint option (see 4.20) |
| A static website | Azure Storage static website hosting behind Azure Front Door |
Outbound: Azure reaches the world
| Need | Recommend |
|---|---|
| VMs in a private subnet need outbound internet (updates, APIs) with a stable, predictable source IP | Azure NAT Gateway on the subnet — outbound-only, one or more static public IPs, no inbound connections initiated from outside |
| Outbound traffic must be inspected and filtered by destination | Azure Firewall (or a network virtual appliance) as the egress path via a user-defined route |
| Outbound traffic must use the IP of a load balancer | Public Load Balancer with outbound rules (the older pattern; NAT Gateway is preferred for new designs) |
| No outbound internet at all | No public IP, no NAT Gateway, and a default route to a firewall that denies egress |
Azure NAT Gateway provides outbound-only internet connectivity for a subnet: all outbound traffic leaves through the gateway's static public IP address (or prefix), and no inbound connection can be initiated from the internet through it. One NAT Gateway can serve multiple subnets in a virtual network, and it is the recommended way to give private VMs predictable outbound access. Azure Firewall is a managed network security service that inspects and filters traffic; it can be the egress path for a whole virtual network (see 4.20). A user-defined route (UDR) overrides Azure's default routing — for example, sending all internet-bound traffic (0.0.0.0/0) to the firewall instead of directly to the internet.
NAT Gateway is outbound-only; a load balancer is both directions. If a scenario says "the VMs must download updates but must never be reachable from the internet", the answer is NAT Gateway. A public IP on each VM would make them reachable, and a public load balancer would too. If the scenario says "customers must reach the web tier", the answer is a load balancer or gateway in front of it, not NAT Gateway. The exam will offer NAT Gateway as a distractor for an inbound requirement, and a public load balancer as a distractor for an outbound-only requirement.
NAT Gateway is also a cost and reliability fact. It bills per gateway-hour plus per gigabyte processed. Traffic that could stay on the Azure backbone (for example, to a storage account) should use a private endpoint instead of leaving through NAT Gateway. A design that sends all storage traffic out through NAT Gateway is paying to send traffic to the internet that never needed to leave Azure.
The company's batch VMs sit in a private subnet. They must download packages from the internet, must use one predictable public IP so a partner can allow-list it, and must never accept inbound connections. Recommend the service. Answer: Azure NAT Gateway on the subnet, with a static public IP — outbound-only, one predictable source address, and no inbound path. A public IP per VM fails the "never reachable" requirement; a load balancer is the wrong tool for outbound-only traffic.
4.18 Recommend a connectivity solution that connects Azure resources to on-premises networks
Hybrid connectivity joins an on-premises network to Azure virtual networks. There are two services, and the choice is a trade-off between cost, bandwidth, latency, and privacy.
Azure VPN Gateway creates encrypted IPsec/IKE tunnels over the public internet between an on-premises VPN device and Azure: site-to-site (S2S) for a whole office or datacentre, point-to-site (P2S) for individual remote users, and VNet-to-VNet for connecting two Azure virtual networks. Azure ExpressRoute is a private, dedicated connection from the on-premises network to Azure through a connectivity provider — the traffic never crosses the public internet. ExpressRoute circuits are provisioned at fixed bandwidths (50 Mbps to 10 Gbps, and up to 100 Gbps with ExpressRoute Direct), and ExpressRoute Global Reach connects two on-premises sites through the Azure backbone. Virtual WAN is a managed hub-and-spoke networking service that brings VPN, ExpressRoute, and branch connectivity into managed hubs.
| VPN Gateway | ExpressRoute |
|---|---|
| Path Public internet, encrypted (IPsec) | Private circuit via a connectivity provider, not encrypted by default |
| Bandwidth Up to 10 Gbps aggregate (VpnGw5AZ); a single tunnel is much lower | 50 Mbps–10 Gbps (100 Gbps with ExpressRoute Direct) |
| Latency Variable (internet) | Low and predictable |
| SLA 99.9% (Basic), 99.95% (other SKUs; zone-redundant SKUs higher) VPN Gateway | ExpressRoute circuit 99.9% minimum; ExpressRoute gateway 99.9% (Basic) / 99.95% (other SKUs) ExpressRoute |
| Cost Low — gateway hours plus data transfer | High — circuit plus gateway hours |
| Best fit Branch offices, dev/test, temporary links, failover for ExpressRoute | Production hybrid, high throughput, predictable latency, regulatory need for a private path |
| Peering types — | Azure Private Peering (to VNets), Microsoft Peering (to Microsoft 365 / Dynamics 365) |
VPN Gateway SKUs — name an availability-zone SKU for a new gateway. The non-AZ SKUs (VpnGw1–VpnGw5) can no longer be created for new gateways (effective 1 November 2025). They retire on 30 September 2026. So a new design names the AZ equivalent (VpnGw1AZ–VpnGw5AZ). The 10 Gbps figure in the table above is the VpnGw5AZ aggregate throughput.
The standard resilient design: ExpressRoute as the primary path and a site-to-site VPN as the failover path. They are not alternatives in a resilient design — they are complements.
VNet peering connects two Azure virtual networks privately over the Azure backbone (no gateway, no internet, no encryption needed because the traffic stays on Microsoft's network). Gateway transit lets a peered spoke virtual network use the hub's VPN or ExpressRoute gateway. Peering is non-transitive: if VNet A peers with B and B peers with C, A and C cannot talk unless they peer directly (or traffic is routed through a hub with a firewall/NVA).
ExpressRoute is private, not encrypted. This is one of the most tested facts in Azure networking. Traffic on an ExpressRoute private peering does not cross the internet, so it is not exposed to it — but it is not encrypted by default. If a scenario requires encryption as well as a private path, the answer is ExpressRoute plus IPsec over ExpressRoute (or application-level encryption). A question that offers "ExpressRoute encrypts the traffic" as the reason to choose it is using a false premise.

When the requirement is "predictable latency and high bandwidth, and the traffic must not cross the public internet", the answer is ExpressRoute — even if VPN Gateway is cheaper. When the requirement is "a branch office, low bandwidth, low cost, and encryption matters more than latency", the answer is VPN Gateway. The exam gives you the requirement that decides; cost alone never decides a hybrid design.
The company's datacentre must replicate 4 TB a day to Azure with predictable latency, and the compliance team forbids the data crossing the public internet. A branch office with 20 users also needs access. Recommend both connections. Answer: ExpressRoute (private peering) for the datacentre — private path, predictable latency, high bandwidth — with a site-to-site VPN as failover; a site-to-site VPN Gateway connection for the branch office, where cost matters and the bandwidth is small.
4.19 Recommend a solution to optimize network performance
Network performance is latency, throughput, and the time a user waits. Optimisation in Azure is mostly about keeping traffic on the fastest path and as close to the user as possible — not about buying bigger pipes first.
| Technique | What it does | When to recommend |
|---|---|---|
| Azure Front Door | Global entry point at the edge; users connect to the nearest edge, traffic crosses Microsoft's backbone to the best origin | Global users, dynamic web apps |
| Azure Front Door (edge caching; replaces retiring Azure CDN classic) | Caches static content at edge locations worldwide | Images, video, downloads, static sites |
| Azure Traffic Manager | DNS-based routing to the nearest or best-performing endpoint | Global failover and latency-based routing for any protocol |
| ExpressRoute | Private, predictable-latency path to on-premises | Hybrid latency problems (see 4.18) |
| VNet peering | Private, low-latency path between VNets over the Azure backbone | Cross-VNet traffic that currently goes over the internet or a gateway |
| Private endpoints / Private Link | PaaS traffic stays on the Azure backbone, never the internet | Storage/SQL traffic from a VNet that is slow or charged as internet egress |
| Accelerated Networking | SR-IOV: the VM's network interface bypasses the host for lower latency and higher throughput | Latency-sensitive or high-throughput VMs (HPC, databases) |
| Proximity placement groups | Places VMs physically close together in the same datacentre | Low-latency VM-to-VM traffic (HPC, clustered databases) |
| Azure Virtual WAN | Managed hub-and-spoke with optimised routing between branches and Azure | Many branches, global hybrid routing |
| Connection pooling / keep-alive, compression | Reduces per-request overhead | Application-level latency, before any infrastructure change |
Azure Front Door is a global, Layer 7 entry point running on Microsoft's edge network: it terminates TLS at the edge, caches content, routes each request to the healthiest and nearest origin, and accelerates traffic over Microsoft's private backbone. Azure CDN (classic) cached content at points of presence close to users. But it retires on 30 September 2027 and has accepted no new profiles since 15 August 2025. New designs use Azure Front Door for edge caching. That is the right answer when the content is static and cacheable. Proximity placement groups co-locate VMs in the same datacentre to reduce inter-VM latency — the design answer when two VMs must talk to each other in microseconds, not milliseconds.
Diagnose before you optimise. The exam's performance questions usually contain the diagnosis in the scenario: "users in Asia wait 4 seconds for a page served from West Europe" is an edge/caching problem (Front Door), not a bigger VM problem. "Two database VMs in the same region have 8 ms of latency between them" is a placement problem (proximity placement group), not a bandwidth problem. "Traffic to Blob storage leaves the VNet and comes back over the internet" is a private-endpoint problem. Match the fix to the location of the delay.
Front Door versus the retiring CDN is a favourite trap: classic Azure CDN cached static content, but it retires on 30 September 2027 and takes no new profiles. Front Door accelerates dynamic web applications as well as caching static content, and adds global load balancing, TLS termination, and WAF. If the scenario is a global web application with personalised pages, the answer is Front Door; if it is a library of videos and images, Front Door's edge caching is the answer.
The company's course videos are served from Blob storage in one region. Learners in Asia and Australia report slow starts, and the videos are identical for every learner. Recommend the optimisation. Answer: Azure Front Door with caching in front of the Blob storage — the videos are static and identical for all users, so caching them at edge locations near the learners removes the cross-region fetch on every play. (Classic Azure CDN would have been the old answer; it retires on 30 September 2027 and takes no new profiles, so Front Door is the current design.) A bigger VM or ExpressRoute would not help, because the bottleneck is distance, not compute.
4.20 Recommend a solution to optimize network security
Network security in Azure is defence in depth: control who can reach what, inspect what passes, keep PaaS traffic private, and remove public exposure wherever possible. The services overlap, and the exam tests the boundary between them.
Azure Firewall is a managed, cloud-based network security service that protects virtual network resources. It filters traffic with network rules (IP, port, protocol), application rules (FQDN-based, for HTTP/HTTPS), and NAT rules (inbound DNAT). It includes built-in threat intelligence, and optional intrusion detection/prevention (IDPS) and TLS inspection in the Premium tier. By default it denies traffic and only allows what a rule permits. Network Security Groups (NSGs) are packet filters applied to a subnet or a network interface, allowing or denying traffic by source, destination, port, and protocol — the basic segmentation control. Application Security Groups (ASGs) let NSG rules refer to groups of VMs by role ("web", "database") instead of by IP address. Azure DDoS Protection (Network Protection) monitors and mitigates volumetric attacks against public IPs; Basic protection is included automatically, Network Protection is the paid, tuned tier with cost protection and attack analytics. Azure Bastion gives secure RDP/SSH access to VMs through the portal over TLS, without exposing the VMs to the internet. Azure Private Link / private endpoints give a PaaS service a private IP in your VNet, so traffic never crosses the internet. Service endpoints are the older, subnet-level way to keep PaaS traffic on the Azure backbone. They do not give the service a private IP. Azure Web Application Firewall (WAF) protects web applications against common attacks (SQL injection, cross-site scripting, the OWASP Top 10) and runs on Application Gateway or Front Door. Network Watcher provides the diagnostics (flow logs, packet capture, topology, connectivity checks) that prove what the security controls are actually doing.
| Control | Layer / scope | What it does |
|---|---|---|
| NSG | Subnet or NIC, L3/L4 | Allows/denies traffic by 5-tuple |
| Azure Firewall | VNet egress/ingress, L3–L7 | Stateful filtering, FQDN rules, threat intelligence, IDPS (Premium) |
| WAF | Application Gateway / Front Door, L7 | Blocks web attacks (OWASP Top 10) |
| DDoS Protection | Public IPs, L3/L4 volumetric | Mitigates large-scale floods |
| Private Link | PaaS service, private IP | Keeps PaaS traffic off the internet |
| Bastion | VM access | RDP/SSH without public IPs |
| Private DNS zones | Name resolution | Lets private endpoints resolve to private IPs |
The hub-and-spoke security pattern
The standard design has a hub virtual network and spoke virtual networks. The hub holds Azure Firewall (and the VPN/ExpressRoute gateway). The spokes hold workloads.
User-defined routes send spoke internet-bound traffic through the firewall. NSGs segment subnets inside each spoke. PaaS services are reached through private endpoints.
Management access goes through Bastion. Traffic between spokes passes through the hub firewall, so it is inspected.
NSGs and Azure Firewall are not substitutes — they are different layers. An NSG is a simple allow/deny filter with no inspection, no FQDN awareness, and no threat intelligence; it is cheap and belongs on every subnet. Azure Firewall is a stateful, inspecting firewall that understands domain names and threats; it is the egress control point and the hub's inspection point. A scenario that says "block all outbound traffic except to *.microsoft.com" needs Azure Firewall (FQDN application rules), because an NSG cannot filter by domain name. A scenario that says "the database subnet must only accept traffic from the web subnet on port 1433" needs an NSG (or an ASG-based rule), because that is simple segmentation.
Three facts the exam repeats. (1) Azure Firewall denies by default — you must write a rule to allow traffic. (2) A private endpoint bypasses the storage account firewall entirely, so disabling public access is the way to force private-only access. (3) Bastion removes the need for public IPs on VMs, so "expose RDP to the internet" is never the right answer.
The company's spoke virtual networks must send all internet-bound traffic through one inspected egress point, the database subnet must only accept traffic from the web tier on port 1433, and administrators must reach VMs without public IPs. Name the three controls. Answer: Azure Firewall in the hub with a user-defined route (0.0.0.0/0) from the spokes, an NSG on the database subnet allowing only the web tier (ideally via an application security group) on port 1433, and Azure Bastion for administration.
Symptom–cause–fix playbook: network security
| Symptom | Likely cause | Fix |
|---|---|---|
| VMs can reach a blocked website | No egress inspection — traffic leaves directly | Route 0.0.0.0/0 through Azure Firewall with application rules |
| A storage account is reachable from the internet despite a private endpoint | Public access still enabled on the account | Disable public network access; verify private DNS resolution |
| Database accepts connections from anywhere in the VNet | NSG missing or too broad on the database subnet | NSG allowing only the web tier's ASG on the database port |
| Web app is hit by SQL injection attempts | No WAF in front of the app | Enable WAF on Application Gateway or Front Door |
| Administrators RDP directly to public IPs | No Bastion | Deploy Azure Bastion; remove public IPs from the VMs |
| Outbound traffic to a SaaS API is blocked | Firewall application rule missing the FQDN | Add an FQDN-based application rule (or a network rule for the IP) |
Walkthrough: Create a private endpoint and lock down a storage account
The company's storage account must be reachable only from the virtual network. This walkthrough creates the private endpoint and then disables public access, so the endpoint is the only way in.
- In the Azure portal, open the storage account, select Networking under Settings, and select the Private endpoint connections tab. Select + Private endpoint.
- On the Basics tab, select the subscription, resource group, region, and a name for the endpoint, then select Next.
- On the Resource tab, select Storage account as the resource type, select the storage account, and select Blob as the target sub-resource.
- On the Virtual Network tab, select the virtual network and the subnet for the endpoint — in the capture (Screenshot S-12) this is the virtual network's default subnet (10.0.0.0/24) — and confirm the private DNS zone integration so the storage name resolves to the private IP.
- Select Review + create, then Create. Return to the storage account's Networking blade and set Public network access to Disabled, so the private endpoint is the only path to the account.
- Verify from a VM in the virtual network that the storage name resolves to the private IP and that the account is unreachable from the internet.
Table 4.3 — Private endpoint blade
| Section | What to look at |
|---|---|
| Basics tab | Endpoint name |
| Resource tab | Storage account; blob sub-resource selected |
| Virtual Network tab | Subnet; private DNS zone entry |
| Storage account Networking blade | Public network access: Disabled |


Azure CLI — the same steps:
az network private-endpoint create --name pe-stredundancydemo-blob --resource-group rg-prod --location canadacentral --vnet-name vnet-prod --subnet default --private-connection-resource-id <storage-account-id> --group-id blob --connection-name pe-blob az network private-endpoint dns-zone-group create --resource-group rg-prod --endpoint-name pe-stredundancydemo-blob --name default --private-dns-zone privatelink.blob.core.windows.net --zone-name privatelink.blob.core.windows.net az storage account update --name stredundancydemo --resource-group rg-prod --public-network-access Disabled
The private DNS zone privatelink.blob.core.windows.net must already exist (the portal flow creates it for you); create it first with az network private-dns zone create if you are scripting the whole setup. Disable public access only after the endpoint and DNS are working, or the account becomes unreachable.
Expected output:
{
"name": "pe-stredundancydemo-blob",
"privateLinkServiceConnections": [
{ "groupIds": ["blob"], "name": "pe-blob", "provisioningState": "Succeeded" }
],
"provisioningState": "Succeeded",
"resourceGroup": "rg-prod"
}
Why this, not that:
| Option | Cost | Scale | Security | Operations | Pick it when |
|---|---|---|---|---|---|
| Private endpoint (recommended) | $0.01 an hour (about $7.30 a month) plus $0.01 per GB processed | One endpoint per resource and sub-resource | Traffic never leaves the VNet; private IP | Private DNS zone to maintain | Sensitive PaaS data; public access disabled |
| Service endpoint | Free | Per subnet, per service | Traffic stays on the Azure backbone, but no private IP | One subnet setting | Cost-sensitive, no private IP needed |
| Public access + firewall rules | No endpoint charge; egress may bill | Internet-routable endpoint | IP and firewall rules only; still public | Simplest, weakest | Dev/test only, non-sensitive data |
Worked cost example: Price it in the Azure pricing calculator under Private Link, region Canada Central. One private endpoint running 730 hours a month costs $0.01 × 730 = $7.30 a month, plus $0.01 per GB processed — 500 GB a month through the endpoint adds $5.00, for about $12.30 a month in total, at time of writing (November 2026).
The endpoint is cheap; the line item to watch is the hub firewall from §4.20 if you add one: Azure Firewall Standard is $1.25 an hour (about $913 a month) plus $0.016 per GB processed. What drives the bill is the firewall deployment hours, not the endpoint. Delete the endpoint with the storage account when you finish practising — deleting the account does not delete the endpoint.
Free tier: A private endpoint bills per hour and per gigabyte processed; there is no free tier for private endpoints. Practise the steps on a small test setup and delete the endpoint when you are done.
4.21 Recommend a load-balancing and routing solution
Azure has four load-balancing services, and the exam tests the two questions that sort them: is the traffic web (Layer 7) or any protocol (Layer 4)? and is the scope regional or global?
Azure Load Balancer is a regional Layer 4 (TCP/UDP) load balancer: it distributes incoming connections across healthy backend VMs or scale-set instances, public (internet-facing) or internal (private frontend inside a VNet). It has frontend IPs, backend pools, health probes, and load-balancing rules; the Standard SKU is zone-redundant. Application Gateway is a regional Layer 7 (HTTP/HTTPS) reverse proxy: it terminates TLS, routes by URL path or host name, provides cookie-based session affinity, and can host a Web Application Firewall (WAF). Azure Front Door is a global Layer 7 service on Microsoft's edge network: it routes users to the nearest healthy origin, caches content, terminates TLS, and can host a WAF. Azure Traffic Manager is a DNS-based global routing service: it answers DNS queries with the address of the best endpoint (by priority, performance, weight, or geography) and the client then connects directly — it never proxies traffic. Cross-region Load Balancer extends the Layer 4 load balancer across regions. Azure Route Server and user-defined routes handle routing inside virtual networks, for example steering traffic through a firewall or a network virtual appliance.
| Load Balancer | Application Gateway | Front Door | Traffic Manager |
|---|---|---|---|
| Layer 4 (TCP/UDP) | 7 (HTTP/HTTPS) | 7 (HTTP/HTTPS) | DNS (any protocol) |
| Scope Regional Load Balancer | Regional (one VNet) Application Gateway | Global (edge) Front Door | Global (DNS) Traffic Manager |
| Proxies traffic? Yes (pass-through) | Yes (reverse proxy) | Yes (edge proxy) | No — returns a DNS answer |
| TLS termination No | Yes | Yes | No |
| URL / path routing No | Yes | Yes | No |
| WAF No | Yes | Yes | No |
| Session affinity Source-IP based | Cookie-based | Cookie-based | No |
| Best fit Non-HTTP workloads (SQL, RDP, gaming), internal L4 | Regional web apps needing path routing / WAF | Global web apps, edge acceleration | Global failover / geo-routing for any protocol |
How to choose — the decision table
- Web traffic, one region, need path routing, TLS offload, or WAF → Application Gateway.
- Web traffic, multiple regions, need the nearest healthy origin and edge acceleration → Front Door (with an Application Gateway in each region behind it if regional Layer 7 features are also needed).
- Non-web traffic (TCP/UDP), one region → Load Balancer (internal for private services, public for internet-facing ones).
- Any protocol, multiple regions, DNS-level failover or geographic routing → Traffic Manager. Remember its limits: failover speed depends on DNS TTL and client caching, and it cannot inspect traffic, so it cannot do TLS offload, path routing, or WAF.
Traffic Manager is not a proxy, and that single fact decides half the questions in this section. If a requirement mentions TLS offload, path-based routing, WAF, or caching, Traffic Manager is wrong no matter how "global" the scenario sounds. Conversely, if the requirement is "route users to the nearest of three regional deployments for a custom TCP protocol", Front Door and Application Gateway are wrong (they are HTTP-only) and Traffic Manager (or the cross-region Load Balancer) is right.

"Path-based routing" is the Application Gateway tell; "global" plus "web" is the Front Door tell; "DNS" is the Traffic Manager tell; "TCP" or "UDP" is the Load Balancer tell. When a question combines two tells — "global web application with path-based routing" — the answer is Front Door in front, with Application Gateway in each region behind it.
The company's learning platform runs in two regions. Users worldwide must reach the nearest healthy region, traffic must be routed by URL path (/api to the API tier, /content to the content tier), and the site must be protected by a WAF. Which services, and why is Traffic Manager wrong? Answer: Azure Front Door as the global entry point (nearest healthy origin, WAF at the edge) with an Application Gateway in each region for path-based routing and regional WAF. Traffic Manager is wrong because it only answers DNS queries — it cannot route by URL path, terminate TLS, or run a WAF.
Chapter 4 — Design Infrastructure Solutions. Based on the official Microsoft AZ-305 exam objectives (skills measured April 17, 2026). Unofficial study material — not affiliated with or endorsed by Microsoft. Fictional company used in all scenarios.
Hands-on lab 4 — Deploy the site and assess the migration
Scenario
The company still deploys its public website by copying files to a server by hand. It still runs forty on-premises servers that nobody has assessed for migration. The leadership wants two things before they spend any money: a working website running on Azure, and an honest assessment of what those forty servers would cost to run in Azure.
You are the solutions architect. In this lab you will deploy a website to an App Service Free (F1) plan, deploy a static front end to Static Web Apps on the Free tier, and create an Azure Migrate project for the server assessment.
This is the hands-on version of Chapter 4. Pick the compute tier from the workload, automate the deployment path instead of copying files, and assess before you migrate.
Azure Migrate is the free discovery and assessment service for migration. It inventories on-premises servers, checks their Azure readiness, right-sizes them to Azure VM sizes, and estimates their monthly cost. Discovery and assessment cost nothing. The migration itself — the VMs, the data transfer, the target services — is what costs money. That is why the assessment comes first.
Objectives covered
This lab maps to the Chapter 4 exam objectives in the official AZ-305 study guide (skills measured 17 April 2026):
| Objective | What you practise in this lab |
|---|---|
| Specify components of a compute solution based on workload requirements | Choosing F1 Free for a lab website and knowing what it cannot do |
| Recommend a virtual machine-based solution Objective | Right-sizing thinking in the Migrate assessment (what the forty servers become) What you practise in this lab |
| Recommend a serverless-based solution | Seeing where Static Web Apps fits: static front end, no server to manage |
| Recommend an automated deployment solution for applications | Replacing hand-copy deployment with a repeatable CLI deployment |
| Evaluate a migration solution that leverages the Microsoft Cloud Adoption Framework for Azure | Creating the Migrate project and the migration wave plan |
| Evaluate on-premises servers, data, and applications for migration | Recording what an assessment must cover: readiness, sizing, cost, dependencies |
| Recommend a solution for migrating workloads to IaaS and PaaS | Deciding, per server, whether the target is a VM or a platform service |
Prerequisites
- A free Azure account (or Azure free trial credits). Nothing in this lab needs a paid tier.
- The Azure CLI installed, or Azure Cloud Shell in the portal (Cloud Shell already has the Azure CLI installed). Sign in first with
az login. - A resource group for this lab: rg-lab4. All resources go in it, so one delete at the end removes everything.
- A GitHub account is not needed for this lab. Static Web Apps normally connects to a GitHub repository, so this lab creates the static web app without a repository connection. It deploys the App Service site as the working website instead — see step 5.
Names must be unique. The web app name and the static web app name are globally unique across Azure (they become part of a public URL). Replace <unique> with a short string of your own, for example your initials plus a number (for example web-lab4-hs7).
Steps
- Create the resource group. In the portal, search for Resource groups, select Create, name it
rg-lab4, pick a region near you (for example Canada Central), and select Review + create, then Create. Or with the CLI:
az group create --name rg-lab4 --location canadacentral
- Create the App Service plan on the Free tier. In the portal, search for App Service plans, select Create, choose
rg-lab4, name itplan-lab4, choose Linux as the operating system, and under Pricing plan select Change size and pick F1 Free. Select Review + create, then Create. Or with the CLI:
az appservice plan create --name plan-lab4 --resource-group rg-lab4 --location canadacentral --sku F1 --is-linux
The F1 Free tier is the cheapest possible App Service plan — free — and the exam expects you to know its limits: 60 CPU-minutes per day, 1 GB of storage, no custom domain at all (only the default <app>.azurewebsites.net hostname), no deployment slots, and no scale-out. Deployment slots need Standard or above, so they are deliberately not in this lab. A free-tier lab that needs a slot is a lab designed wrong. If a workload needs slots, the honest answer is a paid tier, and the honest lab answer is to leave slots out.
- Create the web app on the Free plan. In the portal, search for App Services, select Create, then Web App. Choose
rg-lab4, name the appweb-lab4-<unique>, choose Publish: Code, Runtime stack: Python 3.12, Operating System: Linux, and under App Service Plan selectplan-lab4. Select Review + create, then Create. Or with the CLI:
az webapp create --name web-lab4-<unique> --resource-group rg-lab4 --plan plan-lab4 --runtime "PYTHON|3.12"
- Open the website and confirm the default page. Find the app's public URL:
az webapp show --name web-lab4-<unique> --resource-group rg-lab4 --query defaultHostName -o tsv
Open https://<that-hostname> in a browser. You will see the Azure App Service default landing page. That page is the proof the deployment path works: the app exists, the plan serves it, and the URL resolves.
You have not deployed any code yet, and that is fine. The lab is about the platform, not about writing a website. A student who wants to deploy code next can use the Deployment Center blade, which is the automated path this hand-copy process replaces.
- Create the static web app on the Free tier. In the portal, search for Static Web Apps, select Create, choose
rg-lab4, name itswa-lab4-<unique>, and choose the Free plan. For Deployment details, choose Other (no GitHub repository) so the app is created without a source connection — connecting a repository is a later exercise, not this lab. Select Review + create, then Create. Or with the CLI:
az staticwebapp create --name swa-lab4-<unique> --resource-group rg-lab4 --location eastus2 --sku Free
Static Web Apps is only available in a small set of regions, and Canada Central is not one of them, so this step keeps East US 2 while the rest of the lab uses Canada Central.
The Free tier of Static Web Apps includes 100 GB of bandwidth per month, free managed TLS, and no SLA. That is enough for a personal project or a lab, and the right tier for a static front end that has no server-side code.
- Create the Azure Migrate project (portal or REST API — no Azure CLI command). There is no Azure CLI command that creates an Azure Migrate project. Microsoft documents project creation through the portal and the REST API, so this step is honestly portal-or-REST-API and the lab says so. In the portal, search for Azure Migrate, select Servers, databases and web apps, select Create project, choose
rg-lab4, name the projectmigrate-lab4, pick a geography, and select Create. You need the Azure Migrate Owner role (or a higher-privileged role such as subscription Owner) on the subscription to create a project; Contributor is not enough. - Record what the assessment would cover — without running a real discovery. A real assessment needs the Azure Migrate appliance installed on-premises and real servers to discover, which this lab does not have and does not pretend to have. Instead, open the project, select Servers, databases and web apps, and read the Discover and Assess blades so you can see what the workflow asks for. Then write down, in your own notes, the assessment plan for the company's forty servers: (a) which servers are candidates for rehost to Azure VMs, which for replatform to App Service or Azure SQL, and which for retire; (b) what the assessment must report for each server — Azure readiness, right-sized VM size, estimated monthly cost, and dependencies on other servers; (c) the migration waves, in order: the usual wave order is to migrate the least-dependent servers first, with a rollback plan for each wave. A database migrates before — or together in one wave with — the
application that uses it when that application is its only consumer, so the pair is never split; a shared database that many applications depend on migrates last, after its consumers are ready, so it stays available until cutover.
Assess before you migrate, and migrate in waves. The assessment is free; the migration is not. A wave plan that moves the shared database first, with no rollback plan, is the design the exam expects you to reject.
- Compare the two compute choices you just built. Write one sentence for each: the App Service web app is the right home for server-side code that needs a runtime (Python, in this lab); the Static Web App is the right home for a static front end with no server code. If the company's storefront were a static site with an API, the exam answer would be Static Web Apps for the front end plus a serverless API — not a VM, and not an always-on App Service plan.
Expected result
You have a web app running on an F1 Free App Service plan with its default page reachable at its public URL. You have a Static Web App on the Free tier. You have an Azure Migrate project ready to receive a discovery, plus a written wave plan for the forty on-premises servers.
You have also seen, in the portal, that the Migrate project cannot be created from the CLI (portal or REST API only). Knowing which tasks have no CLI path is itself exam-relevant knowledge.
Screenshot — capture this: the web app Overview blade showing the F1 Free App Service plan and the default host name, with the default landing page open in a browser tab; and the Azure Migrate project overview showing the project name migrate-lab4 and the Discover and Assess tiles.
Lab evidence: capture your own screenshot of the finished result — the web app overview with the F1 plan and the working default page URL, and the Migrate project overview — and keep it as proof you completed the lab.
A teammate says the lab website is too slow and suggests adding a deployment slot so they can test a faster build. Why is that the wrong fix on this plan? Answer: deployment slots need Standard tier or above — the F1 Free plan has no slots. The fix is either to accept the Free tier's limits for a lab, or to move to a paid tier deliberately. Slowness on F1 is usually the 60 CPU-minutes-per-day quota or the shared infrastructure, not the deployment method.
Cost alert
| Resource created | Cost |
|---|---|
Resource group rg-lab4 | Free — a resource group is a container, not a billable resource. |
App Service plan plan-lab4 (F1 Free) | Free — 60 CPU-minutes per day, 1 GB storage, shared infrastructure. No custom domain, no slots, no scale-out. |
Web app web-lab4-<unique> | Free — billed through the plan, and the plan is F1 Free. |
Static Web App swa-lab4-<unique> (Free) | Free — 100 GB bandwidth per month, free managed TLS, no SLA. |
Azure Migrate project migrate-lab4 | Free — discovery and assessment cost nothing. The appliance runs on-premises and the assessment itself has no charge. |
Clean up — delete everything when you finish. Deleting the resource group deletes the plan, the web app, the static web app, and the Migrate project. Free tiers bill nothing, but delete anyway. A forgotten F1 plan is harmless, a forgotten project is clutter, and the habit of cleaning up is what keeps a real subscription's bill at zero.
az group delete --name rg-lab4 --yes --no-wait
In the portal: open Resource groups, select rg-lab4, select Delete resource group, type the name to confirm, and select Delete. Check the group is gone before you close the portal.
Worked cost estimate
All figures below are at time of writing (November 2026), in US dollars, for the Canada Central region. They come from the Azure App Service pricing page, the Azure Static Web Apps pricing page, and the Azure pricing calculator. Prices change by region and over time, so run the same steps in the calculator before you quote a price to anyone.
No paid-tier price is printed here: the lab uses free tiers only, and the first paid step (moving the App Service plan to Basic, or the Static Web App to Standard) is a deliberate paid choice, so the calculator steps below tell you where to read that price instead of printing a number that may be wrong for your region.
Worked example: you run the lab in one day, then delete rg-lab4 the same day. Usage assumptions: the web app serves only the default landing page a few times, well inside 60 CPU-minutes in a day; the Static Web App serves no real traffic, well inside 100 GB of bandwidth a month; the Migrate project runs no discovery, because there are no on-premises servers in this lab.
Pricing Calculator steps:
- Add App Service, operating system Linux, pricing tier F1 Free, region Canada Central, and enter 1 app. The calculator shows $0.00.
- Add Static Web Apps, plan Free, region East US 2 (the region used in Lab 4 step 5), and enter 1 app with 0.01 GB of bandwidth. The calculator shows $0.00.
- Add Azure Migrate. There is no line to add: discovery and assessment cost nothing, so the project has no meter to price.
- Read the monthly total. Then, as a what-if only, change the App Service plan tier to Basic (B1) in the calculator and read the new total, so you can see what the first paid step would cost. Do not make that change in the portal: it is a paid tier, and this lab stays on free tiers.
| Resource | Tier | Monthly cost |
|---|---|---|
Resource group rg-lab4 | - | $0.00 |
App Service plan plan-lab4 | F1 Free | $0.00 (60 CPU-minutes per day, 1 GB storage, shared infrastructure) |
Web app web-lab4-<unique> | F1 Free (through the plan) | $0.00 (billed through the plan, and the plan is free) |
Static Web App swa-lab4-<unique> | Free | $0.00 (100 GB bandwidth per subscription per month, 0.50 GB storage, free managed TLS, no SLA) |
Azure Migrate project migrate-lab4 | - | $0.00 (discovery and assessment cost nothing) |
| Total | $0.00 per month |
What drives the bill: nothing in this lab bills by usage, because every resource is on a free tier with a quota instead of a meter. The quotas are the cost control: 60 CPU-minutes per day on the F1 plan, 1 GB of storage on the plan, and 100 GB of bandwidth a month on the Static Web App Free tier.
What would make it jump: the bill jumps only when you leave the free tiers. Moving the App Service plan to Basic is the first paid step and bills per hour for as long as the plan exists, even with no traffic, so check the current Basic price in the calculator before you change it. Adding a second app to the same F1 plan costs nothing extra but shares the same 60 CPU-minutes a day, so two busy apps hit the quota twice as fast.
On the Static Web App, exceeding the 100 GB free bandwidth does not add an overage charge on the Free tier; the site simply stops being served until the quota resets. That is why the honest fix for a busy site is the Standard tier, not more free usage. The Migrate project itself never bills; the migration it assesses is what costs money, which is why the assessment comes first.
Try it further Scenario: The company wants a second, separate website for its course catalogue, but the team does not want to pay for a second hosting plan. In this challenge you create a second web app on the same F1 Free plan, confirm it serves its own default page at its own URL, and check the one limit both apps now share. This uses only the web app command already in Lab 4. 1. Create the second web app on the same plan, plan-lab4, with the same Python 3.12 runtime. Replace <unique> with the same string you used in Lab 4, so the name stays recognisable:
az webapp create --name web-lab4-catalog-<unique> --resource-group rg-lab4 --plan plan-lab4 --runtime "PYTHON|3.12"
- Find the second app's public URL:
az webapp show --name web-lab4-catalog-<unique> --resource-group rg-lab4 --query defaultHostName -o tsv
- Open
https://<that-hostname>in a browser and confirm you see the Azure App Service default landing page, at a different URL from the first web app. 4. In the portal, openplan-lab4, select Quotas, and read the CPU time used today. Note that the quota is per plan, not per app: both web apps draw from the same 60 CPU-minutes per day, so the second app does not get a second 60 minutes. 5. Write one sentence in your own notes answering this: if the catalogue site became busy and kept hitting the shared CPU quota, would you add a third app to this plan, or move the plan to a paid tier? The honest answer is the paid tier, because a third free app shares the same exhausted quota. 6. Leave the second web app in place. Do not delete it separately: deletingrg-lab4removes it along with everything else in the lab. Expected result: two web apps run on the one F1 Free plan, each reachable at its own public URL showing the default landing page. The plan Quotas blade shows a single shared CPU-minutes quota for the plan, not one quota per app. Screenshot — capture this: the plan Quotas blade showing the shared CPU quota, with the second web app's default landing page open in a browser tab. Lab evidence: capture your own screenshot of the second app's working URL and the plan quota blade, and keep them with the Lab 4 evidence. Two apps on one free plan prove you understand the quota is shared; two apps on two plans would prove nothing. Cost note: a second web app on the same F1 Free plan costs $0.00 extra. No new plan is created and no paid tier is used. Deleterg-lab4as in the Lab 4 cleanup when you finish.
Case study 1 — Scaling the company for global exam season
The company is a mid-sized online training business. Its learning platform sells exam preparation courses. It serves video lessons and runs timed practice exams.
Today the whole platform runs on one set of virtual machines in one Azure region. Behind them sits one on-premises SQL Server, lifted into a VM. It works in a quiet month. It does not work in exam season.
Traffic rises to twenty times its normal level for three weeks. Students in Europe and Asia wait seconds for pages to load. One failed VM has already taken the practice-exam service offline for an afternoon.
The board has approved a rebuild, not a bigger VM. The company will move the platform to a cloud-native design in Azure. The on-premises office stays connected for staff and finance. The new platform must be ready for the next exam season in 14 weeks.
The design below is the recommendation. Every choice is tied to a numbered requirement. The rejected alternatives are listed with the reason each one loses.
Business requirements
- Survive exam season. The platform must serve 20 times normal traffic for three weeks, four times a year, without manual intervention and without a maintenance window.
- Go global. Students in North America, Europe, and Asia must all get page loads under 2 seconds. Today only North American students do.
- No exam-day outage. The practice-exam service must stay available during exam weeks. A single datacentre failure must not take it offline.
- Launch in 14 weeks. The rebuild must be live before the next exam season. There is no time to hire a Kubernetes team or to retrain the existing four-person engineering team.
- Keep the monthly platform bill under $1,000 in a quiet month. Exam-season months may run higher, but the quiet-month baseline must stay under $1,000.
- Keep student data in the home region. Student records and payment data must stay in the Canada Central region to meet the company's data-residency commitment.
- Keep the office connected. The 40-person office and the finance system stay on-premises for now. Staff must reach the platform's back-office tools over the existing office network.
- Grow the catalogue without rework. New courses, new video content, and a new mobile app are planned in the next year. The design must absorb them without another rebuild.
Technical requirements and constraints
- Existing estate: one monolithic web application on Windows VMs, one on-premises SQL Server database (420 GB) with SQL Agent jobs, and 3 TB of video files on a file server.
- Workload shape: the web front end is stateless and request-driven; video grading is a batch job (thousands of independent renders, each taking 10 to 25 minutes); practice-exam attempts are short, high-volume writes.
- Availability target: 99.95% for the practice-exam service. The current single-VM design has no availability target it can meet.
- Latency target: page loads under 2 seconds for students in North America, Europe, and Asia.
- Identity: staff sign in with Microsoft Entra ID. Students sign in with email and password today; the new design must not force students into the staff directory.
- Network: the office has a single 100 Mbps internet link and no private circuit. The finance system must never be reachable from the public internet.
- Team skills: four engineers who know.NET, SQL Server, and containers at a basic level. No Kubernetes experience, no dedicated network engineer.
- Deployment: releases happen twice a week today and break the site about once a month. The new design must support blue-green or canary releases and automatic rollback.
Recommended architecture Identity
Staff keep signing in with Microsoft Entra ID. The platform's APIs accept Entra ID tokens for back-office calls. Students are a separate population.
They sign in through Microsoft Entra External ID, which bills per monthly active user. It keeps student identities out of the staff directory.
That separation answers business requirement 6 and technical constraint 5. Data residency is about student records, not about mixing populations.
So there is one directory for staff and one external identity service for students, with no shared credentials between them.
When a scenario has two populations - employees and customers - the exam expects two identity answers. Workforce identity (Entra ID P1/P2) is for staff; external identity (Entra External ID) is for customers. Putting students in the staff directory is the trap answer.
Compute
The monolith is split into three parts, and each part gets the compute that fits its workload shape:
- • Web front end and APIs -> Azure App Service, Premium v3 (P1v3), two instances, zone-redundant. App Service is the right host for a stateless.NET web app that needs deployment slots, autoscale, and managed patching. Two instances across availability zones meet the 99.95% target and the "survive a datacentre failure" requirement. The team already knows.NET and App Service, so the 14-week deadline (business requirement 4) is achievable.
- • Video grading -> Azure Container Apps (Consumption plan). Grading is thousands of independent jobs that spike in exam season and idle the rest of the year. Container Apps scales from zero to hundreds of replicas on queue length. It bills per second of active compute. So the quiet-month bill stays low, and exam season scales without anyone provisioning VMs. The team ships the grader as a container image; they never touch Kubernetes.
- • Event-driven glue -> Azure Functions (Consumption plan). Short tasks - sending result emails, thumbnail generation, cleaning up expired exam sessions - run as functions triggered by queues and timers. The Consumption plan's free grant (1 million executions and 400,000 GB-seconds per month) covers this volume, so the cost is zero at current scale.
The compute decision follows the workload, not personal preference. A stateless web app points to App Service. A spiky, queue-driven batch job points to Container Apps or Batch. A handler that runs for seconds points to Functions. A 25-minute render rules out Functions on the Consumption plan, which caps one run at 10 minutes. That is why grading is a container job, not a function.
Data
- • Student records, orders, and enrolments -> Azure SQL Managed Instance, General Purpose tier, 4 vCores, zone-redundant. The 420 GB database uses SQL Agent jobs. Azure SQL Database cannot run those jobs at all. Managed Instance is the PaaS tier that keeps SQL Agent with the database. It also keeps cross-database queries and near-full SQL Server compatibility. Four vCores is the smallest standalone size. Microsoft Learn ("Resource Limits - Azure SQL Managed Instance") states that a 2-vCore instance is only possible inside an instance pool (footnote 1: "Deploying a 2-vCore instance is only possible inside an instance pool"). An instance pool itself starts at 8 vCores. So there is no 2-vCore price to take. The database is priced at the 4-vCore rate in the cost estimate below. Zone redundancy is on for the primary instance. That way the database survives the loss of a datacentre in Canada Central without a manual failover (business requirement 3). The cross-region failover group remains the protection against a whole-region outage. The secondary instance itself is not zone-redundant. It is a failover target in another region. A datacentre loss in Canada East does not take the practice-exam service offline while the primary is healthy. Reporting reads go to the failover-group secondary in Canada East, so they do not slow down enrolments. (Azure SQL Database Hyperscale was considered for its scale-out named replicas, but it has no SQL Agent. The nightly jobs would have needed a separate replacement with no owner — see rejection #5.)
- • Practice-exam attempts -> Azure Cosmos DB for NoSQL, provisioned throughput 1,000 RU/s. Attempts are high-volume, semi-structured writes. The student ID is the natural partition key. Attempts are read back by student and by exam. Cosmos DB gives single-digit-millisecond reads and writes and scales throughput independently of the relational database.
- • Video files -> Azure Blob Storage, Hot tier for current courses, Cool tier for older courses. Video is unstructured data; Blob Storage is the right store, and the Hot/Cool split answers business requirement 5 (cost) without touching performance for current courses.
- • Caching -> Azure Managed Redis. Session state and the course catalogue are cached so that exam-season reads do not hit the database. Managed Redis is the current managed cache service. The older Azure Cache for Redis tiers retire on 30 September 2028 (new-customer creation blocked since 1 April 2026). So no new design should be built on them.
Messaging and application architecture
A Service Bus namespace (Standard tier) sits between the web tier and the grading workers. The web tier drops a grading message on a queue. Container Apps scales on queue length. Results come back through a second queue.
This keeps the front end apart from the graders, so a grading backlog slows grading, not the website.
API Management is deliberately not used here. The platform has one internal API consumer (its own front end) and one partner integration planned. App Service's built-in authentication covers both.
Adding API Management now would add cost, and a service the team must learn before the deadline.
Network
- • Global entry point -> Azure Front Door, Standard tier. Front Door routes each student to the nearest healthy origin, terminates TLS at the edge, and caches static content. It is the single answer to business requirement 2 (global latency under 2 seconds) and to failover. If the primary region's origin fails its health probe, Front Door sends traffic to the secondary region.
- • Secondary region -> Canada East, warm standby. One App Service instance (P1v3) and a Managed Instance failover-group secondary run in Canada East, the paired region for Canada Central. Student records stay in Canada (business requirement 6), and the secondary is inside the same country.
- • Office connectivity -> VPN Gateway, VpnGw1AZ, site-to-site. The office has a 100 Mbps link and no private circuit. A site-to-site VPN over the public internet is the right connection. ExpressRoute would give a private circuit, but it needs a connectivity provider, a monthly circuit fee, and a lead time the 14-week deadline cannot absorb. The finance system is reached only through the site-to-site VPN tunnel, on its own on-premises address, routed over the tunnel. It has no public IP address. (A private endpoint cannot do this job. A private endpoint exposes an Azure PaaS service into a virtual network. It cannot give an on-premises system an address inside the virtual network. Private endpoints in this design are for the Azure PaaS services — SQL Managed Instance, Cosmos DB, and Blob Storage — as listed under Network security below.)
- • Network security -> Network Security Groups on every subnet, private endpoints for SQL Managed Instance, Cosmos DB, and Blob Storage, and Azure Firewall is not deployed. The platform's threat model is a public web application, not a hub-and-spoke enterprise network. Front Door plus NSGs plus private endpoints cover it. Azure Firewall would add a fixed hourly charge for filtering the team does not need at this scale.
Monitoring and governance
One Log Analytics workspace per region collects resource logs through diagnostic settings. Resource logs are not collected until diagnostic settings are enabled.
Azure Monitor alerts on failed exam submissions, queue depth, and HTTP 5xx rate. Azure Key Vault (Standard tier) holds connection strings and certificates. The application reads them with a managed identity, so no secret ever lives in source code or an app setting.
Backup and disaster recovery
App Service's built-in backup protects the web app configuration and files. Azure Backup protects the Blob Storage data. Managed Instance point-in-time restore covers accidental deletes. Cosmos DB continuous backup covers the attempts store.
Disaster recovery is the secondary region behind Front Door plus the Managed Instance failover group. It is drilled quarterly with a test failover. (Full backup and recovery design is worked through in Case study 3.)

The company's 420 GB enrolment database runs SQL Agent jobs every night. Which Azure SQL target keeps those jobs, and why not Azure SQL Database? Answer: Azure SQL Managed Instance — it runs SQL Agent natively, along with cross-database queries and near-full SQL Server compatibility. Azure SQL Database has no SQL Agent, so the nightly jobs would be stranded (or need a separate replacement such as Elastic Jobs) if the database moved there.
Why this design (and what was rejected)
- Virtual machines and Virtual Machine Scale Sets for the web tier - rejected. VMs would meet the availability target with zones and scale sets, but the team would own patching, images, and load-balancer configuration for a stateless.NET app that App Service hosts with less operational work. VMs are the right answer when a workload needs an OS feature; this one does not.
- Azure Kubernetes Service (AKS) for the microservices - rejected. AKS gives full Kubernetes control, but the team has no Kubernetes skills and the workload is three simple services, not a large microservice estate. AKS would put the 14-week deadline at risk and add a cluster the team must
operate. Container Apps gives the team containers without the cluster.
- A single region with an availability set - rejected. An availability set lives inside one datacentre, so it cannot survive a datacentre failure, and it does nothing for global latency. The requirement says "survive a datacentre failure" and "under 2 seconds in Europe and Asia", so the design needs zones plus a second region plus Front Door.
- ExpressRoute for the office connection - rejected. ExpressRoute is a private circuit with a monthly port fee and provider charges, and it needs procurement lead time. The office has a 100 Mbps internet link and the only on-premises requirement is staff access to back-office tools, which a site-to-site VPN meets at a fraction of the cost.
- SQL Server on Azure VMs for the 420 GB database - rejected. The on-premises database uses SQL Agent jobs. That points toward Managed Instance rather than a VM, and the design takes that pointer. The database moves to Azure SQL Managed Instance (General Purpose, 4 vCores). It runs SQL Agent jobs natively, with no separate job-replacement component to build or pay for. Four vCores is the smallest standalone size (see the data section above). A 2-vCore instance exists only inside an instance pool, and a pool starts at 8 vCores. So neither the 2-vCore price nor a pool saving is available to this design. Azure SQL Database Hyperscale was considered for its scale-out named replicas, but it has no SQL Agent. The nightly jobs would have needed a separate replacement (Elastic Jobs or Azure Automation) with no owner and no cost line. Choosing Hyperscale would have stranded every scheduled job. A VM would be chosen only if a requirement could not be met by PaaS, and none here cannot.
Cost estimate
All figures are Canada Central list prices, pay-as-you-go, at time of writing (November 2026), using a 730-hour month. Use the Azure Pricing Calculator with these inputs before committing, because prices vary by region and change over time. The free-tier column is the development environment, not production.
Step 1 - Price the fixed monthly items (they bill whether or not anyone visits the site).
| Resource | Pricing Calculator input | Monthly cost |
|---|---|---|
| Azure Front Door, Standard | 1 profile, base fee | $35.00 |
| App Service, P1v3 (Linux), primary region | 2 instances, zone-redundant | 2 x $122.64 = $245.28 |
| App Service, P1v3 (Linux), secondary region Resource | 1 instance, warm standby Pricing Calculator input | $122.64 Monthly cost |
| Azure SQL Managed Instance, General Purpose, 4 vCores, zone-redundant | 4 vCores, provisioned (Gen5, licence-included) — zone redundancy is specified for the primary instance because business requirement 3 needs the database to survive a datacentre loss without a manual failover (see Step 5). Azure Retail Prices API, Canada Central, November 2026: $0.730644/hour base + $0.438388/hour zone redundancy = $1.169032/hour × 730 hours. A 2-vCore instance cannot be priced instead: Microsoft Learn ("Resource Limits - Azure SQL Managed Instance", footnote 1) states a 2-vCore instance is only possible inside an instance pool, and an instance pool starts at 8 vCores, so the standalone minimum is 4 vCores. | $853.39 |
| Managed Instance storage, 420 GB | 388 GB at $0.253/GB/month — the 420 GB database minus the 32 GB included free per instance (Microsoft Learn, Azure SQL Managed Instance FAQ: "First 32 GB are free of charge"). Azure Retail Prices API, Canada Central ("SQL Managed Instance General Purpose - Storage", meter "General Purpose Zone Redundancy Data Stored", $0.253/GB/month) — the zone-redundant rate, because the primary instance is zone-redundant; it is exactly twice the non-redundant rate ($0.1265/GB/month, meter "General Purpose Data Stored") | $98.16 |
| Azure SQL Managed Instance failover-group secondary, General Purpose, 4 vCores (Canada East) Resource | 4 vCores in Canada East, billed at the primary's base rate — Azure Retail Prices API, Canada Central: $0.730644/hour × 730 hours = $533.37/month; a failover-group secondary matches the primary's size and is billed like the primary. Base only — the secondary itself is not zone-redundant: it is a cross-region failover target, and a datacentre loss in Canada East does not take the practice-exam service offline while the primary is healthy, so zone redundancy on the secondary (about $369 a month: $320.02 compute plus $49.08 storage) would spend against no stated requirement. Pricing Calculator input | $533.37 Monthly cost |
| Managed Instance secondary storage, 420 GB | 388 GB at $0.1265/GB/month — the 420 GB database minus the 32 GB included free per instance (Microsoft Learn, Azure SQL Managed Instance FAQ). Azure Retail Prices API, Canada Central, meter "General Purpose Data Stored"; the secondary holds a full copy of the data, so its storage is billed too, at the non-redundant rate because the secondary is not zone-redundant | $49.08 |
| Cosmos DB, provisioned 1,000 RU/s | 1,000 RU/s, single region, single write region — Azure Retail Prices API, Canada Central: $0.0088/hour per 100 RU/s × 10 × 730 hours | $64.24 |
| Service Bus, Standard | Base charge $0.0135/hour x 730 | $9.86 |
| VPN Gateway, VpnGw1AZ | 1 gateway, 650 Mbps — Azure Retail Prices API, Canada Central, November 2026: $0.21/hour × 730 hours | $153.30 |
| Key Vault, Standard | Estimated operations, well under 1M/month | about $1.00 |
| Fixed subtotal | about $2,165.32 |
Step 2 - Price the usage-based items on the stated assumptions.
| Resource | Assumption and maths | Monthly cost |
|---|---|---|
| Front Door data transfer and requests | 500 GB out to Zone 1 at $0.0825/GB = $41.25; 10 million requests at $0.009 per 10,000 = $9.00 | $50.25 |
| Container Apps grading workers | 1 vCPU + 2 GiB replica, active about 12 hours a day on average: half of the 30-day always-on figure ($110.38) = $55.19, less the free grant (180,000 vCPU-seconds + 360,000 GiB-seconds, worth about $7.56) — Azure Retail Prices API, Canada Central, November 2026: vCPU active $0.000034/second, memory active $0.000004/GiB-second; always-on is ($0.000034 + 2 × $0.000004) × 2,628,000 seconds = $110.38 | about $47.63 |
| Azure Functions, Consumption | Inside the free grant (1M executions + 400,000 GB-seconds) | $0.00 |
| Blob Storage | Hot 500 GB at $0.02/GB = $10.00; Cool 2,000 GB at $0.011/GB = $22.00 — Azure Retail Prices API, Canada Central first tier, November 2026 | $32.00 |
| Log Analytics | 20 GB ingested; first 5 GB free per billing account; 15 GB at $2.30/GB | $34.50 |
| Usage subtotal | about $164.38 |
Step 3 - Price the backup lines the design promises.
| Resource | Assumption and maths | Monthly cost |
|---|---|---|
| Azure Backup for Blobs, protected instance | 1 protected instance (the Blob Storage account) at $12.00/month (Azure Retail Prices API, Canada Central) | $12.00 |
| Cosmos DB continuous-backup storage | 100 GB of attempts-store backup data (planning assumption — the attempts store is small and high-churn) at $0.22/GB for the 30-day continuous-backup tier — Azure Retail Prices API, Canada Central, meter "Cont 30D Bckp Continuous Backup", $0.22/GB; the 7-day tier (meter "Cont 7D Bkup Continuous Backup") carries no backup-storage charge ($0.00) | $22.00 |
| Backup subtotal | $34.00 |
Blob backup snapshot storage itself bills per GB inside the storage account at standard Blob Storage rates; at the volumes in this design it is a few dollars a month and is not separately itemised — treat the $12.00 protected-instance fee as the floor for that line, not the whole cost.
Step 4 - Price the cache.
Azure Managed Redis, Balanced B1 (1 GB), costs $25.55 a month pay-as-you-go for a single node without high availability. High availability (a second node) doubles the price to $51.10 a month. So this design budgets the single-node price. Confirm the exact figure in the Pricing Calculator before ordering, because prices vary by region and change over time.
Step 5 - Add it up.
Fixed about $2,165.32 + usage about $164.38 + backup lines $34.00 + Managed Redis B1 $25.55 = about $2,389 a month in a quiet month. That is about $1,389 over the $1,000 budget in business requirement 5, so the design as drawn does not meet the budget — and not by a little.
Two earlier totals are withdrawn. The price-alignment pass had priced the Managed Instance at a 2-vCore rate ($266.69), which made the database lines look like about $320 and the total look like about $1,034, only $34 over budget.
That 2-vCore price was never deployable standalone: Microsoft Learn states a 2-vCore instance is only possible inside an instance pool, and a pool starts at 8 vCores. At the correct standalone minimum of 4 vCores the primary instance alone is $853.39. With its storage ($98.16 for 388 GB above the included 32 GB at the zone-redundant $0.253/GB rate) the primary database lines are $951.55 — about $539 more than the $412.67 Hyperscale line they replaced, not a saving.
The budget-resolution pass then corrected the primary to 4 vCores (total about $1,303, about $303 over budget) but left the failover-group secondary in Canada East — which the design itself names in the data section — with no cost line at all. A failover-group secondary is a second full instance, billed like the primary ($533.37 for 4 vCores plus $49.08 for its 388 GB copy of the data), so the database lines are $1,534.00, not $586.50. The corrected total is about $2,389, about $1,389 over budget.
Why the primary database costs more than the earlier $1,889 total: zone redundancy (requirement 3). The earlier total priced the primary Managed Instance without zone redundancy. That left a hole. Business requirement 3 says a single datacentre failure must not take the practice-exam service offline. Without zone redundancy the primary instance goes offline with its datacentre until a manual failover to Canada East completes. The design did not meet its own requirement as written.
Zone redundancy is now specified for the primary instance only (+$320.02 compute and +$49.08 storage a month, $369.10 in total). Its automatic in-region failover keeps the database serving through a datacentre loss.
The secondary is deliberately left without zone redundancy. It is a cross-region failover target, and a datacentre loss in Canada East does not take the service offline while the primary is healthy. So zone redundancy there would spend about $369 a month against no stated requirement.
The remaining move from $1,889 to $2,389 is the November 2026 price corrections: Blob first-tier rates (+$2.80), the 32 GB included storage on both instances (−$8.10), App Service P1v3 at $122.64 (−$4.38 across three instances), Container Apps at current rates (+$13.63), and the VPN Gateway from Basic to VpnGw1AZ (+$127.02). The $0.05 remainder is rounding in the earlier total, which used a rounded $148 usage subtotal.
The design includes two levers the team can pull before launch, but neither closes the gap now. Run the secondary App Service instance on a B1 (Linux) plan (about $13 a month) instead of P1v3 until exam season. That saves about $110 and brings the quiet-month total to about $2,279.
Or pause the secondary region entirely and accept a cold standby with a longer failover time. That saves the secondary App Service instance ($122.64) plus the failover-group secondary and its storage ($582.45) — $705.09 in total — and brings the total to about $1,684. The two levers are alternatives for the same secondary region, so they cannot be combined. Even the larger one leaves the bill about $684 over budget.
Dropping the Cosmos DB continuous backup from the 30-day tier ($22.00) to the 7-day tier ($0.00) would save a further $22 and still leave the bill about $662 over, while giving up 23 days of backup retention. So it is not a way to meet the budget either. No legitimate lever in the cost tables closes a $1,389 gap. The remaining fixed lines are all tied to stated requirements (two zone-redundant App Service instances for the 99.95% target, the VPN Gateway for the office, Front Door for global latency), and the usage-based lines are already small.
Azure Hybrid Benefit is not a lever here either. It needs SQL Server licences with Software Assurance, which this scenario does not state the company holds. Replacing Managed Instance with Azure SQL Database plus a job replacement would strand the SQL Agent jobs the design is built around, so it fails a stated requirement rather than saving money.
The honest verdict, and what the model answer must say. The design cannot meet the $1,000 quiet-month budget as drawn. The binding constraint is the database. SQL Agent jobs force Azure SQL Managed Instance, and the standalone minimum for Managed Instance is 4 vCores at $533.37 a month before storage. The design needs two of them, primary plus failover-group secondary, so the database lines alone are $1,534.00, more than the whole budget.
The cheapest compliant total, pausing the secondary region outside exam weeks, is about $1,684 a month, still about $684 over budget. A candidate earns full marks by naming the 4-vCore minimum and stating this plainly, and by recommending the Managed Instance design plus a budget revision (raise the quiet-month budget to about $1,684 with the secondary paused, or about $2,389 as drawn) or a named requirement to relax (for example, accept a cold standby in Canada East, or revisit the secondary-region requirement). A candidate who claims the design fits $1,000 has missed the 4-vCore minimum and is marked down.
What drives the bill. Azure SQL Managed Instance is now the largest line (about $1,534 of the total: $853.39 for the zone-redundant 4-vCore primary plus $98.16 for 388 GB of storage, and $533.37 plus $49.08 for the failover-group secondary in Canada East). It bills per vCore-hour whether or not it serves traffic.
App Service is next (about $368 across the three P1v3 Linux instances), because it bills per instance per hour whether or not it serves traffic. Front Door data transfer is the line that grows fastest in exam season: every extra terabyte delivered to Zone 1 adds about $82.50. The lines that do not grow with traffic are the VPN Gateway, Key Vault, and the Service Bus base charge.
Free-tier / development environment. A development copy of this design costs about $10 to $20 a month. It uses App Service F1 (free tier, 60 CPU minutes a day, no custom domain), Container Apps and Functions inside their free grants, Cosmos DB free tier (1,000 RU/s and 25 GB free), Blob Storage for a few gigabytes, Log Analytics inside the 5 GB free allowance, and Key Vault at a few cents.
Managed Instance has a 12-month free offer (720 vCore-hours a month, 64 GB of storage, one instance per subscription). But the 420 GB database exceeds its 64 GB storage limit. So development uses a serverless General Purpose database that auto-pauses, billed per vCore-second actually used.
In a cost question, the fixed hourly items are the trap. A service that bills per instance per hour (App Service, VPN Gateway) costs the same at 3 a.m. as at 3 p.m. A service that bills per use (Functions, Container Apps, serverless SQL) costs almost nothing when idle. Always ask "does this bill when nobody uses it?" before you add up a design.
Follow-up questions
The company's exam-season traffic is 20 times normal for three weeks, then falls back to normal. The grading queue grows to 50,000 messages during the peak. Which change best handles the peak without raising the quiet-month bill?
A) Move the web tier to larger App Service instances (P3v3) permanently B) Configure Container Apps to scale on Service Bus queue length, with maximum replicas set for the peak C) Move the grading workers to Azure Functions on the Consumption plan D) Add a second VPN Gateway for the office deep and scale back to zero when it drains; the quiet-month bill barely moves because Consumption billing is per second of active compute. A is wrong because larger instances bill 24 hours a day, raising the quiet-month bill for capacity that is only needed three weeks a year. C is wrong because each grading render takes 10 to 25 minutes and Functions on the Consumption plan caps a single execution at 10 minutes, so the renders would be killed part-way through. D is wrong because the office VPN has nothing to do with student traffic or the grading queue.
Correct answer: B Explanation: Container Apps scales on queue length, so replicas grow while the queue is
A student in Berlin reports page loads of 4 seconds, while a student in Toronto reports loads under 1 second. All other requirements are unchanged. Which single change most directly fixes the Berlin student's experience?
A) Increase the Azure SQL Managed Instance to 8 vCores B) Add Azure Front Door in front of the application with caching at the edge C) Move the database to the Business Critical tier D) Increase the VPN Gateway from VpnGw1AZ to VpnGw2AZ TLS close to the student, and serves cached static content from the edge, which is exactly the fix for a latency problem that only affects distant users. A is wrong because database compute does not cause geographic latency - the Toronto student is fast against the same database. C is wrong for the same reason: Business Critical improves write latency and failover speed, not the network distance between Berlin and Canada. D is wrong because the VPN Gateway carries office traffic, not student traffic, and students never touch it.
Correct answer: B Explanation: Front Door routes the Berlin student to the nearest edge location, terminates
The finance team asks for the on-premises finance system to be reachable from the new Azure design, but it must never be exposed to the public internet. Which design meets that requirement at the lowest cost?
A) Give the finance system a public IP address and restrict it with a Network Security Group B) Connect the office with a site-to-site VPN Gateway and reach the finance system through the VPN tunnel, on its own on-premises address C) Order an ExpressRoute circuit and put the finance system behind Azure Front Door D) Copy the finance database to Blob Storage every night and shut the finance system down finance system is reached on its own on-premises address routed over that tunnel, with no public IP, so it is never exposed to the internet; the VpnGw1AZ gateway costs about $153 a month, which is the cheapest option that meets the requirement. (A private endpoint would not do this: a private endpoint exposes an Azure PaaS service into a virtual network — it cannot give an on-premises system an address inside the virtual network. Private endpoints in this design are for the Azure PaaS services: SQL Managed Instance, Cosmos DB, and Blob Storage.) A is wrong because a public IP address, even behind a Network Security Group, is still a public exposure and fails the "never be exposed" requirement. C is wrong because ExpressRoute is far more expensive (a monthly circuit fee plus provider charges) and Front Door is a public entry point, which is the opposite of what the requirement asks for. D is wrong because copying a database to Blob Storage does not give staff access to the finance system itself, and shutting the system down is not a connectivity design.
Correct answer: B Explanation: A site-to-site VPN carries office traffic over an encrypted tunnel, and the
The company wants the practice-exam service to survive the loss of a whole datacentre. Suppose the web tier ran on two instances in one availability zone. What is the smallest change that meets the requirement?
A) Add a third instance in the same availability zone B) Spread the two instances across two availability zones C) Move the instances to an availability set D) Increase the App Service plan from P1v3 to P2v3 independent power, cooling, and networking, so spreading instances across zones means the loss of one datacentre leaves the other zones serving traffic. A is wrong because a third instance in the same zone fails with the zone. C is wrong because an availability set lives inside one datacentre - it protects against a rack failure and planned maintenance, not against losing the whole datacentre. D is wrong because a bigger VM does not survive a datacentre failure; availability is a property of the placement design, not of the VM size.
Correct answer: B Explanation: Availability zones are physically separate datacentres in the same region with
Chapter 4 addendum — Infrastructure
Common mistakes and exam traps — Infrastructure
- Running a 25-minute job on the legacy Azure Functions Consumption plan. The exam describes a function that runs for 20 or 30 minutes and offers "increase the timeout" as the fix. The Consumption plan caps a single execution at 10 minutes (5 minutes by default), and that cap cannot
be raised. The correct principle is to read the runtime limit as the whole question: long-running serverless work belongs on Flex Consumption or Premium, which have no enforced maximum, or the work must be split with Durable Functions.
- Swapping Azure Container Instances and Azure Container Apps. The exam asks for a service that scales to zero, offers revisions, and provides an HTTP endpoint, and offers ACI as the simpler answer. ACI runs a container once: there is no revision, no traffic splitting, no autoscaling, and no ingress. The correct principle is that a single container running a nightly conversion and stopping is ACI, while microservices that scale to zero with canary releases are Container Apps.
- Recommending AKS because the workload is "big". The exam describes six microservices run by a team with no Kubernetes experience and offers AKS as the answer for a "serious" container estate. AKS gives full Kubernetes control, but it forces the team to operate node pools, upgrades, and the Kubernetes API, which the scenario says they cannot staff. The correct principle is that the container decision is control versus effort, not size: without a Kubernetes team or a specific control requirement (a custom operator, a service mesh, a particular CNI plug-in), Container Apps is the recommendation.
- Using Event Grid as a store. The exam describes a new consumer that must replay last week's events and offers Event Grid as the eventing service. Event Grid pushes discrete events to subscribers and retries on failure, but it is not a queue and not a store — an event with no subscriber is gone, and there is nothing to replay. The correct principle is to use Event Hubs (a partitioned, replayable log with retention) whenever replay or reprocessing is part of the requirement.
- Using events where durable messages are needed. The exam says orders must never be lost and failed orders must be set aside for inspection, and offers Event Grid or Event Hubs. Only a broker gives you a first-class dead-letter queue, and only Service Bus sessions give you FIFO ordering per key. The correct principle is to match the strongest requirement: loss and ordering point at Service Bus, volume and replay point at Event Hubs, and "something happened — react" points at Event Grid.
- Treating Traffic Manager as a load balancer that can terminate TLS or run a WAF. The exam describes a global web application needing path-based routing and a WAF, and offers Traffic Manager because the scenario is "global". Traffic Manager works at the DNS level: it answers a DNS query with an endpoint address and the client connects directly, so it never sees traffic, never terminates TLS, and cannot route by URL path. The correct principle is that global plus web means Front Door (with an Application Gateway in each region for path routing), while Traffic Manager is for DNS-level failover or routing of any protocol.
- Using NAT Gateway to let the internet reach your VMs. The exam says customers must reach the web tier and offers NAT Gateway because it involves a public IP. NAT Gateway is outbound-only: it lets instances in a subnet connect out to the internet while remaining fully private, and no unsolicited inbound connection can pass through it. The correct principle is to keep the directions straight: inbound traffic needs a load balancer or gateway in front of the tier, while NAT Gateway is the answer only for outbound-only access with one predictable source IP.
- Assuming ExpressRoute encrypts your traffic. The exam says the data must not cross the public internet and must be encrypted, and offers ExpressRoute as the single answer. ExpressRoute is a private path — traffic never crosses the public internet — but it is not encrypted by default. The correct principle is that private and encrypted are two different properties: encryption on ExpressRoute needs IPsec over ExpressRoute, or MACsec on ExpressRoute Direct.
- Using Spot VMs for work that must stay up. The exam describes a batch job that must complete and offers Spot VMs because they are cheap. Spot VMs use spare capacity at a deep discount but can be evicted at any time with 30 seconds' notice. The correct principle is that Spot fits interruptible
work such as rendering or Monte Carlo runs, never a workload that must stay up — the saving is real only when an eviction is harmless.
- Storing a secret in Azure App Configuration. The exam asks for a setting that must change without redeploying and a payment API key that must be rotated, and offers App Configuration for both. App Configuration holds non-secret settings and feature flags; it is not a secret store, and a password placed there is a secret in the wrong service. The correct principle is to split the two: App Configuration holds the setting and a Key Vault reference, Key Vault holds the secret, and the application's managed identity reads it from Key Vault at runtime.
Architect's decision checklist — Infrastructure
Use this checklist on exam day. If you cannot answer an item from the scenario, the scenario probably has not given you that fact — and the exam is testing whether you notice it is missing.
| Check | Why it matters |
|---|---|
| [ ] Workload facts: duration, frequency, state, OS needs? | The facts decide the compute: seconds and event-driven = Functions; a specific OS or kernel driver = VMs; thousands of parallel tasks = Batch. |
| [ ] Disqualifier: what rules each service out? | Functions (Consumption) is disqualified by runtimes over 10 minutes; AKS by a team with no Kubernetes skills; VMs by "no server management". |
| [ ] Container host: control or effort? | One-off task = ACI; microservices with no Kubernetes team = Container Apps; full Kubernetes control = AKS; containerised web app with PaaS features = App Service. |
| [ ] Messaging: loss, ordering, or replay? | Never lose a message and quarantine failures = Service Bus (sessions + dead-letter queue); replay and volume = Event Hubs; react to a state change = Event Grid. |
| [ ] Event-driven: does the caller need an answer now? | Event-driven design is eventually consistent; a user waiting for a confirmation on screen needs a synchronous API call, not an event. |
| [ ] API: per-partner quotas, versioning, hidden backend? | Partners with their own quotas and a self-service portal = API Management (products + subscriptions + version sets); the backend must also validate, not just the gateway. |
| [ ] Cache: how stale may the data be, and who invalidates it? | A long TTL is fine when minutes of staleness are acceptable; "a stale price must never be shown" needs explicit or event-driven invalidation. |
| [ ] Config vs secrets: which service holds it? | Non-secret settings and feature flags = App Configuration; passwords, keys, and certificates = Key Vault, referenced from App Configuration. |
| [ ] Deployment: can a bad release roll back in seconds? | Slots (App Service) or revisions (Container Apps) with a canary step give instant rollback; deploying straight to production does not. |
| [ ] Migration: is the CAF sequence respected? | Strategy and business case, inventory and rationalise, landing zone ready, then migrate in waves starting with low-risk workloads — each wave with a rollback plan. |
| [ ] Assessment: sized from observed use or provisioned size? Check | Right-size from Azure Migrate performance-based sizing; a server provisioned at 64 GB that uses 9 GB wastes money from day one. Why it matters |
| [ ] Database migration: online or offline? | The downtime budget decides, not the database size; a database that cannot be offline for more than 15 minutes needs an online DMS migration. |
| [ ] Data movement: does the network beat the deadline? | Do the arithmetic: volume divided by effective throughput. If the network cannot move the data in the window, the answer is Data Box, not a faster tool. |
| [ ] Network: layer, scope, and direction? | Layer 4 regional = Load Balancer; Layer 7 regional = Application Gateway; Layer 7 global = Front Door; DNS global = Traffic Manager; outbound-only = NAT Gateway. |
End-of-chapter check questions
Answer these from memory, then check the key. They cover the decisions, not the definitions.
The company has a workload that runs for 35 minutes each time it is triggered, a few times a day. Which Azure Functions hosting plan cannot run it, and why?
A) Flex Consumption — it caps a single execution at 30 minutes B) Premium — it has no enforced maximum, so it can run it C) The legacy Consumption plan — it caps a single execution at 10 minutes (5 minutes by default), and that cap cannot be raised D) Dedicated (App Service plan) — it needs Always On, so it cannot run it
The company must process enrolment payments in order per student, never lose one, and quarantine failures for inspection. Which messaging service, and which two features decide it?
A) Azure Service Bus — sessions (FIFO ordering per student) and the dead-letter queue (quarantine for failed messages) B) Azure Event Grid — it pushes events and retries delivery C) Azure Event Hubs — it is a replayable partitioned log D) Azure Storage Queues — it is the cheapest queue
Three partner companies will call the catalogue API, each with its own call quota, and v1 must keep working when v2 ships. Which service, and which two features?
A) Azure Front Door — edge caching and global routing B) Azure API Management — products with per-partner subscriptions and quota policies, and version sets so v1 and v2 run side by side C) Azure Logic Apps — connector-based workflows with approvals D) App Service authentication — it validates tokens at the backend
A web application runs on four instances behind a load balancer and users must stay signed in whichever instance answers. Where does the session state live?
A) In memory on the instance that served the first request B) In Azure Managed Redis — session state must live outside any single instance C) In a Blob Storage container shared by the instances D) In the load balancer's session-affinity cookie
The team must change a discount threshold without redeploying, and the payment API key must be kept out of source control. Name the two services and how they connect.
A) Both in Azure App Configuration — it holds settings and secrets B) Azure App Configuration for the threshold (and feature flags), Azure Key Vault for the payment key; App Configuration stores a Key Vault reference, and the app's managed identity reads the secret from Key Vault C) Both in Azure Key Vault — it holds settings and secrets D) Both in source control, encrypted — the pipeline decrypts them at deploy time
A bad release took two hours to undo because files were copied to a VM by hand. What deployment design gives a rollback in seconds?
A) A CI/CD pipeline deploying to an App Service staging slot, then swapping into production; a bad release is undone by swapping back B) Copying the new files to the VM again, faster C) Scaling the VM up so the bad release runs faster D) Deploying straight to production and redeploying the old version if it breaks
A consultant proposes migrating 300 servers in one weekend with no inventory and no landing zone. Which proposal fails the Cloud Adoption Framework?
A) Assess the estate, rationalise, build the landing zone, then migrate in waves starting with low-risk workloads B) Migrate all 300 servers at once, unassessed, with no landing zone, no wave plan, and no rollback plan C) Migrate the least-dependent servers first, with a rollback plan for each wave D) Build the landing zone first, then migrate the most critical workloads last
Private VMs must download updates using one predictable public IP and must never accept inbound connections. Which service?
A) Azure NAT Gateway on the subnet, with a static public IP — outbound-only, one predictable source address, no inbound path B) A public IP address on each VM C) A public load balancer in front of the VMs D) Azure ExpressRoute
The datacentre needs predictable latency and the data must not cross the public internet. A branch office needs cheap, encrypted connectivity. Name both connections.
A) ExpressRoute (private peering) for the datacentre, with a site-to-site VPN as failover; a site-to-site VPN Gateway connection for the branch office B) A site-to-site VPN for the datacentre and ExpressRoute for the branch office C) ExpressRoute for both — it is encrypted by default D) The public internet for both, with TLS
A global web application in two regions needs nearest-region routing, URL path routing, and a WAF. Which two services, and why is Traffic Manager the wrong answer?
A) Azure Front Door (global entry point, nearest healthy origin, WAF at the edge) with an Application Gateway in each region (path-based routing, regional WAF); Traffic Manager is wrong because it only answers DNS queries — it cannot route by path, terminate TLS, or run a WAF B) Azure Traffic Manager alone — it routes globally and runs a WAF C) Azure Load Balancer in each region — it is Layer 7 and global D) Azure Front Door alone — it does path-based routing in each region
Answer key
Chapter 4 addendum — based on the official Microsoft AZ-305 exam objectives (skills measured April 17, 2026). Unofficial study material — not affiliated with or endorsed by Microsoft.
Want the full Microsoft Azure Solutions Architect Expert (AZ-305) package?
This guide is free to read. Get the downloadable PDF guidebook plus the full 700-question AZ-305 practice exam with 3 months of online access.
Get AZ-305 Full Access — $10