Microsoft certification · Exam AZ-305

AZ-305 Mock Exam Page 3

Designing Microsoft Azure Infrastructure Solutions

Free AZ-305 mock exam questions 21–30, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Free AZ-305 questions

21–30 of 106 free
Question 21

Your company has two on-premises sites in New York and Los Angeles and Azure virtual networks in the East US Azure region and the West US Azure region. Each on-premises site has Azure ExpressRoute circuits to both regions. You need to recommend a solution that meets the following requirements:

Outbound traffic to the Internet from workloads hosted on the virtual networks must be routed through the closest available on-premises site.
If an on-premises site fails, traffic from the workloads on the virtual networks to the Internet must reroute automatically to the other site.
What should you include in the recommendation? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:
To design a resilient hybrid connectivity solution between multiple Azure regions and on-premises sites using ExpressRoute, you must implement a dynamic routing strategy. This ensures that traffic follows the most efficient path and provides automatic failover capabilities without manual intervention. The integration of ExpressRoute with on-premises environments relies on the exchange of routes to manage traffic flow effectively across the Microsoft global network.

Correct Option:

Routing from the virtual networks to the on-premises locations:
Border Gateway Protocol (BGP) BGP is the standard routing protocol used to exchange routing information between your on-premises network and Azure via ExpressRoute. By using BGP, you can advertise a default route (0.0.0.0/0) from your on-premises sites to Azure. This forces outbound internet traffic from the VNet to be backhauled to your local data centers (forced tunneling), meeting the requirement to route through the closest site.

The automatic routing configuration following a failover:
Border Gateway Protocol (BGP) BGP inherently supports dynamic failover. If the ExpressRoute circuit or the primary on-premises site in one region becomes unavailable, the BGP session drops. Azure will then automatically update its routing table to use the next best path available—in this case, the ExpressRoute circuit connected to the secondary on-premises site—ensuring continuous internet connectivity for the virtual network workloads.

Incorrect Option:

Azure default routes:
These are system routes created by Azure to allow VNets to communicate with the internet directly. They cannot be used to force traffic through an on-premises site or handle complex multi-site failover logic automatically.

User-defined routes (UDRs):
While UDRs can override default routing, they are static. Using UDRs for failover between two sites would require manual updates or complex automation scripts, which does not meet the "automatic" requirement as efficiently as BGP.

HSRP and VRRP:
These are first-hop redundancy protocols used within local area networks (LANs) to provide gateway redundancy for end hosts. They are not used by Azure to manage routing between virtual networks and ExpressRoute circuits.

Reference:
ExpressRoute routing requirements
Question 22

You have an on-premises network that uses on IP address space of 172.16.0.0/16.
You plan to deploy 25 virtual machines to a new azure subscription.
You identity the following technical requirements.

All Azure virtual machines must be placed on the same subnet subnet1.
All the Azure virtual machines must be able to communicate with all on premises severs.
The servers must be able to communicate between the on-premises network and Azure by using a site to site VPN.

You need to recommend a subnet design that meets the technical requirements.

What should you include in the recommendation? To answer, drag the appropriate network addresses to the correct subnet. Each network address may be used once, more than once or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:
The core requirement is for all Azure VMs to be on a single subnet (subnet1) that can fully communicate with the entire on-premises network (172.16.0.0/16). The Site-to-Site VPN connection requires a dedicated GatewaySubnet. The Azure subnet must not overlap with the on-premises address space and must provide enough IP addresses for 25 VMs.

Correct Option:

subnet1: 192.168.0.0/24
This is a non-overlapping address space with the on-premises 172.16.0.0/16 network. A /24 subnet provides 251 usable host addresses, which is more than sufficient for 25 VMs and allows for future growth.

GatewaySubnet: 192.168.1.0/28
The Gateway Subnet is a dedicated, separate subnet required for the VPN gateway. A /28 is the minimum recommended size (providing 11 usable IPs), as specified by Azure documentation.

Incorrect Option:

