AZ-104 Implement and Manage Virtual Networking Practice Question
You need to expose a web application running on several VMs and distribute traffic across them based on HTTP request attributes such as URL path. Which service should you use?
⚠ Common exam trap
A common mix-up: candidates confuse Azure Load Balancer (Layer 4) with Application Gateway (Layer 7), assuming any load balancer can route based on HTTP attributes, but only Application Gateway can inspect and route based on URL paths, host headers, or query strings.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Azure Application Gateway
Azure Application Gateway is a Layer 7 load balancer that can route traffic based on HTTP request attributes such as URL path, host headers, or query strings. This allows you to distribute incoming web traffic across multiple VMs based on the specific URL path (e.g., /images to one backend pool, /api to another), which is exactly what the question requires.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Azure Load Balancer
Why it's wrong here
Azure Load Balancer operates at Layer 4 of the network stack, forwarding TCP and UDP traffic based on source IP, destination IP, and port. It does not examine HTTP headers, URLs, or other application-layer data, so it is incapable of path-based routing. It simply spreads all traffic arriving on a port evenly across the backend pool VMs without regard to the request content.
When this WOULD be correct
When you need to distribute incoming network traffic across multiple VMs or virtual machine scale sets within a region for high availability, using only TCP/UDP protocols without inspecting HTTP content.
- ✓
Azure Application Gateway
Why this is correct
Azure Application Gateway is a Layer 7 web traffic load balancer that inspects HTTP requests and can route them based on URL paths, host headers, and query strings. It supports path-based routing, allowing you to direct /api traffic to one backend pool and /images to another. Additional features like SSL termination, cookie-based session affinity, and Web Application Firewall (WAF) make it ideal for web applications on multiple VMs.
- ✗
Traffic Manager
Why it's wrong here
Traffic Manager works at the DNS level by resolving a domain name to a specific endpoint based on routing methods like performance, priority, or geographic. It never sees the actual HTTP request, let alone its URL path, so it cannot make application-aware routing decisions. It directs clients to different regions or endpoints but cannot distribute paths across VMs within a single web application.
When this WOULD be correct
You need to distribute traffic across multiple Azure regions based on endpoint health or performance, and you want to route users to the closest or most responsive region. Traffic Manager is the correct choice for global DNS-based traffic routing.
- ✗
Network Watcher
Why it's wrong here
Network Watcher is a diagnostic and monitoring service, not a traffic distribution appliance. It provides tools like packet capture, NSG flow logs, and connection troubleshoot to analyze network health, but it does not intercept or route incoming HTTP traffic. Therefore, it cannot distribute load across VMs or inspect request paths.
When this WOULD be correct
You need to monitor network performance, diagnose connectivity issues, or capture packet traces for a virtual network. For example, 'You need to identify a connectivity issue between two VMs in different subnets' would make Network Watcher correct.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Azure Application GatewayCorrect answer▾
Why this is correct
Azure Application Gateway is a Layer 7 web traffic load balancer that inspects HTTP requests and can route them based on URL paths, host headers, and query strings. It supports path-based routing, allowing you to direct /api traffic to one backend pool and /images to another. Additional features like SSL termination, cookie-based session affinity, and Web Application Firewall (WAF) make it ideal for web applications on multiple VMs.
✗Azure Load BalancerWrong answer — click to see why▾
Why this is wrong here
Azure Load Balancer operates at Layer 4 (transport layer) and distributes traffic based on IP address and port, not HTTP request attributes like URL path. It cannot perform content-based routing.
★ When this WOULD be the correct answer
When you need to distribute incoming network traffic across multiple VMs or virtual machine scale sets within a region for high availability, using only TCP/UDP protocols without inspecting HTTP content.
Why candidates choose this
Candidates may confuse load balancing at Layer 4 with Layer 7, assuming all load balancers can route based on HTTP attributes, or they may not be aware of the specific capabilities of Azure Application Gateway.
✗Traffic ManagerWrong answer — click to see why▾
Why this is wrong here
Traffic Manager operates at the DNS level, distributing traffic based on domain name resolution, not HTTP request attributes like URL path. It cannot inspect or route based on HTTP-level details.
★ When this WOULD be the correct answer
You need to distribute traffic across multiple Azure regions based on endpoint health or performance, and you want to route users to the closest or most responsive region. Traffic Manager is the correct choice for global DNS-based traffic routing.
Why candidates choose this
Candidates may confuse Traffic Manager with a load balancer that can handle HTTP traffic, but its DNS-level routing lacks the application-layer awareness needed for URL path-based distribution.
✗Network WatcherWrong answer — click to see why▾
Why this is wrong here
Network Watcher is a monitoring and diagnostics service for Azure networks, not a traffic distribution service. It cannot route or load balance HTTP traffic based on request attributes.
★ When this WOULD be the correct answer
You need to monitor network performance, diagnose connectivity issues, or capture packet traces for a virtual network. For example, 'You need to identify a connectivity issue between two VMs in different subnets' would make Network Watcher correct.
Why candidates choose this
Candidates may confuse Network Watcher with a network traffic management tool due to its name, or think it can handle traffic distribution because it deals with network-level operations.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
Learn chapter
VPN Gateway and ExpressRoute
Key term
Route
A route is a path that data takes through a network from one device or network to another, determined by routing protocols and configured rules.
Key term
Application Gateway
An Application Gateway is a network device or cloud service that manages and secures traffic between users and web applications by applying rules, routing requests, and offloading tasks like SSL encryption.
About these practice questions
Courseiva writes every AZ-104 question from scratch — 1,049 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.