Home › Studies › AZ-700 › Application Delivery › Application Gateway

Application Gateway

v2 SKUs · autoscale · infrastructure · listeners · routing rules · backend settings · probes · TLS · rewrite rule sets

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Features, SKUs and use cases

Application Gateway is a layer 7 web traffic load balancer. It routes on HTTP request attributes such as URL path and host header, not just on IP address and port. It supports HTTP, HTTPS, HTTP/2 and WebSocket, and TLS and TCP through its layer 4 proxy.

SKUUse it forNotes
Basic (preview)Lower traffic and SLA requirements; no advanced traffic managementNo manual or autoscale modes (scales automatically to an estimated 200 connections per second). No TCP/TLS proxy, mTLS, AKS ingress or Private Link
Standard_v2Production workloads and high trafficAutoscaling or fixed capacity, zone redundancy, static VIP, Key Vault integration, header and URL rewrite, mTLS, Private Link, AKS ingress
WAF_v2Standard_v2 plus Web Application FirewallWAF inspects the entire request to detect and block threats
v1 (Standard, WAF)RetiredRetired on April 28, 2026 and no longer supported. Migrate to v2

Subnet, frontend IP, backend pool and NSGs

NSG and route table rules for the gateway subnet

RuleDetails
Inbound: client trafficAllow clients to the subnet prefix on the listener ports (public and private frontend IPs as destination when both share a port)
Inbound: GatewayManagerAllow the GatewayManager tag on TCP 65200-65535 (v2) or 65503-65534 (v1) for the backend health communication
Inbound: AzureLoadBalancerAllow the AzureLoadBalancer tag. Don't override it with a Deny rule
Also reservedTCP 65502 and 54321, and UDP 12345, are used for platform health monitoring and operations
OutboundAllow outbound to the internet. Don't create NSG rules that deny outbound connectivity
UDRs (v2)Supported: disable BGP route propagation; 0.0.0.0/0 to the internet; AKS kubenet routes. Not supported: 0.0.0.0/0 through a virtual appliance, hub/spoke or on-premises (forced tunneling). A UDR might make backend health show Unknown and break logs and metrics

Manual or autoscale, and zone redundancy

AutoscalingManual
InstancesYou set a minimum (0 to 100) and optionally a maximumYou set a fixed count (1 to 125). The count is mandatory
Best forVariable traffic. Avoids guessing the size and paying for peak capacityConsistent, predictable workloads
RiskA minimum of 0 means no reserved capacity: purely autoscalingMore traffic than the gateway can handle can mean traffic loss
SKUsStandard_v2 and WAF_v2Standard_v2 and WAF_v2 (fixed capacity)

Listeners and routing rules

ListenerBehaviorNotes
BasicAccepts all requests for any domain on that IP and port and sends them to one backend poolSingle-site hosting
Multi-siteRoutes by host header or host names to different backend poolsOver 100 sites per gateway. Wildcard host names (*, ?) and up to 5 host names per listener on v2. No regular expressions. *.contoso.com doesn't match contoso.com
Rule typeRoutes byNotes
BasicEvery request on the listener goes to one backend pool with one HTTP settingCan also redirect
Path-basedURL path (the pattern ignores query parameters)Multiple pools and HTTP settings, plus a default pool and default setting for unmatched paths. Put least specific (wildcard) paths last. The full path is sent to the backend
Advanced (preview)HTTP request attributesNot supported for multi-site listeners or the layer 4 proxy

Backend settings and health probes

