Cloud service · Azure · Updated

Azure Application Gateway - Azure Application Gateway is a managed regional application delivery service that provides HTTP-aware load balancing, TLS termination, optional web application firewall protection, and TCP/TLS proxying.

In short

Azure Application Gateway routes incoming application traffic to healthy backends using listeners, routing rules, backend pools, and health probes. It runs as a dedicated deployment in an Azure virtual network and supports public or private application entry points, with autoscaling and availability-zone resilience on supported SKUs.

Cloud Services Hub →

10 key features of Azure Application Gateway

01
Hostname and URL-path routing

Host multiple applications on one gateway and direct requests to different backend pools using hostnames and path maps. For example, route /api/* to API servers and /images/* to an image service, with a default pool for unmatched paths.

02
TLS termination and backend encryption

Terminate client TLS at the gateway and optionally establish HTTPS connections to backends. Configure listener certificates, TLS policies, backend hostname validation, and certificate trust independently.

03
Web application firewall

WAF_v2 supports managed rules and custom rules for inspecting web requests, with detection and prevention modes. Use WAF Insights to investigate final request outcomes, attack patterns, and false positives through integrated logs and metrics dashboards.

04
Autoscaling and zone redundancy

Standard_v2 and WAF_v2 support autoscaling or fixed-capacity operation and can span availability zones in supported regions. Choose capacity boundaries and backend placement together so gateway resilience is not undermined by a single-zone application tier.

05
Health-based backend selection

Health probes determine which backend members can receive traffic. Configure custom probe paths, hostnames, intervals, and accepted responses to match application readiness rather than relying on a generic root-page check.

06
Redirects and request transformations

Redirect HTTP requests to HTTPS or send clients to another configured destination. Rewrite supported request and response headers, URL paths, and query strings to adapt application routing or enforce response-header requirements.

07
Session affinity and connection draining

Cookie-based affinity can keep a browser session on the same backend when an application depends on local session state. Connection draining gives existing requests and connections a configured period to finish when backend members are removed.

08
WebSocket and client-side HTTP/2 support

Proxy WebSocket connections for interactive applications and enable HTTP/2 on client-facing listeners. For the standard HTTP application gateway path, backend HTTP communication uses HTTP/1.1, so client HTTP/2 support does not imply end-to-end HTTP/2 or native gRPC support.

09
TCP and TLS proxying

Standard_v2 and WAF_v2 can proxy supported non-HTTP workloads using TCP or TLS listeners, including private-only deployments. Use Azure Load Balancer instead when the requirement is Layer 4 pass-through or UDP load balancing rather than a connection-terminating proxy.

10
Advanced routing and authentication previews

Preview advanced routing rules add conditions based on headers, query strings, client IP addresses, methods, and paths; preview advanced load balancing adds backend pool priorities, weights, and server-selection options. Centralized OpenID Connect user authentication and updated JWT validation are also preview capabilities that require separate compatibility and production-readiness assessment.

Where Azure Application Gateway is used

  1. 01
    Secure regional web application entry point

    Deploy WAF_v2 in front of a web application, redirect HTTP to HTTPS, and encrypt connections to private backends. Tune WAF rules against representative application traffic before enabling blocking.

  2. 02
    Shared gateway for multiple applications

    Use hostname-based listeners and separate backend pools to publish several applications through one gateway. Coordinate certificate ownership, routing-rule priorities, and change permissions because the gateway becomes shared infrastructure.

  3. 03
    Path-based application decomposition

    Route different URL prefixes to independently operated services while retaining a single public hostname. For example, direct /catalog/* to one service and /checkout/* to another during a gradual migration from a monolith.

  4. 04
    Kubernetes ingress

    Use Application Gateway Ingress Controller with Standard_v2 or WAF_v2 to translate Kubernetes Ingress resources into gateway configuration. Ensure the gateway can reach pod addresses and define clear ownership of controller-managed configuration.

  5. 05
    Private and hybrid application publishing

    Expose internal applications through a private frontend and forward traffic to Azure or on-premises backends over established private connectivity. Validate DNS, return routes, probe access, and backend firewall rules across the complete network path.

  6. 06
    Regional tier in a multi-region architecture

    Place a gateway in each application region and use a global routing service ahead of them. Keep backend health, TLS settings, origin restrictions, and failover testing consistent across regions.

How Azure Application Gateway is priced

Standard_v2 consumption-based pricing

Charges include a fixed gateway-hour component and a capacity-unit component. Capacity consumption reflects dimensions such as throughput, persistent connections, and compute usage; configured instance capacity can establish a billing floor, so low traffic does not necessarily mean negligible cost.

WAF_v2 consumption-based pricing

WAF_v2 uses fixed gateway-hour and capacity-unit charges at WAF_v2 rates. Estimate costs using representative traffic with WAF inspection enabled, because request complexity and inspection workload affect required capacity.

Associated service and network charges

Budget separately for resources such as public IP addresses, chargeable data transfer, diagnostic-log ingestion and retention, Key Vault operations, and any Front Door or DDoS Protection deployment. Regional rates and selected configurations determine the total architecture cost.

Services Azure Application Gateway works with

A common regional architecture places Application Gateway in a dedicated virtual-network subnet, with backend applications on private addresses in the same network or connected networks. App Service private endpoints and Kubernetes pod networks require working DNS resolution and routing from the gateway. Configure backend HTTPS settings and health probes alongside application hostname bindings to avoid healthy applications appearing unavailable.

Security integrations typically combine a WAF policy with centrally managed TLS certificates. Key Vault certificate-secret integration supports routine certificate lifecycle management, while Managed HSM keyless TLS addresses requirements to keep private keys inside an HSM boundary. Grant managed identities only the access required for the chosen certificate mechanism.

For Kubernetes, Application Gateway Ingress Controller translates Ingress resources into gateway configuration; teams should establish controller ownership before sharing a gateway. Azure Monitor and Log Analytics provide the operational view across access logs, WAF decisions, backend health, and capacity signals.

Multi-region applications can place Azure Front Door ahead of regional gateways. Align origin hostnames, TLS validation, health checks, and access restrictions across both layers. If both layers perform WAF inspection, assign clear policy responsibilities and test how exclusions, client-address handling, and diagnostic correlation behave end to end.

Azure Web Application Firewall

Associate WAF policies with a WAF_v2 gateway at supported gateway, listener, or path scopes to apply managed and custom rules. For example, protect a public checkout endpoint while applying a narrowly scoped exclusion for a legitimate application field. Use WAF Insights and firewall logs to investigate blocked requests before broadening exclusions.

Azure Key Vault

Use a user-assigned managed identity to let the gateway retrieve supported TLS certificate secrets from Key Vault; versionless secret references support certificate rotation. For example, rotate a public website certificate in Key Vault rather than uploading a replacement directly to every gateway. Keyless TLS with Key Vault Managed HSM is a distinct integration in which handshake signing occurs inside the HSM and the private key is not exported to the gateway.

Azure Kubernetes Service (AKS)

Application Gateway Ingress Controller watches Kubernetes Ingress resources and configures a Standard_v2 or WAF_v2 gateway to route traffic to application pods. For example, an Ingress can publish shop.example.com and send /api requests to the API workload. Validate pod-network reachability and avoid manually changing gateway objects owned by the controller.

App Service

Add an App Service application as a backend and configure HTTPS, hostname handling, and custom probes to match its bindings. For example, publish a customer-facing hostname through the gateway while reaching the web app through a private endpoint. Configure private DNS resolution and verify redirects and authentication callbacks use the intended external hostname.

Azure Monitor

Send gateway access logs and WAF logs through diagnostic settings to a Log Analytics workspace, and create Azure Monitor metric alerts. For example, alert on unhealthy backend counts and correlate an increase in 502 responses with backend health, request latency, and WAF outcomes. Set retention and collection choices deliberately to control observability costs.

Azure Front Door

Use Front Door for global HTTP routing and regional Application Gateways for virtual-network ingress and backend routing. For example, configure gateways in two regions as origins and test failover when one region becomes unhealthy. Restrict public gateway origin access using the appropriate Front Door backend network controls and validate the expected X-Azure-FDID value to prevent direct-origin bypass.

Azure Virtual Network

Deploy the gateway into a dedicated subnet and use virtual-network routing, peering, and DNS to reach backend services. For example, an internal gateway in a hub network can route to application servers in peered spoke networks. Check supported route configurations and required network security rules before forcing traffic through a network appliance.

API Management

Application Gateway can publish an internal API Management gateway as an HTTPS backend. Application Gateway handles public ingress and can inspect requests with its web application firewall, while API Management applies policies such as token validation and rate limits.

Azure Advisor

Application Gateway receives resource-specific recommendations in Azure Advisor, such as migrating a gateway from the v1 SKU to v2.

Azure Blob Storage

Application Gateway can archive access and firewall logs to Blob Storage through a diagnostic setting. It can also use a publicly reachable HTML file in Blob Storage as a custom error page.

Alternatives to Azure Application Gateway in other clouds

AWS

Elastic Load Balancing (ELB)Elastic Load Balancing (ELB)

AWS Elastic Load Balancing, through its Application Load Balancer (ALB), and Azure Application Gateway both route HTTP and HTTPS traffic to healthy backends and support autoscaling and TLS termination. ALB integrates with AWS WAF, while Azure Application Gateway provides web application firewall protection through its WAF_v2 tier.

Compare fact by fact
Azure Application GatewayElastic Load Balancing (ELB)
Web application firewallWAF_v2 tierAWS WAF integration
Capacity billing factorsThroughput, persistent conns, computeConnections, bytes, rule evaluations

What is Azure Application Gateway

2 min read

Azure Application Gateway provides a regional entry point for applications running on virtual machines, Kubernetes, Azure App Service, or other reachable endpoints. For HTTP workloads, it evaluates hostnames and URL paths to select a backend pool, then distributes requests among healthy backend members. Standard_v2 and WAF_v2 also support TCP and TLS proxying for non-HTTP applications; HTTP routing and WAF inspection do not apply to arbitrary TCP traffic.

A deployment consists of frontend IP configurations, listeners, routing rules, backend pools, backend settings, and health probes. A listener accepts connections on a configured frontend address and port. Its routing rule either forwards traffic to a backend pool, selects a pool through a path map, or returns a redirect. Backend settings define details such as the destination port, protocol, hostname handling, request timeout, and connection draining.

The gateway requires a dedicated subnet in a virtual network. Size that subnet for the intended deployment and scaling range, and validate network security groups, route tables, and DNS resolution before provisioning. Backends can reside in the same virtual network, peered networks, or connected on-premises environments, provided routing and firewall rules permit access. Public frontends serve internet-facing applications, while private frontends support internal applications.

For HTTPS applications, terminate TLS at the gateway and explicitly choose whether the backend connection uses HTTP or HTTPS. Backend HTTPS establishes a separate encrypted connection rather than preserving the original client TLS session. Configure the expected backend hostname, certificate trust, and probe hostname consistently. A backend that responds correctly to ordinary users can still fail gateway probes if its health endpoint requires authentication or expects a different host header.

Use WAF_v2 when application-layer request inspection is required. Introduce managed rules in detection mode, inspect the resulting logs, and tune narrowly scoped exclusions before switching to prevention mode. WAF is not a replacement for application authorization, secure coding, or network-level DDoS protection. Authentication and JWT validation capabilities announced for Application Gateway are preview features and should be evaluated separately from established routing and WAF controls.

For production deployments, configure availability-zone redundancy where supported and distribute backend instances across failure domains as well. Set an appropriate autoscaling minimum to maintain baseline capacity and a maximum that accommodates expected demand. Scaling is not instantaneous, so load-test realistic request sizes, TLS connection rates, and sustained traffic. Enable diagnostic logs, monitor unhealthy backend counts and failed requests, and configure connection draining for planned backend removal.

Application Gateway is regional rather than a global traffic-routing service. Multi-region designs commonly place Azure Front Door ahead of regional gateways. Application Gateway Ingress Controller can configure a gateway from Kubernetes Ingress resources; Application Gateway for Containers is a separate offering with its own resource model and capabilities. Application Gateway v1 retired on April 28, 2026, and remaining v1 deployments should be migrated to v2.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.