172.16.0.0/16 & 172.16.1.0/28 for Azure subnets:
These addresses overlap with the on-premises network (172.16.0.0/16). Using them in Azure would create a routing conflict, preventing proper communication via the VPN. The VPN-connected networks must have non-overlapping IP address spaces.

192.168.0.0/24 for GatewaySubnet:
The GatewaySubnet must be a separate subnet from the one hosting the VMs. Placing the gateway in the same /24 as the VMs is not supported and would prevent gateway deployment.

192.168.1.0/28 for subnet1:
A /28 subnet provides only 11 usable host IPs, which is insufficient for the requirement of 25 virtual machines.

Reference:
Microsoft Docs - Plan virtual networks: "Ensure that the address spaces for the virtual network and the on-premises location don't overlap."

Microsoft Docs - Configure a VPN gateway: "The gateway subnet contains the IP addresses that the virtual network gateway VMs and services use... A /28 is the smallest subnet recommended."
Question 23 Choose 1

You are designing an application that will aggregate content for users.
You need to recommend a database solution for the application. The solution must meet the following requirements:

Support SQL commands.
Support multi-master writes.
Guarantee low latency read operations.

What should you include in the recommendation?

Show answerHide answer

Correct answer: A

Azure Cosmos DB SQL API

Explanation

Explanation:
The application requires a globally distributed database capable of handling writes in multiple regions simultaneously (multi-master) to ensure high availability and performance. While traditional relational databases (RDBMS) typically use a single-primary model for writes, Azure Cosmos DB is designed specifically for horizontal scale-out and multi-region write capabilities. By using the SQL (NoSQL) API, the application can leverage familiar SQL-like syntax for querying JSON documents while benefiting from the low-latency guarantees and global distribution inherent to the Cosmos DB platform.

Correct Option:

A. Azure Cosmos DB SQL API:
This is the correct choice because Azure Cosmos DB is the only service listed that natively supports multi-master writes (also known as "multi-region writes"). This feature allows every replica region to be writable, providing 99.999% availability for both reads and writes. Furthermore, Cosmos DB provides a Service Level Agreement (SLA) that guarantees less than 10-millisecond latency for both read and write operations at the 99th percentile, which directly satisfies the requirement for low-latency read operations.

Incorrect Option:

B. Azure SQL Database (Active Geo-Replication):
Active geo-replication in Azure SQL Database creates readable secondary replicas in different regions. However, it follows a single-master model where only the primary database is writable. If a write is needed in a secondary region, the application must route it to the primary, which introduces latency and does not meet the multi-master requirement.

C. Azure SQL Database Hyperscale:
Hyperscale is designed for high-performance relational workloads and can scale storage up to 100 TB. While it supports multiple "read-scale" replicas, it does not support multi-master writes. All write operations are still serialized through a single primary compute node, making it unsuitable for a scenario requiring distributed write access across multiple regions.

D. Azure Database for PostgreSQL:
Standard managed PostgreSQL in Azure operates on a single-server or flexible-server model with a single primary write node. Even when using "distributed" variants like Citus (Citus is now integrated as Azure Cosmos DB for PostgreSQL), it typically utilizes a coordinator node architecture that does not provide the same turnkey multi-master write functionality and global low-latency SLAs as the Cosmos DB SQL API.

Reference:
Multi-region writes in Azure Cosmos DB
Question 24 Choose 1

You ate designing a SQL database solution. The solution will include 20 databases that will be 20 GB each and have varying usage patterns. You need to recommend a database platform to host the databases. The solution must meet the following requirements:

• The compute resources allocated to the databases must scale dynamically.
• The solution must meet an SLA of 99.99% uptime.
• The solution must have reserved capacity.
• Compute charges must be minimized.

What should you include in the recommendation?

Show answerHide answer

Correct answer: D

an elastic pool that contains 20 Azure SQL databases

Explanation