Backend settingDetails
Cookie-based affinityGateway-managed cookie, default name ApplicationGatewayAffinity, renameable. Gateways in line need unique names. Clients must support cookies. v2 can't append the domain to the cookie
Connection drainingOff: 30 seconds. On: 1 to 3,600 seconds (CLI --connection-draining-timeout; 0 disables). Gateway-managed session-affinity requests still go to deregistering instances
Protocol and portHTTP or HTTPS (HTTPS plus an HTTPS listener gives end-to-end TLS); port 1 to 65535
Trusted root certificateNeeded (.cer) for a private CA or self-signed backend certificate. Public CAs work by default
Request timeoutDefault 20 seconds. Private backend: 1 to 86,400 seconds. External backend: 1 to 240 seconds
Override backend pathOptional custom forwarding path used when the request is forwarded to the backend
Host namePick host name from backend address (use the pool's name, for multitenant App Service) or host name override. Keep the same host name end to end where you can
Dedicated backend connection1:1 frontend to backend connections for NTLM and Kerberos pass-through. Not supported with HTTP/2. Costs more connections and SNAT ports
ProbeDefault probeCustom probe
CreatedAutomatically when you set no custom probePer backend setting; only one custom probe per setting
Target<protocol>://127.0.0.1:<port>/, protocol and port from the backend settingYour host (also SNI on v2), path starting with /, protocol (must match the setting), port (v2)
TimingInterval 30 s, timeout 30 s, unhealthy threshold 3You set interval, timeout and threshold
HealthyStatus 200 to 399200 to 399, or your status codes or body string match (not a regex, 4090 characters or less)
Extras-MinServers: minimum servers always marked healthy (PowerShell, CLI or ARM only). Use with caution

TLS and rewrite rule sets

ModeHowCertificates
TLS terminationHTTPS listener decrypts; traffic to the backend can be unencrypted (HTTP setting)PFX with private key and the full chain on the listener. Wildcard cert for wildcard hosts; SAN cert for multiple hosts
End-to-end TLSHTTPS listener and HTTPS backend setting: gateway decrypts, applies rules, opens a new TLS connection and re-encryptsv2: trusted root certificate for a self-signed or private CA backend. Public CA certs with a matching CN need nothing; App Service and similar Azure services are trusted

Rewrite rule sets

CLI and PowerShell

TaskAzure CLIPowerShell
Create the public IP for the gatewayaz network public-ip create --resource-group myResourceGroupAG --name myAGPublicIPAddress --allocation-method Static --sku Standard-
Create a Standard_v2 application gatewayaz network application-gateway create --name myAppGateway --location eastus --resource-group myResourceGroupAG --capacity 2 --sku Standard_v2 --public-ip-address myAGPublicIPAddress --vnet-name myVNet --subnet myAGSubnet --servers "$address1" "$address2" --priority 100-
Check backend health-Get-AzApplicationGatewayBackendHealth -Name "appgw1" -ResourceGroupName "rgOne"
Stop the gatewayaz network application-gateway stop -g MyResourceGroup -n MyAppGateway-
Start the gatewayaz network application-gateway start -g MyResourceGroup -n MyAppGateway-
Move the gateway to another subnet in the same virtual network (stop first)az network application-gateway update -g <ResourceGroup> -n <ApplicationGatewayName> --set gatewayIpConfigurations[0].subnet.id=<subnetID>-
Enable HTTP/2 on listeners (then Set-AzApplicationGateway -ApplicationGateway $gw)-$gw.EnableHttp2 = $true
Set connection draining (add --connection-draining-timeout; 0 disables, 1 to 3,600 enables)az network application-gateway http-settings update-
Set the TCP idle timeout of the gateway's public IP (4 to 30 minutes; then Set-AzPublicIpAddress)-$publicIP.IdleTimeoutInMinutes = "15"
Probe response match for a custom probe-$match = New-AzApplicationGatewayProbeHealthResponseMatch -StatusCode 200-399

Exam Tips

Tick each tip once you can answer it without looking.

“Route /images and /video on one site to different server pools, or host several sites on one IP” → Application Gateway: path-based rule or multi-site listeners (layer 7). Trap: Load Balancer works at layer 4 and can't read URLs or host headers. Traffic Manager only answers DNS.

“A v1 gateway is still deployed” → v1 was retired on April 28, 2026: migrate to v2 (Standard_v2 or WAF_v2). Trap: You can't mix v1 and v2 on a subnet. v2 features (autoscale, zones, static VIP, Key Vault, rewrite) don't exist on v1.

“Unpredictable traffic; avoid sizing for peak” → Autoscaling with a minimum (0 to 100) and optional maximum. Trap: Manual mode (1 to 125 instances) can lose traffic when load exceeds capacity. Minimum 0 reserves no capacity, and a new instance takes about three to five minutes.

“What goes in the Application Gateway subnet, and how big?” → Only application gateways. v2: at least a /24 (up to 125 instances + 1 private frontend + 5 reserved). Trap: No other resource type fits in it, and you can't mix v1 and v2 gateways.

“NSG on the gateway subnet; backend health is unhealthy or the gateway fails to deploy” → Allow GatewayManager on TCP 65200-65535 (v2), allow AzureLoadBalancer and outbound to the internet. Trap: Don't override the AzureLoadBalancer tag or deny outbound with NSG rules. Forced tunneling with a 0.0.0.0/0 UDR to an appliance isn't supported on v2.

“Internal line-of-business app, no public exposure, on v2” → A private frontend IP (static address required), or a private-only deployment. Trap: One public and one private IP per IP protocol at most. The static or dynamic choice can't be changed later.

“Which health probe is used if you configure none?” → The default probe: 127.0.0.1, port and protocol from the backend setting, 30 s interval, 30 s timeout, threshold 3, healthy on 200-399. Trap: A custom probe applies only through its backend setting, accepts one probe per setting, and the body match isn't a regex.

“Servers need login and return 403 to probes, or have a wildcard certificate” → A custom probe with a status code match (403), or a probe host name for SNI. Trap: The default probe treats only 200 to 399 as healthy and uses 127.0.0.1 as host unless a host name is set in the backend setting.

“Several sites on one listener port; shop.contoso.com must win over *.contoso.com” → Multi-site listeners, and a lower priority number (1 to 20000) on the more specific rule. Trap: On v2, order is by rule priority, not by list position. Basic and wildcard listeners need a higher number. *.contoso.com doesn't match contoso.com.

“Redirect HTTP to HTTPS” → A redirection setting on a rule, with listener as the target (301 or another type). Trap: An external site target can't carry the original path. A basic-rule redirect is global; path-based redirects only a site area.

“Encrypt traffic all the way to the backend, with private CA certificates” → HTTPS listener + HTTPS backend setting + upload the trusted root certificate (.cer). Trap: TLS termination alone leaves the backend leg unencrypted. Public CA certs with a matching CN need no upload; v2 doesn't use authentication certificates.

“Certificate renewal without touching the gateway” → Key Vault certificate with a versionless secret identifier and a user-assigned managed identity (polled every four hours). Trap: Only v2, only software-validated exportable PFX, one managed identity per gateway. The portal doesn't support secrets or cross-subscription vaults.

“Minimum TLS version” → TLS 1.2 or higher since Aug 31, 2025. Choose a predefined or custom TLS policy; default on API version 2023-02-01 or later is minimum 1.2. Trap: The v2 TLS policy applies to the frontend only. SSL 2.0 and 3.0 are disabled and can't be enabled.

“Remove the port from X-Forwarded-For, add HSTS, or strip a server header” → A rewrite rule set (v2 only), tied to a routing rule. Trap: You can't delete the Host header or rewrite Connection and Upgrade. Several conditions use AND. A rule can have only one rewrite set.

“Choose a pool by a query-string value” → Rewrite the URL path with Re-evaluate path map on, attached to a path-based rule. Trap: Without re-evaluation the original path is matched against the path map.

“502 errors during backend updates or scale-in” → Enable connection draining in the backend setting (1 to 3,600 s) and raise the timeout above the longest client transfer. Trap: Draining off means 30 seconds. Gateway-managed session affinity requests still reach deregistering instances.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Load Balancer & Traffic ManagerFront Door →