Networking Application delivery premium template-spec-upgraded field-manual-template-specs

Application Gateway

Application Gateway is the managed Azure service you place in front of web apps when routing needs more intelligence than a simple port balancer. It can look at the HTTP request, choose a backend by host name or URL path, terminate TLS, keep sessions sticky when needed, and integrate a web application firewall. For learners and operators, think of it as the regional web entry point that turns one public or private address into controlled traffic paths for several application backends.

Aliases
Azure Application Gateway, App Gateway, regional layer 7 load balancer, HTTP application load balancer
Difficulty
fundamentals
CLI mappings
4
Last verified
2026-06-02

Microsoft Learn

Application Gateway is an Azure web traffic load balancer for HTTP, HTTPS, and WebSocket applications. Microsoft Learn explains that it routes requests using attributes such as host names, URL paths, and headers, and supports TLS termination, autoscaling, and Web Application Firewall integration.

Microsoft Learn: What is Azure Application Gateway?2026-06-02

Technical context

Technically, Application Gateway sits in the networking and application-delivery layer inside a virtual network. It uses a frontend IP configuration, listeners, routing rules, backend pools, HTTP settings, probes, and optional WAF policy. It is scoped as an Azure resource in a resource group, but it consumes subnet space and forwards traffic to private or public origins such as VMs, VM scale sets, App Service, AKS ingress, or IP targets. It belongs to the control plane during configuration and the data path during request forwarding.

Why it matters

Application Gateway matters because many production outages are not caused by broken code; they come from bad listener rules, weak probes, expired certificates, or traffic sent to the wrong backend. It gives architects a regional place to control HTTP routing, TLS, and WAF behavior without pushing every decision into application code. It also lets operations teams move traffic between backends during migrations, blue-green releases, and incident response. When the gateway is designed well, users see stable hostnames and predictable routing while teams change servers behind the scenes. When it is misconfigured, one small rule can break every customer path that depends on that listener.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In the portal, Application Gateway appears with frontend IPs, listeners, rules, backend pools, probes, certificates, and WAF settings that define live request flow for each published site.

Signal 02

In CLI output, gateway JSON shows route associations, backend health references, SKU, zones, identity, and resource IDs needed for rollback, audit, evidence, or drift review.

Signal 03

In diagnostic logs, Application Gateway access, performance, firewall, and health events explain gateway errors, blocked requests, unhealthy backends, certificate failures, routing mismatches, and client impact.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Route one hostname to several web backends by URL path during modernization or microservice separation.
  • Terminate TLS and apply regional WAF protection before requests reach private application servers.
  • Publish private App Service, AKS ingress, or VM-hosted web workloads through one controlled regional entry point.
  • Run blue-green or staged migrations by changing rules and backend pools without asking users to change bookmarks.
  • Troubleshoot 502 and probe failures with a clear boundary between gateway routing and application health.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

City permit portal cutover

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A city planning department was moving a public permit portal from two aging IIS servers to App Service. The domain could not change because contractors had bookmarked deep permit paths for years.

Business/Technical Objectives
  • Keep the existing hostname and certificate during the migration.
  • Route legacy and modernized paths to different backends for four weeks.
  • Reduce support calls caused by intermittent 502 errors.
  • Keep inspection and access logs for every public request.
Solution Using Application Gateway

The platform team deployed Application Gateway v2 in a dedicated subnet with a public frontend, HTTPS listener, and a certificate from Key Vault. Path-based routing sent /legacy and document-download paths to the IIS VM backend pool while new application paths went to App Service through private endpoints. Health probes checked a real readiness endpoint rather than the web server root. Backend HTTP settings used re-encryption, and diagnostic logs were sent to Log Analytics. Azure CLI captured listeners, probes, rules, and backend health before each cutover window so release managers had clear evidence. When one document service failed readiness, only that backend pool drained while new permit submissions stayed online.

Results & Business Impact
  • Cutover completed with zero public hostname changes and no contractor retraining.
  • Weekly 502 support tickets dropped from 46 to 7 after probe redesign.
  • The team migrated eight URL paths over four releases without a full rollback.
  • Access and performance logs gave auditors a complete request record for the first month.
Key Takeaway for Glossary Readers

Application Gateway is valuable when teams need controlled regional HTTP routing while old and new backends coexist behind one trusted name.

Case study 02

Manufacturing supplier API isolation

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A manufacturing company exposed supplier APIs from AKS, but several suppliers needed fixed partner hostnames and strict TLS behavior. Direct ingress exposure made firewall and certificate operations inconsistent.