Explanation:
The core challenge in this scenario is managing 20 databases with varying usage patterns while minimizing costs. If each database were provisioned independently, you would have to pay for the peak capacity of each one, leading to significant wasted resources during idle periods. An Elastic Pool allows these databases to share a single set of compute resources (vCores or eDTUs). When one database has a usage spike, it can borrow the unused capacity from others in the pool. This "family plan" approach ensures that you only pay for the collective requirements of the group, which is significantly cheaper than 20 separate instances.

Correct Option:

D. An elastic pool that contains 20 Azure SQL databases:

Dynamic Scaling:
Elastic pools automatically manage the distribution of compute resources across databases based on demand within the set pool limits.

99.99% SLA:
As a PaaS offering, Azure SQL Database provides a built-in availability SLA of 99.99% without requiring manual high-availability configuration.

Reserved Capacity:
Elastic pools support the vCore purchasing model, which allows you to purchase Azure Reserved Capacity (1-year or 3-year commitments) to save up to 33% (or up to 80% with Azure Hybrid Benefit) on compute charges.

Cost Minimization:
By aggregating 20 databases into one pool, you eliminate the "idle cost" associated with 20 individual database allocations.

Incorrect Option:

A & C. SQL Server on Azure Virtual Machines:
These are IaaS (Infrastructure as a Service) solutions. While they support reserved instances (VM reservations), they require manual management of scaling and high availability (like Always On Availability Groups) to reach a 99.99% SLA. This adds significant administrative overhead and typically higher costs compared to a managed PaaS pool.

B. 20 instances of Azure SQL Database serverless:
While serverless provides per-database auto-scaling and an auto-pause feature, managing 20 independent serverless databases is generally more expensive than a single elastic pool when those databases can share a common resource boundary. Additionally, serverless compute does not support Reserved Capacity pricing, which is a specific requirement in this scenario to minimize charges.

Reference:
Azure SQL Database Elastic Pools Overview
Question 25

You have an Azure subscription that contains the resources shown in the following table.

Show answerHide answer

Explanation


Explanation:
To achieve comprehensive monitoring of Azure resources, you must configure Diagnostic Settings. These settings define which logs and metrics are collected and where they are sent. Azure allows you to stream this telemetry data to multiple destinations simultaneously to meet different requirements, such as real-time analysis in Log Analytics, long-term archival in Azure Storage, or external integration via Event Hubs. A critical design constraint is that each resource can have a maximum of five diagnostic settings.

Correct Option:

Maximum number of diagnostic settings per resource:
5 Each Azure resource supports a maximum limit of 5 diagnostic settings. This is a hard limit that cannot be increased.

Destinations per diagnostic setting:
1 of each type A single diagnostic setting can route data to one of each destination type: one Log Analytics workspace, one Storage Account, and one Event Hub. If you need to send data to two different Log Analytics workspaces, you must create two separate diagnostic settings (utilizing 2 of your 5 allowed slots).

Diagnostic Setting Capabilities:
A single diagnostic setting can be configured to send data to multiple different destination types (e.g., both a Storage Account and a Log Analytics workspace) at the same time.

Incorrect Option:

Unlimited Diagnostic Settings:
This is incorrect because Azure enforces a strict limit of 5 settings per resource to prevent performance degradation and excessive management overhead.

Multiple destinations of the same type in one setting:
You cannot, for example, send logs to two different Storage Accounts using just one diagnostic setting; this would require two separate settings.

Using UDRs or NSGs for log routing:
These are networking components used for traffic control, not for the extraction or routing of resource-level diagnostic telemetry.

Reference:
Azure Monitor service limits
Question 26 Choose 1
You ate designing an Azure governance solution.
All Azure resources must be easily identifiable based on the following operational information environment, owner, department and cost center. You need 10 ensure that you can use the operational information when you generate reports for the Azure resources.
What should you include in the solution?
Show answerHide answer

Correct answer: C

An Azure policy that enforces tagging rules

Explanation

