Network Security, Performance and Load Balancing
AZ-305 AZ-305 · Design infrastructure solutions
The final networking guide covers the services that stand between users and your application: the load balancers that distribute traffic, the firewalls that filter it, and the edge services that accelerate it. AZ-305 tests these as a decision matrix — global vs regional, layer 4 vs layer 7, HTTP vs non-HTTP — and expects you to pick the right service for each scenario.
The load balancing decision tree
Azure offers four load balancing services, and the exam tests the choice between them relentlessly. Azure Front Door is the global layer-7 load balancer: anycast routing to the nearest healthy endpoint, TLS termination, WAF, caching, and instant global failover. Choose it for global HTTP(S) applications needing the lowest latency and fastest failover. Azure Traffic Manager is the DNS-based global load balancer: it resolves users to the best endpoint by routing method (priority, geographic, performance, weighted, multivalue) but failover depends on DNS TTL, so it is slower than Front Door. Choose it for non-HTTP global traffic or when DNS-based routing is sufficient. Azure Application Gateway is the regional layer-7 load balancer: path-based and host-based routing, TLS termination, session affinity, and an integrated Web Application Firewall (WAF). Choose it for regional HTTP(S) applications needing layer-7 routing or WAF. Azure Load Balancer is the regional layer-4 load balancer: it distributes TCP/UDP traffic to VMs and scale sets with health probes and high throughput. Choose it for non-HTTP workloads or internal load balancing. The decision flow: global or regional? HTTP or non-HTTP? Layer 7 features needed? The answers point to exactly one service.
Front Door vs Traffic Manager vs Application Gateway
The most-tested comparison is Front Door vs Traffic Manager. Both are global, but Front Door operates at the edge with anycast (users connect to the nearest Microsoft edge point, then travel over Microsoft's backbone), giving lower latency and instant failover; Traffic Manager operates at DNS level (users resolve to an endpoint's IP), so failover waits for DNS TTL expiry and traffic crosses the public internet. Front Door is the modern recommendation for HTTP(S) applications. Application Gateway vs Load Balancer is the regional equivalent: Application Gateway understands HTTP (URL paths, hostnames, cookies, TLS); Load Balancer only understands TCP/UDP. A classic exam scenario: "route /images to one backend pool and /api to another" is Application Gateway (path-based routing); "distribute SQL traffic across VMs" is Load Balancer (layer 4).
Azure Firewall and network security
Azure Firewall is the managed stateful firewall-as-a-service for the hub VNet: network rules (IP/port), application rules (FQDN filtering for HTTP/S), NAT rules (inbound port forwarding), and, in the Premium tier, TLS inspection, intrusion detection and prevention (IDPS), and URL filtering. It is zone-redundant by default and scales automatically. Network security groups (NSGs) are the distributed packet filter at subnet/NIC level — use them for micro-segmentation within VNets. Azure DDoS Protection (Network Protection plan) adds adaptive tuning, attack analytics, and cost protection for public endpoints beyond the always-on basic DDoS mitigation. Azure Bastion provides secure RDP/SSH access to VMs through the browser over TLS, without public IPs on the VMs — the answer whenever a scenario asks for secure VM administration. NAT Gateway provides managed outbound internet connectivity for VMs in a subnet with a static public IP (or IP prefix), solving the SNAT port exhaustion problem that affects large scale sets using the default outbound access.
Web Application Firewall and content delivery
Azure Web Application Firewall (WAF) protects web applications from common attacks — SQL injection, cross-site scripting, and the OWASP Top 10 — and is available on Application Gateway and Front Door. Deploy WAF in Detection mode first to observe what would be blocked, then switch to Prevention mode — the same measure-then-enforce pattern as Azure Policy. Custom rules can block by geography, IP, or request pattern, and bot protection rules filter automated traffic. Azure CDN (now part of Front Door's capabilities, with the standalone CDN offering) caches static content at edge locations close to users, reducing latency and origin load. For global applications, Front Door plus CDN caching is the standard performance design.
Optimising network performance
Performance levers the exam expects: proximity placement groups (co-locate VMs for low-latency communication), accelerated networking (SR-IOV for lower latency and higher throughput on VMs), ExpressRoute for consistent hybrid latency, Front Door for global user latency, and private endpoints to keep PaaS traffic on the Microsoft backbone. For high-throughput storage access, service endpoints or private endpoints avoid internet routing. The design principle: keep traffic on Microsoft's backbone wherever possible, cache at the edge, and place compute close to its data and its users.
Global traffic management patterns
Global applications need a traffic strategy, not just a load balancer. The active-active pattern runs all regions live behind Front Door, routing users to the nearest healthy region — the best latency and fastest failover, but it requires multi-region data. The active-passive pattern runs one primary region with a hot standby, failing over on health-probe failure — simpler data requirements, but failover takes time and the standby costs money while idle. The geo-routing pattern sends users to a specific region by geography (Traffic Manager geographic routing or Front Door rules engine) — useful for data residency requirements where EU users must be served from EU regions. Blue-green across regions deploys a new version to a second region and shifts traffic gradually, giving instant rollback. Canary routing sends a small percentage of traffic to a new deployment to validate it before full rollout. The exam tests these as design choices: data residency points to geo-routing, lowest latency points to active-active, simplicity points to active-passive. Whatever the pattern, health probes are the foundation — a global load balancer can only fail over to a healthy endpoint if it knows which endpoints are healthy.
TLS and certificate management
TLS termination is where load balancers meet security. Front Door and Application Gateway both terminate TLS, offloading the cryptographic work from backend servers and letting you manage certificates in one place — ideally Azure Key Vault, with automatic rotation. For end-to-end encryption, re-encrypt traffic from the load balancer to the backend (both services support backend TLS with trusted certificates). Use managed certificates where available (Front Door and App Service offer free managed certificates for custom domains) to eliminate manual renewal. Enforce minimum TLS versions (TLS 1.2 or higher) on all public endpoints, and use Azure Policy to audit for endpoints that allow older versions. In exam scenarios, "centralise certificate management with automatic renewal" points to Key Vault integration, and "encrypt traffic end to end" means TLS termination plus backend re-encryption — not TLS termination alone.
Exam traps to watch for
- Choosing Traffic Manager when the scenario needs instant global failover for HTTP — Front Door's anycast failover is immediate; Traffic Manager waits on DNS TTL.
- Choosing Load Balancer for path-based HTTP routing — layer-4 balancers cannot inspect URLs; that is Application Gateway.
- Deploying WAF straight into Prevention mode — run Detection mode first to see what would be blocked.
- Giving VMs public IPs for management access — Bastion provides secure RDP/SSH without exposing VMs to the internet.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A global e-commerce site runs in three regions and needs users routed to the nearest healthy region with instant failover if a region fails. Which service should the architect recommend?
Explanation: Front Door uses anycast to route users to the nearest Microsoft edge point and fails over instantly at the edge when an endpoint becomes unhealthy — the fastest global failover for HTTP(S). Option D is wrong because Traffic Manager failover depends on DNS TTL, so it is slower. Option A is wrong because Application Gateway is a regional load balancer, not global. Option C is wrong because Load Balancer is regional and layer 4.
Exam objective: AZ-305 Domain 4: Design network solutions
Q2.A regional web application needs requests to /images/* routed to a storage-backed pool and requests to /api/* routed to an App Service pool, with TLS termination and WAF protection. Which service should the architect recommend?
Explanation: Application Gateway is the regional layer-7 load balancer with path-based routing, TLS termination, and an integrated WAF — matching every requirement. Option D is wrong because Load Balancer is layer 4 and cannot route by URL path. Option A is wrong because Traffic Manager is DNS-based global routing with no path-based rules or WAF. Option C is wrong because Front Door is global; the scenario is regional and Application Gateway is the regional answer.
Exam objective: AZ-305 Domain 4: Design network solutions
Q3.A company runs a custom TCP-based game server on VMs in one region and needs to distribute connections across the VMs with health checks. Which service should the architect recommend?
Explanation: Standard Load Balancer distributes layer-4 TCP/UDP traffic to VMs with health probes — the right tool for a non-HTTP regional workload. Option A is wrong because Application Gateway is HTTP-only (layer 7). Option B is wrong because Front Door is for global HTTP(S) traffic. Option D is wrong because API Management is an API gateway, not a TCP load balancer.
Exam objective: AZ-305 Domain 4: Design network solutions
Q4.A company wants to protect its web application from SQL injection and cross-site scripting attacks. It already uses Azure Front Door. What should the architect recommend?
Explanation: WAF on Front Door inspects HTTP requests for SQL injection, XSS, and OWASP Top 10 attacks; starting in Detection mode lets the team observe what would be blocked before enforcing. Option B is wrong because NSGs filter network traffic, not HTTP request content. Option A is wrong because Azure Firewall is a network firewall; it does not inspect HTTP payloads for web attacks. Option C is wrong because DDoS Protection defends against volumetric attacks, not application-layer injection.
Exam objective: AZ-305 Domain 4: Design network solutions
Q5.Administrators need RDP access to VMs in a private subnet. The security team forbids public IP addresses on the VMs and forbids opening RDP ports to the internet. What should the architect recommend?
Explanation: Azure Bastion provides RDP/SSH access through the browser over TLS, with no public IP on the VMs and no RDP port exposed to the internet. Option A is wrong because a jump box still exposes a public IP and an RDP port. Option B is wrong because per-admin VPNs are heavyweight and do not remove the need for RDP access. Option D is wrong because a NAT rule would expose RDP to the internet, violating the requirement.
Exam objective: AZ-305 Domain 4: Design network solutions
Q6.A Virtual Machine Scale Set with 500 instances is experiencing outbound connection failures because of SNAT port exhaustion. What should the architect recommend?
Explanation: NAT Gateway provides managed outbound connectivity with a large pool of SNAT ports from a public IP prefix, solving port exhaustion for large scale sets. Option D is wrong because 500 public IPs are unmanageable and wasteful. Option C is wrong because accelerated networking improves throughput and latency, not SNAT port availability. Option A is wrong because availability sets address fault tolerance, not outbound connectivity.
Exam objective: AZ-305 Domain 4: Design network solutions
Q7.A company needs a firewall in its hub VNet that filters outbound traffic by fully qualified domain name, inspects TLS traffic, and detects intrusions. Which Azure Firewall tier should the architect recommend?
Explanation: Only the Premium tier provides TLS inspection and intrusion detection and prevention (IDPS); Standard supports FQDN filtering but not TLS inspection or IDPS. Option D is wrong because Basic is a cut-down tier for small environments without these features. Option A is wrong because Standard lacks TLS inspection and IDPS. Option B is wrong because Azure Firewall has Basic, Standard, and Premium tiers.
Exam objective: AZ-305 Domain 4: Design network solutions
Q8.A company serves large static files to users worldwide and wants to reduce latency and origin load. Which design should the architect recommend?
Explanation: Front Door caches content at Microsoft edge locations close to users, reducing latency and origin load with a single global entry point. Option B is wrong because a single-region origin forces distant users to cross the internet for every request. Option C is wrong because Traffic Manager routes DNS to origins; it does not cache content at the edge. Option D is wrong because manual multi-region replication is operationally heavy and still lacks edge caching.
Exam objective: AZ-305 Domain 4: Design network solutions
Q9.A company needs to distribute non-HTTP global traffic (a custom UDP protocol) across endpoints in two regions, routing users to the nearest endpoint. Which service should the architect recommend?
Explanation: Traffic Manager is DNS-based and protocol-agnostic, so it can route non-HTTP traffic globally; the performance routing method sends users to the lowest-latency endpoint. Option D is wrong because Front Door is HTTP(S)-only. Option B is wrong because Application Gateway is regional and HTTP-only. Option C is wrong because Load Balancer is regional, not global.
Exam objective: AZ-305 Domain 4: Design network solutions