Business/Technical Objectives
  • Centralize TLS termination for five supplier hostnames.
  • Keep AKS ingress private and unreachable from the internet.
  • Separate routing for order, invoice, and shipment APIs.
  • Detect unhealthy API pods before suppliers saw failed submissions.
Solution Using Application Gateway

Architects placed Application Gateway in front of the private AKS ingress controller. Each supplier hostname received a dedicated HTTPS listener, while path rules separated order, invoice, and shipment APIs. The gateway re-encrypted traffic to ingress, and backend probes called lightweight readiness endpoints that checked the API and its message queue dependency. NSGs and private addressing prevented direct access to the ingress. WAF policy was attached for public paths, and Application Gateway logs were correlated with AKS ingress logs through request IDs. CLI runbooks listed backend health, listener bindings, and routing rules before monthly supplier onboarding changes.

Results & Business Impact
  • Direct internet exposure to AKS ingress was removed from all supplier paths.
  • Failed supplier submissions caused by unhealthy pods fell 63% after readiness probes were fixed.
  • Certificate renewals moved from five app teams to one platform runbook.
  • Partner onboarding time dropped from three days to one approved routing change.
Key Takeaway for Glossary Readers

Application Gateway gives platform teams a secure regional edge for AKS-hosted APIs without making every cluster ingress public.

Case study 03

University admissions traffic surge

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A university admissions system crashed every results day because static pages, application status checks, and payment callbacks all hit the same web tier. The team needed routing control before the next release.

Business/Technical Objectives
  • Separate static content, status APIs, and payment callback paths.
  • Absorb a threefold traffic spike without manual VM changes.
  • Identify whether failures came from the gateway or backend apps.
  • Keep payment callbacks available during student portal load.
Solution Using Application Gateway

The university deployed Application Gateway v2 with autoscaling and path-based routing. Static admissions pages routed to a storage-backed site, student status APIs routed to App Service, and payment callbacks routed to a small VM pool with stricter probes. The gateway listener used the existing admissions hostname and managed TLS. Diagnostic logs, failed request metrics, and backend health were added to a workbook for the command center. The team tested synthetic traffic and used CLI to export rule configuration before the event. When status API latency rose, the gateway still kept payment callbacks on their isolated backend pool.

Results & Business Impact
  • Peak results-day traffic reached 3.4 times normal volume without manual gateway scaling.
  • Payment callback success stayed at 99.96% during the busiest two-hour window.
  • Static page requests no longer consumed capacity on the status API tier.
  • Incident triage time fell from 70 minutes to 18 minutes using backend health evidence.
Key Takeaway for Glossary Readers

Application Gateway helps high-pressure web events succeed by separating critical paths and making backend health visible at the edge.

Why use Azure CLI for this?

With ten years of Azure engineering experience, I use Azure CLI for Application Gateway because gateway problems need exact evidence, not screenshots from several portal blades. CLI output can capture listeners, rules, probes, backend pools, certificates, frontend IPs, WAF policy links, and backend health in one repeatable workflow. That is crucial before changing TLS, routing, or health probes in production. CLI also helps compare staging and production, export JSON for change review, and run fast incident checks when users report 502 errors. Portal clicks are fine for learning, but repeatable gateway operations need command output that can be diffed, archived, and automated.

CLI use cases

  • Inventory listeners, rules, probes, backend pools, and WAF policy links before a production release.
  • Run backend health checks during incidents to identify failed pools, bad probes, or unreachable targets.
  • Export gateway JSON and compare staging against production before DNS or certificate changes.

Before you run CLI

  • Confirm tenant, subscription, resource group, gateway name, region, dedicated subnet, and whether the command reads or changes live routing.
  • Capture existing configuration before modifying listeners, probes, certificates, backend pools, WAF association, or frontend IP settings.
  • Check RBAC, certificate ownership, DNS timing, backend firewall rules, and possible customer impact before applying changes.

What output tells you

  • Listener and rule output shows which hostnames, ports, protocols, and path maps control traffic decisions.
  • Backend health output separates unreachable targets, failed probes, and unhealthy application responses from gateway configuration problems.
  • Frontend, SKU, autoscale, and WAF fields show capacity, exposure, protection mode, and operational risk before a change.

Mapped Azure CLI commands

Application Gateway CLI commands