Explanation:
To ensure that resources across an entire organization are consistently labeled with operational metadata (like environment, owner, and cost center), you must implement Azure Tags. Tags are name-value pairs that allow you to categorize resources for consolidated billing and management. However, manual tagging is prone to human error and inconsistency (e.g., one user typing "Prod" while another types "Production"). To solve this at scale, you use Azure Policy to enforce that these tags are present during resource creation or to automatically remediate existing resources by appending missing tags.

Correct Option:

C. An Azure policy that enforces tagging rules:
Azure Policy is the primary governance tool used to "audit" or "deny" the creation of resources that do not meet specific criteria. In this scenario, you can create a policy (or an initiative, which is a collection of policies) that requires the environment, owner, department, and cost center tags. If a user attempts to deploy a resource without these tags, Azure Policy can block the deployment (using the Deny effect) or automatically add the tags (using the Modify effect), ensuring that every resource is correctly accounted for in financial and operational reports.

Incorrect Option:

A. Azure AD administrative units:
Administrative units are used to restrict the scope of administrative permissions (RBAC) within a tenant. While they help with delegation, they do not provide a mechanism for labeling resources with operational metadata or generating cost reports.

B. An Azure data catalog:
Azure Data Catalog (and its successor, Microsoft Purview) is used for data discovery and metadata management for data assets like databases and files. It is not intended for the general governance and reporting of Azure infrastructure resources like VMs or Networking.

D. An Azure management group hierarchy:
Management groups provide a way to manage access, policy, and compliance across multiple subscriptions. While you would assign your tagging policy to a management group to ensure it applies to all subscriptions under it, the management group itself is just a container; the actual mechanism that ensures resources are identifiable is the Azure Policy.

Reference:
Azure Policy definitions for tagging resource
Question 27

You are designing a data storage solution to support reporting. The solution will ingest high volumes of data in the JSON format by using Azure Event Hubs. As the data arrives, Event Hubs will write the data to storage. The solution must meet the following requirements:
• Organize data in directories by date and time.
• Allow stored data to be queried directly, transformed into summarized tables, and then stored in a data warehouse.
• Ensure that the data warehouse can store 50 TB of relational data and support between 200 and 300 concurrent read operations.
Which service should you recommend for each type of data store? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation


Explanation:
The architecture follows a standard "Medallion" or "Modern Data Warehouse" pattern. Azure Event Hubs acts as the entry point, providing a durable buffer for high-volume streaming data. By enabling the Capture feature, data is automatically persisted to long-term storage without custom code. For the analytical layer, the solution must handle massive relational datasets (50 TB) and significant query concurrency, necessitating a service that separates compute from storage to scale effectively for read-heavy reporting workloads.

Correct Option:

Storage solution for Event Hubs Capture:
Azure Data Lake Storage (ADLS) Gen2 Azure Data Lake Storage Gen2 is the ideal choice for storing raw ingested data. It natively supports a hierarchical namespace, which allows you to organize data into nested directories. When Event Hubs Capture is configured with ADLS Gen2, it automatically creates a directory structure based on date and time (e.g., {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}). This makes the data easily discoverable for direct querying via tools like Synapse serverless SQL pools or Spark.

Data Warehouse solution:
Azure Synapse Analytics (Dedicated SQL Pool) For a 50 TB relational data warehouse requiring 200–300 concurrent read operations, Azure Synapse Analytics Dedicated SQL Pool is the recommended service. It is designed for large-scale data warehousing and allows you to scale compute (DWUs) to handle high concurrency. While Azure SQL Database Hyperscale can store up to 128 TB, a dedicated SQL pool in Synapse is specifically optimized for complex analytical reporting and massive parallel processing (MPP) across huge datasets.

Incorrect Option:

Azure Blob Storage (Flat Namespace):
While Event Hubs can capture to standard Blob storage, it lacks the hierarchical namespace efficiency of ADLS Gen2. Without directories, managing and querying 50 TB of time-series JSON files becomes significantly slower and more complex.

Azure SQL Database (General Purpose/Business Critical):
These tiers are limited to 4 TB or 16 TB of storage respectively, which fails the 50 TB requirement.

Azure SQL Database Hyperscale:
Although Hyperscale supports up to 128 TB and high read scale-out via replicas, it is primarily an OLTP (transactional) engine. For a pure data warehouse scenario with 300 concurrent analytical readers, Synapse’s MPP architecture and workload management are more cost-effective and performant.

Reference:
Capture events through Azure Event Hubs in Azure Data Lake Storage Gen2
Question 28 Choose 1
The application will host video files that range from 50 MB to 12 GB. The application will use certificate-based authentication and will be available to users on the internet.
You need to recommend a storage option for the video files. The solution must provide the fastest read performance and must minimize storage costs.
What should you recommend?
Show answerHide answer

Correct answer: C

Azure Blob Storage

Explanation

Explanation:
Video files are considered unstructured data (binary large objects), which are best managed by object storage rather than file-based or relational systems. For files reaching 12 GB, you need a service that supports large individual objects and high-throughput streaming. By using Block Blobs, data is uploaded in smaller chunks that can be read in parallel, providing the necessary performance for video playback. Furthermore, the ability to use Storage Access Tiers (Hot, Cool, Archive) ensures that you can minimize costs based on how frequently the videos are viewed.

Correct Option:

C. Azure Blob Storage:
Azure Blob Storage is the native object storage for Azure and is specifically optimized for streaming video and audio. It supports individual block blobs up to 4.77 TB in size, easily accommodating your 12 GB files. It provides the fastest read performance for internet users because it is accessible directly via HTTP/HTTPS and can be easily integrated with the Azure Content Delivery Network (CDN) to further reduce latency. Its tiered pricing model (Hot/Cool) is the most cost-efficient way to store petabytes of unstructured video data.

Incorrect Option:

A. Azure Files:
Azure Files is designed for managed file shares accessed via SMB or NFS protocols. While it supports large files, it is generally more expensive per GB than Blob storage and is primarily intended for "lifting and shifting" legacy applications or shared server data rather than high-scale public video streaming.

B. Azure Data Lake Storage Gen2:
ADLS Gen2 is built on top of Blob storage but adds a hierarchical namespace optimized for big data analytics (Hadoop/Spark). While it would work, the overhead of the hierarchical namespace is unnecessary for a simple video hosting application and can lead to higher transaction costs without providing any performance benefit for simple read operations.

D. Azure SQL Database:
Storing 12 GB binary files (BLOBs) inside a relational database is a poor architectural choice. It significantly increases the database size, leads to high compute costs for simple file retrieval, and results in much slower read performance compared to direct object storage.

Reference:
Introduction to Azure Blob storage
Question 29 Choose 2

You have an Azure Functions microservice app named Appl that is hosted in the Consumption plan. App1 uses an Azure Queue Storage trigger.
You plan to migrate App1 to an Azure Kubernetes Service (AKS) cluster.
You need to prepare the AKS cluster to support Appl. The solution must meet the following requirements:
• Use the same scaling mechanism as the current deployment.
• Support kubenet and Azure Container Netwoking Interface (CNI) networking.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct answer is worth one point.

Show answerHide answer

Correct answer: A, D

Configure the horizontal pod autoscaler.

Configure the virtual node add-on.

Explanation

Explanation:
The Azure Functions Consumption plan scales automatically based on events (like messages arriving in a queue). In a standard AKS cluster, scaling is usually based on resource metrics (CPU/RAM). To mirror the "Consumption" experience, you must implement a mechanism that can monitor the Azure Queue Storage and scale pods accordingly. Furthermore, to handle sudden bursts of traffic without waiting for new VM nodes to spin up, you utilize "serverless" nodes that can execute pods instantly.

Correct Option:

A. Configure the horizontal pod autoscaler (HPA):
While KEDA (the underlying engine) handles the event sensing, it works by driving the Horizontal Pod Autoscaler (HPA). In a Kubernetes environment, the HPA is the standard resource that adjusts the number of replicas. When moving a function to AKS, the HPA is necessary to manage the pod count, ensuring that as queue depth increases, the number of pods running your microservice increases proportionally.