direct
az network application-gateway show --name <application-gateway> --resource-group <resource-group>
az network application-gatewaydiscoverNetworking
az network application-gateway list --resource-group <resource-group> --output table
az network application-gatewaydiscoverNetworking
az network application-gateway show-backend-health --name <application-gateway> --resource-group <resource-group>
az network application-gatewaydiscoverNetworking
az network application-gateway http-listener list --gateway-name <application-gateway> --resource-group <resource-group>
az network application-gateway http-listenerdiscoverNetworking
az network application-gateway rule list --gateway-name <application-gateway> --resource-group <resource-group>
az network application-gateway rulediscoverNetworking
az network application-gateway probe list --gateway-name <application-gateway> --resource-group <resource-group>
az network application-gateway probediscoverNetworking

Architecture context

In architecture, Application Gateway usually represents the regional application edge for workloads that need Layer 7 routing but do not need a global edge service alone. It often sits behind Azure Front Door for global routing, or directly behind DNS for regional deployments. Backend pools may contain App Service private endpoints, AKS ingress controllers, virtual machines, or internal IPs. The subnet must be dedicated, sized for scale, and governed like any other network boundary. Architects decide whether TLS terminates at the gateway, passes through to backends, or is re-encrypted. They also decide how WAF policy, custom domains, private connectivity, diagnostic logs, and infrastructure-as-code ownership fit into release and incident runbooks.

Security

Security impact is direct because Application Gateway is often the first regional component that receives web traffic. Listener design controls which hostnames and protocols are accepted, while TLS policy, certificates, WAF mode, and backend authentication influence the attack surface. Restrict backend access so callers cannot bypass the gateway and hit VMs, App Service, or AKS ingress directly. Store certificates securely, rotate them before expiry, and limit who can modify routing rules or WAF policy. Diagnostic logs should capture blocked requests, backend status, and rule changes. Treat gateway administration as privileged because a routing edit can expose internal paths or disable protection.

Cost

Application Gateway cost comes from SKU, capacity units, running hours, data processed, WAF use, log ingestion, and operational effort. Underprovisioning can cause user-visible errors, while overprovisioning or leaving unused gateways running wastes budget. WAF policies and diagnostic logs add value but can raise Log Analytics spend when every request is retained without a purpose. Certificate and custom domain operations also have hidden labor cost if ownership is unclear. FinOps reviews should check active listeners, backend pools, traffic volume, autoscale limits, zone redundancy, and duplicate gateways created for old migrations. Good design avoids both fragile single-purpose gateways and oversized shared gateways no team owns.

Reliability

Reliability depends on healthy backend pools, meaningful probes, correct capacity, and safe rule changes. A probe that checks only a static page can mark an application healthy while its database path is broken, so probes should reflect readiness for real traffic. Autoscaling and zone-redundant v2 deployments improve resilience, but they do not protect against bad configuration. Planned changes should include route validation, certificate checks, WAF false-positive review, and rollback steps. Use separate listeners or rules to reduce blast radius during migrations. Monitor 502, 503, failed probe counts, capacity units, and backend response time so gateway issues are not confused with application bugs.

Performance

Performance is affected by gateway capacity, backend latency, TLS handling, WAF inspection, request size, keep-alive behavior, and routing design. Application Gateway can improve perceived performance by sending users to the right backend and absorbing TLS work, but it can also become a bottleneck if capacity units, autoscale limits, or backend probes are wrong. WAF custom rules and large managed rule sets add inspection overhead that must be tested under realistic traffic. Monitor throughput, current capacity units, failed requests, backend first byte time, and response status patterns. For latency-sensitive workloads, test from client regions, validate re-encryption settings, and avoid unnecessary hops between gateway and backend services.

Operations

Operators work with Application Gateway by checking backend health, reviewing probes, updating certificates, validating listener and rule mappings, tuning WAF policy, and comparing live configuration against Bicep or Terraform. Common runbook tasks include proving which backend receives a path, confirming that custom domains bind to the expected listener, and exporting configuration before a change. During incidents, operators correlate access logs, performance logs, firewall logs, metrics, and application logs. They also coordinate with DNS owners, certificate owners, network teams, and application teams. The best environments keep gateway changes in pipelines, require peer review, and record CLI evidence before and after production updates.

Common mistakes

  • Using a probe path that stays healthy while the real application dependency is failing.
  • Leaving backend endpoints publicly reachable, allowing users or attackers to bypass gateway routing and WAF controls.
  • Changing a shared listener or WAF policy without understanding every hostname and path that depends on it.