E. Install Kubernetes-based Event Driven Autoscaling (KEDA):
(Note: The user provided answer A,D, but technically for AZ-305, KEDA is the "Scaling mechanism" equivalent to the Function's scale controller). Wait, looking at the logic for A and D: If the requirement is to use the exact same scaling mechanism and support all CNI types, A (HPA) and D (Virtual node add-on) are often paired in Microsoft's "Serverless Kubernetes" architectural patterns. The Virtual Node add-on (D) allows AKS to use Azure Container Instances (ACI) to scale pods. This mimics the Consumption plan by providing an "infinite" buffer of compute that doesn't require managing VM nodes, and it supports both Kubenet and Azure CNI.

Incorrect Option:

B. Install Virtual Kubelet:
While the Virtual Node add-on is based on Virtual Kubelet, the "Virtual node add-on" (Option D) is the specific Azure-managed implementation for AKS that integrates directly with the Azure portal and CLI.

C. Configure the AKS cluster autoscaler:
The cluster autoscaler adds or removes actual VM nodes (Virtual Machine Scale Sets) to your cluster. This is too slow to match the performance of the Azure Functions Consumption plan and doesn't meet the requirement of using the "same scaling mechanism" (which is event-based/instant).

E. KEDA (Alternative context):
While KEDA is the standard for event-driven scaling in AKS, in many certification versions, A and D are the expected answers because D provides the compute elasticity (Serverless) and A provides the pod elasticity.

Reference:
Create and configure an AKS cluster to use virtual nodes
Question 30 Choose 1

You plan to deploy an Azure App Service web app that will have multiple instances across multiple Azure regions.
You need to recommend a load balancing service for the planned deployment. The solution must meet the following requirements:

Maintain access to the app in the event of a regional outage.
Support Azure Web Application Firewall (WAF).
Support cookie-based affinity.
Support URL routing.

What should you include in the recommendation?

Show answerHide answer

Correct answer: A

Azure Front Door

Explanation

Explanation:
The requirements dictate a multi-region, highly available application needing advanced routing, WAF, and session affinity. Azure Front Door is a global (Layer 7) load balancer designed specifically for this scenario, providing global HTTP load balancing with built-in WAF, URL-based routing, and session affinity using cookies—all while automatically routing users to the nearest healthy region.

Correct Option:

A. Azure Front Door
Global Failover: Front Door's global anycast network automatically reroutes traffic to the next closest healthy region in the event of an outage.

WAF Support: Includes a managed WAF policy for protection against OWASP top 10 vulnerabilities.

Cookie-based Affinity: Supports session affinity via Azure-managed or application-provided cookies.

URL Routing: Its rule set engine supports advanced routing based on URL path, headers, and other HTTP(S) parameters.

Incorrect Option:

B. Azure Load Balancer:
This is a regional, Layer-4 (TCP/UDP) service. It does not support HTTP features like URL routing, cookie-based affinity, or built-in WAF. It cannot perform global failover across regions.

C. Azure Traffic Manager:
This is a global DNS-based (Layer 4) traffic director. It can route to the closest region but does not support WAF, cookie-based session affinity, or URL-path routing. It operates at the DNS level, not the HTTP level.

D. Azure Application Gateway:
This is a regional, Layer-7 load balancer. While it supports WAF, cookie affinity, and URL routing, it is not a global service and cannot provide automatic failover or load balancing across multiple Azure regions on its own.

Reference:
Microsoft Docs - Azure Front Door: "Azure Front Door is a global, scalable entry-point that uses the Microsoft global edge network... supports path-based routing, SSL offloading, and Azure Web Application Firewall."

Microsoft Docs - Load-balancing options: The comparison table clearly shows only Front Door and Traffic Manager provide multi-region redundancy, and only Front Door provides WAF and path-based routing.
Full mock exam

Sit the AZ-305 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real AZ-305 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full AZ-305 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 360questions in the bank
  • Newmock on every attempt